CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DataMixingSiStripMCDigiWorker.h
Go to the documentation of this file.
1 #ifndef DataMixingSiStripMCDigiWorker_h
2 #define SimDataMixingSiStripMCDigiWorker_h
3 
20 
24 
25 //Data Formats
29 
37 
43 
44 
45 #include <map>
46 #include <vector>
47 #include <string>
48 
49 namespace CLHEP {
50  class HepRandomEngine;
51 }
52 
53 namespace edm
54 {
55  class ModuleCallingContext;
56 
57 
59  {
60  public:
61 
63 
66 
69 
70  void putSiStrip(edm::Event &e, edm::EventSetup const& iSetup) ;
71  void addSiStripSignals(const edm::Event &e);
72  void addSiStripPileups(const int bcr, const edm::EventPrincipal*,unsigned int EventId,
73  ModuleCallingContext const*);
74 
75 
76  virtual void initializeEvent(const edm::Event &e, edm::EventSetup const& iSetup);
77 
78  void DMinitializeDetUnit(StripGeomDetUnit* det, const edm::EventSetup& iSetup );
79 
80  private:
81  // data specifiers
82 
83  edm::InputTag SistripLabelSig_ ; // name given to collection of SiStrip digis
84  edm::InputTag SiStripPileInputTag_ ; // InputTag for pileup strips
85  std::string SiStripDigiCollectionDM_ ; // secondary name to be given to new SiStrip digis
86 
87  //
88 
89  typedef std::vector<SiStripDigi> OneDetectorMap; // maps by strip ID for later combination - can have duplicate strips
90  typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex; // map to all data for each detector ID
92 
94 
95 
96  // unsigned int eventId_; //=0 for signal, from 1-n for pileup events
97 
99 
101  bool peakMode;
102  double theThreshold;
106 
107  std::unique_ptr<SiGaussianTailNoiseAdder> theSiNoiseAdder;
108  std::unique_ptr<SiStripFedZeroSuppression> theSiZeroSuppress;
109  std::unique_ptr<SiTrivialDigitalConverter> theSiDigitalConverter;
110 
111  CLHEP::HepRandomEngine* rndEngine;
112 
114 
115  // bad channels for each detector ID
116  std::map<unsigned int, std::vector<bool> > allBadChannels;
117  // first and last channel wit signal for each detector ID
118  std::map<unsigned int, size_t> firstChannelsWithSignal;
119  std::map<unsigned int, size_t> lastChannelsWithSignal;
120 
121 
123  public:
124  bool operator() (SiStripDigi i,SiStripDigi j) const {return i.strip() < j.strip();}
125  };
126 
127 
128  };
129 }//edm
130 
131 #endif
std::vector< SiStripDigi > DigitalVecType
int i
Definition: DBlmapReader.cc:9
std::map< unsigned int, size_t > firstChannelsWithSignal
void DMinitializeDetUnit(StripGeomDetUnit *det, const edm::EventSetup &iSetup)
virtual void initializeEvent(const edm::Event &e, edm::EventSetup const &iSetup)
SiDigitalConverter::DigitalVecType DigitalVecType
const uint16_t & strip() const
Definition: SiStripDigi.h:40
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
int j
Definition: DBlmapReader.cc:9
std::map< uint32_t, OneDetectorMap > SiGlobalIndex
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
std::unique_ptr< SiGaussianTailNoiseAdder > theSiNoiseAdder
std::map< unsigned int, std::vector< bool > > allBadChannels
std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
std::unique_ptr< SiStripFedZeroSuppression > theSiZeroSuppress
std::map< unsigned int, size_t > lastChannelsWithSignal
void putSiStrip(edm::Event &e, edm::EventSetup const &iSetup)