CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::DataMixingModule Class Reference

#include <DataMixingModule.h>

Inheritance diagram for edm::DataMixingModule:
edm::BMixingModule edm::stream::EDProducer< GlobalCache< MixingCache::Config > >

Public Member Functions

void addSignals (const edm::Event &e, const edm::EventSetup &ES) override
 
void beginLuminosityBlock (LuminosityBlock const &l1, EventSetup const &c) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &eventSetup) override
 
void checkSignal (const edm::Event &e) override
 
void createnewEDProduct () override
 
 DataMixingModule (const edm::ParameterSet &ps, MixingCache::Config const *globalConf)
 
void doPileUp (edm::Event &e, const edm::EventSetup &ES) override
 
void endLuminosityBlock (LuminosityBlock const &l1, EventSetup const &c) override
 
void endRun (const edm::Run &r, const edm::EventSetup &setup) override
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &eventSetup) override
 
void pileWorker (const edm::EventPrincipal &, int bcr, int EventId, const edm::EventSetup &ES, ModuleCallingContext const *)
 
void put (edm::Event &e, const edm::EventSetup &ES) override
 
 ~DataMixingModule () override
 
- Public Member Functions inherited from edm::BMixingModule
virtual void addPileups (const int bcr, EventPrincipal *ep, unsigned int eventId, unsigned int worker, const edm::EventSetup &c)
 
double averageNumber () const
 
void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
 
void beginRun (const edm::Run &r, const edm::EventSetup &setup) override
 
 BMixingModule (const edm::ParameterSet &ps, MixingCache::Config const *globalConf)
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
 
void endRun (const edm::Run &r, const edm::EventSetup &setup) override
 
virtual void finalizeEvent (edm::Event &event, const edm::EventSetup &setup)
 
virtual void initializeEvent (const edm::Event &event, const edm::EventSetup &setup)
 
bool poisson () const
 
void produce (edm::Event &e1, const edm::EventSetup &c) override
 
virtual void reload (const edm::EventSetup &setup)
 
virtual void setBcrOffset ()
 
virtual void setSourceOffset (const unsigned int s)
 
 ~BMixingModule () override
 
- Public Member Functions inherited from edm::stream::EDProducer< GlobalCache< MixingCache::Config > >
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Member Functions

virtual void getSubdetectorNames ()
 

Private Attributes

bool AddedPileup_
 
bool addMCDigiNoise_
 
std::string CSCComparatorDigiCollectionDM_
 
std::string CSCStripDigiCollectionDM_
 
std::string CSCWireDigiCollectionDM_
 
std::string DTDigiCollectionDM_
 
std::string EBDigiCollectionDM_
 
edm::InputTag EBPileInputTag_
 
std::string EBRecHitCollectionDM_
 
DataMixingEcalDigiWorkerProdEcalDigiWorkerProd_
 
std::string EEDigiCollectionDM_
 
edm::InputTag EEPileInputTag_
 
std::string EERecHitCollectionDM_
 
DataMixingEMDigiWorkerEMDigiWorker_
 
DataMixingEMWorkerEMWorker_
 
std::string ESDigiCollectionDM_
 
edm::InputTag ESPileInputTag_
 
std::string ESRecHitCollectionDM_
 
DigiAccumulatorMixModGeneralTrackWorker_
 
std::string HBHEDigiCollectionDM_
 
edm::InputTag HBHEPileInputTag_
 
std::string HBHERecHitCollectionDM_
 
DataMixingHcalDigiWorkerHcalDigiWorker_
 
DataMixingHcalDigiWorkerProdHcalDigiWorkerProd_
 
DataMixingHcalWorkerHcalWorker_
 
std::string HFDigiCollectionDM_
 
edm::InputTag HFPileInputTag_
 
std::string HFRecHitCollectionDM_
 
std::string HODigiCollectionDM_
 
edm::InputTag HOPileInputTag_
 
std::string HORecHitCollectionDM_
 
std::string label_
 
bool MergeEMDigis_
 
bool MergeHcalDigis_
 
bool MergeHcalDigisProd_
 
bool MergePileup_
 
bool MergeTrackerDigis_
 
DataMixingMuonWorkerMuonWorker_
 
std::string PixelDigiCollectionDM_
 
DataMixingPileupCopyPUWorker_
 
std::string QIE10DigiCollectionDM_
 
edm::InputTag QIE10PileInputTag_
 
std::string QIE11DigiCollectionDM_
 
edm::InputTag QIE11PileInputTag_
 
std::string RPCDigiCollectionDM_
 
DataMixingSiPixelMCDigiWorkerSiPixelMCDigiWorker_
 
DataMixingSiPixelWorkerSiPixelWorker_
 
std::string SiStripDigiCollectionDM_
 
DataMixingSiStripMCDigiWorkerSiStripMCDigiWorker_
 
std::string siStripRawDigiSource_
 
DataMixingSiStripRawWorkerSiStripRawWorker_
 
DataMixingSiStripWorkerSiStripWorker_
 
std::vector< std::string > Subdetectors_
 
edm::EDGetTokenT< EBDigitizerTraits::DigiCollectiontok_eb_
 
edm::EDGetTokenT< EEDigitizerTraits::DigiCollectiontok_ee_
 
edm::EDGetTokenT< ESDigitizerTraits::DigiCollectiontok_es_
 
edm::EDGetTokenT< HBHEDigitizerTraits::DigiCollectiontok_hbhe_
 
edm::EDGetTokenT< HFDigitizerTraits::DigiCollectiontok_hf_
 
edm::EDGetTokenT< HODigitizerTraits::DigiCollectiontok_ho_
 
edm::EDGetTokenT< HcalQIE10DigitizerTraits::DigiCollectiontok_qie10_
 
edm::EDGetTokenT< HcalQIE11DigitizerTraits::DigiCollectiontok_qie11_
 
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollectiontok_zdc_
 
DataMixingTrackingParticleWorkerTrackingParticleWorker_
 
bool useSiStripRawDigi_
 
std::string ZDCDigiCollectionDM_
 
edm::InputTag ZDCPileInputTag_
 
std::string ZDCRecHitCollectionDM_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< GlobalCache< MixingCache::Config > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from edm::BMixingModule
static void globalEndJob (MixingCache::Config *)
 
static std::unique_ptr< MixingCache::ConfiginitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from edm::BMixingModule
void beginStream (edm::StreamID) override
 
void dropUnwantedBranches (std::vector< std::string > const &wantedBranches)
 
void endStream () override
 
void setupPileUpEvent (const edm::EventSetup &setup)
 
void update (edm::EventSetup const &)
 
- Protected Attributes inherited from edm::BMixingModule
int bunchSpace_
 
bool checktof_
 
bool doit_ [4]
 
unsigned int eventId_
 
std::vector< std::shared_ptr< PileUp > > inputSources_
 
int maxBunch_
 
