CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::DataMixingModule Class Reference

#include <DataMixingModule.h>

Inheritance diagram for edm::DataMixingModule:
edm::BMixingModule edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void addSignals (const edm::Event &e, const edm::EventSetup &ES)
 
virtual void beginJob ()
 
virtual void checkSignal (const edm::Event &e)
 
virtual void createnewEDProduct ()
 
 DataMixingModule (const edm::ParameterSet &ps)
 
virtual void doPileUp (edm::Event &e, const edm::EventSetup &ES)
 
void pileWorker (const edm::EventPrincipal &, int bcr, int EventId, const edm::EventSetup &ES)
 
virtual void put (edm::Event &e, const edm::EventSetup &ES)
 
virtual ~DataMixingModule ()
 
- Public Member Functions inherited from edm::BMixingModule
virtual void addPileups (const int bcr, EventPrincipal *ep, unsigned int eventId, unsigned int worker, const edm::EventSetup &c)
 
double averageNumber () const
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
 
virtual void beginRun (const edm::Run &r, const edm::EventSetup &setup) override
 
 BMixingModule (const edm::ParameterSet &ps)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &setup) override
 
virtual void endRun (const edm::Run &r, const edm::EventSetup &setup) override
 
virtual void finalizeEvent (edm::Event &event, const edm::EventSetup &setup)
 
virtual void getEventStartInfo (edm::Event &e, const unsigned int source)
 
virtual void initializeEvent (const edm::Event &event, const edm::EventSetup &setup)
 
bool poisson () const
 
virtual void produce (edm::Event &e1, const edm::EventSetup &c) override
 
virtual void reload (const edm::EventSetup &setup)
 
virtual void setBcrOffset ()
 
virtual void setEventStartInfo (const unsigned int s)
 
virtual void setSourceOffset (const unsigned int s)
 
virtual ~BMixingModule ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void getSubdetectorNames ()
 

Private Attributes

bool AddedPileup_
 
std::string CSCComparatorDigiCollectionDM_
 
std::string CSCStripDigiCollectionDM_
 
std::string CSCWireDigiCollectionDM_
 
bool DoFastSim_
 
std::string DTDigiCollectionDM_
 
std::string EBDigiCollectionDM_
 
std::string EBRecHitCollectionDM_
 
std::string EEDigiCollectionDM_
 
std::string EERecHitCollectionDM_
 
DataMixingEMDigiWorkerEMDigiWorker_
 
DataMixingEMWorkerEMWorker_
 
std::string ESDigiCollectionDM_
 
std::string ESRecHitCollectionDM_
 
std::string GeneralTrackCollectionDM_
 
DataMixingGeneralTrackWorkerGeneralTrackWorker_
 
std::string HBHEDigiCollectionDM_
 
std::string HBHERecHitCollectionDM_
 
DataMixingHcalDigiWorkerHcalDigiWorker_
 
DataMixingHcalDigiWorkerProdHcalDigiWorkerProd_
 
DataMixingHcalWorkerHcalWorker_
 
std::string HFDigiCollectionDM_
 
std::string HFRecHitCollectionDM_
 
std::string HODigiCollectionDM_
 
std::string HORecHitCollectionDM_
 
std::string label_
 
bool MergeEMDigis_
 
bool MergeHcalDigis_
 
bool MergeHcalDigisProd_
 
bool MergePileup_
 
DataMixingMuonWorkerMuonWorker_
 
std::string PixelDigiCollectionDM_
 
DataMixingPileupCopyPUWorker_
 
std::string RPCDigiCollectionDM_
 
DataMixingSiPixelWorkerSiPixelWorker_
 
std::string SiStripDigiCollectionDM_
 
std::string siStripRawDigiSource_
 
DataMixingSiStripRawWorkerSiStripRawWorker_
 
DataMixingSiStripWorkerSiStripWorker_
 
std::vector< std::string > Subdetectors_
 
bool useSiStripRawDigi_
 
std::string ZDCDigiCollectionDM_
 
std::string ZDCRecHitCollectionDM_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::BMixingModule
void dropUnwantedBranches (std::vector< std::string > const &wantedBranches)
 
virtual void endJob ()
 
