This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
loki:loki [2009/02/21 13:41] – created decianm | loki:loki [2012/03/29 11:20] (current) – nchiap | ||
---|---|---|---|
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:// | + | LoKi is a package for the simple and user-friendly data analysis. Mostly the Filters are used. To get a list of available filter look at the [[loki:lists| referenc links]]. |
===== How to add a Variable in DecayTreeTuple ===== | ===== How to add a Variable in DecayTreeTuple ===== | ||
When using a python optionsfile, | When using a python optionsfile, | ||
Line 9: | Line 9: | ||
... | ... | ||
myTuple.addTool(LoKiTool, | myTuple.addTool(LoKiTool, | ||
- | Tuple.ToolList = [ | + | myTuple.ToolList = [ |
" | " | ||
other tools... | other tools... | ||
Line 16: | Line 16: | ||
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, | 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, | ||
< | < | ||
- | Tuple.LoKiTool.Variables = { | + | myTuple.LoKiTool.Variables = { |
" | " | ||
" | " | ||
Line 25: | Line 25: | ||
**Notes: | **Notes: | ||
* Mind the two '' | * Mind the two '' | ||
- | * The code on the right sido of the '':'' | + | * The code on the right side of the '':'' |
+ | ===== 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 '' | ||
+ | < | ||
+ | myTuple.LoKiTool.Variables = { | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | which will return 1 if the ISMUON returns '' |