int minBunch_
 
bool const mixProdStep1_
 
bool const mixProdStep2_
 
edm::ESWatcher< MixingRcdparameterWatcher_
 
bool playback_
 
bool readDB_
 
std::vector< float > TrueNumInteractions_
 
int vertexOffset_
 
- Static Protected Attributes inherited from edm::BMixingModule
static const unsigned int maxNbSources_ =4
 

Detailed Description

Definition at line 51 of file DataMixingModule.h.

Constructor & Destructor Documentation

DataMixingModule::DataMixingModule ( const edm::ParameterSet ps,
MixingCache::Config const *  globalConf 
)
explicit

standard constructor

Definition at line 40 of file DataMixingModule.cc.

References addMCDigiNoise_, CSCComparatorDigiCollectionDM_, CSCStripDigiCollectionDM_, CSCWireDigiCollectionDM_, DTDigiCollectionDM_, EBDigiCollectionDM_, EBPileInputTag_, EBRecHitCollectionDM_, EcalDigiWorkerProd_, EEDigiCollectionDM_, EEPileInputTag_, EERecHitCollectionDM_, EMDigiWorker_, EMWorker_, ESDigiCollectionDM_, ESPileInputTag_, ESRecHitCollectionDM_, edm::ParameterSet::exists(), GeneralTrackWorker_, mixOne_sim_on_sim_cfi::GenPUProtonsInputTags, edm::DigiAccumulatorMixModFactory::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), getSubdetectorNames(), edm::ParameterSet::getUntrackedParameter(), HBHEDigiCollectionDM_, HBHEPileInputTag_, HBHERecHitCollectionDM_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, HFDigiCollectionDM_, HFPileInputTag_, HFRecHitCollectionDM_, HODigiCollectionDM_, HOPileInputTag_, HORecHitCollectionDM_, edm::DigiAccumulatorMixModFactory::makeDigiAccumulator(), MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MergeTrackerDigis_, MuonWorker_, PixelDigiCollectionDM_, PUWorker_, QIE10DigiCollectionDM_, QIE10PileInputTag_, QIE11DigiCollectionDM_, QIE11PileInputTag_, fetchall_from_DQM_v2::release, RPCDigiCollectionDM_, edm::DataMixingEcalDigiWorkerProd::setEBAccess(), edm::DataMixingEcalDigiWorkerProd::setEEAccess(), edm::DataMixingEcalDigiWorkerProd::setESAccess(), SiPixelMCDigiWorker_, SiPixelWorker_, SiStripDigiCollectionDM_, SiStripMCDigiWorker_, SiStripRawWorker_, SiStripWorker_, AlCaHLTBitMon_QueryRunRegistry::string, tok_eb_, tok_ee_, tok_es_, tok_hbhe_, tok_hf_, tok_ho_, tok_qie10_, tok_qie11_, tok_zdc_, TrackingParticleWorker_, useSiStripRawDigi_, ZDCDigiCollectionDM_, ZDCPileInputTag_, and ZDCRecHitCollectionDM_.