void update (edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from edm::BMixingModule
int bunchSpace_
 
bool checktof_
 
bool doit_ [4]
 
unsigned int eventId_
 
std::vector< boost::shared_ptr
< PileUp > > 
inputSources_
 
int maxBunch_
 
int minBunch_
 
bool const mixProdStep1_
 
bool const mixProdStep2_
 
edm::ESWatcher< MixingRcdparameterWatcher_
 
bool playback_
 
bool readDB_
 
std::vector< std::string > sourceNames_
 
std::vector< float > TrueNumInteractions_
 
- Static Protected Attributes inherited from edm::BMixingModule
static const unsigned int maxNbSources_ =4
 
static int vertexoffset = 0
 

Detailed Description

Definition at line 46 of file DataMixingModule.h.

Constructor & Destructor Documentation

DataMixingModule::DataMixingModule ( const edm::ParameterSet ps)
explicit

standard constructor

Definition at line 28 of file DataMixingModule.cc.

References CSCComparatorDigiCollectionDM_, CSCStripDigiCollectionDM_, CSCWireDigiCollectionDM_, DoFastSim_, DTDigiCollectionDM_, EBDigiCollectionDM_, EBRecHitCollectionDM_, EEDigiCollectionDM_, EERecHitCollectionDM_, EMDigiWorker_, EMWorker_, ESDigiCollectionDM_, ESRecHitCollectionDM_, edm::ParameterSet::exists(), GeneralTrackCollectionDM_, GeneralTrackWorker_, edm::ParameterSet::getParameter(), getSubdetectorNames(), HBHEDigiCollectionDM_, HBHERecHitCollectionDM_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, HFDigiCollectionDM_, HFRecHitCollectionDM_, HODigiCollectionDM_, HORecHitCollectionDM_, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MuonWorker_, PixelDigiCollectionDM_, PUWorker_, RPCDigiCollectionDM_, SiPixelWorker_, SiStripDigiCollectionDM_, SiStripRawWorker_, SiStripWorker_, AlCaHLTBitMon_QueryRunRegistry::string, useSiStripRawDigi_, ZDCDigiCollectionDM_, and ZDCRecHitCollectionDM_.

28  : BMixingModule(ps),
29  label_(ps.getParameter<std::string>("Label"))
30 
31  { // what's "label_"?
32 
33  // get the subdetector names
34  this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
35 
36  // For now, list all of them here. Later, make this selectable with input parameters
37  //
38 
39  // Check to see if we are working in Full or Fast Simulation
40 
41  DoFastSim_ = (ps.getParameter<std::string>("IsThisFastSim")).compare("YES") == 0;
42  MergeEMDigis_ = (ps.getParameter<std::string>("EcalMergeType")).compare("Digis") == 0;
43  MergeHcalDigis_ = (ps.getParameter<std::string>("HcalMergeType")).compare("Digis") == 0;
44  if(MergeHcalDigis_) MergeHcalDigisProd_ = (ps.getParameter<std::string>("HcalDigiMerge")=="FullProd");
45 
46  // Put Fast Sim Sequences here for Simplification: Fewer options!
47 
48  if(DoFastSim_) {
49 
50  // declare the products to produce
51 
52  //Ecal:
53 
54  EBRecHitCollectionDM_ = ps.getParameter<std::string>("EBRecHitCollectionDM");
55  EERecHitCollectionDM_ = ps.getParameter<std::string>("EERecHitCollectionDM");
56  ESRecHitCollectionDM_ = ps.getParameter<std::string>("ESRecHitCollectionDM");
57 
58  produces< EBRecHitCollection >(EBRecHitCollectionDM_);
59  produces< EERecHitCollection >(EERecHitCollectionDM_);
60  produces< ESRecHitCollection >(ESRecHitCollectionDM_);
61 
62  EMWorker_ = new DataMixingEMWorker(ps);
63 
64  //Hcal:
65 
66  HBHERecHitCollectionDM_ = ps.getParameter<std::string>("HBHERecHitCollectionDM");
67  HORecHitCollectionDM_ = ps.getParameter<std::string>("HORecHitCollectionDM");
68  HFRecHitCollectionDM_ = ps.getParameter<std::string>("HFRecHitCollectionDM");
69  ZDCRecHitCollectionDM_ = ps.getParameter<std::string>("ZDCRecHitCollectionDM");
70 
71  produces< HBHERecHitCollection >(HBHERecHitCollectionDM_);
72  produces< HORecHitCollection >(HORecHitCollectionDM_);
73  produces< HFRecHitCollection >(HFRecHitCollectionDM_);
74  produces< ZDCRecHitCollection >(ZDCRecHitCollectionDM_);
75 
77 
78  //Muons:
79 
80  DTDigiCollectionDM_ = ps.getParameter<std::string>("DTDigiCollectionDM");
81  RPCDigiCollectionDM_ = ps.getParameter<std::string>("RPCDigiCollectionDM");
82  CSCStripDigiCollectionDM_ = ps.getParameter<std::string>("CSCStripDigiCollectionDM");
83  CSCWireDigiCollectionDM_ = ps.getParameter<std::string>("CSCWireDigiCollectionDM");
84  CSCComparatorDigiCollectionDM_ = ps.getParameter<std::string>("CSCComparatorDigiCollectionDM");
85 
86  produces< DTDigiCollection >();
87  produces< RPCDigiCollection >();
88  produces< CSCStripDigiCollection >(CSCStripDigiCollectionDM_);
89  produces< CSCWireDigiCollection >(CSCWireDigiCollectionDM_);
90  produces< CSCComparatorDigiCollection >(CSCComparatorDigiCollectionDM_);
91 
93 
94  //Tracks:
95 
96  GeneralTrackCollectionDM_ = ps.getParameter<std::string>("GeneralTrackDigiCollectionDM");
97  produces< reco::TrackCollection >(GeneralTrackCollectionDM_);
99 
100  }
101  else{ // Full Simulation options
102 
103  //cout<<"FastSim False!!!"<<endl;
104 
105  // declare the products to produce
106  // Start with EM
107  if(MergeEMDigis_) {
108 
109  // cout<<"EM Digis TRUE!!!"<<endl;
110 
111  EBDigiCollectionDM_ = ps.getParameter<std::string>("EBDigiCollectionDM");
112  EEDigiCollectionDM_ = ps.getParameter<std::string>("EEDigiCollectionDM");
113  ESDigiCollectionDM_ = ps.getParameter<std::string>("ESDigiCollectionDM");
114  // nMaxPrintout_ = ps.getUntrackedParameter<int>("nMaxPrintout",10);
115 
116  produces< EBDigiCollection >(EBDigiCollectionDM_);
117  produces< EEDigiCollection >(EEDigiCollectionDM_);
118  produces< ESDigiCollection >(ESDigiCollectionDM_);
119 
121  }
122  else { // merge RecHits
123  EBRecHitCollectionDM_ = ps.getParameter<std::string>("EBRecHitCollectionDM");
124  EERecHitCollectionDM_ = ps.getParameter<std::string>("EERecHitCollectionDM");
125  ESRecHitCollectionDM_ = ps.getParameter<std::string>("ESRecHitCollectionDM");
126  // nMaxPrintout_ = ps.getUntrackedParameter<int>("nMaxPrintout",10);
127 
128  produces< EBRecHitCollection >(EBRecHitCollectionDM_);
129  produces< EERecHitCollection >(EERecHitCollectionDM_);
130  produces< ESRecHitCollection >(ESRecHitCollectionDM_);
131 
132  EMWorker_ = new DataMixingEMWorker(ps);
133  }
134  // Hcal next
135 
136  if(MergeHcalDigis_){
137  // cout<<"Hcal Digis TRUE!!!"<<endl;
138 
139  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
140  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
141  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
142  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
143 
144  produces< HBHEDigiCollection >();
145  produces< HODigiCollection >();
146  produces< HFDigiCollection >();
147  produces< ZDCDigiCollection >();
148 
149  if(MergeHcalDigisProd_) {
151  }
153  }
154 
155 
156  }
157  else{
158  HBHERecHitCollectionDM_ = ps.getParameter<std::string>("HBHERecHitCollectionDM");
159  HORecHitCollectionDM_ = ps.getParameter<std::string>("HORecHitCollectionDM");
160  HFRecHitCollectionDM_ = ps.getParameter<std::string>("HFRecHitCollectionDM");
161  ZDCRecHitCollectionDM_ = ps.getParameter<std::string>("ZDCRecHitCollectionDM");
162 
163  produces< HBHERecHitCollection >(HBHERecHitCollectionDM_);
164  produces< HORecHitCollection >(HORecHitCollectionDM_);
165  produces< HFRecHitCollection >(HFRecHitCollectionDM_);
166  produces< ZDCRecHitCollection >(ZDCRecHitCollectionDM_);
167 
169  }
170 
171  // Muons
172 
173  DTDigiCollectionDM_ = ps.getParameter<std::string>("DTDigiCollectionDM");
174  RPCDigiCollectionDM_ = ps.getParameter<std::string>("RPCDigiCollectionDM");
175  CSCStripDigiCollectionDM_ = ps.getParameter<std::string>("CSCStripDigiCollectionDM");
176  CSCWireDigiCollectionDM_ = ps.getParameter<std::string>("CSCWireDigiCollectionDM");
177  CSCComparatorDigiCollectionDM_ = ps.getParameter<std::string>("CSCComparatorDigiCollectionDM");
178 
179 
180  produces< DTDigiCollection >();
181  produces< RPCDigiCollection >();
182  produces< CSCStripDigiCollection >(CSCStripDigiCollectionDM_);
183  produces< CSCWireDigiCollection >(CSCWireDigiCollectionDM_);
184  produces< CSCComparatorDigiCollection >(CSCComparatorDigiCollectionDM_);
185 
187 
188  // Si-Strips
189 
190  useSiStripRawDigi_ = ps.exists("SiStripRawDigiSource")?
191  ps.getParameter<std::string>("SiStripRawDigiSource")=="PILEUP" ||
192  ps.getParameter<std::string>("SiStripRawDigiSource")=="SIGNAL" : false;
193 
194  SiStripDigiCollectionDM_ = ps.getParameter<std::string>("SiStripDigiCollectionDM");
195 
196  if(useSiStripRawDigi_) {
197 
198  produces< edm::DetSetVector<SiStripRawDigi> > (SiStripDigiCollectionDM_);
200 
201  } else {
202 
203  produces< edm::DetSetVector<SiStripDigi> > (SiStripDigiCollectionDM_);
205 
206  }
207 
208  // Pixels
209 
210  PixelDigiCollectionDM_ = ps.getParameter<std::string>("PixelDigiCollectionDM");
211 
212  produces< edm::DetSetVector<PixelDigi> > (PixelDigiCollectionDM_);
213 
215 
216  }
217 
218  // Pileup Information: if doing pre-mixing, we have to save the pileup information from the Secondary stream
219 
220  MergePileup_ = ps.getParameter<bool>("MergePileupInfo");
221 
222  if(MergePileup_) {
223  produces< std::vector<PileupSummaryInfo> >();
224  produces<CrossingFramePlaybackInfoExtended>();
225 
227  }
228 
229  }
T getParameter(std::string const &) const
std::string HFDigiCollectionDM_
std::string HBHERecHitCollectionDM_
std::string ZDCRecHitCollectionDM_
DataMixingGeneralTrackWorker * GeneralTrackWorker_
std::string CSCStripDigiCollectionDM_
BMixingModule(const edm::ParameterSet &ps)
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string SiStripDigiCollectionDM_
std::string CSCWireDigiCollectionDM_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
std::string RPCDigiCollectionDM_
std::string ZDCDigiCollectionDM_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
std::string GeneralTrackCollectionDM_
DataMixingPileupCopy * PUWorker_
std::string HORecHitCollectionDM_
DataMixingMuonWorker * MuonWorker_
virtual void getSubdetectorNames()
std::string EEDigiCollectionDM_
std::string HFRecHitCollectionDM_
std::string HBHEDigiCollectionDM_
std::string EBRecHitCollectionDM_
std::string CSCComparatorDigiCollectionDM_
DataMixingSiStripWorker * SiStripWorker_
std::string ESRecHitCollectionDM_
std::string EERecHitCollectionDM_
std::string ESDigiCollectionDM_
std::string DTDigiCollectionDM_
std::string EBDigiCollectionDM_
DataMixingHcalWorker * HcalWorker_
std::string HODigiCollectionDM_
std::string PixelDigiCollectionDM_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
DataMixingEMDigiWorker * EMDigiWorker_
DataMixingModule::~DataMixingModule ( )
virtual

Default destructor

Definition at line 271 of file DataMixingModule.cc.

References DoFastSim_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MuonWorker_, PUWorker_, SiPixelWorker_, SiStripRawWorker_, SiStripWorker_, and useSiStripRawDigi_.

271  {
272  if(MergeEMDigis_){ delete EMDigiWorker_;}
273  else {delete EMWorker_;}
274  if(MergeHcalDigis_) {
276  else { delete HcalDigiWorker_; }}
277  else {delete HcalWorker_;}
278  if(MuonWorker_) delete MuonWorker_;
279  if(DoFastSim_){
280  delete GeneralTrackWorker_;
281  }else{
283  delete SiStripRawWorker_;
284  else
285  delete SiStripWorker_;
286  delete SiPixelWorker_;
287  }
288  if(MergePileup_) { delete PUWorker_;}
289  }
DataMixingGeneralTrackWorker * GeneralTrackWorker_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingPileupCopy * PUWorker_
DataMixingMuonWorker * MuonWorker_
DataMixingSiStripWorker * SiStripWorker_
DataMixingHcalWorker * HcalWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
DataMixingEMDigiWorker * EMDigiWorker_

Member Function Documentation

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

Reimplemented from edm::BMixingModule.

Definition at line 291 of file DataMixingModule.cc.

References AddedPileup_, edm::DataMixingEMWorker::addEMSignals(), edm::DataMixingEMDigiWorker::addEMSignals(), edm::DataMixingGeneralTrackWorker::addGeneralTrackSignals(), edm::DataMixingHcalWorker::addHcalSignals(), edm::DataMixingHcalDigiWorkerProd::addHcalSignals(), edm::DataMixingHcalDigiWorker::addHcalSignals(), edm::DataMixingMuonWorker::addMuonSignals(), edm::DataMixingSiPixelWorker::addSiPixelSignals(), edm::DataMixingSiStripWorker::addSiStripSignals(), edm::DataMixingSiStripRawWorker::addSiStripSignals(), DoFastSim_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, edm::EventBase::id(), LogDebug, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MuonWorker_, SiPixelWorker_, SiStripRawWorker_, SiStripWorker_, and useSiStripRawDigi_.

291  {
292  // fill in maps of hits
293 
294  LogDebug("DataMixingModule")<<"===============> adding MC signals for "<<e.id();
295 
296  // Ecal
297  if(MergeEMDigis_) { EMDigiWorker_->addEMSignals(e, ES); }
298  else{ EMWorker_->addEMSignals(e);}
299 
300  // Hcal
301  if(MergeHcalDigis_) {
304  }
305  else{
307  }
308  }
309  else {HcalWorker_->addHcalSignals(e);}
310 
311  // Muon
313 
314  if(DoFastSim_){
316  }else{
317  // SiStrips
320 
321  // SiPixels
323  }
324  AddedPileup_ = false;
325 
326  } // end of addSignals
#define LogDebug(id)
void addMuonSignals(const edm::Event &e)
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
void addSiStripSignals(const edm::Event &e)
void addHcalSignals(const edm::Event &e)
void addEMSignals(const edm::Event &e)
DataMixingGeneralTrackWorker * GeneralTrackWorker_
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingMuonWorker * MuonWorker_
edm::EventID id() const
Definition: EventBase.h:56
DataMixingSiStripWorker * SiStripWorker_
void addSiStripSignals(const edm::Event &e)
DataMixingHcalWorker * HcalWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
void addEMSignals(const edm::Event &e, const edm::EventSetup &ES)
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
DataMixingEMDigiWorker * EMDigiWorker_
void addSiPixelSignals(const edm::Event &e)
virtual void edm::DataMixingModule::beginJob ( void  )
inlinevirtual

