9 from PhysicsTools.Heppy.analyzers.core.Analyzer
import Analyzer
10 from PhysicsTools.HeppyCore.framework.event
import Event
11 from PhysicsTools.HeppyCore.statistics.counter
import Counter, Counters
12 from PhysicsTools.Heppy.analyzers.core.AutoHandle
import AutoHandle
19 from PhysicsTools.Heppy.physicsobjects.PhysicsObjects
import Jet
22 from ROOT.heppy
import AlphaT
28 def __init__(self, cfg_ana, cfg_comp, looperName ):
29 super(AlphaTAnalyzer,self).
__init__(cfg_ana,cfg_comp,looperName)
34 self.handles[
'genJets'] = AutoHandle(
'slimmedGenJets',
'std::vector<reco::GenJet>')
37 super(AlphaTAnalyzer,self).
beginLoop(setup)
38 self.counters.addCounter(
'pairs')
39 count = self.counters.
counter(
'pairs')
40 count.register(
'all events')
49 px = ROOT.std.vector(
'double')()
50 py = ROOT.std.vector(
'double')()
51 et = ROOT.std.vector(
'double')()
55 px.push_back(jet.px())
56 py.push_back(jet.py())
57 et.push_back(jet.et())
60 return alphaTCalc.getAlphaT( et, px, py )
63 self.readCollections( event.input )
65 event.alphaT = self.
makeAlphaT(event.cleanJets)
68 if self.cfg_comp.isMC:
69 event.genAlphaT = self.
makeAlphaT(event.cleanGenJets)
def makeAlphaT(self, jets)
def beginLoop(self, setup)
def __init__(self, cfg_ana, cfg_comp, looperName)