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

◆ __init__()

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, 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)
Definition: init.py:1

Member Function Documentation

◆ correct()

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

Definition at line 14 of file ElectronCalibrator.py.

References ElectronCalibrator.Run2ElectronCalibrator.electronEnergyCalibratorRun2, and 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

◆ electronEnergyCalibratorRun2

ElectronCalibrator.Run2ElectronCalibrator.electronEnergyCalibratorRun2

◆ epCombinationTool

ElectronCalibrator.Run2ElectronCalibrator.epCombinationTool

Definition at line 7 of file ElectronCalibrator.py.

◆ random

ElectronCalibrator.Run2ElectronCalibrator.random

Definition at line 9 of file ElectronCalibrator.py.