Reimplemented from edm::EDProducer.

Definition at line 56 of file DataMixingModule.h.

56 {}
virtual void edm::DataMixingModule::checkSignal ( const edm::Event e)
inlinevirtual

Reimplemented from edm::BMixingModule.

Definition at line 59 of file DataMixingModule.h.

59 {}
virtual void edm::DataMixingModule::createnewEDProduct ( )
inlinevirtual

Reimplemented from edm::BMixingModule.

Definition at line 60 of file DataMixingModule.h.

60 {}
void DataMixingModule::doPileUp ( edm::Event e,
const edm::EventSetup ES 
)
virtual

Reimplemented from edm::BMixingModule.

Definition at line 382 of file DataMixingModule.cc.

References edm::EventBase::id(), edm::BMixingModule::inputSources_, edm::BMixingModule::maxBunch_, edm::BMixingModule::maxNbSources_, edm::BMixingModule::minBunch_, or, pileWorker(), LaserTracksInput_cfi::source, and edm::BMixingModule::TrueNumInteractions_.

383  {
384  std::vector<edm::EventID> recordEventID;
385  std::vector<int> PileupList;
386  PileupList.clear();
387  TrueNumInteractions_.clear();
388 
389  for (int bunchCrossing=minBunch_;bunchCrossing<=maxBunch_;++bunchCrossing) {
390  for (unsigned int isource=0;isource<maxNbSources_;++isource) {
391  boost::shared_ptr<PileUp> source = inputSources_[isource];
392  if (not source or not source->doPileUp())
393  continue;
394 
395  if (isource==0)
396  source->CalculatePileup(minBunch_, maxBunch_, PileupList, TrueNumInteractions_);
397 
398  int NumPU_Events = 0;
399  if (isource ==0) {
400  NumPU_Events = PileupList[bunchCrossing - minBunch_];
401  } else {
402  // non-minbias pileup only gets one event for now. Fix later if desired.
403  NumPU_Events = 1;
404  }
405 
406  source->readPileUp(
407  e.id(),
408  recordEventID,
409  boost::bind(&DataMixingModule::pileWorker, boost::ref(*this),
410  _1, bunchCrossing, _2, boost::cref(ES)),
411  NumPU_Events
412  );
413  }
414  }
415 
416  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< float > TrueNumInteractions_
Definition: BMixingModule.h:90
static const unsigned int maxNbSources_
Definition: BMixingModule.h:87
std::vector< boost::shared_ptr< PileUp > > inputSources_
Definition: BMixingModule.h:95
edm::EventID id() const
Definition: EventBase.h:56
void pileWorker(const edm::EventPrincipal &, int bcr, int EventId, const edm::EventSetup &ES)
void DataMixingModule::getSubdetectorNames ( )
privatevirtual

Definition at line 231 of file DataMixingModule.cc.

Referenced by DataMixingModule().

231  {
232  // get subdetector names
233  // edm::Service<edm::ConstProductRegistry> reg;
234  // Loop over provenance of products in registry.
235  //for (edm::ProductRegistry::ProductList::const_iterator it = reg->productList().begin(); it != reg->productList().end(); ++it) {
236 
237  // **** Check this out.... ****
238 
239  // See FWCore/Framework/interface/BranchDescription.h
240  // BranchDescription contains all the information for the product.
241 
242  // This section not very backwards-compatible in terms of digi-merging. Need to be able to specify here which data format
243  // to look at...
244 
245  // edm::BranchDescription desc = it->second;
246  //if (!desc.friendlyClassName_.compare(0,9,"EBRecHitC")) {
247  // Subdetectors_.push_back(desc.productInstanceName_);
248  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
249  //}
250  //else if (!desc.friendlyClassName_.compare(0,9,"EERecHitC")) {
251  // else if (!desc.friendlyClassName_.compare(0,9,"EErechitC") && desc.productInstanceName_.compare(0,11,"TrackerHits")) {
252  // Subdetectors_.push_back(desc.productInstanceName_);
253  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
254  //}
255  //else if (!desc.friendlyClassName_.compare(0,9,"HBRecHitC")) {
256  // Subdetectors_.push_back(desc.productInstanceName_);
257  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
258  //}
259  //else if (!desc.friendlyClassName_.compare(0,9,"HERecHitC")) {
260  // Subdetectors_.push_back(desc.productInstanceName_);
261  //LogInfo("DataMixingModule") <<"Adding container "<<desc.productInstanceName_ <<" for pileup treatment";
262  // }
263  // and so on with other detector types...
264  // }
265  }
void DataMixingModule::pileWorker ( const edm::EventPrincipal ep,
int  bcr,
int  EventId,
const edm::EventSetup ES 
)

Definition at line 331 of file DataMixingModule.cc.

References AddedPileup_, edm::DataMixingEMWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingGeneralTrackWorker::addGeneralTrackPileups(), edm::DataMixingHcalWorker::addHcalPileups(), edm::DataMixingHcalDigiWorkerProd::addHcalPileups(), edm::DataMixingHcalDigiWorker::addHcalPileups(), edm::DataMixingMuonWorker::addMuonPileups(), edm::DataMixingPileupCopy::addPileupInfo(), edm::DataMixingSiPixelWorker::addSiPixelPileups(), edm::DataMixingSiStripWorker::addSiStripPileups(), edm::DataMixingSiStripRawWorker::addSiStripPileups(), DoFastSim_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, edm::EventPrincipal::id(), LogDebug, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MuonWorker_, PUWorker_, SiPixelWorker_, SiStripRawWorker_, SiStripWorker_, and useSiStripRawDigi_.

Referenced by doPileUp().

331  {
332 
333 
334  LogDebug("DataMixingModule") <<"\n===============> adding pileups from event "<<ep.id()<<" for bunchcrossing "<<bcr;
335 
336  // fill in maps of hits; same code as addSignals, except now applied to the pileup events
337 
338  // Ecal
339  if(MergeEMDigis_) { EMDigiWorker_->addEMPileups(bcr, &ep, eventNr, ES);}
340  else {EMWorker_->addEMPileups(bcr, &ep, eventNr); }
341 
342  // Hcal
343  if(MergeHcalDigis_) {
344  if(MergeHcalDigisProd_) {
345  HcalDigiWorkerProd_->addHcalPileups(bcr, &ep, eventNr, ES);
346  }
347  else{
348  HcalDigiWorker_->addHcalPileups(bcr, &ep, eventNr, ES);}
349  }
350  else {HcalWorker_->addHcalPileups(bcr, &ep, eventNr);}
351 
352  // Muon
353  MuonWorker_->addMuonPileups(bcr, &ep, eventNr);
354 
355  if(DoFastSim_){
356  GeneralTrackWorker_->addGeneralTrackPileups(bcr, &ep, eventNr);
357  }else{
358 
359  // SiStrips
361  else SiStripWorker_->addSiStripPileups(bcr, &ep, eventNr);
362 
363  // SiPixels
364  SiPixelWorker_->addSiPixelPileups(bcr, &ep, eventNr);
365  }
366 
367  // check and see if we need to copy the pileup information from
368  // secondary stream to the output stream
369  // We only have the pileup event here, so pick the first time and store the info
370 
371  if(MergePileup_ && !AddedPileup_){
372 
373  PUWorker_->addPileupInfo(&ep, eventNr);
374 
375  AddedPileup_ = true;
376  }
377 
378  }
#define LogDebug(id)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES)
void addSiPixelPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
DataMixingGeneralTrackWorker * GeneralTrackWorker_
EventID const & id() const
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
void addGeneralTrackPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES)
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES)
DataMixingPileupCopy * PUWorker_
void addEMPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
DataMixingMuonWorker * MuonWorker_
void addMuonPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId)
DataMixingSiStripWorker * SiStripWorker_
DataMixingHcalWorker * HcalWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
DataMixingEMDigiWorker * EMDigiWorker_
void addPileupInfo(const edm::EventPrincipal *, unsigned int EventId)
void DataMixingModule::put ( edm::Event e,
const edm::EventSetup ES 
)
virtual

