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