CMS 3D CMS Logo

List of all members | Public Member Functions
AlphaTAnalyzer.AlphaTAnalyzer Class Reference
Inheritance diagram for AlphaTAnalyzer.AlphaTAnalyzer:

Public Member Functions

def __init__ (self, cfg_ana, cfg_comp, looperName)
 
def beginLoop (self, setup)
 
def declareHandles (self)
 
def makeAlphaT (self, jets)
 
def process (self, event)
 

Detailed Description

Definition at line 27 of file AlphaTAnalyzer.py.

Constructor & Destructor Documentation

◆ __init__()

def AlphaTAnalyzer.AlphaTAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 28 of file AlphaTAnalyzer.py.

28  def __init__(self, cfg_ana, cfg_comp, looperName ):
29  super(AlphaTAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
30 

Member Function Documentation

◆ beginLoop()

def AlphaTAnalyzer.AlphaTAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 36 of file AlphaTAnalyzer.py.

36  def beginLoop(self,setup):
37  super(AlphaTAnalyzer,self).beginLoop(setup)
38  self.counters.addCounter('pairs')
39  count = self.counters.counter('pairs')
40  count.register('all events')
41 
42 

References CSCSPEvent.counters(), cms::cuda::AtomicPairCounter::Atomic2.counters, NMaxPerLumi.counters, analyzer.Analyzer.counters, HistogramManager.counters, counter.Counters.counters, and cscdqm::ChamberCounterKeyType.counters.

◆ declareHandles()

def AlphaTAnalyzer.AlphaTAnalyzer.declareHandles (   self)

Definition at line 31 of file AlphaTAnalyzer.py.

31  def declareHandles(self):
32  super(AlphaTAnalyzer, self).declareHandles()
33  #genJets
34  self.handles['genJets'] = AutoHandle( 'slimmedGenJets','std::vector<reco::GenJet>')
35 

References core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, and HTTP.RequestManager.handles.

◆ makeAlphaT()

def AlphaTAnalyzer.AlphaTAnalyzer.makeAlphaT (   self,
  jets 
)

Definition at line 44 of file AlphaTAnalyzer.py.

44  def makeAlphaT(self, jets):
45 
46  if len(jets) == 0:
47  return 0.
48 
49  px = ROOT.std.vector('double')()
50  py = ROOT.std.vector('double')()
51  et = ROOT.std.vector('double')()
52 
53  #Make alphaT from lead 10 jets
54  for jet in jets[:10]:
55  px.push_back(jet.px())
56  py.push_back(jet.py())
57  et.push_back(jet.et())
58 
59  alphaTCalc = AlphaT()
60  return alphaTCalc.getAlphaT( et, px, py )
61 

Referenced by AlphaTAnalyzer.AlphaTAnalyzer.process().

◆ process()

def AlphaTAnalyzer.AlphaTAnalyzer.process (   self,
  event 
)

Definition at line 62 of file AlphaTAnalyzer.py.

62  def process(self, event):
63  self.readCollections( event.input )
64 
65  event.alphaT = self.makeAlphaT(event.cleanJets)
66 
67  #Do the same with gen jets for MC
68  if self.cfg_comp.isMC:
69  event.genAlphaT = self.makeAlphaT(event.cleanGenJets)
70 
71  return True

References analyzer.Analyzer.cfg_comp, looper.Looper.cfg_comp, AlphaTAnalyzer.AlphaTAnalyzer.makeAlphaT(), and core.Analyzer.Analyzer.readCollections().

counter
Definition: counter.py:1
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
AlphaT
Definition: AlphaT.h:8