Reimplemented from edm::BMixingModule.

Definition at line 419 of file DataMixingModule.cc.

References DoFastSim_, EMDigiWorker_, EMWorker_, GeneralTrackWorker_, HcalDigiWorker_, HcalDigiWorkerProd_, HcalWorker_, MergeEMDigis_, MergeHcalDigis_, MergeHcalDigisProd_, MergePileup_, MuonWorker_, edm::DataMixingEMWorker::putEM(), edm::DataMixingEMDigiWorker::putEM(), edm::DataMixingGeneralTrackWorker::putGeneralTrack(), edm::DataMixingHcalWorker::putHcal(), edm::DataMixingHcalDigiWorkerProd::putHcal(), edm::DataMixingHcalDigiWorker::putHcal(), edm::DataMixingMuonWorker::putMuon(), edm::DataMixingPileupCopy::putPileupInfo(), edm::DataMixingSiPixelWorker::putSiPixel(), edm::DataMixingSiStripWorker::putSiStrip(), edm::DataMixingSiStripRawWorker::putSiStrip(), PUWorker_, SiPixelWorker_, SiStripRawWorker_, SiStripWorker_, and useSiStripRawDigi_.

419  {
420 
421  // individual workers...
422 
423  // Ecal
424  if(MergeEMDigis_) {EMDigiWorker_->putEM(e,ES);}
425  else {EMWorker_->putEM(e);}
426 
427  // Hcal
428  if(MergeHcalDigis_) {
429  if(MergeHcalDigisProd_) {
431  }
432  else{
433  HcalDigiWorker_->putHcal(e,ES);
434  }
435  }
436  else {HcalWorker_->putHcal(e);}
437 
438  // Muon
439  MuonWorker_->putMuon(e);
440 
441  if(DoFastSim_){
443  }else{
444  // SiStrips
446  else SiStripWorker_->putSiStrip(e);
447 
448  // SiPixels
450  }
451 
453 
454 
455  }
void putEM(edm::Event &e)
DataMixingGeneralTrackWorker * GeneralTrackWorker_
void putPileupInfo(edm::Event &e)
void putEM(edm::Event &e, const edm::EventSetup &ES)
DataMixingSiStripRawWorker * SiStripRawWorker_
DataMixingSiPixelWorker * SiPixelWorker_
void putHcal(edm::Event &e, const edm::EventSetup &ES)
DataMixingHcalDigiWorker * HcalDigiWorker_
DataMixingEMWorker * EMWorker_
DataMixingPileupCopy * PUWorker_
DataMixingMuonWorker * MuonWorker_
void putHcal(edm::Event &e, const edm::EventSetup &ES)
DataMixingSiStripWorker * SiStripWorker_
DataMixingHcalWorker * HcalWorker_
DataMixingHcalDigiWorkerProd * HcalDigiWorkerProd_
DataMixingEMDigiWorker * EMDigiWorker_

