Dear experts,
I have a problem that is probably very easy to solve but I don’t know how to. I will appreciate if you can help me.
In my code, I make a TTree called “CharmoniumTree” and fill it after reading another TTree (saved as a root file). The CharmoniumTree is made and filled successfully. Now I would like to read values from my CharmoniumTree in the same code and do some calculations. The leaves of the Tree are vectors.
I get the entries in a loop using “CharmoniumTree->GetEntry(i);” command. Then I do the following, for example, “CharmoniumTree->PsiMass->at(0)” (at(0) is because the leaves has only one entry).
But I get the following error:
Error in TRint::HandleTermInput(): std::out_of_range caught: vector::_M_range_check
I know the problem is the way I try to read the branch “PsiMass” from the “CharmoniumTree” but I don’t know how to solve it.
Thanks for the help in advance
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided