27 DataMixingHcalWorker::DataMixingHcalWorker() {sel_=0;}
31 label_(ps.getParameter<std::string>(
"Label"))
77 LogInfo(
"DataMixingHcalWorker")<<
"===============> adding MC signals for "<<e.
id();
86 HBHERecHits = pHBHERecHits.
product();
87 LogDebug(
"DataMixingHcalWorker") <<
"total # HBHE rechits: " << HBHERecHits->
size();
95 it != HBHERecHits->
end(); ++it) {
100 LogDebug(
"DataMixingHcalWorker") <<
"processed HBHERecHit with rawId: "
102 <<
" rechit energy: " << it->energy();
115 HORecHits = pHORecHits.
product();
117 LogDebug(
"DataMixingHcalWorker") <<
"total # HO rechits: " << HORecHits->
size();
126 it != HORecHits->
end(); ++it) {
131 LogDebug(
"DataMixingHcalWorker") <<
"processed HORecHit with rawId: "
133 <<
" rechit energy: " << it->energy();
146 HFRecHits = pHFRecHits.
product();
148 LogDebug(
"DataMixingHcalWorker") <<
"total # HF rechits: " << HFRecHits->
size();
157 it != HFRecHits->
end(); ++it) {
162 LogDebug(
"DataMixingHcalWorker") <<
"processed HFRecHit with rawId: "
164 <<
" rechit energy: " << it->energy();
177 ZDCRecHits = pZDCRecHits.
product();
179 LogDebug(
"DataMixingHcalWorker") <<
"total # ZDC rechits: " << ZDCRecHits->
size();
188 it != ZDCRecHits->
end(); ++it) {
193 LogDebug(
"DataMixingHcalWorker") <<
"processed ZDCRecHit with rawId: "
195 <<
" rechit energy: " << it->energy();
205 LogDebug(
"DataMixingHcalWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
211 boost::shared_ptr<Wrapper<HBHERecHitCollection>
const> HBHERecHitsPTR =
214 if(HBHERecHitsPTR ) {
218 LogDebug(
"DataMixingEMWorker") <<
"total # HBHE rechits: " << HBHERecHits->
size();
222 it != HBHERecHits->
end(); ++it) {
227 LogDebug(
"DataMixingEMWorker") <<
"processed HBHERecHit with rawId: "
228 << it->id().rawId() <<
"\n"
229 <<
" rechit energy: " << it->energy();
236 boost::shared_ptr<Wrapper<HORecHitCollection>
const> HORecHitsPTR =
243 LogDebug(
"DataMixingEMWorker") <<
"total # HO rechits: " << HORecHits->
size();
247 it != HORecHits->
end(); ++it) {
252 LogDebug(
"DataMixingEMWorker") <<
"processed HORecHit with rawId: "
253 << it->id().rawId() <<
"\n"
254 <<
" rechit energy: " << it->energy();
261 boost::shared_ptr<Wrapper<HFRecHitCollection>
const> HFRecHitsPTR =
268 LogDebug(
"DataMixingEMWorker") <<
"total # HF rechits: " << HFRecHits->
size();
272 it != HFRecHits->
end(); ++it) {
277 LogDebug(
"DataMixingEMWorker") <<
"processed HFRecHit with rawId: "
278 << it->id().rawId() <<
"\n"
279 <<
" rechit energy: " << it->energy();
286 boost::shared_ptr<Wrapper<ZDCRecHitCollection>
const> ZDCRecHitsPTR =
293 LogDebug(
"DataMixingEMWorker") <<
"total # ZDC rechits: " << ZDCRecHits->
size();
297 it != ZDCRecHits->
end(); ++it) {
302 LogDebug(
"DataMixingEMWorker") <<
"processed ZDCRecHit with rawId: "
303 << it->id().rawId() <<
"\n"
304 <<
" rechit energy: " << it->energy();
328 HBHERecHitMap::const_iterator iHBchk;
333 currentID = iHB->first;
335 if (currentID == formerID) {
337 ESum+=(iHB->second).
energy();
344 HBHErechits->push_back( aHit );
347 formerID = currentID;
348 ESum = (iHB->second).
energy();
349 HBTime = (iHB->second).
time();
355 HBHErechits->push_back( aHit );
366 HORecHitMap::const_iterator iHOchk;
371 currentID = iHO->first;
373 if (currentID == formerID) {
375 ESum+=(iHO->second).
energy();
381 HORecHit aHit(formerID, ESum, HOTime);
382 HOrechits->push_back( aHit );
385 formerID = currentID;
386 ESum = (iHO->second).
energy();
387 HOTime = (iHO->second).
time();
392 HORecHit aHit(formerID, ESum, HOTime);
393 HOrechits->push_back( aHit );
406 HFRecHitMap::const_iterator iHFchk;
411 currentID = iHF->first;
413 if (currentID == formerID) {
415 ESum+=(iHF->second).
energy();
421 HFRecHit aHit(formerID, ESum, HFTime);
422 HFrechits->push_back( aHit );
425 formerID = currentID;
426 ESum = (iHF->second).
energy();
427 HFTime = (iHF->second).
time();
432 HFRecHit aHit(formerID, ESum, HBTime);
433 HFrechits->push_back( aHit );
443 float lowGainEnergy = 0;
446 ZDCRecHitMap::const_iterator iZDCchk;
451 currentID = iZDC->first;
453 if (currentID == formerID) {
455 ESum+=(iZDC->second).
energy();
461 ZDCRecHit aHit(formerID, ESum, ZDCTime, lowGainEnergy);
462 ZDCrechits->push_back( aHit );
465 formerID = currentID;
466 ESum = (iZDC->second).
energy();
467 lowGainEnergy = (iZDC->second).lowGainEnergy();
468 ZDCTime = (iZDC->second).
time();
473 ZDCRecHit aHit(formerID, ESum, HBTime, lowGainEnergy);
474 ZDCrechits->push_back( aHit );
481 LogInfo(
"DataMixingHcalWorker") <<
"total # HBHE Merged rechits: " << HBHErechits->size() ;
482 LogInfo(
"DataMixingHcalWorker") <<
"total # HO Merged rechits: " << HOrechits->size() ;
483 LogInfo(
"DataMixingHcalWorker") <<
"total # HF Merged rechits: " << HFrechits->size() ;
484 LogInfo(
"DataMixingHcalWorker") <<
"total # ZDC Merged rechits: " << ZDCrechits->size() ;
T getParameter(std::string const &) const
std::string HORecHitCollectionDM_
void addHcalSignals(const edm::Event &e)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
HBHERecHitMap HBHERecHitStorage_
EventID const & id() const
std::vector< T >::const_iterator const_iterator
ZDCRecHitMap ZDCRecHitStorage_
std::string HBHERecHitCollectionDM_
HFRecHitMap HFRecHitStorage_
edm::InputTag HFPileRecHitInputTag_
edm::InputTag HOrechitCollectionSig_
std::string ZDCRecHitCollectionDM_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag HBHErechitCollectionSig_
edm::InputTag HBHEPileRecHitInputTag_
Container::value_type value_type
std::string HFRecHitCollectionDM_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag HOPileRecHitInputTag_
edm::InputTag ZDCrechitCollectionSig_
const_iterator end() const
T const * product() const
edm::InputTag ZDCPileRecHitInputTag_
edm::InputTag HFrechitCollectionSig_
void putHcal(edm::Event &e)
HORecHitMap HORecHitStorage_
virtual ~DataMixingHcalWorker()
const_iterator begin() const