79 if ( pEBRecHits.isValid() ) {
82 LogDebug(
"EcalRecHitDebug") <<
"total # EB rechits to be re-calibrated: " <<
EBRecHits->size();
92 if ( pEERecHits.isValid() ) {
95 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits to be re-calibrated: " <<
EERecHits->size();
114 agc = pAgc.product();
116 agc_eb = float(agc->getEBValue());
117 agc_ee = float(agc->getEEValue());
124 ical = pIcal.product();
146 if( icalit!=icalMap.
end() ){
147 icalconst = (*icalit);
149 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EBDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? "
154 float lasercalib = 1;
156 lasercalib = pLaser->getLaserCorrection(
EBDetId(it->id()), evt.
time() );
163 icalconst = 1.0/icalconst;
166 lasercalib = 1.0/lasercalib;
169 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_eb * icalconst * lasercalib, (*it).time() );
170 EBRecalibRecHits->push_back( aHit );
185 if( icalit!=icalMap.
end() ) {
186 icalconst = (*icalit);
188 edm::LogError(
"EcalRecHitError") <<
"No intercalib const found for xtal " <<
EEDetId(it->id()) <<
"! something wrong with EcalIntercalibConstants in your DB? ";
192 float lasercalib = 1;
194 lasercalib = pLaser->getLaserCorrection(
EEDetId(it->id()), evt.
time() );
202 icalconst = 1.0/icalconst;
205 lasercalib = 1.0/lasercalib;
208 EcalRecHit aHit( (*it).id(), (*it).energy() * agc_ee * icalconst * lasercalib, (*it).time() );
209 EERecalibRecHits->push_back( aHit );
213 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EB re-calibrated rechits: " << EBRecalibRecHits->size();
214 LogInfo(
"EcalRecalibRecHitInfo") <<
"total # EE re-calibrated rechits: " << EERecalibRecHits->size();
T getParameter(std::string const &) const
std::string EERecalibRecHitCollection_
const self & getMap() const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHitAbsAlgo * EBalgo_
edm::InputTag EERecHitCollection_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool doIntercalibInverse_
std::string EBRecalibRecHitCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool doEnergyScaleInverse_
EcalRecHitAbsAlgo * EEalgo_
EcalRecalibRecHitProducer(const edm::ParameterSet &ps)
std::vector< Item >::const_iterator const_iterator
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
edm::InputTag EBRecHitCollection_
const_iterator find(uint32_t rawId) const
const_iterator end() const
edm::Timestamp time() const
bool doLaserCorrectionsInverse_
~EcalRecalibRecHitProducer()
float EcalIntercalibConstant