I’ve a tree made of several branches. The branches contain Ion information such as Element Name, Atomic Number, Atomic Mass, etc. If I want to retrieve let say Atomic Mass given the Element Name and Atomic Number, how would I do that?
I’ve tried following method.
Double_t myMass(Int_t AA, Int_t AZ)
TFile *mrf = TFile::Open(“mass2003tree.root”);
mt->Draw(“M”, “A==AA && Z==AZ”, “goff”);
Here, AA=Atomic Number and AZ=Atomic Z.
This gives me following error after I load the file and type “myMass(11, 5)” for 11B mass:
Error in TTreeFormula::Compile: Bad numerical expression : “AA”
I’m not sure how I can pass a parameter in the selection whether it’s an integer, double, or string of characters?
Any help would be great.