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 
111 
113 
115 
119 
120  edm::EDGetTokenT< CrossingFrame<PCaloHit> > crossingFramePCaloHitEBToken_, crossingFramePCaloHitEEToken_, crossingFramePCaloHitESToken_;
121 
122  std::map<int, double, std::less<int> > gainConv_;
123 
126 
129 
132 
136 
137  static const int nBunch = 21;
138 
139  MonitorElement* meEBBunchShape_[nBunch];
140  MonitorElement* meEEBunchShape_[nBunch];
141  MonitorElement* meESBunchShape_[nBunch];
142 
146 
150 
152  //const CaloVShape * theEcalShape;
156 
157 
158  //CaloHitResponse * theEcalResponse;
162 
163  void computeSDBunchDigi(const edm::EventSetup & eventSetup, const MixCollection<PCaloHit> & theHits, MapType & ebSignalSimMap, const EcalSubdetector & thisDet, const double & theSimThreshold, CLHEP::HepRandomEngine*);
164 
165  void bunchSumTest(std::vector<MonitorElement *> & theBunches, MonitorElement* & theTotal, MonitorElement* & theRatio, 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
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
int gainId(sample_type sample)
get the gainId (2 bits)
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
void bookHistograms(fwlite::EventContainer &eventCont)
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_
HLT enums.
EcalSubdetector
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: Run.h:43
Definition: EEShape.h:6