40  :
41  BMixingModule(ps, globalConf),
42  EBPileInputTag_(ps.getParameter<edm::InputTag>("EBPileInputTag")),
43  EEPileInputTag_(ps.getParameter<edm::InputTag>("EEPileInputTag")),
44  ESPileInputTag_(ps.getParameter<edm::InputTag>("ESPileInputTag")),
45  HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
46  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
47  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
48  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
49  QIE10PileInputTag_(ps.getParameter<edm::InputTag>("QIE10PileInputTag")),
50  QIE11PileInputTag_(ps.getParameter<edm::InputTag>("QIE11PileInputTag")),
51  label_(ps.getParameter<std::string>("Label"))
52  {
53 
54  // prepare for data access in DataMixingEcalDigiWorkerProd
55  tok_eb_ = consumes<EBDigitizerTraits::DigiCollection>(EBPileInputTag_);
56  tok_ee_ = consumes<EEDigitizerTraits::DigiCollection>(EEPileInputTag_);
57  tok_es_ = consumes<ESDigitizerTraits::DigiCollection>(ESPileInputTag_);
58 
59  // prepare for data access in DataMixingHcalDigiWorkerProd
60  tok_hbhe_ = consumes<HBHEDigitizerTraits::DigiCollection>(HBHEPileInputTag_);
61  tok_ho_ = consumes<HODigitizerTraits::DigiCollection>(HOPileInputTag_);
62  tok_hf_ = consumes<HFDigitizerTraits::DigiCollection>(HFPileInputTag_);
63  tok_zdc_ = consumes<ZDCDigitizerTraits::DigiCollection>(ZDCPileInputTag_);
64  tok_qie10_ = consumes<HcalQIE10DigitizerTraits::DigiCollection>(QIE10PileInputTag_);
65  tok_qie11_ = consumes<HcalQIE11DigitizerTraits::DigiCollection>(QIE11PileInputTag_);
66 
67  // get the subdetector names
68  this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
69 
70  // For now, list all of them here. Later, make this selectable with input parameters
71  //
72 
73  // Check to see if we are working in Full or Fast Simulation
74 
75  MergeTrackerDigis_ = (ps.getParameter<std::string>("TrackerMergeType")) == "Digis";
76  MergeEMDigis_ = (ps.getParameter<std::string>("EcalMergeType")) == "Digis";
77  MergeHcalDigis_ = (ps.getParameter<std::string>("HcalMergeType")) == "Digis";
78  if(MergeHcalDigis_) MergeHcalDigisProd_ = (ps.getParameter<std::string>("HcalDigiMerge")=="FullProd");
79 
80  addMCDigiNoise_ = false;
81 
82  addMCDigiNoise_ = ps.getUntrackedParameter<bool>("addMCDigiNoise"); // for Sim on Sim mixing
83 
84  // Put Fast Sim Sequences here for Simplification: Fewer options!
85 
86 
87  if(MergeEMDigis_) {
88 
89  // cout<<"EM Digis TRUE!!!"<<endl;
90 
91  EBDigiCollectionDM_ = ps.getParameter<std::string>("EBDigiCollectionDM");
92  EEDigiCollectionDM_ = ps.getParameter<std::string>("EEDigiCollectionDM");
93  ESDigiCollectionDM_ = ps.getParameter<std::string>("ESDigiCollectionDM");
94  // nMaxPrintout_ = ps.getUntrackedParameter<int>("nMaxPrintout",10);
95 
96  produces< EBDigiCollection >(EBDigiCollectionDM_);
97  produces< EEDigiCollection >(EEDigiCollectionDM_);
98  produces< ESDigiCollection >(ESDigiCollectionDM_);
99 
100 
101  if(addMCDigiNoise_ ) {
102  edm::ConsumesCollector iC(consumesCollector());
107  }
108  else { EMDigiWorker_ = new DataMixingEMDigiWorker(ps, consumesCollector()); }
109  }
110  else { // merge RecHits
111  EBRecHitCollectionDM_ = ps.getParameter<std::string>("EBRecHitCollectionDM");
112  EERecHitCollectionDM_ = ps.getParameter<std::string>("EERecHitCollectionDM");
113  ESRecHitCollectionDM_ = ps.getParameter<std::string>("ESRecHitCollectionDM");
114  // nMaxPrintout_ = ps.getUntrackedParameter<int>("nMaxPrintout",10);
115 
116  produces< EBRecHitCollection >(EBRecHitCollectionDM_);
117  produces< EERecHitCollection >(EERecHitCollectionDM_);
118  produces< ESRecHitCollection >(ESRecHitCollectionDM_);
119 
120  EMWorker_ = new DataMixingEMWorker(ps, consumesCollector());
121  }
122  // Hcal next
123 
124  if(MergeHcalDigis_){
125  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
126  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
127  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
128  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
129  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
130  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
131 
132  produces< HBHEDigiCollection >();
133  produces< HODigiCollection >();
134  produces< HFDigiCollection >();
135  produces< ZDCDigiCollection >();
136 
137  produces<QIE10DigiCollection>("HFQIE10DigiCollection");
138  produces<QIE11DigiCollection>("HBHEQIE11DigiCollection");
139 
140  if(ps.getParameter<bool>("debugCaloSamples")){
141  produces<CaloSamplesCollection>("HcalSamples");
142  }
143  if(ps.getParameter<bool>("injectTestHits")){
144  produces<edm::PCaloHitContainer>("HcalHits");
145  }
146 
147  if(MergeHcalDigisProd_) HcalDigiWorkerProd_ = new DataMixingHcalDigiWorkerProd(ps, consumesCollector());
148  else HcalDigiWorker_ = new DataMixingHcalDigiWorker(ps, consumesCollector());
149 
150  }
151  else{
152  HBHERecHitCollectionDM_ = ps.getParameter<std::string>("HBHERecHitCollectionDM");
153  HORecHitCollectionDM_ = ps.getParameter<std::string>("HORecHitCollectionDM");
154  HFRecHitCollectionDM_ = ps.getParameter<std::string>("HFRecHitCollectionDM");
155  ZDCRecHitCollectionDM_ = ps.getParameter<std::string>("ZDCRecHitCollectionDM");
156 
157  produces< HBHERecHitCollection >(HBHERecHitCollectionDM_);
158  produces< HORecHitCollection >(HORecHitCollectionDM_);
159  produces< HFRecHitCollection >(HFRecHitCollectionDM_);
160  produces< ZDCRecHitCollection >(ZDCRecHitCollectionDM_);
161 
162  HcalWorker_ = new DataMixingHcalWorker(ps, consumesCollector());
163  }
164 
165  // Muons
166 
167  DTDigiCollectionDM_ = ps.getParameter<std::string>("DTDigiCollectionDM");
168  RPCDigiCollectionDM_ = ps.getParameter<std::string>("RPCDigiCollectionDM");
169  CSCStripDigiCollectionDM_ = ps.getParameter<std::string>("CSCStripDigiCollectionDM");
170  CSCWireDigiCollectionDM_ = ps.getParameter<std::string>("CSCWireDigiCollectionDM");
171  CSCComparatorDigiCollectionDM_ = ps.getParameter<std::string>("CSCComparatorDigiCollectionDM");
172 
173 
174  produces< DTDigiCollection >();
175  produces< RPCDigiCollection >();
176  produces< CSCStripDigiCollection >(CSCStripDigiCollectionDM_);
177  produces< CSCWireDigiCollection >(CSCWireDigiCollectionDM_);
178  produces< CSCComparatorDigiCollection >(CSCComparatorDigiCollectionDM_);
179 
180  MuonWorker_ = new DataMixingMuonWorker(ps, consumesCollector());
181 
182 
183  if(MergeTrackerDigis_) {
184 
185  // Si-Strips
186 
187  useSiStripRawDigi_ = ps.exists("SiStripRawDigiSource")?
188  ps.getParameter<std::string>("SiStripRawDigiSource")=="PILEUP" ||
189  ps.getParameter<std::string>("SiStripRawDigiSource")=="SIGNAL" : false;
190 
191  SiStripDigiCollectionDM_ = ps.getParameter<std::string>("SiStripDigiCollectionDM");
192 
193  if(useSiStripRawDigi_) {
194 
195  produces< edm::DetSetVector<SiStripRawDigi> > (SiStripDigiCollectionDM_);
196  SiStripRawWorker_ = new DataMixingSiStripRawWorker(ps, consumesCollector());
197 
198  } else {
199 
200  produces< edm::DetSetVector<SiStripDigi> > (SiStripDigiCollectionDM_);
201 
202  if( addMCDigiNoise_ ) {
203  SiStripMCDigiWorker_ = new DataMixingSiStripMCDigiWorker(ps, consumesCollector());
204  }
205  else {
206  SiStripWorker_ = new DataMixingSiStripWorker(ps, consumesCollector());
207  }
208  }
209 
210  // Pixels
211 
212  PixelDigiCollectionDM_ = ps.getParameter<std::string>("PixelDigiCollectionDM");
213 
214  produces< edm::DetSetVector<PixelDigi> > (PixelDigiCollectionDM_);
215 
216  if( addMCDigiNoise_ ) {
217  SiPixelMCDigiWorker_ = new DataMixingSiPixelMCDigiWorker(ps, consumesCollector());
218  }
219  else {
220  SiPixelWorker_ = new DataMixingSiPixelWorker(ps, consumesCollector());
221  }
222 
223  }
224  else{
225  //Tracks:
226  edm::ConsumesCollector iC(consumesCollector());
228  }
229 
230  // Pileup Information: if doing pre-mixing, we have to save the pileup information from the Secondary stream
231 
232  MergePileup_ = ps.getParameter<bool>("MergePileupInfo");
233 
234  if(MergePileup_) {
235  produces< std::vector<PileupSummaryInfo> >();
236  produces< int >("bunchSpacing");
237  produces<CrossingFramePlaybackInfoNew>();
238 
239  std::vector<edm::InputTag> GenPUProtonsInputTags;
240  GenPUProtonsInputTags = ps.getParameter<std::vector<edm::InputTag> >("GenPUProtonsInputTags");
241  for(std::vector<edm::InputTag>::const_iterator it_InputTag = GenPUProtonsInputTags.begin();
242  it_InputTag != GenPUProtonsInputTags.end(); ++it_InputTag)
243  produces< std::vector<reco::GenParticle> >( it_InputTag->label() );
244 
245  PUWorker_ = new DataMixingPileupCopy(ps, consumesCollector());
246  }
247 
248  // Validation
249 
250  produces< std::vector<TrackingParticle> >(ps.getParameter<std::string>("TrackingParticleCollectionDM"));
251  produces< std::vector<TrackingVertex> >(ps.getParameter<std::string>("TrackingParticleCollectionDM"));
252 
253  produces< edm::DetSetVector<StripDigiSimLink> >(ps.getParameter<std::string>("StripDigiSimLinkCollectionDM"));
254  produces< edm::DetSetVector<PixelDigiSimLink> >(ps.getParameter<std::string>("PixelDigiSimLinkCollectionDM"));
255  produces< MuonDigiCollection<DTLayerId,DTDigiSimLink> >(ps.getParameter<std::string>("DTDigiSimLinkDM"));
256  produces< edm::DetSetVector<RPCDigiSimLink> >(ps.getParameter<std::string>("RPCDigiSimLinkDM"));
257  produces< edm::DetSetVector<StripDigiSimLink> >(ps.getParameter<std::string>("CSCStripDigiSimLinkDM"));
258  produces< edm::DetSetVector<StripDigiSimLink> >(ps.getParameter<std::string>("CSCWireDigiSimLinkDM"));
259 
260  TrackingParticleWorker_ = new DataMixingTrackingParticleWorker(ps, consumesCollector());
261 
262  }
T getParameter(std::string const &) const
edm::EDGetTokenT< HcalQIE11DigitizerTraits::DigiCollection > tok_qie11_
T getUntrackedParameter(std::string const &, T const &) const
std::string HFDigiCollectionDM_
std::string HBHERecHitCollectionDM_
edm::InputTag QIE11PileInputTag_
std::string ZDCRecHitCollectionDM_
void setESAccess(edm::EDGetTokenT< ESDigitizerTraits::DigiCollection > tok)
edm::EDGetTokenT< EBDigitizerTraits::DigiCollection > tok_eb_
std::string CSCStripDigiCollectionDM_
edm::InputTag QIE10PileInputTag_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string SiStripDigiCollectionDM_
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollection > tok_zdc_
edm::EDGetTokenT< HODigitizerTraits::DigiCollection > tok_ho_
DigiAccumulatorMixMod * GeneralTrackWorker_
std::string CSCWireDigiCollectionDM_
edm::EDGetTokenT< ESDigitizerTraits::DigiCollection > tok_es_
std::string QIE10DigiCollectionDM_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
std::string RPCDigiCollectionDM_
std::string ZDCDigiCollectionDM_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
edm::InputTag EEPileInputTag_
edm::EDGetTokenT< EEDigitizerTraits::DigiCollection > tok_ee_
edm::InputTag ESPileInputTag_
DataMixingPileupCopy * PUWorker_
void setEBAccess(edm::EDGetTokenT< EBDigitizerTraits::DigiCollection > tok)
std::string HORecHitCollectionDM_
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingMuonWorker * MuonWorker_
virtual void getSubdetectorNames()
edm::InputTag EBPileInputTag_
std::string EEDigiCollectionDM_
ParameterSet const & getParameterSet(std::string const &) const
DataMixingTrackingParticleWorker * TrackingParticleWorker_
edm::InputTag HBHEPileInputTag_
std::string HFRecHitCollectionDM_
edm::EDGetTokenT< HcalQIE10DigitizerTraits::DigiCollection > tok_qie10_
std::string HBHEDigiCollectionDM_
std::string EBRecHitCollectionDM_
std::string CSCComparatorDigiCollectionDM_
edm::InputTag HOPileInputTag_
void setEEAccess(edm::EDGetTokenT< EEDigitizerTraits::DigiCollection > tok)
DataMixingSiStripWorker * SiStripWorker_
std::string ESRecHitCollectionDM_
std::string EERecHitCollectionDM_
edm::EDGetTokenT< HFDigitizerTraits::DigiCollection > tok_hf_
std::string ESDigiCollectionDM_
std::string DTDigiCollectionDM_
std::unique_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, ProducerBase &, ConsumesCollector &) const
std::string EBDigiCollectionDM_
DataMixingHcalWorker * HcalWorker_
edm::InputTag HFPileInputTag_
std::string HODigiCollectionDM_
std::string PixelDigiCollectionDM_
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
edm::EDGetTokenT< HBHEDigitizerTraits::DigiCollection > tok_hbhe_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
static DigiAccumulatorMixModFactory const * get()
std::string QIE11DigiCollectionDM_
DataMixingEMDigiWorker * EMDigiWorker_
edm::InputTag ZDCPileInputTag_
BMixingModule(const edm::ParameterSet &ps, MixingCache::Config const *globalConf)
DataMixingModule::~DataMixingModule ( )
override

