Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ECAL reconstructions to use different time calibration records - 131x #42868

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RecoLocalCalo/EcalRecProducers/plugins/EcalRecHitProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ void EcalRecHitProducer::fillDescriptions(edm::ConfigurationDescriptions& descri
desc.add<double>("EELaserMAX", 8.0);
desc.add<double>("logWarningEtThreshold_EB_FE", 50);
desc.add<bool>("recoverEEIsolatedChannels", false);
desc.add<edm::ESInputTag>("timeCalibTag", edm::ESInputTag());
desc.add<edm::ESInputTag>("timeOffsetTag", edm::ESInputTag());
desc.add<bool>("skipTimeCalib", false);
descriptions.add("ecalRecHit", desc);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Utilities/interface/ESInputTag.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalRecHitSimpleAlgo.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgo.h"
#include "RecoLocalCalo/EcalRecProducers/interface/EcalRecHitWorkerBaseClass.h"
Expand Down Expand Up @@ -84,8 +85,10 @@ EcalRecHitWorkerSimple::EcalRecHitWorkerSimple(const edm::ParameterSet& ps, edm:

icalToken_ = c.esConsumes<EcalIntercalibConstants, EcalIntercalibConstantsRcd>();
if (!skipTimeCalib_) {
itimeToken_ = c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>();
offtimeToken_ = c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>();
itimeToken_ = c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>(
ps.getParameter<edm::ESInputTag>("timeCalibTag"));
offtimeToken_ = c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>(
ps.getParameter<edm::ESInputTag>("timeOffsetTag"));
}
agcToken_ = c.esConsumes<EcalADCToGeVConstant, EcalADCToGeVConstantRcd>();
chStatusToken_ = c.esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/ESInputTag.h"
#include "HeterogeneousCore/CUDACore/interface/JobConfigurationGPURecord.h"
#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
#include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h"
Expand Down Expand Up @@ -70,6 +71,8 @@ void EcalUncalibRecHitProducerGPU::fillDescriptions(edm::ConfigurationDescriptio
desc.add<std::string>("recHitsLabelEB", "EcalUncalibRecHitsEB");
desc.add<std::string>("recHitsLabelEE", "EcalUncalibRecHitsEE");

desc.add<edm::ESInputTag>("timeCalibTag", edm::ESInputTag());
desc.add<edm::ESInputTag>("timeOffsetTag", edm::ESInputTag());
desc.add<double>("EBtimeFitLimits_Lower", 0.2);
desc.add<double>("EBtimeFitLimits_Upper", 1.4);
desc.add<double>("EEtimeFitLimits_Lower", 0.2);
Expand Down Expand Up @@ -104,9 +107,11 @@ EcalUncalibRecHitProducerGPU::EcalUncalibRecHitProducerGPU(const edm::ParameterS
pulseCovariancesToken_{esConsumes<EcalPulseCovariancesGPU, EcalPulseCovariancesRcd>()},
samplesCorrelationToken_{esConsumes<EcalSamplesCorrelationGPU, EcalSamplesCorrelationRcd>()},
timeBiasCorrectionsToken_{esConsumes<EcalTimeBiasCorrectionsGPU, EcalTimeBiasCorrectionsRcd>()},
timeCalibConstantsToken_{esConsumes<EcalTimeCalibConstantsGPU, EcalTimeCalibConstantsRcd>()},
timeCalibConstantsToken_{esConsumes<EcalTimeCalibConstantsGPU, EcalTimeCalibConstantsRcd>(
ps.getParameter<edm::ESInputTag>("timeCalibTag"))},
sampleMaskToken_{esConsumes<EcalSampleMask, EcalSampleMaskRcd>()},
timeOffsetConstantToken_{esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>()},
timeOffsetConstantToken_{esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>(
ps.getParameter<edm::ESInputTag>("timeOffsetTag"))},
multifitParametersToken_{esConsumes<EcalMultifitParametersGPU, JobConfigurationGPURecord>()} {
std::pair<double, double> EBtimeFitLimits, EEtimeFitLimits;
EBtimeFitLimits.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Utilities/interface/ESInputTag.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRatioMethodAlgo.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecChi2Algo.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecWeightsAlgo.h"
Expand Down Expand Up @@ -136,8 +137,10 @@ EcalUncalibRecHitWorkerGlobal::EcalUncalibRecHitWorkerGlobal(const edm::Paramete
testbeamEBShape(c),
tokenSampleMask_(c.esConsumes<EcalSampleMask, EcalSampleMaskRcd>()),
tokenTimeCorrBias_(c.esConsumes<EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd>()),
tokenItime_(c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>()),
tokenOfftime_(c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>()) {
tokenItime_(c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>(
ps.getParameter<edm::ESInputTag>("timeCalibTag"))),
tokenOfftime_(c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>(
ps.getParameter<edm::ESInputTag>("timeOffsetTag"))) {
// ratio method parameters
EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
Expand Down Expand Up @@ -577,6 +580,8 @@ edm::ParameterSetDescription EcalUncalibRecHitWorkerGlobal::getAlgoDescription()
edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
edm::ParameterDescription<edm::ESInputTag>("timeCalibTag", edm::ESInputTag(), true) and
edm::ParameterDescription<edm::ESInputTag>("timeOffsetTag", edm::ESInputTag(), true) and
edm::ParameterDescription<std::vector<double>>(
"EEtimeFitParameters",
{-2.390548, 3.553628, -17.62341, 67.67538, -133.213, 140.7432, -75.41106, 16.20277},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Utilities/interface/ESInputTag.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitMultiFitAlgo.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRatioMethodAlgo.h"
#include "RecoLocalCalo/EcalRecAlgos/interface/EcalUncalibRecHitRecChi2Algo.h"
Expand Down Expand Up @@ -216,8 +217,10 @@ EcalUncalibRecHitWorkerMultiFit::EcalUncalibRecHitWorkerMultiFit(const edm::Para
grpsToken_ = c.esConsumes<EcalWeightXtalGroups, EcalWeightXtalGroupsRcd>();
wgtsToken_ = c.esConsumes<EcalTBWeights, EcalTBWeightsRcd>();
timeCorrBiasToken_ = c.esConsumes<EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd>();
itimeToken_ = c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>();
offtimeToken_ = c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>();
itimeToken_ =
c.esConsumes<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd>(ps.getParameter<edm::ESInputTag>("timeCalibTag"));
offtimeToken_ = c.esConsumes<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd>(
ps.getParameter<edm::ESInputTag>("timeOffsetTag"));

// algorithm to be used for timing
auto const& timeAlgoName = ps.getParameter<std::string>("timealgo");
Expand Down Expand Up @@ -768,6 +771,8 @@ edm::ParameterSetDescription EcalUncalibRecHitWorkerMultiFit::getAlgoDescription
true) and
edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.890, 1.400}, true) and
edm::ParameterDescription<edm::ESInputTag>("timeCalibTag", edm::ESInputTag(), true) and
edm::ParameterDescription<edm::ESInputTag>("timeOffsetTag", edm::ESInputTag(), true) and
edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true) and
edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
Expand Down
4 changes: 4 additions & 0 deletions RecoLocalCalo/EcalRecProducers/python/ecalRecHit_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
EBLaserMAX = cms.double(3.0),
EELaserMAX = cms.double(8.0),

# to select timing conditions record
timeCalibTag = cms.ESInputTag('', ''),
timeOffsetTag = cms.ESInputTag('', ''),

# useful if time is not calculated, as at HLT
skipTimeCalib = cms.bool(False),

Expand Down