Member Data Documentation

bool edm::DataMixingModule::AddedPileup_
private

Definition at line 133 of file DataMixingModule.h.

Referenced by addSignals(), and pileWorker().

std::string edm::DataMixingModule::CSCComparatorDigiCollectionDM_
private

Definition at line 101 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 99 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 100 of file DataMixingModule.h.

Referenced by DataMixingModule().

bool edm::DataMixingModule::DoFastSim_
private

Definition at line 113 of file DataMixingModule.h.

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

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

Definition at line 97 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 77 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 72 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::EEDigiCollectionDM_
private

Definition at line 78 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 73 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingEMDigiWorker* edm::DataMixingModule::EMDigiWorker_
private

Definition at line 120 of file DataMixingModule.h.

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

DataMixingEMWorker* edm::DataMixingModule::EMWorker_
private

Definition at line 119 of file DataMixingModule.h.

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

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

Definition at line 79 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 74 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::GeneralTrackCollectionDM_
private

Definition at line 110 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingGeneralTrackWorker* edm::DataMixingModule::GeneralTrackWorker_
private

Definition at line 152 of file DataMixingModule.h.

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

std::string edm::DataMixingModule::HBHEDigiCollectionDM_
private

Definition at line 90 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 84 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingHcalDigiWorker* edm::DataMixingModule::HcalDigiWorker_
private

