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  // note: no crossing frame is foreseen to be used for this object type
104 
105  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
106  //std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
107 
108  } else if (object=="SimVertex") {
109  InputTag tag;
110  if (tags.size()>0) tag=tags[0];
112 
113  branchesActivate(TypeID(typeid(std::vector<SimVertex>)).friendlyClassName(),std::string(""),tag,label);
114  adjustersObjects_.push_back(new Adjuster<SimVertex>(tag));
115  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
116  if(makeCrossingFrame) {
118  produces<CrossingFrame<SimVertex> >(label);
119  consumes<std::vector<SimVertex> >(tag);
120  }
121 
122  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label;
123  // std::cout <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label<<std::endl;
124 
125  } else if (object=="HepMCProduct") {
126  InputTag tag;
127  if (tags.size()>0) tag=tags[0];
129 
130  branchesActivate(TypeID(typeid(HepMCProduct)).friendlyClassName(),std::string(""),tag,label);
131  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
132  if(makeCrossingFrame) {
134  produces<CrossingFrame<HepMCProduct> >(label);
135  }
136  consumes<HepMCProduct>(tag);
137 
138  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
139  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
140 
141  } else if (object=="PCaloHit") {
142  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
143  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
144  sort_all(crossingFrames);
145  for (unsigned int ii=0;ii<subdets.size();++ii) {
146  InputTag tag;
147  if (tags.size()==1) tag=tags[0];
148  else if(tags.size()>1) tag=tags[ii];
150 
151  branchesActivate(TypeID(typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[ii],tag,label);
152  adjustersObjects_.push_back(new Adjuster<PCaloHit>(tag));
153  if(binary_search_all(crossingFrames, tag.instance())) {
154  workersObjects_.push_back(new MixingWorker<PCaloHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
155  produces<CrossingFrame<PCaloHit> >(label);
156  consumes<std::vector<PCaloHit> >(tag);
157  }
158 
159  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
160  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
161 
162  }
163 
164  } else if (object=="PSimHit") {
165  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
166  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
167  sort_all(crossingFrames);
168  for (unsigned int ii=0;ii<subdets.size();++ii) {
169  InputTag tag;
170  if (tags.size()==1) tag=tags[0];
171  else if(tags.size()>1) tag=tags[ii];
173 
174  branchesActivate(TypeID(typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[ii],tag,label);
175  adjustersObjects_.push_back(new Adjuster<PSimHit>(tag));
176  if(binary_search_all(crossingFrames, tag.instance())) {
177  workersObjects_.push_back(new MixingWorker<PSimHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
178  produces<CrossingFrame<PSimHit> >(label);
179  consumes<std::vector<PSimHit> >(tag);
180  }
181 
182  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
183  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
184  }
185  } else {
186  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!";
187  }
188  //} //if for mixProdStep2
189  }//while over the mixObjects parameters
190 
192  for (unsigned int branch=0;branch<wantedBranches_.size();++branch) LogDebug("MixingModule")<<"Will keep branch "<<wantedBranches_[branch]<<" for mixing ";
193 
195 
196  produces<PileupMixingContent>();
197 
198  produces<CrossingFramePlaybackInfoExtended>();
199 
201  // Create and configure digitizers
202  createDigiAccumulators(ps_mix, iC);
203  }
204 
205 
207  ParameterSet const& digiPSet = mixingPSet.getParameterSet("digitizers");
208  std::vector<std::string> digiNames = digiPSet.getParameterNames();
209  for(auto const& digiName : digiNames) {
210  ParameterSet const& pset = digiPSet.getParameterSet(digiName);
211  std::auto_ptr<DigiAccumulatorMixMod> accumulator = std::auto_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModFactory::get()->makeDigiAccumulator(pset, *this, iC));
212  // Create appropriate DigiAccumulator
213  if(accumulator.get() != 0) {
214  digiAccumulators_.push_back(accumulator.release());
215  }
216  }
217  }
218 
220  //change the basic parameters.
222  setup.get<MixingRcd>().get(config);
223  minBunch_=config->minBunch();
224  maxBunch_=config->maxBunch();
225  bunchSpace_=config->bunchSpace();
226  //propagate to change the workers
227  for (unsigned int ii=0;ii<workersObjects_.size();++ii){
228  workersObjects_[ii]->reload(setup);
229  }
230  }
231 
233 
234  label=tag.label()+tag.instance();
235  wantedBranches_.push_back(friendlyName + '_' +
236  tag.label() + '_' +
237  tag.instance());
238 
239  //if useCurrentProcessOnly, we have to change the input tag
242  tag = InputTag(tag.label(),tag.instance(),processName);
243  }
244  }
245 
247  if (adjusters_.empty()){
248  for (auto const& adjuster : adjustersObjects_) {
249  if (adjuster->checkSignal(e)){
250  adjusters_.push_back(adjuster);
251  }
252  }
253  }
254  if (workers_.empty()){
255  for (auto const& worker : workersObjects_) {
256  if (worker->checkSignal(e)){
257  workers_.push_back(worker);
258  }
259  }
260  }
261  }
262 
264  //create playback info
266  //and CrossingFrames
267  for (unsigned int ii=0;ii<workers_.size();++ii){
268  workers_[ii]->createnewEDProduct();
269  }
270  }
271 
272  // Virtual destructor needed.
274  for (auto& worker : workersObjects_) {
275  delete worker;
276  }
277 
278  for (auto& adjuster : adjustersObjects_) {
279  delete adjuster;
280  }
281 
282  for (auto& digiAccumulator : digiAccumulators_) {
283  delete digiAccumulator;
284  }
285  }
286 
288 
289  LogDebug("MixingModule")<<"===============> adding signals for "<<e.id();
290 
291  accumulateEvent(e, setup);
292  // fill in signal part of CrossingFrame
293  for (unsigned int ii=0;ii<workers_.size();++ii) {
294  workers_[ii]->addSignals(e);
295  }
296  }
297 
298  void MixingModule::pileAllWorkers(EventPrincipal const& eventPrincipal,
299  ModuleCallingContext const* mcc,
300  int bunchCrossing, int eventId,
301  int& vertexOffset,
302  const edm::EventSetup& setup,
303  StreamID const& streamID) {
304 
305  InternalContext internalContext(eventPrincipal.id(), mcc);
306  ParentContext parentContext(&internalContext);
307  ModuleCallingContext moduleCallingContext(&moduleDescription());
308  ModuleContextSentry moduleContextSentry(&moduleCallingContext, parentContext);
309 
310  for (auto const& adjuster : adjusters_) {
311  adjuster->doOffset(bunchSpace_, bunchCrossing, eventPrincipal, &moduleCallingContext, eventId, vertexOffset);
312  }
313  PileUpEventPrincipal pep(eventPrincipal, &moduleCallingContext, bunchCrossing);
314  accumulateEvent(pep, setup, streamID);
315 
316  for (auto const& worker : workers_) {
317  LogDebug("MixingModule") <<" merging Event: id " << eventPrincipal.id();
318  // std::cout <<"PILEALLWORKERS merging Event: id " << eventPrincipal.id() << std::endl;
319 
320  worker->addPileups(eventPrincipal, &moduleCallingContext, eventId);
321  }
322  }
323 
325  using namespace std::placeholders;
326 
327  // Don't allocate because PileUp will do it for us.
328  std::vector<edm::EventID> recordEventID;
330  if (playback_) {
331  bool got = e.getByLabel(inputTagPlayback_, playbackInfo_H);
332  if (!got) {
333  throw cms::Exception("MixingProductNotFound") << " No "
334  "CrossingFramePlaybackInfoExtended on the input file, but playback "
335  "option set!!!!! Please change the input file if you really want "
336  "playback!!!!!!" << std::endl;
337  }
338  }
339 
340  // source[0] is "real" pileup. Check to see that this is what we are doing.
341 
342  std::vector<int> PileupList;
343  PileupList.clear();
344  TrueNumInteractions_.clear();
345 
346  std::shared_ptr<PileUp> source0 = inputSources_[0];
347 
348  if((source0 && source0->doPileUp(0) ) && !playback_) {
349  // if((!inputSources_[0] || !inputSources_[0]->doPileUp()) && !playback_ )
350 
351  // Pre-calculate all pileup distributions before we go fishing for events
352 
353  source0->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_, e.streamID());
354 
355  }
356 
357  // for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
358  // std::cout << " bunch ID, Pileup, True " << bunchIdx << " " << PileupList[bunchIdx-minBunch_] << " " << TrueNumInteractions_[bunchIdx-minBunch_] << std::endl;
359  //}
360 
361  int KeepTrackOfPileup = 0;
362 
363  for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
364  for (size_t setBcrIdx=0; setBcrIdx<workers_.size(); ++setBcrIdx) {
365  workers_[setBcrIdx]->setBcrOffset();
366  }
367  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
368  (*accItr)->initializeBunchCrossing(e, setup, bunchIdx);
369  }
370 
371  for (size_t readSrcIdx=0; readSrcIdx<maxNbSources_; ++readSrcIdx) {
372  std::shared_ptr<PileUp> source = inputSources_[readSrcIdx]; // this looks like we create
373  // new PileUp objects for each
374  // source for each event?
375  // Why?
376  for (size_t setSrcIdx=0; setSrcIdx<workers_.size(); ++setSrcIdx) {
377  workers_[setSrcIdx]->setSourceOffset(readSrcIdx);
378  }
379 
380  if (!source || !source->doPileUp(bunchIdx)) continue;
381 
382  int NumPU_Events = 0;
383 
384  if(readSrcIdx ==0 && !playback_) {
385  NumPU_Events = PileupList[bunchIdx - minBunch_];
386  } else {
387  NumPU_Events = 1;
388  } // non-minbias pileup only gets one event for now. Fix later if desired.
389 
390  // int eventId = 0;
391  int vertexOffset = 0;
392 
393  ModuleCallingContext const* mcc = e.moduleCallingContext();
394  if (!playback_) {
395  inputSources_[readSrcIdx]->readPileUp(e.id(), recordEventID,
396  std::bind(&MixingModule::pileAllWorkers, std::ref(*this), _1, mcc, bunchIdx,
397  _2, vertexOffset, std::ref(setup), e.streamID()), NumPU_Events, e.streamID()
398  );
399  playbackInfo_->setStartEventId(recordEventID, readSrcIdx, bunchIdx, KeepTrackOfPileup);
400  KeepTrackOfPileup+=NumPU_Events;
401  } else {
402  const std::vector<edm::EventID>& playEventID =
403  playbackInfo_H->getStartEventId(readSrcIdx, bunchIdx);
404  if(readSrcIdx == 0) {
405  PileupList.push_back(playEventID.size());
406  TrueNumInteractions_.push_back(playEventID.size());
407  }
408  inputSources_[readSrcIdx]->playPileUp(
409  playEventID,
410  std::bind(&MixingModule::pileAllWorkers, std::ref(*this), _1, mcc, bunchIdx,
411  _2, vertexOffset, std::ref(setup), e.streamID())
412  );
413  }
414  }
415  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
416  (*accItr)->finalizeBunchCrossing(e, setup, bunchIdx);
417  }
418  }
419 
420  // Keep track of pileup accounting...
421 
422  std::auto_ptr<PileupMixingContent> PileupMixing_;
423 
424  std::vector<int> numInteractionList;
425  std::vector<int> bunchCrossingList;
426  std::vector<float> TrueInteractionList;
427 
428  //Makin' a list: Basically, we don't care about the "other" sources at this point.
429  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
430  bunchCrossingList.push_back(bunchCrossing);
431  if(!inputSources_[0] || !inputSources_[0]->doPileUp(0)) {
432  numInteractionList.push_back(0);
433  TrueInteractionList.push_back(0);
434  }
435  else {
436  numInteractionList.push_back(PileupList[bunchCrossing-minBunch_]);
437  TrueInteractionList.push_back((TrueNumInteractions_)[bunchCrossing-minBunch_]);
438  }
439  }
440 
441  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
442  (*accItr)->StorePileupInformation( bunchCrossingList,
443  numInteractionList,
444  TrueInteractionList,
445  bunchSpace_);
446  }
447 
448 
449  PileupMixing_ = std::auto_ptr<PileupMixingContent>(new PileupMixingContent(bunchCrossingList,
450  numInteractionList,
451  TrueInteractionList,
452  bunchSpace_));
453 
454  e.put(PileupMixing_);
455 
456  // we have to do the ToF transformation for PSimHits once all pileup has been added
457  for (unsigned int ii=0;ii<workers_.size();++ii) {
458  workers_[ii]->setTof();
459  workers_[ii]->put(e);
460  }
461  }
462 
464 
465  if (playbackInfo_) {
466  std::auto_ptr<CrossingFramePlaybackInfoExtended> pOut(playbackInfo_);
467  e.put(pOut);
468  }
469  }
470 
472  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
473  (*accItr)->beginRun(run, setup);
474  }
475  BMixingModule::beginRun( run, setup);
476  }
477 
479  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
480  (*accItr)->endRun(run, setup);
481  }
482  BMixingModule::endRun( run, setup);
483  }
484 
486  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
487  (*accItr)->beginLuminosityBlock(lumi, setup);
488  }
490  }
491 
493  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
494  (*accItr)->endLuminosityBlock(lumi, setup);
495  }
497  }
498 
499  void
501  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
502  (*accItr)->initializeEvent(event, setup);
503  }
504  }
505 
506  void
508  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
509  (*accItr)->accumulate(event, setup);
510  }
511  }
512 
513  void
515  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
516  (*accItr)->accumulate(event, setup, streamID);
517  }
518  }
519 
520  void
522  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
523  (*accItr)->finalizeEvent(event, setup);
524  }
525  }
526 }//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[]
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