Changeset b03c0d0 in git for examples/Example7.C
- Timestamp:
- May 26, 2021, 4:46:34 PM (3 years ago)
- Branches:
- master
- Children:
- c1780a5
- Parents:
- db316cd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Example7.C
rdb316cd rb03c0d0 30 30 TClonesArray *branchElectron = treeReader->UseBranch("ElectronMedium"); 31 31 TClonesArray *branchWeight = treeReader->UseBranch("Weight"); 32 TClonesArray *branchEvent = treeReader->UseBranch("Event"); 32 33 33 34 // Book histograms … … 40 41 // Load selected branches with data from specified event 41 42 treeReader->ReadEntry(entry); 42 43 Double_t w =1.0; 44 // read MC event weight 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 45 49 if(branchWeight->GetEntries() > 0) 46 50 { 47 51 Weight *weight = (Weight*) branchWeight -> At(0); 48 w = weight->Weight; 52 Double_t lhe_weight = weight->Weight; 53 54 //cout<<lhe_weight<<endl; 55 // do stuff ... 49 56 } 50 57 51 58 // If event contains at least 1 jet 52 59 if(branchJet->GetEntries() > 0) … … 66 73 histJetPT->Fill(jet->PT, w); 67 74 } 68 69 75 70 76 // If event contains at least 1 jet
Note:
See TracChangeset
for help on using the changeset viewer.