Hello,
I was wondering if anyone can explain why the psudocode below would print two different values instead of the same values. Please note, this is rewritten psudo-code to illustrait my confusion, and would not work if ran.
TFile* Data_File = TFile::Open( "Example ");
TTree* Data_Tree = (TTree*)Data_File->Get("MyTree");
// First Version
TH1D *h1 = new TH1D("h1","h1", 50, -1, 1 );
Data_Tree -> Draw("my_Var>>h1", "(criteria1==1)&&(criteria2>=5) * weight" ,"goff");
cout<<h1->GetSumOfWeights()<<endl;
// Second version
TH1D *h2 = new TH1D("h2","h2", 50, -1, 1 );
Data_Tree -> Draw("my_Var>>h2", "(criteria1==1)*(criteria2>=5) * weight" ,"goff");
cout<<h2->GetSumOfWeights()<<endl;
delete h1; delete h2;
Noting that the difference is in the weights and criteria string, where i put && in the first and * in the second. When i call this for my application, i get two different results.
Thank you in advance!
Matt