Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Mar 3, 2018
1 parent 4eb0868 commit 18f1b15
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion advanced-bender/fill.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,32 @@ All of them are (well) documented and one can easily inspect them:
import BenderTools.Fill
from Bender.Main import Algo
help(Algo.treatPions)
```
```
Also all these methods print detailed how-to infomratino in log-file at the moment of the first invoke, and it vasn be very helpful to understand the branches in n-tuple/tree.
The typical usage of these methods is:
```python
tup = self.nTuple('MyTuple')
for p in particles :

psi = p(1) ## the first daughter: J/psi

## fill few kinematic variables for the particles:
self.treatKine ( tup , p , '_b' ) ## use the suffix to mark variables
self.treatKine ( tup , psi , '_psi' ) ## use the suffix to mark variables

self.treatKaons ( tup , p ) ## fill some basic information for all kaons
self.treatMuons ( tup , p ) ## fill some basic information for all muons
self.treatTracks ( tup , p ) ## fill some basic information for all charged tracks

tup.write()
```
{% challenge "Challenge" %}
1. Add (some of) these functions into your previous Bender module with n-tuples.
2. Run it and observe the detailed printout in log-file
3. Observe new variables in your n-tuple/tree
{% solution "Solution" %}
The complete module is accessible [here] (https://gist.github.com/VanyaBelyaev/becc26fe5dea90aa96cb8f929faf6a53)
{% endchallenge %}



0 comments on commit 18f1b15

Please sign in to comment.