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
ElectronCalibrator.Run2ElectronCalibrator Class Reference

Public Member Functions

def __init__
 
def correct
 

Public Attributes

 electronEnergyCalibratorRun2
 
 epCombinationTool
 
 random
 

Detailed Description

Definition at line 5 of file ElectronCalibrator.py.

Constructor & Destructor Documentation

def ElectronCalibrator.Run2ElectronCalibrator.__init__ (   self,
  data,
  gbrForest,
  isMC,
  isSync = False 
)

Definition at line 6 of file ElectronCalibrator.py.

6 
7  def __init__(self, data, gbrForest, isMC, isSync=False):
8  self.epCombinationTool = ROOT.EpCombinationTool()
9  self.epCombinationTool.init(os.path.expandvars(gbrForest[0]), gbrForest[1])
10  self.random = ROOT.TRandom3()
11  self.random.SetSeed(0) # make it really random across different jobs
12  self.electronEnergyCalibratorRun2 = ROOT.ElectronEnergyCalibratorRun2(self.epCombinationTool, isMC, isSync, data)
13  self.electronEnergyCalibratorRun2.initPrivateRng(self.random)

Member Function Documentation

def ElectronCalibrator.Run2ElectronCalibrator.correct (   self,
  electron,
  run 
)

Definition at line 14 of file ElectronCalibrator.py.

Referenced by KalmanMuonCorrector.KalmanMuonCorrector.correct_all().

14 
15  def correct(self,electron,run):
16  if not electron.validCandidateP4Kind(): return False # these can't be calibrated
17  electron.uncalibratedP4 = electron.p4()
18  electron.uncalibratedP4Error = electron.p4Error(electron.candidateP4Kind())
19  self.electronEnergyCalibratorRun2.calibrate(electron.physObj, int(run))
20  return True
21 

Member Data Documentation

ElectronCalibrator.Run2ElectronCalibrator.electronEnergyCalibratorRun2

Definition at line 11 of file ElectronCalibrator.py.

ElectronCalibrator.Run2ElectronCalibrator.epCombinationTool

Definition at line 7 of file ElectronCalibrator.py.

ElectronCalibrator.Run2ElectronCalibrator.random

Definition at line 9 of file ElectronCalibrator.py.