Changeset b03c0d0 in git for examples/Example7.py
- 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.py
rdb316cd rb03c0d0 33 33 34 34 # Get pointers to branches used in this analysis 35 branchJet = treeReader.UseBranch("JetPUPPITight")35 branchJet = treeReader.UseBranch("JetPUPPITight") 36 36 branchElectron = treeReader.UseBranch("ElectronMedium") 37 branchWeight = treeReader.UseBranch("Weight") 37 branchWeight = treeReader.UseBranch("Weight") 38 branchEvent = treeReader.UseBranch("Event") 38 39 39 40 # Book histograms … … 46 47 treeReader.ReadEntry(entry) 47 48 48 w = 1.0 49 ## read MC event weight 50 if branchWeight.GetEntries() > 0: 51 weight = branchWeight.At(0).Weight 49 ## main MC event weight 50 w = branchEvent[0].Weight 52 51 52 ## read lhe event weight 53 for weight in branchWeight: 54 lhe_weight = weight.Weight 55 ## do stuff ... 56 ## print lhe_weight 57 53 58 # If event contains at least 1 jet 54 59 if branchJet.GetEntries() > 0: … … 76 81 eta = abs(electron.Eta) 77 82 83 ## looseCut = 0.3, mediumCut = 0.2, tightCut = 0.1 78 84 IsoCut = 0.2 79 85 IsoOk = electron.IsolationVar < IsoCut
Note:
See TracChangeset
for help on using the changeset viewer.