Default destructor

Definition at line 339 of file DataMixingModule.cc.

References addMCDigiNoise_, EcalDigiWorkerProd_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MergeTrackerDigis_, MuonWorker_, PUWorker_, SiPixelMCDigiWorker_, SiPixelWorker_, SiStripMCDigiWorker_, SiStripRawWorker_, SiStripWorker_, TrackingParticleWorker_, and useSiStripRawDigi_.

339  {
340  if(MergeEMDigis_){
341  if(addMCDigiNoise_ ) {delete EcalDigiWorkerProd_;}
342  else {delete EMDigiWorker_;}
343  }
344  else {delete EMWorker_;}
345  if(MergeHcalDigis_) {
347  else { delete HcalDigiWorker_; }}
348  else {delete HcalWorker_;}
349  if(MuonWorker_) delete MuonWorker_;
350  if(MergeTrackerDigis_){
352  delete SiStripRawWorker_;
353  else if(addMCDigiNoise_ ) delete SiStripMCDigiWorker_;
354  else delete SiStripWorker_;
356  else delete SiPixelWorker_;
357  }
358  else{
359  delete GeneralTrackWorker_;
360  }
361  if(MergePileup_) { delete PUWorker_;}
362 
364  }
DigiAccumulatorMixMod * GeneralTrackWorker_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingPileupCopy * PUWorker_
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingMuonWorker * MuonWorker_
DataMixingTrackingParticleWorker * TrackingParticleWorker_
DataMixingSiStripWorker * SiStripWorker_
DataMixingHcalWorker * HcalWorker_
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
DataMixingEMDigiWorker * EMDigiWorker_

Member Function Documentation

