test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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);
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);
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 
121 
122  std::map<int, double, std::less<int> > gainConv_;
123 
126 
129 
132 
136 
137  static const int nBunch = 21;
138 
142 
146 
150 
152  //const CaloVShape * theEcalShape;
156 
157 
158  //CaloHitResponse * theEcalResponse;
162 
163  void computeSDBunchDigi(const edm::EventSetup & eventSetup, 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
void checkPedestals(const edm::EventSetup &c)
int i
Definition: DBlmapReader.cc:9
void computeSDBunchDigi(const edm::EventSetup &eventSetup, MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
const ESIntercalibConstants * m_ESmips
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
void findPedestal(const DetId &detId, int gainId, double &ped) const
int gainId(sample_type sample)
get the gainId (2 bits)
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
void checkCalibrations(edm::EventSetup const &c)
MonitorElement * meEEBunchShape_[nBunch]
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
MonitorElement * meEBBunchShape_[nBunch]
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
MonitorElement * meESBunchShape_[nBunch]
Creates electronics signals from hits.
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EBShape.h:6
std::map< int, double, std::less< int > > gainConv_
void analyze(edm::Event const &e, edm::EventSetup const &c)
Analyze.
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: DetId.h:18
const EcalSimParameterMap * theParameterMap
std::map< uint32_t, float, std::less< uint32_t > > MapType
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
void endRun(const edm::Run &r, const edm::EventSetup &c)
EcalMixingModuleValidation(const edm::ParameterSet &ps)
Constructor.
EcalSubdetector
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: Run.h:43
Definition: EEShape.h:6