Description: Applies calibrations to reco::calojets
INPUT PARAMETERS ***
inputCollectionTag, InputTag, collection of reco calojet to calibrate
absEtaBinning, vdouble with eta bins, allows for non-homogeneous binning
calibration, VPSet with calibration factors
outputCollectionName, string, output collection tag name
Definition at line 43 of file Phase1L1TJetCalibrator.cc.
Definition at line 100 of file Phase1L1TJetCalibrator.cc.
104 auto calibratedCollectionPtr = std::make_unique<std::vector<reco::CaloJet>>();
115 calibratedCollectionPtr->reserve(inputCollectionHandle->size());
117 for (
const auto& candidate : *inputCollectionHandle) {
119 float pt = candidate.pt();
120 float eta = candidate.eta();
139 candidateP4.SetPt(candidateP4.pt() * l1tCalibrationFactor);
140 calibratedCollectionPtr->emplace_back(candidate);
141 calibratedCollectionPtr->back().setP4(candidateP4);
144 if (newCandidate->pt() < 0) {
145 LogDebug(
"Phase1L1TJetCalibrator") <<
"######################" << std::endl;
146 LogDebug(
"Phase1L1TJetCalibrator") <<
"PRE-CALIBRATION " << std::endl;
147 LogDebug(
"Phase1L1TJetCalibrator") <<
"\t Jet properties (pt, eta, phi, pile-up): " << candidate.pt() <<
"\t"
148 << candidate.eta() <<
"\t" LogDebug(
"Phase1L1TJetCalibrator")
149 << candidate.phi() <<
"\t" << candidate.pileup() << std::endl;
150 LogDebug(
"Phase1L1TJetCalibrator") <<
"CALIBRATION " << std::endl;
151 LogDebug(
"Phase1L1TJetCalibrator") <<
"\t Using eta - pt - factor " << *
etaBin <<
" - " << *
ptBin <<
" - "
152 << l1tCalibrationFactor
LogDebug(
"Phase1L1TJetCalibrator") << std::endl;
153 LogDebug(
"Phase1L1TJetCalibrator") <<
"POST-CALIBRATION " << std::endl;
154 LogDebug(
"Phase1L1TJetCalibrator") <<
"\t Jet properties (pt, eta, phi, pile-up): " << newCandidate->pt() <<
"\t"
155 << newCandidate->eta() <<
"\t" << newCandidate->phi() <<
"\t"
156 << newCandidate->pileup() << std::endl;
162 std::sort(calibratedCollectionPtr->begin(),
163 calibratedCollectionPtr->end(),
References _jetCalibrationFactorsPtBins, absEtaBinning_, PVValHelper::eta, etaBin(), iEvent, inputCollectionTag_, jetCalibrationFactorsBinnedInEta_, Phase1L1TJetCalibrator_9x9Jets_cfi::l1tCalibrationFactors, Phase1L1TJetCalibrator_9x9Jets_cfi::l1tPtBins, LogDebug, eostools::move(), outputCollectionName_, DiDispStaMuonMonitor_cfi::pt, reco::LeafCandidate::pt(), muonRecoAnalyzer_cfi::ptBin, jetUpdater_cfi::sort, and pfDeepBoostedJetPreprocessParams_cfi::upper_bound.