26 : EBRecHitCollection_(ps.getParameter<
edm::
InputTag>(
"EBRecHitCollection")),
27 EERecHitCollection_(ps.getParameter<
edm::
InputTag>(
"EERecHitCollection")),
32 EBRecalibRecHitCollection_(ps.getParameter<
std::
string>(
"EBRecalibRecHitCollection")),
33 EERecalibRecHitCollection_(ps.getParameter<
std::
string>(
"EERecalibRecHitCollection")),
34 doEnergyScale_(ps.getParameter<
bool>(
"doEnergyScale")),
35 doIntercalib_(ps.getParameter<
bool>(
"doIntercalib")),
36 doLaserCorrections_(ps.getParameter<
bool>(
"doLaserCorrections")),
38 doEnergyScaleInverse_(ps.getParameter<
bool>(
"doEnergyScaleInverse")),
39 doIntercalibInverse_(ps.getParameter<
bool>(
"doIntercalibInverse")),
40 doLaserCorrectionsInverse_(ps.getParameter<
bool>(
"doLaserCorrectionsInverse")),
70 auto EBRecalibRecHits = std::make_unique<EBRecHitCollection>();
71 auto EERecalibRecHits = std::make_unique<EERecHitCollection>();
97 agc_eb = 1.0 / agc_eb;
98 agc_ee = 1.0 / agc_ee;
109 if (icalit != icalMap.
end()) {
110 icalconst = (*icalit);
113 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
117 float lasercalib = 1;
126 icalconst = 1.0 / icalconst;
129 lasercalib = 1.0 / lasercalib;
132 EcalRecHit aHit((*it).id(), (*it).energy() * agc_eb * icalconst * lasercalib, (*it).time());
133 EBRecalibRecHits->push_back(aHit);
145 if (icalit != icalMap.
end()) {
146 icalconst = (*icalit);
149 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
153 float lasercalib = 1;
159 icalconst = 1.0 / icalconst;
162 lasercalib = 1.0 / lasercalib;
166 EcalRecHit aHit((*it).id(), (*it).energy() * agc_ee * icalconst * lasercalib, (*it).time());
167 EERecalibRecHits->push_back(aHit);
171 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EB re-calibrated rechits: " << EBRecalibRecHits->size();
172 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EE re-calibrated rechits: " << EERecalibRecHits->size();
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > ecalADCToGeVConstantToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::InputTag EERecHitCollection_
#define DEFINE_FWK_MODULE(type)
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
const bool doIntercalibInverse_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > ecalIntercalibConstantsToken_
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > ecalLaserDBServiceToken_
Log< level::Error, false > LogError
void produce(edm::StreamID sid, edm::Event &evt, const edm::EventSetup &es) const override
T const * product() const
edm::Timestamp time() const
const bool doEnergyScaleInverse_
float getLaserCorrection(DetId const &xid, edm::Timestamp const &iTime) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const_iterator find(uint32_t rawId) const
const bool doLaserCorrectionsInverse_
Log< level::Info, false > LogInfo
EcalRecalibRecHitProducer(const edm::ParameterSet &ps)
std::vector< Item >::const_iterator const_iterator
const bool doEnergyScale_
const edm::EDGetTokenT< EERecHitCollection > EERecHitToken_
const bool doLaserCorrections_
const std::string EERecalibRecHitCollection_
const edm::EDGetTokenT< EBRecHitCollection > EBRecHitToken_
const edm::InputTag EBRecHitCollection_
const self & getMap() const
const_iterator end() const
const std::string EBRecalibRecHitCollection_
float EcalIntercalibConstant