00001 #ifndef DataMixingSiStripRawWorker_h 00002 #define SimDataMixingSiStripRawWorker_h 00003 00017 #include "FWCore/Framework/interface/Event.h" 00018 #include "FWCore/Framework/interface/EventPrincipal.h" 00019 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00020 #include "FWCore/Framework/interface/Selector.h" 00021 00022 #include "DataFormats/Provenance/interface/ProductID.h" 00023 #include "DataFormats/Common/interface/Handle.h" 00024 //Data Formats 00025 #include "DataFormats/Common/interface/DetSetVector.h" 00026 #include "DataFormats/Common/interface/DetSet.h" 00027 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h" 00028 #include "DataFormats/SiStripDigi/interface/SiStripRawDigi.h" 00029 00030 #include <map> 00031 #include <vector> 00032 #include <string> 00033 00034 00035 namespace edm 00036 { 00037 class DataMixingSiStripRawWorker 00038 { 00039 public: 00040 00041 DataMixingSiStripRawWorker(); 00042 00044 explicit DataMixingSiStripRawWorker(const edm::ParameterSet& ps); 00045 00047 virtual ~DataMixingSiStripRawWorker(); 00048 00049 void putSiStrip(edm::Event &e) ; 00050 void addSiStripSignals(const edm::Event &e); 00051 void addSiStripPileups(const int bcr, edm::EventPrincipal*,unsigned int EventId); 00052 00053 00054 private: 00055 // data specifiers 00056 00057 edm::InputTag Sistripdigi_collectionSig_ ; // primary name given to collection of SiStrip digis 00058 edm::InputTag SistripLabelSig_ ; // secondary name given to collection of SiStrip digis 00059 edm::InputTag SiStripPileInputTag_; // InputTag for pileup strips 00060 edm::InputTag SiStripRawInputTag_ ; // InputTag for strips with rawdigis 00061 std::string SiStripDigiCollectionDM_ ; // secondary name to be given to new SiStrip raw digis 00062 std::string SiStripRawDigiSource_ ; // which collection is rawdigis: either "SIGNAL" or "PILEUP" 00063 00064 // 00065 00066 typedef std::vector<SiStripDigi> OneDetectorMap; // maps by strip ID for later combination - can have duplicate strips 00067 typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex; // map to all data for each detector ID 00068 00069 SiGlobalIndex SiHitStorage_; 00070 00071 // SiStripDigi and SiStripRawDigi collections 00072 const edm::DetSetVector<SiStripDigi> *digicollection_; 00073 const edm::DetSetVector<SiStripRawDigi> *rawdigicollection_; 00074 00075 Selector * sel_; 00076 std::string label_; 00077 00078 }; 00079 }//edm 00080 00081 #endif