Public Member Functions | |
def | __init__ (self, globalTag, jetFlavour, doResidualJECs, jecPath, upToLevel=3, calculateSeparateCorrections=False, calculateType1METCorrection=False, type1METParams={ 'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True}) |
def | correct (self, jet, rho, delta=0, addCorr=False, addShifts=False, metShift=[0, 0], type1METCorr=[0, 0, 0]) |
def | correctAll (self, jets, rho, delta=0, addCorr=False, addShifts=False, metShift=[0., 0.], type1METCorr=[0., 0., 0.]) |
def | getCorrection (self, jet, rho, delta=0, corrector=None) |
def | rawP4forType1MET_ (self, jet) |
Definition at line 8 of file JetReCalibrator.py.
def JetReCalibrator.JetReCalibrator.__init__ | ( | self, | |
globalTag, | |||
jetFlavour, | |||
doResidualJECs, | |||
jecPath, | |||
upToLevel = 3 , |
|||
calculateSeparateCorrections = False , |
|||
calculateType1METCorrection = False , |
|||
type1METParams = {'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True} |
|||
) |
Create a corrector object that reads the payloads from the text dumps of a global tag under CMGTools/RootTools/data/jec (see the getJec.py there to make the dumps). It will apply the L1,L2,L3 and possibly the residual corrections to the jets. If configured to do so, it will also compute the type1 MET corrections.
Definition at line 9 of file JetReCalibrator.py.
def JetReCalibrator.JetReCalibrator.correct | ( | self, | |
jet, | |||
rho, | |||
delta = 0 , |
|||
addCorr = False , |
|||
addShifts = False , |
|||
metShift = [0,0] , |
|||
type1METCorr = [0,0,0] |
|||
) |
Corrects a jet energy (optionally shifting it also by delta times the JEC uncertainty) If addCorr, set jet.corr to the correction. If addShifts, set also the +1 and -1 jet shifts The metShift vector will accumulate the x and y changes to the MET from the JEC, i.e. the negative difference between the new and old jet momentum, for jets eligible for type1 MET corrections, and after subtracting muons. The pt cut is applied to the new corrected pt. This shift can be applied on top of the *OLD TYPE1 MET*, but only if there was no change in the L1 corrections nor in the definition of the type1 MET (e.g. jet pt cuts). The type1METCorr vector, will accumulate the x, y, sumEt type1 MET corrections, to be applied to the *RAW MET* (if the feature was turned on in the constructor of the class).
Definition at line 98 of file JetReCalibrator.py.
References JetReCalibrator.JetReCalibrator.calculateType1METCorr, CastorPulseContainmentCorrection.getCorrection(), HcalPulseContainmentCorrection.getCorrection(), AddCorrectionsToGenericMET.getCorrection(), FactorizedJetCorrector.getCorrection(), JetReCalibrator.JetReCalibrator.getCorrection(), JetCorrExtractorT< T >.getCorrection(), FactorizedJetCorrectorCalculator.getCorrection(), relativeConstraints.keys, JetReCalibrator.JetReCalibrator.rawP4forType1MET_(), JetReCalibrator.JetReCalibrator.separateJetCorrectors, JetReCalibrator.JetReCalibrator.type1METParams, and objects.JetAnalyzer.JetAnalyzer.type1METParams.
Referenced by KalmanMuonCorrector.KalmanMuonCorrector.correct_all(), and JetReCalibrator.JetReCalibrator.correctAll().
def JetReCalibrator.JetReCalibrator.correctAll | ( | self, | |
jets, | |||
rho, | |||
delta = 0 , |
|||
addCorr = False , |
|||
addShifts = False , |
|||
metShift = [0.,0.] , |
|||
type1METCorr = [0.,0.,0.] |
|||
) |
Applies 'correct' to all the jets, discard the ones that have bad corrections (corrected pt <= 0)
Definition at line 143 of file JetReCalibrator.py.
References ElectronCalibrator.Run2ElectronCalibrator.correct(), FFTJetCorrector< Jet, Adjustable >.correct(), FFTJetCorrectorSequence< Jet, InitialConverter, FinalConverter >.correct(), MomentumScaleCorrector.correct(), JetReCalibrator.JetReCalibrator.correct(), l1tpf_calo::SingleCaloClusterer.correct(), l1tpf_calo::SimpleCaloLinkerBase.correct(), and edm.print().
def JetReCalibrator.JetReCalibrator.getCorrection | ( | self, | |
jet, | |||
rho, | |||
delta = 0 , |
|||
corrector = None |
|||
) |
Definition at line 63 of file JetReCalibrator.py.
References JetReCalibrator.JetReCalibrator.JetCorrector, JetReCalibrator.JetReCalibrator.JetUncertainty, SiStripPI.max, and edm.print().
Referenced by JetReCalibrator.JetReCalibrator.correct().
def JetReCalibrator.JetReCalibrator.rawP4forType1MET_ | ( | self, | |
jet | |||
) |
Return the raw 4-vector, after subtracting the muons (if requested), or None if the jet fails the EMF cut.
Definition at line 84 of file JetReCalibrator.py.
References FastTimerService_cff.range, JetReCalibrator.JetReCalibrator.type1METParams, and objects.JetAnalyzer.JetAnalyzer.type1METParams.
Referenced by JetReCalibrator.JetReCalibrator.correct().
JetReCalibrator.JetReCalibrator.calculateType1METCorr |
Definition at line 19 of file JetReCalibrator.py.
Referenced by JetReCalibrator.JetReCalibrator.correct().
JetReCalibrator.JetReCalibrator.doResidualJECs |
Definition at line 16 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.globalTag |
Definition at line 14 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.jecPath |
Definition at line 17 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.JetCorrector |
Definition at line 35 of file JetReCalibrator.py.
Referenced by JetReCalibrator.JetReCalibrator.getCorrection().
JetReCalibrator.JetReCalibrator.jetFlavour |
Definition at line 15 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.JetUncertainty |
Definition at line 37 of file JetReCalibrator.py.
Referenced by JetReCalibrator.JetReCalibrator.getCorrection().
JetReCalibrator.JetReCalibrator.L1JetPar |
Definition at line 23 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.L2JetPar |
Definition at line 24 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.L3JetPar |
Definition at line 25 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.ResJetPar |
Definition at line 32 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.separateJetCorrectors |
Definition at line 43 of file JetReCalibrator.py.
Referenced by JetReCalibrator.JetReCalibrator.correct().
JetReCalibrator.JetReCalibrator.type1METParams |
Definition at line 20 of file JetReCalibrator.py.
Referenced by JetReCalibrator.JetReCalibrator.correct(), and JetReCalibrator.JetReCalibrator.rawP4forType1MET_().
JetReCalibrator.JetReCalibrator.upToLevel |
Definition at line 18 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.vPar |
Definition at line 26 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.vParL1 |
Definition at line 45 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.vParL2 |
Definition at line 49 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.vParL3 |
Definition at line 53 of file JetReCalibrator.py.
JetReCalibrator.JetReCalibrator.vParL3Res |
Definition at line 57 of file JetReCalibrator.py.