CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
23 
32 
39 
41 //#include "SimCalorimetry/EcalSimAlgos/interface/EcalShape.h"
48 
61 
62 #include <iostream>
63 #include <fstream>
64 #include <vector>
65 #include <map>
66 
67 namespace edm {
68  class StreamID;
69 }
70 
71 namespace CLHEP {
72  class HepRandomEngine;
73 }
74 
76  typedef std::map<uint32_t, float, std::less<uint32_t> > MapType;
77 
78 public:
81 
83  ~EcalMixingModuleValidation() override;
84 
85  void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
86 
87 protected:
89  void analyze(edm::Event const& e, edm::EventSetup const& c) override;
90 
91  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
92 
93  // EndRun
94  void dqmEndRun(const edm::Run& r, const edm::EventSetup& c) override;
95 
96 private:
97  void checkPedestals(const edm::EventSetup& c);
98 
99  void findPedestal(const DetId& detId, int gainId, double& ped) const;
100 
101  void checkCalibrations(edm::EventSetup const& c);
102 
103  bool verbose_;
104 
106 
108 
114 
122 
123  std::map<int, double, std::less<int> > gainConv_;
124 
127 
130 
133 
137 
138  static const int nBunch = 21;
139 
143 
147 
151 
152  std::unique_ptr<const EcalSimParameterMap> theParameterMap;
153  //const CaloVShape * theEcalShape;
154  std::unique_ptr<ESShape> theESShape;
155  std::unique_ptr<EBShape> theEBShape;
156  std::unique_ptr<EEShape> theEEShape;
157 
158  //CaloHitResponse * theEcalResponse;
159  std::unique_ptr<CaloHitResponse> theESResponse;
160  std::unique_ptr<CaloHitResponse> theEBResponse;
161  std::unique_ptr<CaloHitResponse> theEEResponse;
162 
163  void computeSDBunchDigi(const edm::EventSetup& eventSetup,
164  const MixCollection<PCaloHit>& theHits,
165  MapType& ebSignalSimMap,
166  const EcalSubdetector& thisDet,
167  const double& theSimThreshold,
168  CLHEP::HepRandomEngine*);
169 
170  void bunchSumTest(std::vector<MonitorElement*>& theBunches,
171  MonitorElement*& theTotal,
172  MonitorElement*& theRatio,
173  int nSample);
174 
175  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
176 
177  double esBaseline_;
178  double esADCtokeV_;
179  double esThreshold_;
180 
183 
185 
186  // the pedestals
188 
189  int m_ESgain;
192  double m_ESeffwei;
193 
194  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
195 };
196 
197 #endif
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > dbPed
void checkPedestals(const edm::EventSetup &c)
const edm::EventSetup & c
const ESIntercalibConstants * m_ESmips
void findPedestal(const DetId &detId, int gainId, double &ped) const
std::unique_ptr< EEShape > theEEShape
std::map< uint32_t, float, std::less< uint32_t > > MapType
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
void checkCalibrations(edm::EventSetup const &c)
MonitorElement * meEEBunchShape_[nBunch]
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
std::unique_ptr< const EcalSimParameterMap > theParameterMap
std::vector< CLHEP::HepRandomEngine * > randomEngines_
MonitorElement * meEBBunchShape_[nBunch]
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > esMIPToGeV_
std::unique_ptr< CaloHitResponse > theEBResponse
edm::ESGetToken< ESGain, ESGainRcd > esgain_
std::unique_ptr< CaloHitResponse > theESResponse
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
MonitorElement * meESBunchShape_[nBunch]
~EcalMixingModuleValidation() override
Destructor.
std::unique_ptr< CaloHitResponse > theEEResponse
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
std::unique_ptr< ESShape > theESShape
void computeSDBunchDigi(const edm::EventSetup &eventSetup, const MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
std::map< int, double, std::less< int > > gainConv_
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: DetId.h:17
std::unique_ptr< EBShape > theEBShape
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
edm::ESGetToken< ESPedestals, ESPedestalsRcd > esPedestals_
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyze.
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > pAgc
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > esMIPs_
EcalMixingModuleValidation(const edm::ParameterSet &ps)
Constructor.
EcalSubdetector
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > hGeometry
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: Run.h:45