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
RochesterCorrections.RochesterCorrections Class Reference
Inheritance diagram for RochesterCorrections.RochesterCorrections:

Public Member Functions

def __init__
 
def correct
 
def corrected_p4
 

Public Attributes

 cor
 
 cor2012
 

Detailed Description

Definition at line 7 of file RochesterCorrections.py.

Constructor & Destructor Documentation

def RochesterCorrections.RochesterCorrections.__init__ (   self)

Member Function Documentation

def RochesterCorrections.RochesterCorrections.correct (   self,
  particles,
  run 
)
Correct a list of particles.

The p4 of each particle will change

Definition at line 36 of file RochesterCorrections.py.

References RochesterCorrections.RochesterCorrections.corrected_p4().

36 
37  def correct( self, particles, run ):
38  '''Correct a list of particles.
39 
40  The p4 of each particle will change
41  '''
42  for ptc in particles:
43  corp4 = corrected_p4(ptc, run)
44  ptc.setP4( corp4 )
45 
def RochesterCorrections.RochesterCorrections.corrected_p4 (   self,
  particle,
  run 
)
Returns the corrected p4 for a particle.

The particle remains unchanged. 

Definition at line 13 of file RochesterCorrections.py.

Referenced by RochesterCorrections.RochesterCorrections.correct().

13 
14  def corrected_p4( self, particle, run ):
15  '''Returns the corrected p4 for a particle.
16 
17  The particle remains unchanged.
18  '''
19  ptc = particle
20  p4 = ptc.p4()
21  tlp4 = TLorentzVector( p4.px(), p4.py(), p4.pz(), p4.energy() )
22  cortlp4 = copy.copy(tlp4)
23  if run<100:
24  if is2012:
25  self.cor2012.momcor_mc( cortlp4, ptc.charge(), 0.0, 0 )
26  else:
27  self.cor.momcor_mc( cortlp4, ptc.charge(), 0.0, 0 )
28  else: # data
29  if is2012:
30  self.cor2012.momcor_data( cortlp4, ptc.charge(), 0.0, 0 )
31  else:
32  self.cor.momcor_data( cortlp4, ptc.charge(), 0.0, int(run>173692) )
33  corp4 = p4.__class__( cortlp4.Px(), cortlp4.Py(), cortlp4.Pz(), cortlp4.Energy() )
34  return corp4
35 

Member Data Documentation

RochesterCorrections.RochesterCorrections.cor

Definition at line 10 of file RochesterCorrections.py.

RochesterCorrections.RochesterCorrections.cor2012

Definition at line 11 of file RochesterCorrections.py.