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>
65 
66 namespace edm {
67  class StreamID;
68 }
69 
70 namespace CLHEP {
71  class HepRandomEngine;
72 }
73 
75  typedef std::map<uint32_t, float, std::less<uint32_t> > MapType;
76 
77 public:
80 
82  ~EcalMixingModuleValidation() override;
83 
84  void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
85 
86 protected:
88  void analyze(edm::Event const& e, edm::EventSetup const& c) override;
89 
90  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
91 
92  // EndRun
93  void dqmEndRun(const edm::Run& r, const edm::EventSetup& c) override;
94 
95 private:
96  void checkPedestals(const edm::EventSetup& c);
97 
98  void findPedestal(const DetId& detId, int gainId, double& ped) const;
99 
100  void checkCalibrations(edm::EventSetup const& c);
101 
102  bool verbose_;
103 
105 
107 
111 
112  edm::EDGetTokenT<CrossingFrame<PCaloHit> > crossingFramePCaloHitEBToken_, crossingFramePCaloHitEEToken_,
114 
115  std::map<int, double, std::less<int> > gainConv_;
116 
119 
122 
125 
129 
130  static const int nBunch = 21;
131 
132  MonitorElement* meEBBunchShape_[nBunch];
133  MonitorElement* meEEBunchShape_[nBunch];
134  MonitorElement* meESBunchShape_[nBunch];
135 
139 
143 
145  //const CaloVShape * theEcalShape;
149 
150  //CaloHitResponse * theEcalResponse;
154 
155  void computeSDBunchDigi(const edm::EventSetup& eventSetup,
157  MapType& ebSignalSimMap,
158  const EcalSubdetector& thisDet,
159  const double& theSimThreshold,
160  CLHEP::HepRandomEngine*);
161 
162  void bunchSumTest(std::vector<MonitorElement*>& theBunches,
163  MonitorElement*& theTotal,
164  MonitorElement*& theRatio,
165  int nSample);
166 
167  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
168 
169  double esBaseline_;
170  double esADCtokeV_;
171  double esThreshold_;
172 
175 
177 
178  // the pedestals
180 
181  int m_ESgain;
184  double m_ESeffwei;
185 
186  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
187 };
188 
189 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
const ESIntercalibConstants * m_ESmips
std::map< uint32_t, float, std::less< uint32_t > > MapType
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:17
const EcalSimParameterMap * theParameterMap
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
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