This is an old revision of the document!
LoKi is a package for the simple and user-friendly data analysis, a page with some useful links can be found | here. Mostly, the Filters are used.
When using a python optionsfile, one can add several tools to the DecayTreeTuple that will store information in the final tuple. However, one can also add (LoKi) variables by hand. Add in your code (some of these things might already be in):
from Configurables import LoKi__Hybrid__TupleTool LoKiTool = LoKi__Hybrid__TupleTool( 'LoKiTool') ... myTuple.addTool(LoKiTool, name = 'LoKiTool') myTuple.ToolList = [ "LoKi::Hybrid::TupleTool/LoKiTool", other tools... ]
Now you have to define the variables (a dictionary in Python). Suppose you want to add the deposited energy of a MIP (minimum ionizing particle) in your calorimeter(Ecal, Hcal, Pre-shower). For this, do:
myTuple.LoKiTool.Variables = { "HcalE" : "PPINFO( LHCb.ProtoParticle.CaloHcalE , -10)", "EcalE" : "PPINFO( LHCb.ProtoParticle.CaloEcalE , -10)", "PrsE" : "PPINFO( LHCb.ProtoParticle.CaloPrsE , -10)" }
Notes:
__
!:
is just a LoKi particle functor, which can be found here. Don't forget: It's Python, not C++ (e.g. there aren't any ::
for namespaces).