CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
objects.IsoTrackAnalyzer.IsoTrackAnalyzer Class Reference
Inheritance diagram for objects.IsoTrackAnalyzer.IsoTrackAnalyzer:

Public Member Functions

def __init__
 
def beginLoop
 
def declareHandles
 
def makeIsoTrack
 

Public Attributes

 IsoTrackIsolationComputer
 

Detailed Description

Definition at line 46 of file IsoTrackAnalyzer.py.

Constructor & Destructor Documentation

def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 48 of file IsoTrackAnalyzer.py.

48 
49  def __init__(self, cfg_ana, cfg_comp, looperName ):
50  super(IsoTrackAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
51  self.IsoTrackIsolationComputer = heppy.IsolationComputer(self.cfg_ana.isoDR)

Member Function Documentation

def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 60 of file IsoTrackAnalyzer.py.

60 
61  def beginLoop(self, setup):
62  super(IsoTrackAnalyzer,self).beginLoop(setup)
63  self.counters.addCounter('events')
64  count = self.counters.counter('events')
65  count.register('all events')
66  count.register('has >=1 selected Track')
67  count.register('has >=1 selected Iso Track')
def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.declareHandles (   self)

Definition at line 55 of file IsoTrackAnalyzer.py.

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

55 
56  def declareHandles(self):
57  super(IsoTrackAnalyzer, self).declareHandles()
58  self.handles['met'] = AutoHandle( 'slimmedMETs', 'std::vector<pat::MET>' )
59  self.handles['packedCandidates'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>')
def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.makeIsoTrack (   self,
  event 
)

Definition at line 71 of file IsoTrackAnalyzer.py.

References funct.abs(), RecoTauCleanerPlugins.charge, deltaR(), eta(), core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, if(), python.multivaluedict.map(), and phi.

71 
72  def makeIsoTrack(self, event):
73 
74 
75 
76  event.selectedIsoTrack = []
77  event.selectedIsoCleanTrack = []
78  #event.preIsoTrack = []
79 
80  patcands = self.handles['packedCandidates'].product()
81 
82  charged = [ p for p in patcands if ( p.charge() != 0 and abs(p.dz())<=self.cfg_ana.dzMax ) ]
83 
84  self.IsoTrackIsolationComputer.setPackedCandidates(patcands, -1, 0.1, True)
85 
86  alltrack = map( IsoTrack, charged )
87 
88 
89  for track in alltrack:
90 
91  if ( (abs(track.pdgId())!=11) and (abs(track.pdgId())!=13) and (track.pt() < self.cfg_ana.ptMin) ): continue
92  if ( track.pt() < self.cfg_ana.ptMinEMU ): continue
93 
94  foundNonIsoTrack = False
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.IsoTrackIsolationComputer

Definition at line 50 of file IsoTrackAnalyzer.py.