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 47 of file IsoTrackAnalyzer.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 49 of file IsoTrackAnalyzer.py.

49  def __init__(self, cfg_ana, cfg_comp, looperName ):
50  super(IsoTrackAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
51  self.IsoTrackIsolationComputer = heppy.IsolationComputer()
52 
53  self.doIsoAnnulus = getattr(cfg_ana, 'doIsoAnnulus', False)
54 
55 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ beginLoop()

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

Definition at line 64 of file IsoTrackAnalyzer.py.

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

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

◆ declareHandles()

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  def declareHandles(self):
60  super(IsoTrackAnalyzer, self).declareHandles()
61  self.handles['met'] = AutoHandle( 'slimmedMETs', 'std::vector<pat::MET>' )
62  self.handles['packedCandidates'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>')
63 

◆ makeIsoTrack()

def objects.IsoTrackAnalyzer.IsoTrackAnalyzer.makeIsoTrack (   self,
  event 
)

Definition at line 75 of file IsoTrackAnalyzer.py.

References funct.abs(), analyzer.Analyzer.cfg_ana, ALCARECOTkAlJpsiMuMu_cff.charge, PbPb_ZMuSkimMuonDPG_cff.deltaR, PVValHelper.eta, core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets.if(), objects.IsoTrackAnalyzer.IsoTrackAnalyzer.IsoTrackIsolationComputer, and genParticles_cff.map.

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

Member Data Documentation

◆ doIsoAnnulus

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.doIsoAnnulus

◆ IsoTrackIsolationComputer

objects.IsoTrackAnalyzer.IsoTrackAnalyzer.IsoTrackIsolationComputer