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>
65 
66 namespace edm {
67  class StreamID;
68 }
69 
70 namespace CLHEP {
71  class HepRandomEngine;
72 }
73 
75 
76  typedef std::map<uint32_t,float,std::less<uint32_t> > MapType;
77 
78 public:
79 
82 
85 
86 protected:
87 
89 void analyze(edm::Event const & e, edm::EventSetup const & c);
90 
91 // BeginRun
92 void beginRun(edm::Run const &, edm::EventSetup const & c);
93 
94 // EndRun
95 void endRun(const edm::Run& r, const edm::EventSetup& c);
96 
97 // EndJob
98 void endJob(void);
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)
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.
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)
void beginRun(edm::Run const &, edm::EventSetup const &c)
EcalMixingModuleValidation(const edm::ParameterSet &ps)
Constructor.
EcalSubdetector
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: Run.h:41
Definition: EEShape.h:6