CMS 3D CMS Logo

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