27 DataMixingEMWorker::DataMixingEMWorker() { }
31 label_(ps.getParameter<std::
string>(
"Label"))
77 LogInfo(
"DataMixingEMWorker")<<
"===============> adding MC signals for "<<e.
id();
86 EBRecHits = pEBRecHits.
product();
87 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
95 it != EBRecHits->
end(); ++it) {
99 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: "
100 << it->id().rawId() <<
"\n"
101 <<
" rechit energy: " << it->energy();
114 EERecHits = pEERecHits.
product();
115 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
123 it != EERecHits->
end(); ++it) {
127 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: "
128 << it->id().rawId() <<
"\n"
129 <<
" rechit energy: " << it->energy();
142 ESRecHits = pESRecHits.
product();
144 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
153 it != ESRecHits->
end(); ++it) {
158 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: "
159 << it->id().rawId() <<
"\n"
160 <<
" 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)
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_
Container::value_type value_type
edm::InputTag EErechitCollectionSig_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
const_iterator end() const
edm::InputTag ESrechitCollectionSig_
std::string ESRecHitCollectionDM_
T const * product() const
edm::InputTag EBPileRecHitInputTag_
edm::InputTag EEProducerSig_
edm::InputTag EBProducerSig_
edm::InputTag EEPileRecHitInputTag_
ESRecHitMap ESRecHitStorage_
EERecHitMap EERecHitStorage_
std::string EERecHitCollectionDM_
const_iterator begin() const