CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/SimGeneral/DataMixingModule/plugins/DataMixingSiPixelWorker.h

Go to the documentation of this file.
00001 #ifndef DataMixingSiPixelWorker_h
00002 #define SimDataMixingSiPixelWorker_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/SiPixelDigi/interface/PixelDigi.h"
00028 
00029 #include <map>
00030 #include <vector>
00031 #include <string>
00032 
00033 
00034 namespace edm
00035 {
00036   class DataMixingSiPixelWorker
00037     {
00038     public:
00039 
00040       DataMixingSiPixelWorker();
00041 
00043       explicit DataMixingSiPixelWorker(const edm::ParameterSet& ps);
00044 
00046       virtual ~DataMixingSiPixelWorker();
00047 
00048       void putSiPixel(edm::Event &e) ;
00049       void addSiPixelSignals(const edm::Event &e); 
00050       void addSiPixelPileups(const int bcr, edm::EventPrincipal*,unsigned int EventId);
00051 
00052 
00053     private:
00054       // data specifiers
00055 
00056       edm::InputTag pixeldigi_collectionSig_ ; // secondary name given to collection of SiPixel digis
00057       edm::InputTag pixeldigi_collectionPile_ ; // secondary name given to collection of SiPixel digis
00058       std::string PixelDigiCollectionDM_  ; // secondary name to be given to new SiPixel digis
00059 
00060       // 
00061 
00062       typedef std::multimap<int, PixelDigi> OneDetectorMap;   // maps by pixel ID for later combination - can have duplicate pixels
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     };
00074 }//edm
00075 
00076 #endif