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 =
208 const HORecHitCollection *HORecHits = const_cast<HORecHitCollection *>(HORecHitsPTR->product());
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 =
250 const ZDCRecHitCollection *ZDCRecHits = const_cast<ZDCRecHitCollection *>(ZDCRecHitsPTR->product());
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();