Hello all,
I am filling the branch only 622 times while the entries in the leaf showing value 194375. I could not understand it why? When I do tree->Print(); even then it is showing 622 entries corresponding to each branches.
I am filling branches like
TClonesArray *Llep0 = new TClonesArray("TLorentzVector");
TClonesArray &aLlep0 = *Llep0;
new(aLlep0[BKGnumber]) TLorentzVector(bkgReader.at(0), //PG px
bkgReader.at(1), //PG py
bkgReader.at(2), //PG pz
bkgReader.at(3) //PG E
);
You can have a look at tree at the link bit.ly/14s6nD0 .
Next Problem: When I am trying to access the leaf from the tree then I am getting the segmentation fault. at the last line of
[code] TFile *lhe = new TFile(“lhe.root”, “READ”);
if (!(lhe && lhe->IsOpen())) { delete lhe; return -1; }
TTree *tree;
lhe->GetObject(“tree”, tree);
if (!tree) { delete lhe; return -2; }
tree->SetMakeClass(1); // all branches in decomposed object mode
tree->SetBranchStatus("*", 0); // disable all branches
Int_t Llep0_ = -1;
tree->SetBranchStatus(“Llep0”, 1); // activate “Llep0”
tree->SetBranchAddress(“Llep0”, &Llep0_);
[/code]
The code that I was using for it is Analyze_LHE.C (1.22 KB). Please suggest what may be I am doing wrong.
Thanks & regards,
Ram Krishna