27 DataMixingEMWorker::DataMixingEMWorker() { sel_=0;}
31 label_(ps.getParameter<std::string>(
"Label"))
87 LogInfo(
"DataMixingEMWorker")<<
"===============> adding MC signals for "<<e.
id();
96 EBRecHits = pEBRecHits.
product();
97 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
105 it != EBRecHits->
end(); ++it) {
109 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: "
110 << it->id().rawId() <<
"\n"
111 <<
" rechit energy: " << it->energy();
124 EERecHits = pEERecHits.
product();
125 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
133 it != EERecHits->
end(); ++it) {
137 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: "
138 << it->id().rawId() <<
"\n"
139 <<
" rechit energy: " << it->energy();
152 ESRecHits = pESRecHits.
product();
154 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
163 it != ESRecHits->
end(); ++it) {
168 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: "
169 << it->id().rawId() <<
"\n"
170 <<
" rechit energy: " << it->energy();
180 LogInfo(
"DataMixingEMWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
186 boost::shared_ptr<Wrapper<EBRecHitCollection>
const> EBRecHitsPTR =
193 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
197 it != EBRecHits->
end(); ++it) {
202 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: "
203 << it->id().rawId() <<
"\n"
204 <<
" rechit energy: " << it->energy();
211 boost::shared_ptr<Wrapper<EERecHitCollection>
const> EERecHitsPTR =
218 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
222 it != EERecHits->
end(); ++it) {
227 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: "
228 << it->id().rawId() <<
"\n"
229 <<
" rechit energy: " << it->energy();
236 boost::shared_ptr<Wrapper<ESRecHitCollection>
const> ESRecHitsPTR =
243 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
247 it != ESRecHits->
end(); ++it) {
252 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: "
253 << it->id().rawId() <<
"\n"
254 <<
" rechit energy: " << it->energy();
277 EBRecHitMap::const_iterator iEBchk;
282 currentID = iEB->first;
284 if (currentID == formerID) {
286 ESum+=(iEB->second).
energy();
292 EBrechits->push_back( aHit );
295 formerID = currentID;
296 ESum = (iEB->second).
energy();
297 EBTime = (iEB->second).
time();
303 EBrechits->push_back( aHit );
314 EERecHitMap::const_iterator iEEchk;
319 currentID = iEE->first;
321 if (currentID == formerID) {
323 ESum+=(iEE->second).
energy();
329 EErechits->push_back( aHit );
332 formerID = currentID;
333 ESum = (iEE->second).
energy();
334 EETime = (iEE->second).
time();
340 EErechits->push_back( aHit );
351 ESRecHitMap::const_iterator iESchk;
356 currentID = iES->first;
358 if (currentID == formerID) {
360 ESum+=(iES->second).
energy();
366 ESrechits->push_back( aHit );
369 formerID = currentID;
370 ESum = (iES->second).
energy();
371 ESTime = (iES->second).
time();
377 ESrechits->push_back( aHit );
384 LogInfo(
"DataMixingEMWorker") <<
"total # EB Merged rechits: " << EBrechits->size() ;
385 LogInfo(
"DataMixingEMWorker") <<
"total # EE Merged rechits: " << EErechits->size() ;
386 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