Definition at line 126 of file DataMixingModule.h.

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

DataMixingHcalDigiWorkerProd* edm::DataMixingModule::HcalDigiWorkerProd_
private

Definition at line 127 of file DataMixingModule.h.

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

DataMixingHcalWorker* edm::DataMixingModule::HcalWorker_
private

Definition at line 125 of file DataMixingModule.h.

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

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

Definition at line 92 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 86 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 91 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 85 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 121 of file DataMixingModule.h.

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

bool edm::DataMixingModule::MergeHcalDigis_
private

Definition at line 129 of file DataMixingModule.h.

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

bool edm::DataMixingModule::MergeHcalDigisProd_
private

Definition at line 130 of file DataMixingModule.h.

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

bool edm::DataMixingModule::MergePileup_
private

Definition at line 132 of file DataMixingModule.h.

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

DataMixingMuonWorker* edm::DataMixingModule::MuonWorker_
private

Definition at line 137 of file DataMixingModule.h.

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

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

Definition at line 107 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingPileupCopy* edm::DataMixingModule::PUWorker_
private

Definition at line 117 of file DataMixingModule.h.

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

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

Definition at line 98 of file DataMixingModule.h.

Referenced by DataMixingModule().

DataMixingSiPixelWorker* edm::DataMixingModule::SiPixelWorker_
private

Definition at line 148 of file DataMixingModule.h.

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

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

Definition at line 104 of file DataMixingModule.h.

Referenced by DataMixingModule().

std::string edm::DataMixingModule::siStripRawDigiSource_
private

Definition at line 144 of file DataMixingModule.h.

DataMixingSiStripRawWorker* edm::DataMixingModule::SiStripRawWorker_
private

Definition at line 142 of file DataMixingModule.h.

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

DataMixingSiStripWorker* edm::DataMixingModule::SiStripWorker_
private

Definition at line 141 of file DataMixingModule.h.

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

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

Definition at line 157 of file DataMixingModule.h.

bool edm::DataMixingModule::useSiStripRawDigi_
private

Definition at line 143 of file DataMixingModule.h.

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

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

Definition at line 93 of file DataMixingModule.h.

Referenced by DataMixingModule().

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

Definition at line 87 of file DataMixingModule.h.

Referenced by DataMixingModule().