void DataMixingModule::addSignals ( const edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Reimplemented from edm::BMixingModule.

Definition at line 366 of file DataMixingModule.cc.

References DigiAccumulatorMixMod::accumulate(), edm::DataMixingEcalDigiWorkerProd::addEcalSignals(), AddedPileup_, edm::DataMixingEMWorker::addEMSignals(), edm::DataMixingEMDigiWorker::addEMSignals(), edm::DataMixingHcalWorker::addHcalSignals(), edm::DataMixingHcalDigiWorker::addHcalSignals(), edm::DataMixingHcalDigiWorkerProd::addHcalSignals(), addMCDigiNoise_, edm::DataMixingMuonWorker::addMuonSignals(), edm::DataMixingSiPixelWorker::addSiPixelSignals(), edm::DataMixingSiPixelMCDigiWorker::addSiPixelSignals(), edm::DataMixingSiStripWorker::addSiStripSignals(), edm::DataMixingSiStripRawWorker::addSiStripSignals(), edm::DataMixingSiStripMCDigiWorker::addSiStripSignals(), edm::DataMixingTrackingParticleWorker::addTrackingParticleSignals(), EcalDigiWorkerProd_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, edm::EventBase::id(), LogDebug, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergeTrackerDigis_, MuonWorker_, SiPixelMCDigiWorker_, SiPixelWorker_, SiStripMCDigiWorker_, SiStripRawWorker_, SiStripWorker_, TrackingParticleWorker_, and useSiStripRawDigi_.

Referenced by createnewEDProduct().

366  {
367  // fill in maps of hits
368 
369  LogDebug("DataMixingModule")<<"===============> adding MC signals for "<<e.id();
370 
371  // Ecal
372  if(MergeEMDigis_) {
374  else {EMDigiWorker_->addEMSignals(e, ES); }
375  }
376  else{ EMWorker_->addEMSignals(e);}
377 
378  // Hcal
379  if(MergeHcalDigis_) {
382  }
383  else{
385  }
386  }
387  else {HcalWorker_->addHcalSignals(e);}
388 
389  // Muon
391 
392  if(MergeTrackerDigis_){
393  // SiStrips
397 
398  // SiPixels
401  }else{
402  //GeneralTrackWorker_->addGeneralTrackSignal(e);
404  }
405  AddedPileup_ = false;
406 
408 
409  } // end of addSignals
#define LogDebug(id)
void addMuonSignals(const edm::Event &e)
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
virtual void accumulate(edm::Event const &event, edm::EventSetup const &setup)=0
void addSiStripSignals(const edm::Event &e)
void addHcalSignals(const edm::Event &e)
void addEMSignals(const edm::Event &e)
DigiAccumulatorMixMod * GeneralTrackWorker_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingMuonWorker * MuonWorker_
DataMixingTrackingParticleWorker * TrackingParticleWorker_
edm::EventID id() const
Definition: EventBase.h:60
DataMixingSiStripWorker * SiStripWorker_
void addSiStripSignals(const edm::Event &e)
DataMixingHcalWorker * HcalWorker_
void addEcalSignals(const edm::Event &e, const edm::EventSetup &ES)
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void addEMSignals(const edm::Event &e, const edm::EventSetup &ES)
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
DataMixingEMDigiWorker * EMDigiWorker_
void addSiPixelSignals(const edm::Event &e)
void DataMixingModule::beginLuminosityBlock ( LuminosityBlock const &  l1,
EventSetup const &  c 
)
override

Definition at line 582 of file DataMixingModule.cc.

References addMCDigiNoise_, edm::BMixingModule::beginLuminosityBlock(), edm::DataMixingEcalDigiWorkerProd::beginLuminosityBlock(), and EcalDigiWorkerProd_.

Referenced by createnewEDProduct().

582  {
585  }
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
void DataMixingModule::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eventSetup 
)
override

Definition at line 322 of file DataMixingModule.cc.

References addMCDigiNoise_, edm::BMixingModule::beginRun(), edm::DataMixingHcalDigiWorkerProd::beginRun(), edm::DataMixingEcalDigiWorkerProd::beginRun(), EcalDigiWorkerProd_, and HcalDigiWorkerProd_.

Referenced by createnewEDProduct().

322  {
324  if( addMCDigiNoise_ ) {
327  }
328  }
void beginRun(const edm::Run &r, const edm::EventSetup &setup) override
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
void beginRun(const edm::EventSetup &ES)
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void beginRun(const edm::Run &run, const edm::EventSetup &ES)
void edm::DataMixingModule::checkSignal ( const edm::Event e)
inlineoverridevirtual

Reimplemented from edm::BMixingModule.

Definition at line 62 of file DataMixingModule.h.

