CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/SimGeneral/DataMixingModule/plugins/DataMixingModule.h

Go to the documentation of this file.
00001 #ifndef DataMixingModule_h
00002 #define SimDataMixingModule_h
00003 
00015 #include "Mixing/Base/interface/BMixingModule.h"
00016 
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 #include "FWCore/Framework/interface/Selector.h"
00020 #include "FWCore/Framework/interface/EventPrincipal.h"
00021 
00022 #include "DataFormats/Provenance/interface/ProductID.h"
00023 #include "DataFormats/Common/interface/Handle.h"
00024 
00025 #include "SimGeneral/DataMixingModule/plugins/DataMixingEMWorker.h"
00026 #include "SimGeneral/DataMixingModule/plugins/DataMixingHcalWorker.h"
00027 #include "SimGeneral/DataMixingModule/plugins/DataMixingEMDigiWorker.h"
00028 #include "SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.h"
00029 #include "SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorkerProd.h"
00030 #include "SimGeneral/DataMixingModule/plugins/DataMixingMuonWorker.h"
00031 #include "SimGeneral/DataMixingModule/plugins/DataMixingSiStripWorker.h"
00032 #include "SimGeneral/DataMixingModule/plugins/DataMixingSiStripRawWorker.h"
00033 #include "SimGeneral/DataMixingModule/plugins/DataMixingSiPixelWorker.h"
00034 #include "SimGeneral/DataMixingModule/plugins/DataMixingGeneralTrackWorker.h"
00035 
00036 #include <map>
00037 #include <vector>
00038 #include <string>
00039 
00040 
00041 namespace edm
00042 {
00043   class DataMixingModule : public BMixingModule
00044     {
00045     public:
00046 
00048       explicit DataMixingModule(const edm::ParameterSet& ps);
00049 
00051       virtual ~DataMixingModule();
00052 
00053       virtual void beginJob() {}
00054 
00055       // copies, with EventSetup
00056       virtual void checkSignal(const edm::Event &e) {}
00057       virtual void createnewEDProduct() {}
00058       virtual void addSignals(const edm::Event &e, const edm::EventSetup& ES); 
00059       virtual void doPileUp(edm::Event &e,const edm::EventSetup& ES);
00060       virtual void put(edm::Event &e,const edm::EventSetup& ES) ;
00061 
00062       void pileWorker(const edm::EventPrincipal&, int bcr, int EventId,const edm::EventSetup& ES);
00063 
00064     private:
00065       // data specifiers
00066 
00067       // Ecal
00068       //output:
00069       std::string EBRecHitCollectionDM_; // secondary name to be given to EB collection of hits
00070       std::string EERecHitCollectionDM_; // secondary name to be given to EE collection of hits
00071       std::string ESRecHitCollectionDM_; // secondary name to be given to EE collection of hits
00072       //Digis:
00073       //output
00074       std::string EBDigiCollectionDM_; // secondary name to be given to EB collection of hits
00075       std::string EEDigiCollectionDM_; // secondary name to be given to EE collection of hits
00076       std::string ESDigiCollectionDM_; // secondary name to be given to EE collection of hits
00077 
00078       // Hcal
00079       // Rechits:
00080       // output:
00081       std::string HBHERecHitCollectionDM_; // secondary name to be given to HBHE collection of hits
00082       std::string HORecHitCollectionDM_  ; // secondary name to be given to HO collection of hits
00083       std::string HFRecHitCollectionDM_  ; // secondary name to be given to HF collection of hits
00084       std::string ZDCRecHitCollectionDM_ ; // secondary name to be given to ZDC collection of hits
00085       // Digis:
00086       // output:
00087       std::string HBHEDigiCollectionDM_; // secondary name to be given to HBHE collection of hits
00088       std::string HODigiCollectionDM_  ; // secondary name to be given to HO collection of hits
00089       std::string HFDigiCollectionDM_  ; // secondary name to be given to HF collection of hits
00090       std::string ZDCDigiCollectionDM_ ; // secondary name to be given to ZDC collection of hits
00091 
00092       // Muons
00093       // output:
00094       std::string DTDigiCollectionDM_;       // secondary name to be given to new DT digis
00095       std::string RPCDigiCollectionDM_;      // secondary name to be given to new RPC digis
00096       std::string CSCStripDigiCollectionDM_; // secondary name given to new collection of CSC Strip digis
00097       std::string CSCWireDigiCollectionDM_;  // secondary name given to new collection of CSC wire digis
00098       std::string CSCComparatorDigiCollectionDM_; // "     "                              CSC Comparator digis
00099 
00100       // SiStrips
00101       std::string SiStripDigiCollectionDM_  ; // secondary name to be given to new SiStrip digis
00102 
00103       // SiPixels
00104       std::string PixelDigiCollectionDM_  ; // secondary name to be given to new SiPixel digis
00105 
00106       // Tracks
00107       std::string GeneralTrackCollectionDM_;
00108       // FastSimulation or not?
00109 
00110       bool DoFastSim_;
00111 
00112       // Submodules to handle the individual detectors
00113 
00114       DataMixingEMWorker *EMWorker_ ;
00115       DataMixingEMDigiWorker *EMDigiWorker_ ;
00116       bool MergeEMDigis_;
00117 
00118       // Hcal 
00119       
00120       DataMixingHcalWorker *HcalWorker_ ;
00121       DataMixingHcalDigiWorker *HcalDigiWorker_ ;
00122       DataMixingHcalDigiWorkerProd *HcalDigiWorkerProd_ ;
00123 
00124       bool MergeHcalDigis_;
00125       bool MergeHcalDigisProd_;
00126 
00127       // Muons
00128 
00129       DataMixingMuonWorker *MuonWorker_ ;
00130 
00131       // Si-Strips
00132 
00133       DataMixingSiStripWorker *SiStripWorker_ ;
00134       DataMixingSiStripRawWorker *SiStripRawWorker_ ;
00135       bool useSiStripRawDigi_;
00136       std::string siStripRawDigiSource_;
00137 
00138       // Pixels
00139 
00140       DataMixingSiPixelWorker *SiPixelWorker_ ;
00141 
00142       // Tracks
00143 
00144       DataMixingGeneralTrackWorker *GeneralTrackWorker_;
00145 
00146       virtual void getSubdetectorNames();  
00147 
00148       // internally used information : subdetectors present in input
00149       std::vector<std::string> Subdetectors_;
00150 
00151       //      unsigned int eventId_; //=0 for signal, from 1-n for pileup events
00152 
00153       Selector * sel_;
00154       std::string label_;
00155 
00156     };
00157 }//edm
00158 
00159 #endif