CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ntupleDataFormat.SimHitMatchInfo Class Reference
Inheritance diagram for ntupleDataFormat.SimHitMatchInfo:
ntupleDataFormat._Object

Public Member Functions

def __getattr__ (self, attr)
 
def __init__ (self, tree, index, shindex, prefix)
 
def simHit (self)
 
- Public Member Functions inherited from ntupleDataFormat._Object
def __getattr__ (self, attr)
 
def __init__ (self, tree, index, prefix)
 
def index (self)
 
def isValid (self)
 

Private Attributes

 _shindex
 

Detailed Description

Class representing a match to a SimHit.

The point of this class is to provide, in addition to the matched
SimHit, also other information about the match (e.g. fraction of
charge from this SimHit).

Definition at line 548 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

◆ __init__()

def ntupleDataFormat.SimHitMatchInfo.__init__ (   self,
  tree,
  index,
  shindex,
  prefix 
)
Constructor.

Arguments:
tree    -- TTree object
index   -- Index of the hit matched to SimHit
shindex -- Index of the SimHit match (second index in _simHitIdx branch)
prefix  -- String for prefix of the object (track/seed/hit) matched to TrackingParticle

Definition at line 555 of file ntupleDataFormat.py.

555  def __init__(self, tree, index, shindex, prefix):
556  """Constructor.
557 
558  Arguments:
559  tree -- TTree object
560  index -- Index of the hit matched to SimHit
561  shindex -- Index of the SimHit match (second index in _simHitIdx branch)
562  prefix -- String for prefix of the object (track/seed/hit) matched to TrackingParticle
563  """
564  super(SimHitMatchInfo, self).__init__(tree, index, prefix)
565  self._shindex = shindex
566 
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

◆ __getattr__()

def ntupleDataFormat.SimHitMatchInfo.__getattr__ (   self,
  attr 
)
Custom __getattr__ because of the second index needed to access the branch.

Definition at line 567 of file ntupleDataFormat.py.

References ntupleDataFormat.SimHitMatchInfo._shindex.

567  def __getattr__(self, attr):
568  """Custom __getattr__ because of the second index needed to access the branch."""
569  val = super(SimHitMatchInfo, self).__getattr__(attr)()[self._shindex]
570  return lambda: val
571 

◆ simHit()

def ntupleDataFormat.SimHitMatchInfo.simHit (   self)

Member Data Documentation

◆ _shindex

ntupleDataFormat.SimHitMatchInfo._shindex
private