CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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

 doIsoAnnulus
 
 IsoTrackIsolationComputer
 

Detailed Description

Definition at line 47 of file IsoTrackAnalyzer.py.

Constructor & Destructor Documentation

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

Definition at line 49 of file IsoTrackAnalyzer.py.

49 
50  def __init__(self, cfg_ana, cfg_comp, looperName ):
51  super(IsoTrackAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
53 
54  self.doIsoAnnulus = getattr(cfg_ana, 'doIsoAnnulus', False)
55 

Member Function Documentation

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

Definition at line 64 of file IsoTrackAnalyzer.py.

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

Definition at line 59 of file IsoTrackAnalyzer.py.

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

59 
60  def declareHandles(self):
61  super(IsoTrackAnalyzer, self).declareHandles()
62  self.handles['met'] = AutoHandle( 'slimmedMETs', 'std::vector<pat::MET>' )
63  self.handles['packedCandidates'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>')
def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.makeIsoTrack (   self,
  event 
)

Definition at line 75 of file IsoTrackAnalyzer.py.

References funct.abs(), RecoTauCleanerPlugins.charge, HLT_FULL_cff.deltaR, PVValHelper.eta, core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, and if().

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

Member Data Documentation

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.doIsoAnnulus

Definition at line 53 of file IsoTrackAnalyzer.py.

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.IsoTrackIsolationComputer

Definition at line 51 of file IsoTrackAnalyzer.py.