21 DataMixingEMWorker::DataMixingEMWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
65 LogInfo(
"DataMixingEMWorker") <<
"===============> adding MC signals for " <<
e.id();
83 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: " << it->id().rawId() <<
"\n" 84 <<
" rechit energy: " << it->energy();
104 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: " << it->id().rawId() <<
"\n" 105 <<
" rechit energy: " << it->energy();
116 ESRecHits = pESRecHits.
product();
118 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
128 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: " << it->id().rawId() <<
"\n" 129 <<
" rechit energy: " << it->energy();
138 unsigned int eventNr,
140 LogInfo(
"DataMixingEMWorker") <<
"\n===============> adding pileups from event " <<
ep->id()
141 <<
" for bunchcrossing " << bcr;
148 std::shared_ptr<Wrapper<EBRecHitCollection>
const> EBRecHitsPTR =
161 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: " << it->id().rawId() <<
"\n" 162 <<
" rechit energy: " << it->energy();
169 std::shared_ptr<Wrapper<EERecHitCollection>
const> EERecHitsPTR =
182 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: " << it->id().rawId() <<
"\n" 183 <<
" rechit energy: " << it->energy();
190 std::shared_ptr<Wrapper<ESRecHitCollection>
const> ESRecHitsPTR =
196 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
203 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: " << it->id().rawId() <<
"\n" 204 <<
" rechit energy: " << it->energy();
225 EBRecHitMap::const_iterator iEBchk;
228 currentID = iEB->first;
230 if (currentID == formerID) {
232 ESum += (iEB->second).
energy();
237 EBrechits->push_back(aHit);
240 formerID = currentID;
241 ESum = (iEB->second).
energy();
242 EBTime = (iEB->second).
time();
248 EBrechits->push_back(aHit);
260 EERecHitMap::const_iterator iEEchk;
263 currentID = iEE->first;
265 if (currentID == formerID) {
267 ESum += (iEE->second).
energy();
272 EErechits->push_back(aHit);
275 formerID = currentID;
276 ESum = (iEE->second).
energy();
277 EETime = (iEE->second).
time();
283 EErechits->push_back(aHit);
295 ESRecHitMap::const_iterator iESchk;
298 currentID = iES->first;
300 if (currentID == formerID) {
302 ESum += (iES->second).
energy();
307 ESrechits->push_back(aHit);
310 formerID = currentID;
311 ESum = (iES->second).
energy();
312 ESTime = (iES->second).
time();
318 ESrechits->push_back(aHit);
325 LogInfo(
"DataMixingEMWorker") <<
"total # EB Merged rechits: " << EBrechits->size();
326 LogInfo(
"DataMixingEMWorker") <<
"total # EE Merged rechits: " << EErechits->size();
327 LogInfo(
"DataMixingEMWorker") <<
"total # ES Merged rechits: " << ESrechits->size();
EBRecHitMap EBRecHitStorage_
T getParameter(std::string const &) const
void putEM(edm::Event &e)
void addEMSignals(const edm::Event &e)
edm::EDGetTokenT< EERecHitCollection > EEPileRecHitToken_
T const * product() const
std::vector< EcalRecHit >::const_iterator const_iterator
virtual ~DataMixingEMWorker()
edm::InputTag EBrechitCollectionSig_
edm::InputTag ESProducerSig_
edm::InputTag ESPileRecHitInputTag_
Container::value_type value_type
std::string EBRecHitCollectionDM_
edm::EDGetTokenT< EERecHitCollection > EERecHitToken_
const_iterator begin() const
edm::InputTag EErechitCollectionSig_
edm::EDGetTokenT< EBRecHitCollection > EBRecHitToken_
edm::EDGetTokenT< ESRecHitCollection > ESPileRecHitToken_
const_iterator end() const
Log< level::Info, false > LogInfo
edm::EDGetTokenT< ESRecHitCollection > ESRecHitToken_
edm::InputTag ESrechitCollectionSig_
std::string ESRecHitCollectionDM_
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
edm::InputTag EBPileRecHitInputTag_
edm::InputTag EEProducerSig_
edm::InputTag EBProducerSig_
edm::InputTag EEPileRecHitInputTag_
ESRecHitMap ESRecHitStorage_
EERecHitMap EERecHitStorage_
std::string EERecHitCollectionDM_
edm::EDGetTokenT< EBRecHitCollection > EBPileRecHitToken_