CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
ElectronCalibrator.Run2ElectronCalibrator Class Reference

Public Member Functions

def __init__ (self, data, gbrForest, isMC, isSync=False)
 
def correct (self, electron, run)
 

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

Member Function Documentation

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

Definition at line 14 of file ElectronCalibrator.py.

References createfilelist.int.

Referenced by KalmanMuonCorrector.KalmanMuonCorrector.correct_all(), and JetReCalibrator.JetReCalibrator.correctAll().

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

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.