CMS 3D CMS Logo

EcalMixingModuleValidation.h
Go to the documentation of this file.
1 #ifndef EcalMixingModuleValidation_H
2 #define EcalMixingModuleValidation_H
3 
4 /*
5  * \file EcalMixingModuleValidation.h
6  *
7  * \author F. Cossutti
8  *
9 */
10 
13 
18 
21 
24 
33 
40 
42 //#include "SimCalorimetry/EcalSimAlgos/interface/EcalShape.h"
49 
59 
60 #include <iostream>
61 #include <fstream>
62 #include <vector>
63 #include <map>
66 
67 namespace edm {
68  class StreamID;
69 }
70 
71 namespace CLHEP {
72  class HepRandomEngine;
73 }
74 
76 
77  typedef std::map<uint32_t,float,std::less<uint32_t> > MapType;
78 
79 public:
80 
83 
85 ~EcalMixingModuleValidation() override;
86 
87 void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override;
88 
89 protected:
90 
92 void analyze(edm::Event const & e, edm::EventSetup const & c) override;
93 
94 void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
95 
96 // EndRun
97 void endRun(const edm::Run& r, const edm::EventSetup& c) override;
98 
99 
100 private:
101 
102  void checkPedestals(const edm::EventSetup & c);
103 
104  void findPedestal(const DetId & detId, int gainId, double & ped) const;
105 
106  void checkCalibrations(edm::EventSetup const & c);
107 
108  bool verbose_;
109 
110 
112 
114 
118 
119  edm::EDGetTokenT< CrossingFrame<PCaloHit> > crossingFramePCaloHitEBToken_, crossingFramePCaloHitEEToken_, crossingFramePCaloHitESToken_;
120 
121  std::map<int, double, std::less<int> > gainConv_;
122 
125 
128 
131 
135 
136  static const int nBunch = 21;
137 
138  MonitorElement* meEBBunchShape_[nBunch];
139  MonitorElement* meEEBunchShape_[nBunch];
140  MonitorElement* meESBunchShape_[nBunch];
141 
145 
149 
151  //const CaloVShape * theEcalShape;
155 
156 
157  //CaloHitResponse * theEcalResponse;
161 
162  void computeSDBunchDigi(const edm::EventSetup & eventSetup, const MixCollection<PCaloHit> & theHits, MapType & ebSignalSimMap, const EcalSubdetector & thisDet, const double & theSimThreshold, CLHEP::HepRandomEngine*);
163 
164  void bunchSumTest(std::vector<MonitorElement *> & theBunches, MonitorElement* & theTotal, MonitorElement* & theRatio, int nSample);
165 
166  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
167 
168  double esBaseline_;
169  double esADCtokeV_;
170  double esThreshold_;
171 
174 
176 
177  // the pedestals
179 
180  int m_ESgain ;
183  double m_ESeffwei ;
184 
185  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
186 };
187 
188 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
const ESIntercalibConstants * m_ESmips
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
Creates electronics signals from hits.
Definition: EBShape.h:6
std::map< int, double, std::less< int > > gainConv_
Definition: DetId.h:18
const EcalSimParameterMap * theParameterMap
std::map< uint32_t, float, std::less< uint32_t > > MapType
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
HLT enums.
EcalSubdetector
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: Run.h:45
Definition: EEShape.h:6