61 : EBRecHitCollection_(ps.getParameter<
edm::
InputTag>(
"EBRecHitCollection")),
62 EERecHitCollection_(ps.getParameter<
edm::
InputTag>(
"EERecHitCollection")),
67 EBRecalibRecHitCollection_(ps.getParameter<
std::
string>(
"EBRecalibRecHitCollection")),
68 EERecalibRecHitCollection_(ps.getParameter<
std::
string>(
"EERecalibRecHitCollection")),
69 doEnergyScale_(ps.getParameter<
bool>(
"doEnergyScale")),
70 doIntercalib_(ps.getParameter<
bool>(
"doIntercalib")),
71 doLaserCorrections_(ps.getParameter<
bool>(
"doLaserCorrections")),
73 doEnergyScaleInverse_(ps.getParameter<
bool>(
"doEnergyScaleInverse")),
74 doIntercalibInverse_(ps.getParameter<
bool>(
"doIntercalibInverse")),
75 doLaserCorrectionsInverse_(ps.getParameter<
bool>(
"doLaserCorrectionsInverse")),
105 auto EBRecalibRecHits = std::make_unique<EBRecHitCollection>();
106 auto EERecalibRecHits = std::make_unique<EERecHitCollection>();
116 agc = pAgc.product();
132 agc_eb = 1.0 / agc_eb;
133 agc_ee = 1.0 / agc_ee;
144 if (icalit != icalMap.
end()) {
145 icalconst = (*icalit);
148 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
152 float lasercalib = 1;
161 icalconst = 1.0 / icalconst;
164 lasercalib = 1.0 / lasercalib;
167 EcalRecHit aHit((*it).id(), (*it).energy() * agc_eb * icalconst * lasercalib, (*it).time());
168 EBRecalibRecHits->push_back(aHit);
180 if (icalit != icalMap.
end()) {
181 icalconst = (*icalit);
184 <<
"! something wrong with EcalIntercalibConstants in your DB? ";
188 float lasercalib = 1;
194 icalconst = 1.0 / icalconst;
197 lasercalib = 1.0 / lasercalib;
201 EcalRecHit aHit((*it).id(), (*it).energy() * agc_ee * icalconst * lasercalib, (*it).time());
202 EERecalibRecHits->push_back(aHit);
206 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EB re-calibrated rechits: " << EBRecalibRecHits->size();
207 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_
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_
#define DEFINE_FWK_MODULE(type)
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