28 DataMixingEMWorker::DataMixingEMWorker() { }
32 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();
171 LogInfo(
"DataMixingEMWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
177 std::shared_ptr<Wrapper<EBRecHitCollection>
const> EBRecHitsPTR =
184 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
188 it != EBRecHits->
end(); ++it) {
193 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: " 194 << it->id().rawId() <<
"\n" 195 <<
" rechit energy: " << it->energy();
202 std::shared_ptr<Wrapper<EERecHitCollection>
const> EERecHitsPTR =
209 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
213 it != EERecHits->
end(); ++it) {
218 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: " 219 << it->id().rawId() <<
"\n" 220 <<
" rechit energy: " << it->energy();
227 std::shared_ptr<Wrapper<ESRecHitCollection>
const> ESRecHitsPTR =
234 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
238 it != ESRecHits->
end(); ++it) {
243 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: " 244 << it->id().rawId() <<
"\n" 245 <<
" rechit energy: " << it->energy();
268 EBRecHitMap::const_iterator iEBchk;
273 currentID = iEB->first;
275 if (currentID == formerID) {
277 ESum+=(iEB->second).energy();
283 EBrechits->push_back( aHit );
286 formerID = currentID;
287 ESum = (iEB->second).energy();
288 EBTime = (iEB->second).
time();
294 EBrechits->push_back( aHit );
305 EERecHitMap::const_iterator iEEchk;
310 currentID = iEE->first;
312 if (currentID == formerID) {
314 ESum+=(iEE->second).energy();
320 EErechits->push_back( aHit );
323 formerID = currentID;
324 ESum = (iEE->second).energy();
325 EETime = (iEE->second).
time();
331 EErechits->push_back( aHit );
342 ESRecHitMap::const_iterator iESchk;
347 currentID = iES->first;
349 if (currentID == formerID) {
351 ESum+=(iES->second).energy();
357 ESrechits->push_back( aHit );
360 formerID = currentID;
361 ESum = (iES->second).energy();
362 ESTime = (iES->second).
time();
368 ESrechits->push_back( aHit );
375 LogInfo(
"DataMixingEMWorker") <<
"total # EB Merged rechits: " << EBrechits->size() ;
376 LogInfo(
"DataMixingEMWorker") <<
"total # EE Merged rechits: " << EErechits->size() ;
377 LogInfo(
"DataMixingEMWorker") <<
"total # ES Merged rechits: " << ESrechits->size() ;
EBRecHitMap EBRecHitStorage_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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_
Container::value_type value_type
std::string EBRecHitCollectionDM_
edm::EDGetTokenT< EERecHitCollection > EERecHitToken_
edm::InputTag EErechitCollectionSig_
edm::EDGetTokenT< EBRecHitCollection > EBRecHitToken_
edm::EDGetTokenT< ESRecHitCollection > ESPileRecHitToken_
const_iterator end() const
edm::EDGetTokenT< ESRecHitCollection > ESRecHitToken_
edm::InputTag ESrechitCollectionSig_
T const * product() const
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_
const_iterator begin() const