CMS 3D CMS Logo

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__ (self, cfg_ana, cfg_comp, looperName)
 
def beginLoop (self, setup)
 
def declareHandles (self)
 
def makeIsoTrack (self, event)
 

Public Attributes

 doIsoAnnulus
 
 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  def __init__(self, cfg_ana, cfg_comp, looperName ):
49  super(IsoTrackAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
51 
52  self.doIsoAnnulus = getattr(cfg_ana, 'doIsoAnnulus', False)
53 
54 
def __init__(self, cfg_ana, cfg_comp, looperName)

Member Function Documentation

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

Definition at line 63 of file IsoTrackAnalyzer.py.

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

Definition at line 58 of file IsoTrackAnalyzer.py.

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

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

Definition at line 74 of file IsoTrackAnalyzer.py.

References funct.abs(), ALCARECOTkAlJpsiMuMu_cff.charge, deltaR(), PVValHelper.eta, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, reco.if(), and genParticles_cff.map.

74  def makeIsoTrack(self, event):
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 p.fromPV() > 1 ) ]
83 
84  self.IsoTrackIsolationComputer.setPackedCandidates(patcands, 1, 9999, 9999.)
85 
86 
87  alltrack = map( IsoTrack, charged )
88 
89 
90  for track in alltrack:
91 
92  if ( abs(track.dz()) > self.cfg_ana.dzMax ): continue
93  if ( (abs(track.pdgId())!=11) and (abs(track.pdgId())!=13) and (track.pt() < self.cfg_ana.ptMin) ): continue
94  if ( track.pt() < self.cfg_ana.ptMinEMU ): continue
95 
96  foundNonIsoTrack = False
97 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.doIsoAnnulus
objects.IsoTrackAnalyzer.IsoTrackAnalyzer.IsoTrackIsolationComputer

Definition at line 50 of file IsoTrackAnalyzer.py.