23 DataMixingEMWorker::DataMixingEMWorker() { }
27 label_(ps.getParameter<
std::
string>(
"Label"))
72 LogInfo(
"DataMixingEMWorker")<<
"===============> adding MC signals for "<<e.
id();
81 EBRecHits = pEBRecHits.
product();
82 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
90 it != EBRecHits->
end(); ++it) {
94 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: " 95 << it->id().rawId() <<
"\n" 96 <<
" rechit energy: " << it->energy();
109 EERecHits = pEERecHits.
product();
110 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
118 it != EERecHits->
end(); ++it) {
122 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: " 123 << it->id().rawId() <<
"\n" 124 <<
" rechit energy: " << it->energy();
137 ESRecHits = pESRecHits.
product();
139 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
148 it != ESRecHits->
end(); ++it) {
153 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: " 154 << it->id().rawId() <<
"\n" 155 <<
" rechit energy: " << it->energy();
166 LogInfo(
"DataMixingEMWorker") <<
"\n===============> adding pileups from event "<<ep->
id()<<
" for bunchcrossing "<<bcr;
172 std::shared_ptr<Wrapper<EBRecHitCollection>
const> EBRecHitsPTR =
179 LogDebug(
"DataMixingEMWorker") <<
"total # EB rechits: " << EBRecHits->
size();
183 it != EBRecHits->
end(); ++it) {
188 LogDebug(
"DataMixingEMWorker") <<
"processed EBRecHit with rawId: " 189 << it->id().rawId() <<
"\n" 190 <<
" rechit energy: " << it->energy();
197 std::shared_ptr<Wrapper<EERecHitCollection>
const> EERecHitsPTR =
204 LogDebug(
"DataMixingEMWorker") <<
"total # EE rechits: " << EERecHits->
size();
208 it != EERecHits->
end(); ++it) {
213 LogDebug(
"DataMixingEMWorker") <<
"processed EERecHit with rawId: " 214 << it->id().rawId() <<
"\n" 215 <<
" rechit energy: " << it->energy();
222 std::shared_ptr<Wrapper<ESRecHitCollection>
const> ESRecHitsPTR =
229 LogDebug(
"DataMixingEMWorker") <<
"total # ES rechits: " << ESRecHits->
size();
233 it != ESRecHits->
end(); ++it) {
238 LogDebug(
"DataMixingEMWorker") <<
"processed ESRecHit with rawId: " 239 << it->id().rawId() <<
"\n" 240 <<
" rechit energy: " << it->energy();
263 EBRecHitMap::const_iterator iEBchk;
268 currentID = iEB->first;
270 if (currentID == formerID) {
272 ESum+=(iEB->second).energy();
278 EBrechits->push_back( aHit );
281 formerID = currentID;
282 ESum = (iEB->second).energy();
283 EBTime = (iEB->second).
time();
289 EBrechits->push_back( aHit );
300 EERecHitMap::const_iterator iEEchk;
305 currentID = iEE->first;
307 if (currentID == formerID) {
309 ESum+=(iEE->second).energy();
315 EErechits->push_back( aHit );
318 formerID = currentID;
319 ESum = (iEE->second).energy();
320 EETime = (iEE->second).
time();
326 EErechits->push_back( aHit );
337 ESRecHitMap::const_iterator iESchk;
342 currentID = iES->first;
344 if (currentID == formerID) {
346 ESum+=(iES->second).energy();
352 ESrechits->push_back( aHit );
355 formerID = currentID;
356 ESum = (iES->second).energy();
357 ESTime = (iES->second).
time();
363 ESrechits->push_back( aHit );
370 LogInfo(
"DataMixingEMWorker") <<
"total # EB Merged rechits: " << EBrechits->size() ;
371 LogInfo(
"DataMixingEMWorker") <<
"total # EE Merged rechits: " << EErechits->size() ;
372 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