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
PhotonCalibrator.Run2PhotonCalibrator Class Reference

Public Member Functions

def __init__
 
def correct
 

Public Attributes

 photonEnergyCalibratorRun2
 
 random
 

Detailed Description

Definition at line 5 of file PhotonCalibrator.py.

Constructor & Destructor Documentation

def PhotonCalibrator.Run2PhotonCalibrator.__init__ (   self,
  data,
  isMC,
  isSync = False 
)

Definition at line 6 of file PhotonCalibrator.py.

6 
7  def __init__(self, data, isMC, isSync=False):
8  self.random = ROOT.TRandom3()
9  self.random.SetSeed(0) # make it really random across different jobs
10  self.photonEnergyCalibratorRun2 = ROOT.PhotonEnergyCalibratorRun2(isMC, isSync, data)
11  self.photonEnergyCalibratorRun2.initPrivateRng(self.random)

Member Function Documentation

def PhotonCalibrator.Run2PhotonCalibrator.correct (   self,
  photon,
  run 
)

Definition at line 12 of file PhotonCalibrator.py.

12 
13  def correct(self,photon,run):
14  photon.uncalibratedP4 = photon.p4(photon.getCandidateP4type())
15  photon.uncalibratedP4Error = photon.getCorrectedEnergyError(photon.getCandidateP4type())
16  self.photonEnergyCalibratorRun2.calibrate(photon.physObj, int(run))
17  return True

Member Data Documentation

PhotonCalibrator.Run2PhotonCalibrator.photonEnergyCalibratorRun2

Definition at line 9 of file PhotonCalibrator.py.

PhotonCalibrator.Run2PhotonCalibrator.random

Definition at line 7 of file PhotonCalibrator.py.