62 {};
void edm::DataMixingModule::createnewEDProduct ( )
inlineoverridevirtual
void DataMixingModule::doPileUp ( edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Reimplemented from edm::BMixingModule.

Definition at line 481 of file DataMixingModule.cc.

References DigiAccumulatorMixMod::finalizeBunchCrossing(), GeneralTrackWorker_, edm::EventBase::id(), DigiAccumulatorMixMod::initializeBunchCrossing(), edm::BMixingModule::inputSources_, edm::BMixingModule::maxBunch_, edm::BMixingModule::maxNbSources_, MergeTrackerDigis_, edm::BMixingModule::minBunch_, edm::Event::moduleCallingContext(), pileWorker(), edm::source(), edm::Event::streamID(), and edm::BMixingModule::TrueNumInteractions_.

Referenced by createnewEDProduct().

482  {
483  using namespace std::placeholders;
484 
485  std::vector<edm::SecondaryEventIDAndFileInfo> recordEventID;
486  std::vector<int> PileupList;
487  PileupList.clear();
488  TrueNumInteractions_.clear();
489 
490  ModuleCallingContext const* mcc = e.moduleCallingContext();
491 
492  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
493  for (unsigned int isource=0;isource<maxNbSources_;++isource) {
494  std::shared_ptr<PileUp> source = inputSources_[isource];
495  if (!source || !(source->doPileUp(bunchCrossing)))
496  continue;
497 
498  if (isource==0)
499  source->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_, e.streamID());
500 
501  int NumPU_Events = 0;
502  if (isource ==0) {
503  NumPU_Events = PileupList[bunchCrossing - minBunch_];
504  } else {
505  // non-minbias pileup only gets one event for now. Fix later if desired.
506  NumPU_Events = 1;
507  }
508 
509  if(!MergeTrackerDigis_)
510  GeneralTrackWorker_->initializeBunchCrossing(e, ES, bunchCrossing);
511 
512  source->readPileUp(
513  e.id(),
514  recordEventID,
515  std::bind(&DataMixingModule::pileWorker, std::ref(*this),
516  _1, bunchCrossing, _2, std::cref(ES), mcc),
517  NumPU_Events,
518  e.streamID()
519  );
520 
521  if(!MergeTrackerDigis_)
522  GeneralTrackWorker_->finalizeBunchCrossing(e, ES, bunchCrossing);
523 
524  }
525  }
526 
527  }
static std::string const source("source")
std::vector< float > TrueNumInteractions_
virtual void initializeBunchCrossing(edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
DigiAccumulatorMixMod * GeneralTrackWorker_
ModuleCallingContext const * moduleCallingContext() const
Definition: Event.h:258
static const unsigned int maxNbSources_
void pileWorker(const edm::EventPrincipal &, int bcr, int EventId, const edm::EventSetup &ES, ModuleCallingContext const *)
virtual void finalizeBunchCrossing(edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
edm::EventID id() const
Definition: EventBase.h:60
std::vector< std::shared_ptr< PileUp > > inputSources_
StreamID streamID() const
Definition: Event.h:95
void DataMixingModule::endLuminosityBlock ( LuminosityBlock const &  l1,
EventSetup const &  c 
)
override

Definition at line 587 of file DataMixingModule.cc.

References edm::BMixingModule::endLuminosityBlock().

Referenced by createnewEDProduct().

587  {
588  // EcalDigiWorkerProd_->endLuminosityBlock(l1,c); // FIXME Not implemented.
590  }
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
void DataMixingModule::endRun ( const edm::Run r,
const edm::EventSetup setup 
)
override

Definition at line 330 of file DataMixingModule.cc.

References edm::BMixingModule::endRun().

Referenced by createnewEDProduct().

330  {
331  //if( addMCDigiNoise_ ) {
332  // HcalDigiWorkerProd_->endRun( run, ES ); // FIXME not implemented
333  // EcalDigiWorkerProd_->endRun( ES ); // FIXME not implemented
334  //}
336  }
void endRun(const edm::Run &r, const edm::EventSetup &setup) override
void DataMixingModule::getSubdetectorNames ( )
privatevirtual

Definition at line 264 of file DataMixingModule.cc.

Referenced by DataMixingModule().

264  {
265  // get subdetector names
266  // edm::Service<edm::ConstProductRegistry> reg;
267  // Loop over provenance of products in registry.
268  //for (edm::ProductRegistry::ProductList::const_iterator it = reg->productList().begin(); it != reg->productList().end(); ++it) {
269 
270  // **** Check this out.... ****
271 
272  // See FWCore/Framework/interface/BranchDescription.h
273  // BranchDescription contains all the information for the product.
274 
275  // This section not very backwards-compatible in terms of digi-merging. Need to be able to specify here which data format
276  // to look at...
277 
278  // edm::BranchDescription desc = it->second;
279  //if (!desc.friendlyClassName_.compare(0,9,"EBRecHitC")) {
280  // Subdetectors_.push_back(desc.productInstanceName_);
281  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
282  //}
283  //else if (!desc.friendlyClassName_.compare(0,9,"EERecHitC")) {
284  // else if (!desc.friendlyClassName_.compare(0,9,"EErechitC") && desc.productInstanceName_.compare(0,11,"TrackerHits")) {
285  // Subdetectors_.push_back(desc.productInstanceName_);
286  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
287  //}
288  //else if (!desc.friendlyClassName_.compare(0,9,"HBRecHitC")) {
289  // Subdetectors_.push_back(desc.productInstanceName_);
290  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
291  //}
292  //else if (!desc.friendlyClassName_.compare(0,9,"HERecHitC")) {
293  // Subdetectors_.push_back(desc.productInstanceName_);
294  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
295  // }
296  // and so on with other detector types...
297  // }
298  }
void DataMixingModule::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  eventSetup 
)
override

Definition at line 301 of file DataMixingModule.cc.

References addMCDigiNoise_, EcalDigiWorkerProd_, GeneralTrackWorker_, HcalDigiWorkerProd_, DigiAccumulatorMixMod::initializeEvent(), edm::DataMixingTrackingParticleWorker::initializeEvent(), edm::DataMixingHcalDigiWorkerProd::initializeEvent(), edm::DataMixingEcalDigiWorkerProd::initializeEvent(), edm::DataMixingSiPixelMCDigiWorker::initializeEvent(), edm::DataMixingSiStripMCDigiWorker::initializeEvent(), MergeHcalDigisProd_, MergeTrackerDigis_, SiPixelMCDigiWorker_, SiStripMCDigiWorker_, and TrackingParticleWorker_.

Referenced by createnewEDProduct().

301  {
302 
303  if( addMCDigiNoise_ ) {
304  if(MergeTrackerDigis_){
307  }
308  else{
310  }
312  }
315  }
316 
318 
319  }
virtual void initializeEvent(edm::Event const &event, edm::EventSetup const &setup)=0
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
virtual void initializeEvent(const edm::Event &e, edm::EventSetup const &iSetup)
DigiAccumulatorMixMod * GeneralTrackWorker_
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES)
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingTrackingParticleWorker * TrackingParticleWorker_
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES)
void DataMixingModule::pileWorker ( const edm::EventPrincipal ep,
int  bcr,
int  EventId,
const edm::EventSetup ES,
edm::ModuleCallingContext const *  mcc 
)

Definition at line 414 of file DataMixingModule.cc.

References DigiAccumulatorMixMod::accumulate(), edm::DataMixingEcalDigiWorkerProd::addEcalPileups(), AddedPileup_, edm::DataMixingEMWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingHcalWorker::addHcalPileups(), edm::DataMixingHcalDigiWorkerProd::addHcalPileups(), edm::DataMixingHcalDigiWorker::addHcalPileups(), addMCDigiNoise_, edm::DataMixingMuonWorker::addMuonPileups(), edm::DataMixingPileupCopy::addPileupInfo(), edm::DataMixingSiPixelWorker::addSiPixelPileups(), edm::DataMixingSiPixelMCDigiWorker::addSiPixelPileups(), edm::DataMixingSiStripWorker::addSiStripPileups(), edm::DataMixingSiStripRawWorker::addSiStripPileups(), edm::DataMixingSiStripMCDigiWorker::addSiStripPileups(), edm::DataMixingTrackingParticleWorker::addTrackingParticlePileups(), EcalDigiWorkerProd_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, edm::EventPrincipal::id(), LogDebug, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MergeTrackerDigis_, MuonWorker_, PUWorker_, edm::BMixingModule::setupPileUpEvent(), SiPixelMCDigiWorker_, SiPixelWorker_, SiStripMCDigiWorker_, SiStripRawWorker_, SiStripWorker_, edm::EventPrincipal::streamID(), TrackingParticleWorker_, and useSiStripRawDigi_.

Referenced by createnewEDProduct(), and doPileUp().

