User Tools

Site Tools


loki:loki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
loki:loki [2009/02/21 13:42] decianmloki:loki [2009/07/25 14:23] decianm
Line 1: Line 1:
 ===== LoKi ===== ===== LoKi =====
 ===== Idea ===== ===== Idea =====
-LoKi is a package for the simple and user-friendly data analysis, a page with some useful links can be found [[https://twiki.cern.ch/twiki/bin/view/LHCb/LoKi || here]]. Mostly, the Filters are used.+LoKi is a package for the simple and user-friendly data analysis, a page with some useful links can be found [[https://twiki.cern.ch/twiki/bin/view/LHCb/LoKi | here]]. Mostly, the Filters are used.
 ===== How to add a Variable in DecayTreeTuple ===== ===== How to add a Variable in DecayTreeTuple =====
 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): 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):
Line 25: Line 25:
 **Notes:**  **Notes:** 
   * Mind the two ''__''!   * Mind the two ''__''!
-  * The code on the right sido of the '':'' is just a LoKi particle functor, which can be found [[ https://twiki.cern.ch/twiki/bin/view/LHCb/LoKiParticleFunctions | here]]. Don't forget: It's Python, not C++ (e.g. there aren't any ''::'' for namespaces).+  * The code on the right side of the '':'' is just a LoKi particle function, which can be found [[ https://twiki.cern.ch/twiki/bin/view/LHCb/LoKiParticleFunctions | here]]. Don't forget: It's Python, not C++ (e.g. there aren't any ''::'' for namespaces)
 +===== Adding bool Variables ===== 
 +If your particle function returns a bool value, you first have to convert it in order to store it in a tuple. This can be done with the ''switch''-function, e.g., 
 +<code> 
 +myTuple.LoKiTool.Variables = { 
 +    "IsMuon" : "switch(ISMUON,1,0)", 
 +   } 
 +</code> 
 +which will return 1 if the ISMUON returns ''true'' and 0 otherwise.
loki/loki.txt · Last modified: 2012/03/29 11:20 by nchiap