21 DataMixingHcalWorker::DataMixingHcalWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
69 LogInfo(
"DataMixingHcalWorker") <<
"===============> adding MC signals for " <<
e.id();
88 LogDebug(
"DataMixingHcalWorker") <<
"processed HBHERecHit with rawId: " << it->id() <<
"\n" 89 <<
" rechit energy: " << it->energy();
101 HORecHits = pHORecHits.
product();
103 LogDebug(
"DataMixingHcalWorker") <<
"total # HO rechits: " << HORecHits->
size();
113 LogDebug(
"DataMixingHcalWorker") <<
"processed HORecHit with rawId: " << it->id() <<
"\n" 114 <<
" rechit energy: " << it->energy();
138 LogDebug(
"DataMixingHcalWorker") <<
"processed HFRecHit with rawId: " << it->id() <<
"\n" 139 <<
" rechit energy: " << it->energy();
151 ZDCRecHits = pZDCRecHits.
product();
153 LogDebug(
"DataMixingHcalWorker") <<
"total # ZDC rechits: " << ZDCRecHits->
size();
163 LogDebug(
"DataMixingHcalWorker") <<
"processed ZDCRecHit with rawId: " << it->id() <<
"\n" 164 <<
" rechit energy: " << it->energy();
173 unsigned int eventNr,
175 LogDebug(
"DataMixingHcalWorker") <<
"\n===============> adding pileups from event " <<
ep->id()
176 <<
" for bunchcrossing " << bcr;
183 std::shared_ptr<Wrapper<HBHERecHitCollection>
const> HBHERecHitsPTR =
186 if (HBHERecHitsPTR) {
196 LogDebug(
"DataMixingEMWorker") <<
"processed HBHERecHit with rawId: " << it->id().rawId() <<
"\n" 197 <<
" rechit energy: " << it->energy();
204 std::shared_ptr<Wrapper<HORecHitCollection>
const> HORecHitsPTR =
210 LogDebug(
"DataMixingEMWorker") <<
"total # HO rechits: " << HORecHits->
size();
217 LogDebug(
"DataMixingEMWorker") <<
"processed HORecHit with rawId: " << it->id().rawId() <<
"\n" 218 <<
" rechit energy: " << it->energy();
225 std::shared_ptr<Wrapper<HFRecHitCollection>
const> HFRecHitsPTR =
238 LogDebug(
"DataMixingEMWorker") <<
"processed HFRecHit with rawId: " << it->id().rawId() <<
"\n" 239 <<
" rechit energy: " << it->energy();
246 std::shared_ptr<Wrapper<ZDCRecHitCollection>
const> ZDCRecHitsPTR =
252 LogDebug(
"DataMixingEMWorker") <<
"total # ZDC rechits: " << ZDCRecHits->
size();
259 LogDebug(
"DataMixingEMWorker") <<
"processed ZDCRecHit with rawId: " << it->id().rawId() <<
"\n" 260 <<
" rechit energy: " << it->energy();
282 HBHERecHitMap::const_iterator iHBchk;
285 currentID = iHB->first;
287 if (currentID == formerID) {
289 ESum += (iHB->second).
energy();
295 HBHErechits->push_back(aHit);
298 formerID = currentID;
299 ESum = (iHB->second).
energy();
300 HBTime = (iHB->second).
time();
306 HBHErechits->push_back(aHit);
318 HORecHitMap::const_iterator iHOchk;
321 currentID = iHO->first;
323 if (currentID == formerID) {
325 ESum += (iHO->second).
energy();
330 HORecHit aHit(formerID, ESum, HOTime);
331 HOrechits->push_back(aHit);
334 formerID = currentID;
335 ESum = (iHO->second).
energy();
336 HOTime = (iHO->second).
time();
341 HORecHit aHit(formerID, ESum, HOTime);
342 HOrechits->push_back(aHit);
354 HFRecHitMap::const_iterator iHFchk;
357 currentID = iHF->first;
359 if (currentID == formerID) {
361 ESum += (iHF->second).
energy();
366 HFRecHit aHit(formerID, ESum, HFTime);
367 HFrechits->push_back(aHit);
370 formerID = currentID;
371 ESum = (iHF->second).
energy();
372 HFTime = (iHF->second).
time();
377 HFRecHit aHit(formerID, ESum, HBTime);
378 HFrechits->push_back(aHit);
389 float lowGainEnergy = 0;
392 ZDCRecHitMap::const_iterator iZDCchk;
395 currentID = iZDC->first;
397 if (currentID == formerID) {
399 ESum += (iZDC->second).
energy();
404 ZDCRecHit aHit(formerID, ESum, ZDCTime, lowGainEnergy);
405 ZDCrechits->push_back(aHit);
408 formerID = currentID;
409 ESum = (iZDC->second).
energy();
410 lowGainEnergy = (iZDC->second).lowGainEnergy();
411 ZDCTime = (iZDC->second).
time();
416 ZDCRecHit aHit(formerID, ESum, HBTime, lowGainEnergy);
417 ZDCrechits->push_back(aHit);
424 LogInfo(
"DataMixingHcalWorker") <<
"total # HBHE Merged rechits: " << HBHErechits->size();
425 LogInfo(
"DataMixingHcalWorker") <<
"total # HO Merged rechits: " << HOrechits->size();
426 LogInfo(
"DataMixingHcalWorker") <<
"total # HF Merged rechits: " << HFrechits->size();
427 LogInfo(
"DataMixingHcalWorker") <<
"total # ZDC Merged rechits: " << ZDCrechits->size();
std::string HORecHitCollectionDM_
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
T const * product() const
HBHERecHitMap HBHERecHitStorage_
std::vector< T >::const_iterator const_iterator
edm::EDGetTokenT< ZDCRecHitCollection > ZDCRecHitToken_
ZDCRecHitMap ZDCRecHitStorage_
edm::EDGetTokenT< ZDCRecHitCollection > ZDCRecHitPToken_
std::string HBHERecHitCollectionDM_
HFRecHitMap HFRecHitStorage_
edm::InputTag HFPileRecHitInputTag_
edm::EDGetTokenT< HORecHitCollection > HORecHitToken_
edm::InputTag HOrechitCollectionSig_
edm::EDGetTokenT< HBHERecHitCollection > HBHERecHitPToken_
std::string ZDCRecHitCollectionDM_
Container::value_type value_type
edm::EDGetTokenT< HFRecHitCollection > HFRecHitToken_
edm::InputTag HBHErechitCollectionSig_
const_iterator begin() const
edm::InputTag HBHEPileRecHitInputTag_
std::string HFRecHitCollectionDM_
edm::InputTag HOPileRecHitInputTag_
edm::InputTag ZDCrechitCollectionSig_
const_iterator end() const
Log< level::Info, false > LogInfo
edm::EDGetTokenT< HBHERecHitCollection > HBHERecHitToken_
edm::EDGetTokenT< HFRecHitCollection > HFRecHitPToken_
edm::InputTag ZDCPileRecHitInputTag_
edm::InputTag HFrechitCollectionSig_
void putHcal(edm::Event &e)
HORecHitMap HORecHitStorage_
edm::EDGetTokenT< HORecHitCollection > HORecHitPToken_
virtual ~DataMixingHcalWorker()