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
4 //
5 //--------------------------------------------
6 
17 #include "MixingModule.h"
18 #include "MixingWorker.h"
19 
21 using namespace std;
22 
23 namespace edm
24 {
25 
26  // Constructor
27  MixingModule::MixingModule(const edm::ParameterSet& ps_mix) :
28  BMixingModule(ps_mix),
29  labelPlayback_(ps_mix.getParameter<std::string>("LabelPlayback")),
30  mixProdStep2_(ps_mix.getParameter<bool>("mixProdStep2")),
31  mixProdStep1_(ps_mix.getParameter<bool>("mixProdStep1"))
32  {
33  if (!mixProdStep1_ && !mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Standard mode.";
34  if (mixProdStep1_) LogInfo("MixingModule") << " The MixingModule was run in the Step1 mode. It produces a mixed secondary source.";
35  if (mixProdStep2_) LogInfo("MixingModule") << " The MixingModule was run in the Step2 mode. It uses a mixed secondary source.";
36 
38  if (ps_mix.exists("useCurrentProcessOnly")) {
39  useCurrentProcessOnly_=ps_mix.getParameter<bool>("useCurrentProcessOnly");
40  LogInfo("MixingModule") <<" using given Parameter 'useCurrentProcessOnly' ="<<useCurrentProcessOnly_;
41  }
42  if (labelPlayback_.size()>0){
44  }
45  else {
47  }
48 
49  ParameterSet ps=ps_mix.getParameter<ParameterSet>("mixObjects");
50  std::vector<std::string> names = ps.getParameterNames();
51  for (std::vector<string>::iterator it=names.begin();it!= names.end();++it)
52  {
53  ParameterSet pset=ps.getParameter<ParameterSet>((*it));
54  if (!pset.exists("type")) continue; //to allow replacement by empty pset
55  std::string object = pset.getParameter<std::string>("type");
56  std::vector<InputTag> tags=pset.getParameter<std::vector<InputTag> >("input");
57 
58  if (mixProdStep2_){
59  //SimTracks
60  if (object=="SimTrackPCrossingFrame") {
61  InputTag tag;
62  if (tags.size()>0) tag=tags[0];
63  std::string label;
64  branchesActivate(TypeID(typeid(PCrossingFrame<SimTrack>)).friendlyClassName(),std::string(""),tag,label);
65 
66  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
67  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label << std::endl ;
68 
69  //---------------------------------
70  // set an appropriate label for the CrossingFrame
71  if (find(names.begin(), names.end(), "mixTracks") != names.end())
72  {
73  edm::ParameterSet psin=ps.getParameter<edm::ParameterSet>("mixTracks");
74  if (!psin.exists("type")) continue; //to allow replacement by empty pset
75  std::string object = psin.getParameter<std::string>("type");
76  std::vector<InputTag> tags=psin.getParameter<std::vector<InputTag> >("input");
77 
78  InputTag tagCF;
79  if (tags.size()>0) tagCF=tags[0];
80  std::string labelCF;
81 
82  branchesActivate(TypeID(typeid(std::vector<SimTrack>)).friendlyClassName(),std::string(""),tagCF,labelCF);
83  workersObjects_.push_back(new MixingWorker<SimTrack>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
84 
85  produces<CrossingFrame<SimTrack> >(labelCF);
86  }
87  //--------------------------------
88 
89  }else if (object=="SimVertexPCrossingFrame") {
90  InputTag tag;
91  if (tags.size()>0) tag=tags[0];
92  std::string label;
93  branchesActivate(TypeID(typeid(PCrossingFrame<SimVertex>)).friendlyClassName(),std::string(""),tag,label);
94 
95  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label;
96  // std::cout <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label << std::endl ;
97 
98  //---------------------------------
99  // set an appropriate label for the CrossingFrame
100  if (find(names.begin(), names.end(), "mixVertices") != names.end())
101  {
102  edm::ParameterSet psin=ps.getParameter<edm::ParameterSet>("mixVertices");
103  if (!psin.exists("type")) continue; //to allow replacement by empty pset
104  std::string object = psin.getParameter<std::string>("type");
105  std::vector<InputTag> tags=psin.getParameter<std::vector<InputTag> >("input");
106 
107  InputTag tagCF;
108  if (tags.size()>0) tagCF=tags[0];
109  std::string labelCF;
110 
111  branchesActivate(TypeID(typeid(std::vector<SimVertex>)).friendlyClassName(),std::string(""),tagCF,labelCF);
112  workersObjects_.push_back(new MixingWorker<SimVertex>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
113 
114  produces<CrossingFrame<SimVertex> >(labelCF);
115  }
116  //---------------------------------
117  }
118 
119  else if (object=="HepMCProductPCrossingFrame") {
120  InputTag tag;
121  if (tags.size()>0) tag=tags[0];
122  std::string label;
123  branchesActivate(TypeID(typeid(PCrossingFrame<HepMCProduct>)).friendlyClassName(),std::string(""),tag,label);
124 
125  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
126  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
127 
128  //---------------------------------
129  // set an appropriate label for the CrossingFrame
130  if (find(names.begin(), names.end(), "mixHepMC") != names.end())
131  {
132  edm::ParameterSet psin=ps.getParameter<edm::ParameterSet>("mixHepMC");
133  if (!psin.exists("type")) continue; //to allow replacement by empty pset
134  std::string object = psin.getParameter<std::string>("type");
135  std::vector<InputTag> tags=psin.getParameter<std::vector<InputTag> >("input");
136 
137  InputTag tagCF;
138  if (tags.size()>0) tagCF=tags[0];
139  std::string labelCF;
140 
141  branchesActivate(TypeID(typeid(HepMCProduct)).friendlyClassName(),std::string(""),tagCF,labelCF);
142  workersObjects_.push_back(new MixingWorker<HepMCProduct>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
143 
144  produces<CrossingFrame<HepMCProduct> >(labelCF);
145  }
146  //--------------------------------
147  }else if (object=="PCaloHitPCrossingFrame") {
148  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
149  for (unsigned int ii=0;ii<subdets.size();ii++) {
150  InputTag tag;
151  if (tags.size()==1) tag=tags[0];
152  else if(tags.size()>1) tag=tags[ii];
153  std::string label;
154  branchesActivate(TypeID(typeid(PCrossingFrame<PCaloHit>)).friendlyClassName(),subdets[ii],tag,label);
155 
156  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
157  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
158 
159  //---------------------------------
160  // set an appropriate label for the product CrossingFrame
161  if (find(names.begin(), names.end(), "mixCH") != names.end())
162  {
164  if (!psin.exists("type")) continue; //to allow replacement by empty pset
165  std::string object = psin.getParameter<std::string>("type");
166  std::vector<InputTag> tags=psin.getParameter<std::vector<InputTag> >("input");
167 
168  InputTag tagCF;
169  if (tags.size()==1) tagCF=tags[0];
170  else if(tags.size()>1) tagCF=tags[ii];
171  std::string labelCF;
172 
173  branchesActivate(TypeID(typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[ii],tagCF,labelCF);
174  workersObjects_.push_back(new MixingWorker<PCaloHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
175 
176  produces<CrossingFrame<PCaloHit> > (labelCF);
177  }
178  //--------------------------------
179  }
180 
181  }else if (object=="PSimHitPCrossingFrame") {
182  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
183  for (unsigned int ii=0;ii<subdets.size();ii++) {
184  InputTag tag;
185  if (tags.size()==1) tag=tags[0];
186  else if(tags.size()>1) tag=tags[ii];
187  std::string label;
188  branchesActivate(TypeID(typeid(PCrossingFrame<PSimHit>)).friendlyClassName(),subdets[ii],tag,label);
189 
190  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
191  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
192 
193 
194  //---------------------------------
195  // set an appropriate label for the CrossingFrame
196  if (find(names.begin(), names.end(), "mixSH") != names.end())
197  {
199  if (!psin.exists("type")) continue; //to allow replacement by empty pset
200  std::string object = psin.getParameter<std::string>("type");
201  std::vector<InputTag> tags=psin.getParameter<std::vector<InputTag> >("input");
202 
203  InputTag tagCF;
204  if (tags.size()==1) tagCF=tags[0];
205  else if(tags.size()>1) tagCF=tags[ii];
206  std::string labelCF;
207  branchesActivate(TypeID(typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[ii],tagCF,labelCF);
208  workersObjects_.push_back(new MixingWorker<PSimHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
209 
210  produces<CrossingFrame<PSimHit> > (labelCF);
211  }
212  //-------------------------------
213  }
214 
215  }
216  }//mixProdStep2
217 
218 
219  if (!mixProdStep2_){
220 
221  InputTag tagCF = InputTag();
222  std::string labelCF = " ";
223 
224  //SimTracks
225  if (object=="SimTrack") {
226  InputTag tag;
227  if (tags.size()>0) tag=tags[0];
228  std::string label;
229 
230  branchesActivate(TypeID(typeid(std::vector<SimTrack>)).friendlyClassName(),std::string(""),tag,label);
231  workersObjects_.push_back(new MixingWorker<SimTrack>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
232 
233  produces<CrossingFrame<SimTrack> >(label);
234  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
235  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
236 
237 
238  }else if (object=="SimVertex") {
239  InputTag tag;
240  if (tags.size()>0) tag=tags[0];
241  std::string label;
242 
243  branchesActivate(TypeID(typeid(std::vector<SimVertex>)).friendlyClassName(),std::string(""),tag,label);
244 
245  workersObjects_.push_back(new MixingWorker<SimVertex>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
246  produces<CrossingFrame<SimVertex> >(label);
247  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label;
248  // std::cout <<"Will mix "<<object<<"s with InputTag "<<tag.encode()<<", label will be "<<label<<std::endl;
249 
250  }else if (object=="HepMCProduct") {
251  InputTag tag;
252  if (tags.size()>0) tag=tags[0];
253  std::string label;
254 
255  branchesActivate(TypeID(typeid(HepMCProduct)).friendlyClassName(),std::string(""),tag,label);
256  workersObjects_.push_back(new MixingWorker<HepMCProduct>(minBunch_,maxBunch_,bunchSpace_,std::string(""),label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
257 
258  produces<CrossingFrame<HepMCProduct> >(label);
259  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
260  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
261 
262 
263  }else if (object=="PCaloHit") {
264  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
265  for (unsigned int ii=0;ii<subdets.size();ii++) {
266  InputTag tag;
267  if (tags.size()==1) tag=tags[0];
268  else if(tags.size()>1) tag=tags[ii];
269  std::string label;
270 
271  branchesActivate(TypeID(typeid(std::vector<PCaloHit>)).friendlyClassName(),subdets[ii],tag,label);
272  workersObjects_.push_back(new MixingWorker<PCaloHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
273 
274  produces<CrossingFrame<PCaloHit> > (label);
275  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
276  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
277 
278  }
279 
280  }else if (object=="PSimHit") {
281  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
282  for (unsigned int ii=0;ii<subdets.size();ii++) {
283  InputTag tag;
284  if (tags.size()==1) tag=tags[0];
285  else if(tags.size()>1) tag=tags[ii];
286  std::string label;
287 
288  branchesActivate(TypeID(typeid(std::vector<PSimHit>)).friendlyClassName(),subdets[ii],tag,label);
289  workersObjects_.push_back(new MixingWorker<PSimHit>(minBunch_,maxBunch_,bunchSpace_,subdets[ii],label,labelCF,maxNbSources_,tag,tagCF,mixProdStep2_));
290 
291  produces<CrossingFrame<PSimHit> > (label);
292  LogInfo("MixingModule") <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label;
293  // std::cout <<"Will mix "<<object<<"s with InputTag= "<<tag.encode()<<", label will be "<<label<<std::endl;
294  }
295  }
296  else 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!";
297  }//if for mixProdStep2
298  }//while over the mixObjects parameters
299 
301  for (unsigned int branch=0;branch<wantedBranches_.size();++branch) LogDebug("MixingModule")<<"Will keep branch "<<wantedBranches_[branch]<<" for mixing ";
302 
304 
305  produces<PileupMixingContent>();
306 
307  produces<CrossingFramePlaybackInfoExtended>();
308  }
309 
311  //change the basic parameters.
313  setup.get<MixingRcd>().get(config);
314  minBunch_=config->minBunch();
315  maxBunch_=config->maxBunch();
316  bunchSpace_=config->bunchSpace();
317 
318  //propagate to change the workers
319  for (unsigned int ii=0;ii<workersObjects_.size();ii++){
320  workersObjects_[ii]->reload(setup);
321  }
322  }
323 
324  void MixingModule::branchesActivate(const std::string &friendlyName, const std::string &subdet, InputTag &tag, std::string &label) {
325 
326  label=tag.label()+tag.instance();
327  wantedBranches_.push_back(friendlyName + '_' +
328  tag.label() + '_' +
329  tag.instance());
330 
331  //if useCurrentProcessOnly, we have to change the input tag
333  const std::string processName = edm::Service<edm::service::TriggerNamesService>()->getProcessName();
334  tag = InputTag(tag.label(),tag.instance(),processName);
335  }
336 
337  }
338 
339 
341  if (workers_.size()==0){
342  for (unsigned int ii=0;ii<workersObjects_.size();ii++){
343  if (workersObjects_[ii]->checkSignal(e)){
344  workers_.push_back(workersObjects_[ii]);
345  }
346  }
347  }
348  }
349 
350 
352  //create playback info
354 
355  //and CrossingFrames
356  for (unsigned int ii=0;ii<workers_.size();ii++){
357  workers_[ii]->createnewEDProduct();
358  }
359  }
360 
361 
362  // Virtual destructor needed.
364  for (unsigned int ii=0;ii<workersObjects_.size();ii++){
365  delete workersObjects_[ii];}
366  delete sel_;
367  }
368 
370  // fill in signal part of CrossingFrame
371 
372  LogDebug("MixingModule")<<"===============> adding signals for "<<e.id();
373  for (unsigned int ii=0;ii<workers_.size();ii++){
374  workers_[ii]->addSignals(e);
375  }
376  }
377 
378 
379  void MixingModule::pileAllWorkers(EventPrincipal const& eventPrincipal,
380  // int bunchCrossing, int& eventId,
381  int bunchCrossing, int eventId,
382  int& vertexOffset)
383  {
384  for (unsigned int ii=0;ii<workers_.size();ii++) {
385  LogDebug("MixingModule") <<" merging Event: id " << eventPrincipal.id();
386  // std::cout <<"PILEALLWORKERS merging Event: id " << eventPrincipal.id() << std::endl;
387 
388  workers_[ii]->addPileups(bunchCrossing,eventPrincipal,
389  // ++eventId,vertexoffset);
390  eventId,vertexoffset);
391  }
392  }
393 
394 
396  {
397  // Don't allocate because PileUp will do it for us.
398  std::vector<edm::EventID> recordEventID;
400  if (playback_) {
401  bool got=e.get((*sel_), playbackInfo_H);
402  if (!got) {
403  throw cms::Exception("MixingProductNotFound") << " No "
404  "CrossingFramePlaybackInfoExtended on the input file, but playback "
405  "option set!!!!! Please change the input file if you really want "
406  "playback!!!!!!" << endl;
407  }
408  }
409 
410  // source[0] is "real" pileup. Check to see that this is what we are doing.
411 
412  std::vector<int> PileupList;
413  PileupList.clear();
414  TrueNumInteractions_.clear();
415 
416  boost::shared_ptr<PileUp> source0 = inputSources_[0];
417 
418  if( (source0 && source0->doPileUp() ) && !playback_ ) {
419  // if( (!inputSources_[0] || !inputSources_[0]->doPileUp()) && !playback_ ) {
420 
421  // Pre-calculate all pileup distributions before we go fishing for events
422 
423  source0->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_);
424 
425  }
426 
427  // for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
428  // std::cout << " bunch ID, Pileup, True " << bunchIdx << " " << PileupList[bunchIdx-minBunch_] << " " << TrueNumInteractions_[bunchIdx-minBunch_] << std::endl;
429  //}
430 
431  int KeepTrackOfPileup = 0;
432 
433  for (int bunchIdx = minBunch_; bunchIdx <= maxBunch_; ++bunchIdx) {
434  for ( size_t setBcrIdx=0; setBcrIdx<workers_.size(); setBcrIdx++) {
435  workers_[setBcrIdx]->setBcrOffset();
436  }
437 
438  for ( size_t readSrcIdx=0; readSrcIdx<maxNbSources_; readSrcIdx++ ) {
439  boost::shared_ptr<PileUp> source = inputSources_[readSrcIdx]; // this looks like we create
440  // new PileUp objects for each
441  // source for each event?
442  // Why?
443 
444  for ( size_t setSrcIdx=0; setSrcIdx<workers_.size(); setSrcIdx++) {
445  workers_[setSrcIdx]->setSourceOffset(readSrcIdx);
446  }
447  if (!source || !source->doPileUp()) continue;
448 
449  int NumPU_Events = 0;
450 
451  if(readSrcIdx ==0 && !playback_) { NumPU_Events = PileupList[bunchIdx - minBunch_];}
452  else { NumPU_Events = 1;} // non-minbias pileup only gets one event for now. Fix later if desired.
453 
454  // int eventId = 0;
455  int vertexOffset = 0;
456 
457  if (!playback_) {
458  inputSources_[readSrcIdx]->readPileUp(e.id(), recordEventID,
459  boost::bind(&MixingModule::pileAllWorkers, boost::ref(*this), _1, bunchIdx,
460  _2, vertexOffset), NumPU_Events
461  );
462  playbackInfo_->setStartEventId(recordEventID, readSrcIdx, bunchIdx, KeepTrackOfPileup);
463  KeepTrackOfPileup+=NumPU_Events;
464  } else {
465  int dummyId = 0 ;
466  const std::vector<edm::EventID>& playEventID =
467  playbackInfo_H->getStartEventId(readSrcIdx, bunchIdx);
468  if(readSrcIdx == 0) {
469  PileupList.push_back(playEventID.size());
470  TrueNumInteractions_.push_back(playEventID.size());
471  }
472  inputSources_[readSrcIdx]->playPileUp(
473  playEventID,
474  boost::bind(&MixingModule::pileAllWorkers, boost::ref(*this), _1, bunchIdx,
475  dummyId, vertexOffset)
476  );
477  }
478  }
479  }
480 
481  // Keep track of pileup accounting...
482 
483  std::auto_ptr< PileupMixingContent > PileupMixing_;
484 
485  std::vector<int> numInteractionList;
486  std::vector<int> bunchCrossingList;
487  std::vector<float> TrueInteractionList;
488 
489  //Makin' a list: Basically, we don't care about the "other" sources at this point.
490  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
491  bunchCrossingList.push_back(bunchCrossing);
492  if(!inputSources_[0] || !inputSources_[0]->doPileUp()) {
493  numInteractionList.push_back(0);
494  TrueInteractionList.push_back(0);
495  }
496  else {
497  numInteractionList.push_back(PileupList[bunchCrossing-minBunch_]);
498  TrueInteractionList.push_back((TrueNumInteractions_)[bunchCrossing-minBunch_]);
499  }
500  }
501 
502 
503  PileupMixing_ = std::auto_ptr< PileupMixingContent >(new PileupMixingContent( bunchCrossingList,
504  numInteractionList,
505  TrueInteractionList));
506 
507  e.put(PileupMixing_);
508 
509 
510  // we have to do the ToF transformation for PSimHits once all pileup has been added
511  for (unsigned int ii=0;ii<workers_.size();ii++) {
512  //not apply setTof in Step2 mode because it was done in the Step1
513  if (!mixProdStep2_){
514  workers_[ii]->setTof();
515  }
516  workers_[ii]->put(e);
517  }
518  }
519 
520 
522 
523  if (playbackInfo_) {
524  std::auto_ptr<CrossingFramePlaybackInfoExtended> pOut(playbackInfo_);
525  e.put(pOut);
526  }
527  }
528 
529 }//edm
#define LogDebug(id)
Selector * sel_
Definition: MixingModule.h:72
T getParameter(std::string const &) const
void pileAllWorkers(EventPrincipal const &ep, int bcr, int id, int &offset)
virtual void reload(const edm::EventSetup &)
virtual ~MixingModule()
static int vertexoffset
Definition: BMixingModule.h:70
static const HistoName names[]
virtual void createnewEDProduct()
std::vector< float > TrueNumInteractions_
Definition: BMixingModule.h:82
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
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::string labelPlayback_
Definition: MixingModule.h:67
std::string encode() const
Definition: InputTag.cc:72
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)
virtual void checkSignal(const edm::Event &e)
std::string friendlyName(std::string const &iFullName)
static std::string subdets[11]
std::vector< MixingWorkerBase * > workers_
Definition: MixingModule.h:74
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:267
static const unsigned int maxNbSources_
Definition: BMixingModule.h:79
std::vector< MixingWorkerBase * > workersObjects_
Definition: MixingModule.h:75
std::vector< std::string > getParameterNames() const
bool useCurrentProcessOnly_
Definition: MixingModule.h:77
virtual void branchesActivate(const std::string &friendlyName, const std::string &subdet, InputTag &tag, std::string &label)
tuple tags
Definition: o2o.py:248
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
const T & get() const
Definition: EventSetup.h:55
std::vector< std::string > wantedBranches_
Definition: MixingModule.h:76
std::string const & label() const
Definition: InputTag.h:25
std::vector< boost::shared_ptr< PileUp > > inputSources_
Definition: BMixingModule.h:87
edm::EventID id() const
Definition: EventBase.h:56
CrossingFramePlaybackInfoExtended * playbackInfo_
Definition: MixingModule.h:70
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
std::string const & instance() const
Definition: InputTag.h:26
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void doPileUp(edm::Event &e, const edm::EventSetup &es)