CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MixingModule.cc
Go to the documentation of this file.
1 // File: MixingModule.cc
2 // Description: see MixingModule.h
3 // Author: Ursula Berthon, LLR Palaiseau, Bill Tanenbaum
4 //
5 //--------------------------------------------
6 
7 #include <functional>
8 #include <memory>
9 
10 #include "MixingModule.h"
11 #include "MixingWorker.h"
12 #include "Adjuster.h"
13 
35 
36 namespace edm {
37 
38  // Constructor
40  BMixingModule(ps_mix),
41  inputTagPlayback_(),
42  mixProdStep2_(ps_mix.getParameter<bool>("mixProdStep2")),
43  mixProdStep1_(ps_mix.getParameter<bool>("mixProdStep1")),
44  digiAccumulators_()
45  {
46  if (!mixProdStep1_ && !mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Standard mode.";
47  if (mixProdStep1_) LogInfo("MixingModule") << " The MixingModule was run in the Step1 mode. It produces a mixed secondary source.";
48  if (mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Step2 mode. It uses a mixed secondary source.";
49 
51  if (ps_mix.exists("useCurrentProcessOnly")) {
52  useCurrentProcessOnly_=ps_mix.getParameter<bool>("useCurrentProcessOnly");
53  LogInfo("MixingModule") <<" using given Parameter 'useCurrentProcessOnly' ="<<useCurrentProcessOnly_;
54  }
55  std::string labelPlayback;
56  if (ps_mix.exists("LabelPlayback")) {
57  labelPlayback = ps_mix.getParameter<std::string>("LabelPlayback");
58  }
59  if (labelPlayback.empty()) {
60  labelPlayback = ps_mix.getParameter<std::string>("@module_label");
61  }
62  if (playback_) {
64  consumes<CrossingFramePlaybackInfoExtended>(inputTagPlayback_);
65  }
66 
67  ParameterSet ps=ps_mix.getParameter<ParameterSet>("mixObjects");
68  std::vector<std::string> names = ps.getParameterNames();
69  for(std::vector<std::string>::iterator it=names.begin();it!= names.end();++it) {
70  ParameterSet pset=ps.getParameter<ParameterSet>((*it));
71  if (!pset.exists("type")) continue; //to allow replacement by empty pset
72  std::string object = pset.getParameter<std::string>("type");
73  std::vector<InputTag> tags=pset.getParameter<std::vector<InputTag> >("input");
74 
75  //if (!mixProdStep2_) {
76 
77  InputTag tagCF = InputTag();
78  std::string labelCF = " ";
79 
80  if (object=="SimTrack") {
81  InputTag tag;
82  if (tags.size()>0) tag=tags[0];
84 
85  branchesActivate(TypeID(typeid(std::vector<SimTrack>)).friendlyClassName(),std::string(""),tag,label);
86  adjustersObjects_.push_back(new Adjuster<SimTrack>(tag));
87  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
88  if(makeCrossingFrame) {
90  produces<CrossingFrame<SimTrack> >(label);
91  consumes<std::vector<SimTrack> >(tag);
92  }
93 
94  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
95  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
96 
97  } else if (object=="RecoTrack") {
98  InputTag tag;
99  if (tags.size()>0) tag=tags[0];
101 
102  branchesActivate(TypeID(typeid(std::vector<reco::Track>)).friendlyClassName(),std::string(""),tag,label);
103  branchesActivate(TypeID(typeid(std::vector<reco::TrackExtra>)).friendlyClassName(),std::string(""),tag,label);
105  // note: no crossing frame is foreseen to be used for this object type
106 
107  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
108  //std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
109 
110  } else if (object=="SimVertex") {
111  InputTag tag;
112  if (tags.size()>0) tag=tags[0];
114 
115  branchesActivate(TypeID(typeid(std::vector<SimVertex>)).friendlyClassName(),std::string(""),tag,label);
116  adjustersObjects_.push_back(new Adjuster<SimVertex>(tag));
117  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
118  if(makeCrossingFrame) {
120  produces<CrossingFrame<SimVertex> >(label);
121  consumes<std::vector<SimVertex> >(tag);
122  }
123 
124  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label;
125  // std::cout <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label<<std::endl;
126 
127  } else if (object=="HepMCProduct") {
128  InputTag tag;
129  if (tags.size()>0) tag=tags[0];
131 
132  branchesActivate(TypeID(typeid(HepMCProduct)).friendlyClassName(),std::string(""),tag,label);
133  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
134  if(makeCrossingFrame) {
136  produces<CrossingFrame<HepMCProduct> >(label);
137  }
138  consumes<HepMCProduct>(tag);
139 
140  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
141  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
142 
143  } else if (object=="PCaloHit") {
144  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
145  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
146  sort_all(crossingFrames);
147  for (unsigned int ii=0;ii<subdets.size();++ii) {
148  InputTag tag;
149  if (tags.size()==1) tag=tags[0];
150  else if(tags.size()>1) tag=tags[ii];
152 
153  branchesActivate(TypeID(typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[ii],tag,label);
154  adjustersObjects_.push_back(new Adjuster<PCaloHit>(tag));
155  if(binary_search_all(crossingFrames, tag.instance())) {
156  workersObjects_.push_back(new MixingWorker<PCaloHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
157  produces<CrossingFrame<PCaloHit> >(label);
158  consumes<std::vector<PCaloHit> >(tag);
159  }
160 
161  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
162  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
163 
164  }
165 
166  } else if (object=="PSimHit") {
167  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
168  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
169  sort_all(crossingFrames);
170  for (unsigned int ii=0;ii<subdets.size();++ii) {
171  InputTag tag;
172  if (tags.size()==1) tag=tags[0];
173  else if(tags.size()>1) tag=tags[ii];
175 
176  branchesActivate(TypeID(typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[ii],tag,label);
177  adjustersObjects_.push_back(new Adjuster<PSimHit>(tag));
178  if(binary_search_all(crossingFrames, tag.instance())) {
179  workersObjects_.push_back(new MixingWorker<PSimHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
180  produces<CrossingFrame<PSimHit> >(label);
181  consumes<std::vector<PSimHit> >(tag);
182  }
183 
184  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
185  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
186  }
187  } else {
188  LogWarning("MixingModule") <<"You have asked to mix an unknown type of object("<<object<<").\n If you want to include it in mixing, please contact the authors of the MixingModule!";
189  }
190  //} //if for mixProdStep2
191  }//while over the mixObjects parameters
192 
194  for (unsigned int branch=0;branch<wantedBranches_.size();++branch) LogDebug("MixingModule")<<"Will keep branch "<<wantedBranches_[branch]<<" for mixing ";
195 
197 
198  produces<PileupMixingContent>();
199 
200  produces<CrossingFramePlaybackInfoExtended>();
201 
203  // Create and configure digitizers
204  createDigiAccumulators(ps_mix, iC);
205  }
206 
207 
209  ParameterSet const& digiPSet = mixingPSet.getParameterSet("digitizers");
210  std::vector<std::string> digiNames = digiPSet.getParameterNames();
211  for(auto const& digiName : digiNames) {
212  ParameterSet const& pset = digiPSet.getParameterSet(digiName);
213  std::auto_ptr<DigiAccumulatorMixMod> accumulator = std::auto_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModFactory::get()->makeDigiAccumulator(pset, *this, iC));
214  // Create appropriate DigiAccumulator
215  if(accumulator.get() != 0) {
216  digiAccumulators_.push_back(accumulator.release());
217  }
218  }
219  }
220 
222  //change the basic parameters.
224  setup.get<MixingRcd>().get(config);
225  minBunch_=config->minBunch();
226  maxBunch_=config->maxBunch();
227  bunchSpace_=config->bunchSpace();
228  //propagate to change the workers
229  for (unsigned int ii=0;ii<workersObjects_.size();++ii){
230  workersObjects_[ii]->reload(setup);
231  }
232  }
233 
235 
236  label=tag.label()+tag.instance();
237  wantedBranches_.push_back(friendlyName + '_' +
238  tag.label() + '_' +
239  tag.instance());
240 
241  //if useCurrentProcessOnly, we have to change the input tag
244  tag = InputTag(tag.label(),tag.instance(),processName);
245  }
246  }
247 
249  if (adjusters_.empty()){
250  for (auto const& adjuster : adjustersObjects_) {
251  if (adjuster->checkSignal(e)){
252  adjusters_.push_back(adjuster);
253  }
254  }
255  }
256  if (workers_.empty()){
257  for (auto const& worker : workersObjects_) {
258  if (worker->checkSignal(e)){
259  workers_.push_back(worker);
260  }
261  }
262  }
263  }
264 
266  //create playback info
268  //and CrossingFrames
269  for (unsigned int ii=0;ii<workers_.size();++ii){
270  workers_[ii]->createnewEDProduct();
271  }
272  }
273 
274  // Virtual destructor needed.
276  for (auto& worker : workersObjects_) {
277  delete worker;
278  }
279 
280  for (auto& adjuster : adjustersObjects_) {
281  delete adjuster;
282  }
283 
284  for (auto& digiAccumulator : digiAccumulators_) {
285  delete digiAccumulator;
286  }
287  }
288 
290 
291  LogDebug("MixingModule")<<"===============> adding signals for "<<e.id();
292 
293  accumulateEvent(e, setup);
294  // fill in signal part of CrossingFrame
295  for (unsigned int ii=0;ii<workers_.size();++ii) {
296  workers_[ii]->addSignals(e);
297  }
298  }
299 
300  void MixingModule::pileAllWorkers(EventPrincipal const& eventPrincipal,
301  ModuleCallingContext const* mcc,
302  int bunchCrossing, int eventId,
303  int& vertexOffset,
304  const edm::EventSetup& setup,
305  StreamID const& streamID) {
306 
307  InternalContext internalContext(eventPrincipal.id(), mcc);
308  ParentContext parentContext(&internalContext);
309  ModuleCallingContext moduleCallingContext(&moduleDescription());
310  ModuleContextSentry moduleContextSentry(&moduleCallingContext, parentContext);
311 
312  for (auto const& adjuster : adjusters_) {
313  adjuster->doOffset(bunchSpace_, bunchCrossing, eventPrincipal, &moduleCallingContext, eventId, vertexOffset);
314  }
315  PileUpEventPrincipal pep(eventPrincipal, &moduleCallingContext, bunchCrossing);
316  accumulateEvent(pep, setup, streamID);
317 
318  for (auto const& worker : workers_) {
319  LogDebug("MixingModule") <<" merging Event: id " << eventPrincipal.id();
320  // std::cout <<"PILEALLWORKERS merging Event: id " << eventPrincipal.id() << std::endl;
321 
322  worker->addPileups(eventPrincipal, &moduleCallingContext, eventId);
323  }
324  }
325 
327  using namespace std::placeholders;
328 
329  // Don't allocate because PileUp will do it for us.
330  std::vector<edm::EventID> recordEventID;
332  if (playback_) {
333  bool got = e.getByLabel(inputTagPlayback_, playbackInfo_H);
334  if (!got) {
335  throw cms::Exception("MixingProductNotFound") << " No "
336  "CrossingFramePlaybackInfoExtended on the input file, but playback "
337  "option set!!!!! Please change the input file if you really want "
338  "playback!!!!!!" << std::endl;
339  }
340  }
341 
342  // source[0] is "real" pileup. Check to see that this is what we are doing.
343 
344  std::vector<int> PileupList;
345  PileupList.clear();
346  TrueNumInteractions_.clear();
347 
348  std::shared_ptr<PileUp> source0 = inputSources_[0];
349 
350  if((source0 && source0->doPileUp(0) ) && !playback_) {
351  // if((!inputSources_[0] || !inputSources_[0]->doPileUp()) && !playback_ )
352 
353  // Pre-calculate all pileup distributions before we go fishing for events
354 
355  source0->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_, e.streamID());
356 
357  }
358 
359  // for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
360  // std::cout << " bunch ID, Pileup, True " << bunchIdx << " " << PileupList[bunchIdx-minBunch_] << " " << TrueNumInteractions_[bunchIdx-minBunch_] << std::endl;
361  //}
362 
363  int KeepTrackOfPileup = 0;
364  std::vector<edm::EventID> eventInfoList;
365 
366  for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
367  for (size_t setBcrIdx=0; setBcrIdx<workers_.size(); ++setBcrIdx) {
368  workers_[setBcrIdx]->setBcrOffset();
369  }
370  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
371  (*accItr)->initializeBunchCrossing(e, setup, bunchIdx);
372  }
373 
374  for (size_t readSrcIdx=0; readSrcIdx<maxNbSources_; ++readSrcIdx) {
375  std::shared_ptr<PileUp> source = inputSources_[readSrcIdx]; // this looks like we create
376  // new PileUp objects for each
377  // source for each event?
378  // Why?
379  for (size_t setSrcIdx=0; setSrcIdx<workers_.size(); ++setSrcIdx) {
380  workers_[setSrcIdx]->setSourceOffset(readSrcIdx);
381  }
382 
383  if (!source || !source->doPileUp(bunchIdx)) continue;
384 
385  int NumPU_Events = 0;
386 
387  if(readSrcIdx ==0 && !playback_) {
388  NumPU_Events = PileupList[bunchIdx - minBunch_];
389  } else {
390  NumPU_Events = 1;
391  } // non-minbias pileup only gets one event for now. Fix later if desired.
392 
393  // int eventId = 0;
394  int vertexOffset = 0;
395 
396  ModuleCallingContext const* mcc = e.moduleCallingContext();
397  if (!playback_) {
398  inputSources_[readSrcIdx]->readPileUp(e.id(), recordEventID,
399  std::bind(&MixingModule::pileAllWorkers, std::ref(*this), _1, mcc, bunchIdx,
400  _2, vertexOffset, std::ref(setup), e.streamID()), NumPU_Events, e.streamID()
401  );
402  playbackInfo_->setStartEventId(recordEventID, readSrcIdx, bunchIdx, KeepTrackOfPileup);
403  const std::vector<edm::EventID>& playEventID =
404  playbackInfo_->getStartEventId(readSrcIdx, bunchIdx);
405  for ( unsigned int pu=0; pu<playEventID.size(); pu++ ) { eventInfoList.push_back(playEventID[pu]); }
406 
407  KeepTrackOfPileup+=NumPU_Events;
408  } else {
409  const std::vector<edm::EventID>& playEventID =
410  playbackInfo_H->getStartEventId(readSrcIdx, bunchIdx);
411  if(readSrcIdx == 0) {
412  PileupList.push_back(playEventID.size());
413  TrueNumInteractions_.push_back(playEventID.size());
414  }
415  inputSources_[readSrcIdx]->playPileUp(
416  playEventID,
417  std::bind(&MixingModule::pileAllWorkers, std::ref(*this), _1, mcc, bunchIdx,
418  _2, vertexOffset, std::ref(setup), e.streamID())
419  );
420  for ( unsigned int pu=0; pu<playEventID.size(); pu++ ) eventInfoList.push_back(playEventID[pu]);
421  }
422  }
423  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
424  (*accItr)->finalizeBunchCrossing(e, setup, bunchIdx);
425  }
426  }
427 
428  // Keep track of pileup accounting...
429 
430  std::auto_ptr<PileupMixingContent> PileupMixing_;
431 
432  std::vector<int> numInteractionList;
433  std::vector<int> bunchCrossingList;
434  std::vector<float> TrueInteractionList;
435 
436  //Makin' a list: Basically, we don't care about the "other" sources at this point.
437  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
438  bunchCrossingList.push_back(bunchCrossing);
439  if(!inputSources_[0] || !inputSources_[0]->doPileUp(0)) {
440  numInteractionList.push_back(0);
441  TrueInteractionList.push_back(0);
442  }
443  else {
444  numInteractionList.push_back(PileupList[bunchCrossing-minBunch_]);
445  TrueInteractionList.push_back((TrueNumInteractions_)[bunchCrossing-minBunch_]);
446  }
447  }
448 
449  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
450  (*accItr)->StorePileupInformation( bunchCrossingList,
451  numInteractionList,
452  TrueInteractionList,
453  eventInfoList,
454  bunchSpace_);
455  }
456 
457 
458  PileupMixing_ = std::auto_ptr<PileupMixingContent>(new PileupMixingContent(bunchCrossingList,
459  numInteractionList,
460  TrueInteractionList,
461  eventInfoList,
462  bunchSpace_));
463 
464  e.put(PileupMixing_);
465 
466  // we have to do the ToF transformation for PSimHits once all pileup has been added
467  for (unsigned int ii=0;ii<workers_.size();++ii) {
468  workers_[ii]->setTof();
469  workers_[ii]->put(e);
470  }
471  }
472 
474 
475  if (playbackInfo_) {
476  std::auto_ptr<CrossingFramePlaybackInfoExtended> pOut(playbackInfo_);
477  e.put(pOut);
478  }
479  }
480 
482  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
483  (*accItr)->beginRun(run, setup);
484  }
485  BMixingModule::beginRun( run, setup);
486  }
487 
489  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
490  (*accItr)->endRun(run, setup);
491  }
492  BMixingModule::endRun( run, setup);
493  }
494 
496  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
497  (*accItr)->beginLuminosityBlock(lumi, setup);
498  }
500  }
501 
503  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
504  (*accItr)->endLuminosityBlock(lumi, setup);
505  }
507  }
508 
509  void
511  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
512  (*accItr)->initializeEvent(event, setup);
513  }
514  }
515 
516  void
518  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
519  (*accItr)->accumulate(event, setup);
520  }
521  }
522 
523  void
525  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
526  (*accItr)->accumulate(event, setup, streamID);
527  }
528  }
529 
530  void
532  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
533  (*accItr)->finalizeEvent(event, setup);
534  }
535  }
536 }//edm
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void reload(const edm::EventSetup &)
virtual void beginRun(const edm::Run &r, const edm::EventSetup &setup) override
virtual ~MixingModule()
MixingModule(const edm::ParameterSet &ps)
Definition: MixingModule.cc:39
virtual void beginLuminosityBlock(LuminosityBlock const &l1, EventSetup const &c) override
static std::string const source("source")
static const HistoName names[]
std::vector< edm::EventID > getStartEventId(const unsigned int s, const int bcr) const
virtual void createnewEDProduct()
tuple lumi
Definition: fjr2json.py:35
void createDigiAccumulators(const edm::ParameterSet &mixingPSet, edm::ConsumesCollector &iC)
std::vector< float > TrueNumInteractions_
Definition: BMixingModule.h:91
virtual void addSignals(const edm::Event &e, const edm::EventSetup &es)
EventID const & id() const
bool exists(std::string const &parameterName) const
checks if a parameter exists
int ii
Definition: cuy.py:588
std::auto_ptr< DigiAccumulatorMixMod > makeDigiAccumulator(ParameterSet const &, one::EDProducerBase &, ConsumesCollector &) const
ModuleDescription const & moduleDescription() const
std::string encode() const
Definition: InputTag.cc:164
virtual void endRun(const edm::Run &r, const edm::EventSetup &setup) override
virtual void put(edm::Event &e, const edm::EventSetup &es)
void setStartEventId(const std::vector< edm::EventID > &id, const unsigned int s, const int bcr, const int start)
ModuleCallingContext const * moduleCallingContext() const
Definition: Event.h:217
virtual void checkSignal(const edm::Event &e)
std::string friendlyName(std::string const &iFullName)
virtual void endLuminosityBlock(LuminosityBlock const &l1, EventSetup const &c) override
std::vector< MixingWorkerBase * > workers_
Definition: MixingModule.h:97
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
Accumulators digiAccumulators_
Definition: MixingModule.h:103
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
static const std::string kSkipCurrentProcess
Definition: InputTag.h:56
std::vector< AdjusterBase * > adjusters_
Definition: MixingModule.h:95
static const unsigned int maxNbSources_
Definition: BMixingModule.h:88
std::vector< MixingWorkerBase * > workersObjects_
Definition: MixingModule.h:98
virtual void beginRun(Run const &r1, EventSetup const &c) override
std::vector< std::string > getParameterNames() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
char const * subdets[11]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:402
virtual void branchesActivate(const std::string &friendlyName, const std::string &subdet, InputTag &tag, std::string &label)
tuple tags
Definition: o2o.py:248
void finalizeEvent(Event &event, EventSetup const &setup)
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
ParameterSet const & getParameterSet(std::string const &) const
const T & get() const
Definition: EventSetup.h:55
std::vector< std::string > wantedBranches_
Definition: MixingModule.h:99
std::vector< AdjusterBase * > adjustersObjects_
Definition: MixingModule.h:96
InputTag inputTagPlayback_
Definition: MixingModule.h:90
std::string const & label() const
Definition: InputTag.h:42
edm::EventID id() const
Definition: EventBase.h:56
void accumulateEvent(Event const &event, EventSetup const &setup)
std::vector< std::shared_ptr< PileUp > > inputSources_
Definition: BMixingModule.h:96
StreamID streamID() const
Definition: Event.h:72
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
Definition: Algorithms.h:76
CrossingFramePlaybackInfoExtended * playbackInfo_
Definition: MixingModule.h:93
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
static DigiAccumulatorMixModFactory const * get()
void initializeEvent(Event const &event, EventSetup const &setup)
std::string const & instance() const
Definition: InputTag.h:43
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
virtual void doPileUp(edm::Event &e, const edm::EventSetup &es) override
Definition: Run.h:41
void pileAllWorkers(EventPrincipal const &ep, ModuleCallingContext const *, int bcr, int id, int &offset, const edm::EventSetup &setup, edm::StreamID const &)
virtual void endRun(Run const &r1, EventSetup const &c) override