00001 #ifndef DataMixingSiStripWorker_h 00002 #define SimDataMixingSiStripWorker_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 00029 #include <map> 00030 #include <vector> 00031 #include <string> 00032 00033 00034 namespace edm 00035 { 00036 class DataMixingSiStripWorker 00037 { 00038 public: 00039 00040 DataMixingSiStripWorker(); 00041 00043 explicit DataMixingSiStripWorker(const edm::ParameterSet& ps); 00044 00046 virtual ~DataMixingSiStripWorker(); 00047 00048 void putSiStrip(edm::Event &e) ; 00049 void addSiStripSignals(const edm::Event &e); 00050 void addSiStripPileups(const int bcr, const edm::EventPrincipal*,unsigned int EventId); 00051 00052 00053 private: 00054 // data specifiers 00055 00056 edm::InputTag SistripLabelSig_ ; // name given to collection of SiStrip digis 00057 edm::InputTag SiStripPileInputTag_ ; // InputTag for pileup strips 00058 std::string SiStripDigiCollectionDM_ ; // secondary name to be given to new SiStrip digis 00059 00060 // 00061 00062 typedef std::vector<SiStripDigi> OneDetectorMap; // maps by strip ID for later combination - can have duplicate strips 00063 typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex; // map to all data for each detector ID 00064 00065 SiGlobalIndex SiHitStorage_; 00066 00067 00068 // unsigned int eventId_; //=0 for signal, from 1-n for pileup events 00069 00070 Selector * sel_; 00071 std::string label_; 00072 00073 class StrictWeakOrdering{ 00074 public: 00075 bool operator() (SiStripDigi i,SiStripDigi j) const {return i.strip() < j.strip();} 00076 }; 00077 00078 00079 }; 00080 }//edm 00081 00082 #endif