414  {
415 
416  InternalContext internalContext(ep.id(), mcc);
417  ParentContext parentContext(&internalContext);
418  ModuleCallingContext moduleCallingContext(&moduleDescription());
419  ModuleContextSentry moduleContextSentry(&moduleCallingContext, parentContext);
420 
421  LogDebug("DataMixingModule") <<"\n===============> adding pileups from event "<<ep.id()<<" for bunchcrossing "<<bcr;
422 
423  // Note: setupPileUpEvent may modify the run and lumi numbers of the EventPrincipal to match that of the primary event.
424  setupPileUpEvent(ES);
425 
426  // check and see if we need to copy the pileup information from
427  // secondary stream to the output stream
428  // We only have the pileup event here, so pick the first time and store the info
429 
430 
431  if(MergePileup_ && !AddedPileup_){
432 
433  PUWorker_->addPileupInfo(&ep, eventNr, &moduleCallingContext);
434 
435  AddedPileup_ = true;
436  }
437 
438  // fill in maps of hits; same code as addSignals, except now applied to the pileup events
439 
440  // Ecal
441  if(MergeEMDigis_) {
442  if(addMCDigiNoise_ ) { EcalDigiWorkerProd_->addEcalPileups(bcr, &ep, eventNr, ES, &moduleCallingContext);}
443  else { EMDigiWorker_->addEMPileups(bcr, &ep, eventNr, ES, &moduleCallingContext);}
444  }
445  else {EMWorker_->addEMPileups(bcr, &ep, eventNr, &moduleCallingContext); }
446 
447  // Hcal
448  if(MergeHcalDigis_) {
449  if(MergeHcalDigisProd_) {
450  HcalDigiWorkerProd_->addHcalPileups(bcr, &ep, eventNr, ES, &moduleCallingContext);
451  }
452  else{
453  HcalDigiWorker_->addHcalPileups(bcr, &ep, eventNr, ES, &moduleCallingContext);}
454  }
455  else {HcalWorker_->addHcalPileups(bcr, &ep, eventNr, &moduleCallingContext);}
456 
457  // Muon
458  MuonWorker_->addMuonPileups(bcr, &ep, eventNr, &moduleCallingContext);
459 
460  if(MergeTrackerDigis_){
461  // SiStrips
462  if(useSiStripRawDigi_) SiStripRawWorker_->addSiStripPileups(bcr, &ep, eventNr, &moduleCallingContext);
463  else if(addMCDigiNoise_ ) SiStripMCDigiWorker_->addSiStripPileups(bcr, &ep, eventNr, &moduleCallingContext);
464  else SiStripWorker_->addSiStripPileups(bcr, &ep, eventNr, &moduleCallingContext);
465 
466  // SiPixels
467  //whoops this should be for the MC worker ????? SiPixelWorker_->setPileupInfo(ps,bunchSpacing);
468  if(addMCDigiNoise_ ) SiPixelMCDigiWorker_->addSiPixelPileups(bcr, &ep, eventNr, &moduleCallingContext);
469  else SiPixelWorker_->addSiPixelPileups(bcr, &ep, eventNr, &moduleCallingContext);
470  }else{
471  PileUpEventPrincipal pep(ep,&moduleCallingContext,bcr);
472  GeneralTrackWorker_->accumulate(pep, ES,ep.streamID());
473  }
474 
475  TrackingParticleWorker_->addTrackingParticlePileups(bcr, &ep, eventNr, &moduleCallingContext);
476 
477  }
#define LogDebug(id)
virtual void accumulate(edm::Event const &event, edm::EventSetup const &setup)=0
void addMuonPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
EventID const & id() const
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, ModuleCallingContext const *)
DigiAccumulatorMixMod * GeneralTrackWorker_
void addSiPixelPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, ModuleCallingContext const *)
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
StreamID streamID() const
DataMixingPileupCopy * PUWorker_
void addTrackingParticlePileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingMuonWorker * MuonWorker_
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, edm::ModuleCallingContext const *)
DataMixingTrackingParticleWorker * TrackingParticleWorker_
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
DataMixingSiStripWorker * SiStripWorker_
void addSiPixelPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
DataMixingHcalWorker * HcalWorker_
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void addPileupInfo(const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *mcc)
void setupPileUpEvent(const edm::EventSetup &setup)
void addEcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, edm::ModuleCallingContext const *)
DataMixingEMDigiWorker * EMDigiWorker_
void DataMixingModule::put ( edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Reimplemented from edm::BMixingModule.

Definition at line 530 of file DataMixingModule.cc.

References addMCDigiNoise_, EcalDigiWorkerProd_, EMDigiWorker_, EMWorker_, DigiAccumulatorMixMod::finalizeEvent(), GeneralTrackWorker_, edm::DataMixingPileupCopy::getPileupInfo(), HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MergeTrackerDigis_, MuonWorker_, edm::DataMixingEcalDigiWorkerProd::putEcal(), edm::DataMixingEMWorker::putEM(), edm::DataMixingEMDigiWorker::putEM(), edm::DataMixingHcalWorker::putHcal(), edm::DataMixingHcalDigiWorkerProd::putHcal(), edm::DataMixingHcalDigiWorker::putHcal(), edm::DataMixingMuonWorker::putMuon(), edm::DataMixingPileupCopy::putPileupInfo(), edm::DataMixingSiPixelWorker::putSiPixel(), edm::DataMixingSiPixelMCDigiWorker::putSiPixel(), edm::DataMixingSiStripWorker::putSiStrip(), edm::DataMixingSiStripRawWorker::putSiStrip(), edm::DataMixingSiStripMCDigiWorker::putSiStrip(), edm::DataMixingTrackingParticleWorker::putTrackingParticle(), PUWorker_, SiPixelMCDigiWorker_, SiPixelWorker_, SiStripMCDigiWorker_, SiStripRawWorker_, SiStripWorker_, TrackingParticleWorker_, and useSiStripRawDigi_.

Referenced by createnewEDProduct().

530  {
531 
532  // individual workers...
533 
534  // move pileup first so we have access to the information for the put step
535 
536  std::vector<PileupSummaryInfo> ps;
537  int bunchSpacing=10000;
538 
539  if(MergePileup_) {
540  PUWorker_->getPileupInfo(ps,bunchSpacing);
542  }
543 
544  // Ecal
545  if(MergeEMDigis_) {
547  else { EMDigiWorker_->putEM(e,ES);}
548  }
549  else {EMWorker_->putEM(e);}
550 
551  // Hcal
552  if(MergeHcalDigis_) {
553  if(MergeHcalDigisProd_) {
555  }
556  else{
557  HcalDigiWorker_->putHcal(e,ES);
558  }
559  }
560  else {HcalWorker_->putHcal(e);}
561 
562  // Muon
563  MuonWorker_->putMuon(e);
564 
565  if(MergeTrackerDigis_){
566  // SiStrips
569  else SiStripWorker_->putSiStrip(e);
570 
571  // SiPixels
572  if(addMCDigiNoise_ ) SiPixelMCDigiWorker_->putSiPixel(e, ES, ps, bunchSpacing);
573  else SiPixelWorker_->putSiPixel(e);
574  }else{
576  }
577 
579 
580  }
void putEM(edm::Event &e)
virtual void finalizeEvent(edm::Event &event, edm::EventSetup const &setup)=0
void putEcal(edm::Event &e, const edm::EventSetup &ES)
void putPileupInfo(edm::Event &e)
DigiAccumulatorMixMod * GeneralTrackWorker_
void putEM(edm::Event &e, const edm::EventSetup &ES)
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingSiStripMCDigiWorker * SiStripMCDigiWorker_
void putHcal(edm::Event &e, const edm::EventSetup &ES)
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingPileupCopy * PUWorker_
DataMixingEcalDigiWorkerProd * EcalDigiWorkerProd_
DataMixingMuonWorker * MuonWorker_
DataMixingTrackingParticleWorker * TrackingParticleWorker_
void putHcal(edm::Event &e, const edm::EventSetup &ES)
DataMixingSiStripWorker * SiStripWorker_
DataMixingHcalWorker * HcalWorker_
void getPileupInfo(std::vector< PileupSummaryInfo > &ps, int &bs)
DataMixingSiPixelMCDigiWorker * SiPixelMCDigiWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void putSiStrip(edm::Event &e, edm::EventSetup const &iSetup)
void putSiPixel(edm::Event &e, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > &ps, int &bs)
DataMixingEMDigiWorker * EMDigiWorker_

Member Data Documentation

bool edm::DataMixingModule::AddedPileup_
private

Definition at line 165 of file DataMixingModule.h.

Referenced by addSignals(), and pileWorker().

bool edm::DataMixingModule::addMCDigiNoise_
private
std::string edm::DataMixingModule::CSCComparatorDigiCollectionDM_
private

Definition at line 115 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::CSCStripDigiCollectionDM_
private

Definition at line 113 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::CSCWireDigiCollectionDM_
private

Definition at line 114 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::DTDigiCollectionDM_
private

Definition at line 111 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::EBDigiCollectionDM_
private

Definition at line 89 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::EBPileInputTag_
private

Definition at line 142 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::EBRecHitCollectionDM_
private

Definition at line 84 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingEcalDigiWorkerProd* edm::DataMixingModule::EcalDigiWorkerProd_
private
std::string edm::DataMixingModule::EEDigiCollectionDM_
private

Definition at line 90 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::EEPileInputTag_
private

Definition at line 143 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::EERecHitCollectionDM_
private

Definition at line 85 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingEMDigiWorker* edm::DataMixingModule::EMDigiWorker_
private

Definition at line 131 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

DataMixingEMWorker* edm::DataMixingModule::EMWorker_
private

Definition at line 130 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::ESDigiCollectionDM_
private

Definition at line 91 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::ESPileInputTag_
private

Definition at line 144 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::ESRecHitCollectionDM_
private

Definition at line 86 of file DataMixingModule.h.

Referenced by DataMixingModule().

DigiAccumulatorMixMod* edm::DataMixingModule::GeneralTrackWorker_
private
std::string edm::DataMixingModule::HBHEDigiCollectionDM_
private

Definition at line 102 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::HBHEPileInputTag_
private

Definition at line 145 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::HBHERecHitCollectionDM_
private

Definition at line 96 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingHcalDigiWorker* edm::DataMixingModule::HcalDigiWorker_
private

Definition at line 138 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

DataMixingHcalDigiWorkerProd* edm::DataMixingModule::HcalDigiWorkerProd_
private
DataMixingHcalWorker* edm::DataMixingModule::HcalWorker_
private

Definition at line 137 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::HFDigiCollectionDM_
private

Definition at line 104 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::HFPileInputTag_
private

Definition at line 147 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::HFRecHitCollectionDM_
private

Definition at line 98 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::HODigiCollectionDM_
private

Definition at line 103 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::HOPileInputTag_
private

Definition at line 146 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::HORecHitCollectionDM_
private

Definition at line 97 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::label_
private
bool edm::DataMixingModule::MergeEMDigis_
private

Definition at line 133 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

bool edm::DataMixingModule::MergeHcalDigis_
private

Definition at line 161 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

bool edm::DataMixingModule::MergeHcalDigisProd_
private
bool edm::DataMixingModule::MergePileup_
private

Definition at line 164 of file DataMixingModule.h.

Referenced by DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

bool edm::DataMixingModule::MergeTrackerDigis_
private
DataMixingMuonWorker* edm::DataMixingModule::MuonWorker_
private

Definition at line 169 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::PixelDigiCollectionDM_
private

Definition at line 121 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingPileupCopy* edm::DataMixingModule::PUWorker_
private

Definition at line 128 of file DataMixingModule.h.

Referenced by DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::QIE10DigiCollectionDM_
private

Definition at line 106 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::QIE10PileInputTag_
private

Definition at line 149 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::QIE11DigiCollectionDM_
private

Definition at line 107 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::QIE11PileInputTag_
private

Definition at line 150 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::RPCDigiCollectionDM_
private

Definition at line 112 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingSiPixelMCDigiWorker* edm::DataMixingModule::SiPixelMCDigiWorker_
private
DataMixingSiPixelWorker* edm::DataMixingModule::SiPixelWorker_
private

Definition at line 183 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::SiStripDigiCollectionDM_
private

Definition at line 118 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingSiStripMCDigiWorker* edm::DataMixingModule::SiStripMCDigiWorker_
private
std::string edm::DataMixingModule::siStripRawDigiSource_
private

Definition at line 178 of file DataMixingModule.h.

DataMixingSiStripRawWorker* edm::DataMixingModule::SiStripRawWorker_
private

Definition at line 175 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

DataMixingSiStripWorker* edm::DataMixingModule::SiStripWorker_
private

Definition at line 173 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::vector<std::string> edm::DataMixingModule::Subdetectors_
private

Definition at line 197 of file DataMixingModule.h.

edm::EDGetTokenT<EBDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_eb_
private

Definition at line 157 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<EEDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_ee_
private

Definition at line 158 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<ESDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_es_
private

Definition at line 159 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<HBHEDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_hbhe_
private

Definition at line 151 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<HFDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_hf_
private

Definition at line 153 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<HODigitizerTraits::DigiCollection> edm::DataMixingModule::tok_ho_
private

Definition at line 152 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<HcalQIE10DigitizerTraits::DigiCollection> edm::DataMixingModule::tok_qie10_
private

Definition at line 155 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<HcalQIE11DigitizerTraits::DigiCollection> edm::DataMixingModule::tok_qie11_
private

Definition at line 156 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::EDGetTokenT<ZDCDigitizerTraits::DigiCollection> edm::DataMixingModule::tok_zdc_
private

Definition at line 154 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingTrackingParticleWorker* edm::DataMixingModule::TrackingParticleWorker_
private
bool edm::DataMixingModule::useSiStripRawDigi_
private

Definition at line 176 of file DataMixingModule.h.

Referenced by addSignals(), DataMixingModule(), pileWorker(), put(), and ~DataMixingModule().

std::string edm::DataMixingModule::ZDCDigiCollectionDM_
private

Definition at line 105 of file DataMixingModule.h.

Referenced by DataMixingModule().

edm::InputTag edm::DataMixingModule::ZDCPileInputTag_
private

Definition at line 148 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::ZDCRecHitCollectionDM_
private

Definition at line 99 of file DataMixingModule.h.

Referenced by DataMixingModule().