Changes in examples/Example7.C [b03c0d0:f8e61b2] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Example7.C
rb03c0d0 rf8e61b2 30 30 TClonesArray *branchElectron = treeReader->UseBranch("ElectronMedium"); 31 31 TClonesArray *branchWeight = treeReader->UseBranch("Weight"); 32 TClonesArray *branchEvent = treeReader->UseBranch("Event");33 32 34 33 // Book histograms … … 41 40 // Load selected branches with data from specified event 42 41 treeReader->ReadEntry(entry); 43 44 // main MC event weight 45 HepMCEvent *event = (HepMCEvent*) branchEvent -> At(0); 46 Double_t w = event->Weight; 47 48 // read lhe event weights 42 43 Double_t w =1.0; 44 // read MC event weight 49 45 if(branchWeight->GetEntries() > 0) 50 46 { 51 47 Weight *weight = (Weight*) branchWeight -> At(0); 52 Double_t lhe_weight = weight->Weight; 53 54 //cout<<lhe_weight<<endl; 55 // do stuff ... 48 w = weight->Weight; 56 49 } 57 50 58 51 // If event contains at least 1 jet 59 52 if(branchJet->GetEntries() > 0) … … 73 66 histJetPT->Fill(jet->PT, w); 74 67 } 68 75 69 76 70 // If event contains at least 1 jet
Note:
See TracChangeset
for help on using the changeset viewer.