How to store information event by event?

Dear Experts,
I am very beginner to solve this type of problem. So, I need help !
I have three trees in one root file(pion, kaon, dst). Inside that I am saving px,py,pz,E and event number.They have different entries. I want to store only those information which is coming from the same event.
Could you please suggest me how to do this ?

[
I have entry in dst tree(1762), pion(6104), kaon(6104). As they have different entries, so I cannot do any arithmetic operation(addition or subtraction). If I could store them inside a single tree means in an event where all(kaon, pion and dst) were generated. That might solve the problem.

Could you please give me some idea how to solve this problem ?

Thanks in Advance.

Regards
Souvik
]


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hello Souvik,

if you don’t have a database that tells you which pion belongs to which kaon etc, there is no way to do an analysis with separate trees.

What you need is indeed a tree where you fill the kaon, pion, dst entries into the same event. Instead of filling px, py, pz, E, create a single tree with several branches where you fill something like
pion_px, pion_py, pion_pz, pion_E, kaon_px, kaon_py, kaon_pz, kaon_E, ....

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.