12 from PhysicsTools.NanoAODTools.postprocessing.framework.datamodel
import Collection
15 ROOT.PyConfig.IgnoreCommandLineOptions =
True 29 def beginFile(self, inputFile, outputFile, inputTree, wrappedOutputTree):
30 self.
out = wrappedOutputTree
33 def endFile(self, inputFile, outputFile, inputTree, wrappedOutputTree):
37 """process event, return True (go to next module) or False (fail, go to next event)""" 38 electrons = Collection(event,
"Electron")
39 muons = Collection(event,
"Muon")
40 jets = Collection(event,
"Jet")
41 eventSum = ROOT.TLorentzVector()
46 for j
in filter(self.jetSel, jets):
48 self.out.fillBranch(
"EventMass", eventSum.M())
def __init__(self, jetSelection)
def beginFile(self, inputFile, outputFile, inputTree, wrappedOutputTree)
def endFile(self, inputFile, outputFile, inputTree, wrappedOutputTree)