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 "MixingModule.h"
8 #include "MixingWorker.h"
9 #include "Adjuster.h"
10 
11 #include "boost/bind.hpp"
12 
34 
35 namespace edm {
36 
37  // Constructor
39  BMixingModule(ps_mix),
40  inputTagPlayback_(),
41  mixProdStep2_(ps_mix.getParameter<bool>("mixProdStep2")),
42  mixProdStep1_(ps_mix.getParameter<bool>("mixProdStep1")),
43  digiAccumulators_()
44  {
45  if (!mixProdStep1_ && !mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Standard mode.";
46  if (mixProdStep1_) LogInfo("MixingModule") << " The MixingModule was run in the Step1 mode. It produces a mixed secondary source.";
47  if (mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Step2 mode. It uses a mixed secondary source.";
48 
50  if (ps_mix.exists("useCurrentProcessOnly")) {
51  useCurrentProcessOnly_=ps_mix.getParameter<bool>("useCurrentProcessOnly");
52  LogInfo("MixingModule") <<" using given Parameter 'useCurrentProcessOnly' ="<<useCurrentProcessOnly_;
53  }
54  std::string labelPlayback;
55  if (ps_mix.exists("LabelPlayback")) {
56  labelPlayback = ps_mix.getParameter<std::string>("LabelPlayback");
57  }
58  if (labelPlayback.empty()) {
59  labelPlayback = ps_mix.getParameter<std::string>("@module_label");
60  }
61  if (playback_) {
63  consumes<CrossingFramePlaybackInfoExtended>(inputTagPlayback_);
64  }
65 
66  ParameterSet ps=ps_mix.getParameter<ParameterSet>("mixObjects");
67  std::vector<std::string> names = ps.getParameterNames();
68  for(std::vector<std::string>::iterator it=names.begin();it!= names.end();++it) {
69  ParameterSet pset=ps.getParameter<ParameterSet>((*it));
70  if (!pset.exists("type")) continue; //to allow replacement by empty pset
71  std::string object = pset.getParameter<std::string>("type");
72  std::vector<InputTag> tags=pset.getParameter<std::vector<InputTag> >("input");
73 
74  //if (!mixProdStep2_) {
75 
76  InputTag tagCF = InputTag();
77  std::string labelCF = " ";
78 
79  if (object=="SimTrack") {
80  InputTag tag;
81  if (tags.size()>0) tag=tags[0];
83 
84  branchesActivate(TypeID(typeid(std::vector<SimTrack>)).friendlyClassName(),std::string(""),tag,label);
85  adjustersObjects_.push_back(new Adjuster<SimTrack>(tag));
86  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
87  if(makeCrossingFrame) {
89  produces<CrossingFrame<SimTrack> >(label);
90  consumes<std::vector<SimTrack> >(tag);
91  }
92 
93  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
94  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
95 
96  } else if (object=="RecoTrack") {
97  InputTag tag;
98  if (tags.size()>0) tag=tags[0];
100 
101  branchesActivate(TypeID(typeid(std::vector<reco::Track>)).friendlyClassName(),std::string(""),tag,label);
102  // note: no crossing frame is foreseen to be used for this object type
103 
104  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
105  //std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
106 
107  } else if (object=="SimVertex") {
108  InputTag tag;
109  if (tags.size()>0) tag=tags[0];
111 
112  branchesActivate(TypeID(typeid(std::vector<SimVertex>)).friendlyClassName(),std::string(""),tag,label);
113  adjustersObjects_.push_back(new Adjuster<SimVertex>(tag));
114  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
115  if(makeCrossingFrame) {
117  produces<CrossingFrame<SimVertex> >(label);
118  consumes<std::vector<SimVertex> >(tag);
119  }
120 
121  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label;
122  // std::cout <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label<<std::endl;
123 
124  } else if (object=="HepMCProduct") {
125  InputTag tag;
126  if (tags.size()>0) tag=tags[0];
128 
129  branchesActivate(TypeID(typeid(HepMCProduct)).friendlyClassName(),std::string(""),tag,label);
130  bool makeCrossingFrame = pset.getUntrackedParameter<bool>("makeCrossingFrame", false);
131  if(makeCrossingFrame) {
133  produces<CrossingFrame<HepMCProduct> >(label);
134  }
135  consumes<HepMCProduct>(tag);
136 
137  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
138  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
139 
140  } else if (object=="PCaloHit") {
141  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
142  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
143  sort_all(crossingFrames);
144  for (unsigned int ii=0;ii<subdets.size();++ii) {
145  InputTag tag;
146  if (tags.size()==1) tag=tags[0];
147  else if(tags.size()>1) tag=tags[ii];
149 
150  branchesActivate(TypeID(typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[ii],tag,label);
151  adjustersObjects_.push_back(new Adjuster<PCaloHit>(tag));
152  if(binary_search_all(crossingFrames, tag.instance())) {
153  workersObjects_.push_back(new MixingWorker<PCaloHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
154  produces<CrossingFrame<PCaloHit> >(label);
155  consumes<std::vector<PCaloHit> >(tag);
156  }
157 
158  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
159  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
160 
161  }
162 
163  } else if (object=="PSimHit") {
164  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
165  std::vector<std::string> crossingFrames=pset.getUntrackedParameter<std::vector<std::string> >("crossingFrames", std::vector<std::string>());
166  sort_all(crossingFrames);
167  for (unsigned int ii=0;ii<subdets.size();++ii) {
168  InputTag tag;
169  if (tags.size()==1) tag=tags[0];
170  else if(tags.size()>1) tag=tags[ii];
172 
173  branchesActivate(TypeID(typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[ii],tag,label);
174  adjustersObjects_.push_back(new Adjuster<PSimHit>(tag));
175  if(binary_search_all(crossingFrames, tag.instance())) {
176  workersObjects_.push_back(new MixingWorker<PSimHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF));
177  produces<CrossingFrame<PSimHit> >(label);
178  consumes<std::vector<PSimHit> >(tag);
179  }
180 
181  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
182  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
183  }
184  } else {
185  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!";
186  }
187  //} //if for mixProdStep2
188  }//while over the mixObjects parameters
189 
191  for (unsigned int branch=0;branch<wantedBranches_.size();++branch) LogDebug("MixingModule")<<"Will keep branch "<<wantedBranches_[branch]<<" for mixing ";
192 
194 
195  produces<PileupMixingContent>();
196 
197  produces<CrossingFramePlaybackInfoExtended>();
198 
200  // Create and configure digitizers
201  createDigiAccumulators(ps_mix, iC);
202  }
203 
204 
206  ParameterSet const& digiPSet = mixingPSet.getParameterSet("digitizers");
207  std::vector<std::string> digiNames = digiPSet.getParameterNames();
208  for(auto const& digiName : digiNames) {
209  ParameterSet const& pset = digiPSet.getParameterSet(digiName);
210  std::auto_ptr<DigiAccumulatorMixMod> accumulator = std::auto_ptr<DigiAccumulatorMixMod>(DigiAccumulatorMixModFactory::get()->makeDigiAccumulator(pset, *this, iC));
211  // Create appropriate DigiAccumulator
212  if(accumulator.get() != 0) {
213  digiAccumulators_.push_back(accumulator.release());
214  }
215  }
216  }
217 
219  //change the basic parameters.
221  setup.get<MixingRcd>().get(config);
222  minBunch_=config->minBunch();
223  maxBunch_=config->maxBunch();
224  bunchSpace_=config->bunchSpace();
225  //propagate to change the workers
226  for (unsigned int ii=0;ii<workersObjects_.size();++ii){
227  workersObjects_[ii]->reload(setup);
228  }
229  }
230 
232 
233  label=tag.label()+tag.instance();
234  wantedBranches_.push_back(friendlyName + '_' +
235  tag.label() + '_' +
236  tag.instance());
237 
238  //if useCurrentProcessOnly, we have to change the input tag
241  tag = InputTag(tag.label(),tag.instance(),processName);
242  }
243  }
244 
246  if (adjusters_.empty()){
247  for (auto const& adjuster : adjustersObjects_) {
248  if (adjuster->checkSignal(e)){
249  adjusters_.push_back(adjuster);
250  }
251  }
252  }
253  if (workers_.empty()){
254  for (auto const& worker : workersObjects_) {
255  if (worker->checkSignal(e)){
256  workers_.push_back(worker);
257  }
258  }
259  }
260  }
261 
263  //create playback info
265  //and CrossingFrames
266  for (unsigned int ii=0;ii<workers_.size();++ii){
267  workers_[ii]->createnewEDProduct();
268  }
269  }
270 
271  // Virtual destructor needed.
273  for (auto& worker : workersObjects_) {
274  delete worker;
275  }
276 
277  for (auto& adjuster : adjustersObjects_) {
278  delete adjuster;
279  }
280 
281  for (auto& digiAccumulator : digiAccumulators_) {
282  delete digiAccumulator;
283  }
284  }
285 
287 
288  LogDebug("MixingModule")<<"===============> adding signals for "<<e.id();
289 
290  accumulateEvent(e, setup);
291  // fill in signal part of CrossingFrame
292  for (unsigned int ii=0;ii<workers_.size();++ii) {
293  workers_[ii]->addSignals(e);
294  }
295  }
296 
297  void MixingModule::pileAllWorkers(EventPrincipal const& eventPrincipal,
298  ModuleCallingContext const* mcc,
299  int bunchCrossing, int eventId,
300  int& vertexOffset,
301  const edm::EventSetup& setup,
302  StreamID const& streamID) {
303 
304  InternalContext internalContext(eventPrincipal.id(), mcc);
305  ParentContext parentContext(&internalContext);
306  ModuleCallingContext moduleCallingContext(&moduleDescription());
307  ModuleContextSentry moduleContextSentry(&moduleCallingContext, parentContext);
308 
309  for (auto const& adjuster : adjusters_) {
310  adjuster->doOffset(bunchSpace_, bunchCrossing, eventPrincipal, &moduleCallingContext, eventId, vertexOffset);
311  }
312  PileUpEventPrincipal pep(eventPrincipal, &moduleCallingContext, bunchCrossing);
313  accumulateEvent(pep, setup, streamID);
314 
315  for (auto const& worker : workers_) {
316  LogDebug("MixingModule") <<" merging Event: id " << eventPrincipal.id();
317  // std::cout <<"PILEALLWORKERS merging Event: id " << eventPrincipal.id() << std::endl;
318 
319  worker->addPileups(eventPrincipal, &moduleCallingContext, eventId);
320  }
321  }
322 
324  // Don't allocate because PileUp will do it for us.
325  std::vector<edm::EventID> recordEventID;
327  if (playback_) {
328  bool got = e.getByLabel(inputTagPlayback_, playbackInfo_H);
329  if (!got) {
330  throw cms::Exception("MixingProductNotFound") << " No "
331  "CrossingFramePlaybackInfoExtended on the input file, but playback "
332  "option set!!!!! Please change the input file if you really want "
333  "playback!!!!!!" << std::endl;
334  }
335  }
336 
337  // source[0] is "real" pileup. Check to see that this is what we are doing.
338 
339  std::vector<int> PileupList;
340  PileupList.clear();
341  TrueNumInteractions_.clear();
342 
343  boost::shared_ptr<PileUp> source0 = inputSources_[0];
344 
345  if((source0 && source0->doPileUp() ) && !playback_) {
346  // if((!inputSources_[0] || !inputSources_[0]->doPileUp()) && !playback_ )
347 
348  // Pre-calculate all pileup distributions before we go fishing for events
349 
350  source0->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_, e.streamID());
351 
352  }
353 
354  // for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
355  // std::cout << " bunch ID, Pileup, True " << bunchIdx << " " << PileupList[bunchIdx-minBunch_] << " " << TrueNumInteractions_[bunchIdx-minBunch_] << std::endl;
356  //}
357 
358  int KeepTrackOfPileup = 0;
359 
360  for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
361  for (size_t setBcrIdx=0; setBcrIdx<workers_.size(); ++setBcrIdx) {
362  workers_[setBcrIdx]->setBcrOffset();
363  }
364  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
365  (*accItr)->initializeBunchCrossing(e, setup, bunchIdx);
366  }
367 
368  for (size_t readSrcIdx=0; readSrcIdx<maxNbSources_; ++readSrcIdx) {
369  boost::shared_ptr<PileUp> source = inputSources_[readSrcIdx]; // this looks like we create
370  // new PileUp objects for each
371  // source for each event?
372  // Why?
373  for (size_t setSrcIdx=0; setSrcIdx<workers_.size(); ++setSrcIdx) {
374  workers_[setSrcIdx]->setSourceOffset(readSrcIdx);
375  }
376 
377  if (!source || !source->doPileUp()) continue;
378 
379  int NumPU_Events = 0;
380 
381  if(readSrcIdx ==0 && !playback_) {
382  NumPU_Events = PileupList[bunchIdx - minBunch_];
383  } else {
384  NumPU_Events = 1;
385  } // non-minbias pileup only gets one event for now. Fix later if desired.
386 
387  // int eventId = 0;
388  int vertexOffset = 0;
389 
390  ModuleCallingContext const* mcc = e.moduleCallingContext();
391  if (!playback_) {
392  inputSources_[readSrcIdx]->readPileUp(e.id(), recordEventID,
393  boost::bind(&MixingModule::pileAllWorkers, boost::ref(*this), _1, mcc, bunchIdx,
394  _2, vertexOffset, boost::ref(setup), boost::cref(e.streamID())), NumPU_Events, e.streamID()
395  );
396  playbackInfo_->setStartEventId(recordEventID, readSrcIdx, bunchIdx, KeepTrackOfPileup);
397  KeepTrackOfPileup+=NumPU_Events;
398  } else {
399  const std::vector<edm::EventID>& playEventID =
400  playbackInfo_H->getStartEventId(readSrcIdx, bunchIdx);
401  if(readSrcIdx == 0) {
402  PileupList.push_back(playEventID.size());
403  TrueNumInteractions_.push_back(playEventID.size());
404  }
405  inputSources_[readSrcIdx]->playPileUp(
406  playEventID,
407  boost::bind(&MixingModule::pileAllWorkers, boost::ref(*this), _1, mcc, bunchIdx,
408  _2, vertexOffset, boost::ref(setup), boost::cref(e.streamID()))
409  );
410  }
411  }
412  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
413  (*accItr)->finalizeBunchCrossing(e, setup, bunchIdx);
414  }
415  }
416 
417  // Keep track of pileup accounting...
418 
419  std::auto_ptr<PileupMixingContent> PileupMixing_;
420 
421  std::vector<int> numInteractionList;
422  std::vector<int> bunchCrossingList;
423  std::vector<float> TrueInteractionList;
424 
425  //Makin' a list: Basically, we don't care about the "other" sources at this point.
426  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
427  bunchCrossingList.push_back(bunchCrossing);
428  if(!inputSources_[0] || !inputSources_[0]->doPileUp()) {
429  numInteractionList.push_back(0);
430  TrueInteractionList.push_back(0);
431  }
432  else {
433  numInteractionList.push_back(PileupList[bunchCrossing-minBunch_]);
434  TrueInteractionList.push_back((TrueNumInteractions_)[bunchCrossing-minBunch_]);
435  }
436  }
437 
438  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
439  (*accItr)->StorePileupInformation( bunchCrossingList,
440  numInteractionList,
441  TrueInteractionList);
442  }
443 
444 
445  PileupMixing_ = std::auto_ptr<PileupMixingContent>(new PileupMixingContent(bunchCrossingList,
446  numInteractionList,
447  TrueInteractionList));
448 
449  e.put(PileupMixing_);
450 
451  // we have to do the ToF transformation for PSimHits once all pileup has been added
452  for (unsigned int ii=0;ii<workers_.size();++ii) {
453  workers_[ii]->setTof();
454  workers_[ii]->put(e);
455  }
456  }
457 
459 
460  if (playbackInfo_) {
461  std::auto_ptr<CrossingFramePlaybackInfoExtended> pOut(playbackInfo_);
462  e.put(pOut);
463  }
464  }
465 
467  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
468  (*accItr)->beginRun(run, setup);
469  }
470  BMixingModule::beginRun( run, setup);
471  }
472 
474  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
475  (*accItr)->endRun(run, setup);
476  }
477  BMixingModule::endRun( run, setup);
478  }
479 
481  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
482  (*accItr)->beginLuminosityBlock(lumi, setup);
483  }
485  }
486 
488  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
489  (*accItr)->endLuminosityBlock(lumi, setup);
490  }
492  }
493 
494  void
496  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
497  (*accItr)->initializeEvent(event, setup);
498  }
499  }
500 
501  void
503  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
504  (*accItr)->accumulate(event, setup);
505  }
506  }
507 
508  void
510  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
511  (*accItr)->accumulate(event, setup, streamID);
512  }
513  }
514 
515  void
517  for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) {
518  (*accItr)->finalizeEvent(event, setup);
519  }
520  }
521 }//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:38
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:92
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:89
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
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
constexpr char const * subdets[11]
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
std::vector< boost::shared_ptr< PileUp > > inputSources_
Definition: BMixingModule.h:97
edm::EventID id() const
Definition: EventBase.h:56
void accumulateEvent(Event const &event, EventSetup const &setup)
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