27 DataMixingEMWorker::DataMixingEMWorker() { }
31 label_(ps.getParameter<std::
string>(
"Label"))
76 LogInfo(
"DataMixingEMWorker")<<
"===============> adding MC signals for "<<e.
id();
85 EBRecHits = pEBRecHits.
product();
86 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
94 it != EBRecHits->
end(); ++it) {
98 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: "
99 << it->id().rawId() <<
"\n"
100 <<
" rechit energy: " << it->energy();
113 EERecHits = pEERecHits.
product();
114 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
122 it != EERecHits->
end(); ++it) {
126 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: "
127 << it->id().rawId() <<
"\n"
128 <<
" rechit energy: " << it->energy();
141 ESRecHits = pESRecHits.
product();
143 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
152 it != ESRecHits->
end(); ++it) {
157 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: "
158 << it->id().rawId() <<
"\n"
159 <<
" rechit energy: " << it->energy();
170 LogInfo(
"DataMixingEMWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
176 boost::shared_ptr<Wrapper<EBRecHitCollection>
const> EBRecHitsPTR =
183 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
187 it != EBRecHits->
end(); ++it) {
192 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: "
193 << it->id().rawId() <<
"\n"
194 <<
" rechit energy: " << it->energy();
201 boost::shared_ptr<Wrapper<EERecHitCollection>
const> EERecHitsPTR =
208 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
212 it != EERecHits->
end(); ++it) {
217 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: "
218 << it->id().rawId() <<
"\n"
219 <<
" rechit energy: " << it->energy();
226 boost::shared_ptr<Wrapper<ESRecHitCollection>
const> ESRecHitsPTR =
233 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
237 it != ESRecHits->
end(); ++it) {
242 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: "
243 << it->id().rawId() <<
"\n"
244 <<
" rechit energy: " << it->energy();
267 EBRecHitMap::const_iterator iEBchk;
272 currentID = iEB->first;
274 if (currentID == formerID) {
276 ESum+=(iEB->second).
energy();
282 EBrechits->push_back( aHit );
285 formerID = currentID;
286 ESum = (iEB->second).
energy();
287 EBTime = (iEB->second).
time();
293 EBrechits->push_back( aHit );
304 EERecHitMap::const_iterator iEEchk;
309 currentID = iEE->first;
311 if (currentID == formerID) {
313 ESum+=(iEE->second).
energy();
319 EErechits->push_back( aHit );
322 formerID = currentID;
323 ESum = (iEE->second).
energy();
324 EETime = (iEE->second).
time();
330 EErechits->push_back( aHit );
341 ESRecHitMap::const_iterator iESchk;
346 currentID = iES->first;
348 if (currentID == formerID) {
350 ESum+=(iES->second).
energy();
356 ESrechits->push_back( aHit );
359 formerID = currentID;
360 ESum = (iES->second).
energy();
361 ESTime = (iES->second).
time();
367 ESrechits->push_back( aHit );
374 LogInfo(
"DataMixingEMWorker") <<
"total # EB Merged rechits: " << EBrechits->size() ;
375 LogInfo(
"DataMixingEMWorker") <<
"total # EE Merged rechits: " << EErechits->size() ;
376 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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EventID const & id() const
std::vector< EcalRecHit >::const_iterator const_iterator
virtual ~DataMixingEMWorker()
edm::InputTag EBrechitCollectionSig_
edm::InputTag ESProducerSig_
edm::InputTag ESPileRecHitInputTag_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string EBRecHitCollectionDM_
edm::EDGetTokenT< EERecHitCollection > EERecHitToken_
Container::value_type value_type
edm::InputTag EErechitCollectionSig_
edm::EDGetTokenT< EBRecHitCollection > EBRecHitToken_
edm::EDGetTokenT< ESRecHitCollection > ESPileRecHitToken_
const_iterator end() const
edm::EDGetTokenT< ESRecHitCollection > ESRecHitToken_
edm::InputTag ESrechitCollectionSig_
std::string ESRecHitCollectionDM_
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
T const * product() const
edm::InputTag EBPileRecHitInputTag_
edm::InputTag EEProducerSig_
edm::InputTag EBProducerSig_
edm::InputTag EEPileRecHitInputTag_
ESRecHitMap ESRecHitStorage_
EERecHitMap EERecHitStorage_
std::string EERecHitCollectionDM_
edm::EDGetTokenT< EBRecHitCollection > EBPileRecHitToken_
const_iterator begin() const