CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/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       virtual void setBcrOffset();
00056       virtual void setSourceOffset(const unsigned int is);      
00057 
00058     private:
00059       // data specifiers
00060 
00061       // Ecal
00062       //output:
00063       std::string EBRecHitCollectionDM_; // secondary name to be given to EB collection of hits
00064       std::string EERecHitCollectionDM_; // secondary name to be given to EE collection of hits
00065       std::string ESRecHitCollectionDM_; // secondary name to be given to EE collection of hits
00066       //Digis:
00067       //output
00068       std::string EBDigiCollectionDM_; // secondary name to be given to EB collection of hits
00069       std::string EEDigiCollectionDM_; // secondary name to be given to EE collection of hits
00070       std::string ESDigiCollectionDM_; // secondary name to be given to EE collection of hits
00071 
00072       // Hcal
00073       // Rechits:
00074       // output:
00075       std::string HBHERecHitCollectionDM_; // secondary name to be given to HBHE collection of hits
00076       std::string HORecHitCollectionDM_  ; // secondary name to be given to HO collection of hits
00077       std::string HFRecHitCollectionDM_  ; // secondary name to be given to HF collection of hits
00078       std::string ZDCRecHitCollectionDM_ ; // secondary name to be given to ZDC collection of hits
00079       // Digis:
00080       // output:
00081       std::string HBHEDigiCollectionDM_; // secondary name to be given to HBHE collection of hits
00082       std::string HODigiCollectionDM_  ; // secondary name to be given to HO collection of hits
00083       std::string HFDigiCollectionDM_  ; // secondary name to be given to HF collection of hits
00084       std::string ZDCDigiCollectionDM_ ; // secondary name to be given to ZDC collection of hits
00085 
00086       // Muons
00087       // output:
00088       std::string DTDigiCollectionDM_;       // secondary name to be given to new DT digis
00089       std::string RPCDigiCollectionDM_;      // secondary name to be given to new RPC digis
00090       std::string CSCStripDigiCollectionDM_; // secondary name given to new collection of CSC Strip digis
00091       std::string CSCWireDigiCollectionDM_;  // secondary name given to new collection of CSC wire digis
00092       std::string CSCComparatorDigiCollectionDM_; // "     "                              CSC Comparator digis
00093 
00094       // SiStrips
00095       std::string SiStripDigiCollectionDM_  ; // secondary name to be given to new SiStrip digis
00096 
00097       // SiPixels
00098       std::string PixelDigiCollectionDM_  ; // secondary name to be given to new SiPixel digis
00099 
00100       // Tracks
00101       std::string GeneralTrackCollectionDM_;
00102       // FastSimulation or not?
00103 
00104       bool DoFastSim_;
00105 
00106       // Submodules to handle the individual detectors
00107 
00108       DataMixingEMWorker *EMWorker_ ;
00109       DataMixingEMDigiWorker *EMDigiWorker_ ;
00110       bool MergeEMDigis_;
00111 
00112       // Hcal 
00113       
00114       DataMixingHcalWorker *HcalWorker_ ;
00115       DataMixingHcalDigiWorker *HcalDigiWorker_ ;
00116       DataMixingHcalDigiWorkerProd *HcalDigiWorkerProd_ ;
00117 
00118       bool MergeHcalDigis_;
00119       bool MergeHcalDigisProd_;
00120 
00121       // Muons
00122 
00123       DataMixingMuonWorker *MuonWorker_ ;
00124 
00125       // Si-Strips
00126 
00127       DataMixingSiStripWorker *SiStripWorker_ ;
00128       DataMixingSiStripRawWorker *SiStripRawWorker_ ;
00129       bool useSiStripRawDigi_;
00130       std::string siStripRawDigiSource_;
00131 
00132       // Pixels
00133 
00134       DataMixingSiPixelWorker *SiPixelWorker_ ;
00135 
00136       // Tracks
00137 
00138       DataMixingGeneralTrackWorker *GeneralTrackWorker_;
00139 
00140       virtual void createnewEDProduct();
00141       virtual void getSubdetectorNames();
00142 
00143       // copies, with EventSetup
00144       virtual void put(edm::Event &e,const edm::EventSetup& ES) ;
00145       virtual void addSignals(const edm::Event &e, const edm::EventSetup& ES); 
00146       virtual void doPileUp(edm::Event &e,const edm::EventSetup& ES);
00147       virtual void addPileups(const int bcr, edm::EventPrincipal*, unsigned int EventId,unsigned int worker,const edm::EventSetup& ES);
00148       virtual void checkSignal(const edm::Event &e);
00149   
00150 
00151       // internally used information : subdetectors present in input
00152       std::vector<std::string> Subdetectors_;
00153 
00154       //      unsigned int eventId_; //=0 for signal, from 1-n for pileup events
00155 
00156       Selector * sel_;
00157       std::string label_;
00158 
00159     };
00160 }//edm
00161 
00162 #endif