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 
23 
32 
39 
41 //#include "SimCalorimetry/EcalSimAlgos/interface/EcalShape.h"
48 
58 
59 #include <iostream>
60 #include <fstream>
61 #include <vector>
62 #include <map>
63 
64 namespace edm {
65  class StreamID;
66 }
67 
68 namespace CLHEP {
69  class HepRandomEngine;
70 }
71 
73  typedef std::map<uint32_t, float, std::less<uint32_t> > MapType;
74 
75 public:
78 
80  ~EcalMixingModuleValidation() override;
81 
82  void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
83 
84 protected:
86  void analyze(edm::Event const& e, edm::EventSetup const& c) override;
87 
88  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
89 
90  // EndRun
91  void dqmEndRun(const edm::Run& r, const edm::EventSetup& c) override;
92 
93 private:
94  void checkPedestals(const edm::EventSetup& c);
95 
96  void findPedestal(const DetId& detId, int gainId, double& ped) const;
97 
98  void checkCalibrations(edm::EventSetup const& c);
99 
100  bool verbose_;
101 
103 
105 
109 
112 
113  std::map<int, double, std::less<int> > gainConv_;
114 
117 
120 
123 
127 
128  static const int nBunch = 21;
129 
133 
137 
141 
143  //const CaloVShape * theEcalShape;
147 
148  //CaloHitResponse * theEcalResponse;
152 
153  void computeSDBunchDigi(const edm::EventSetup& eventSetup,
155  MapType& ebSignalSimMap,
156  const EcalSubdetector& thisDet,
157  const double& theSimThreshold,
158  CLHEP::HepRandomEngine*);
159 
160  void bunchSumTest(std::vector<MonitorElement*>& theBunches,
161  MonitorElement*& theTotal,
162  MonitorElement*& theRatio,
163  int nSample);
164 
165  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
166 
167  double esBaseline_;
168  double esADCtokeV_;
169  double esThreshold_;
170 
173 
175 
176  // the pedestals
178 
179  int m_ESgain;
182  double m_ESeffwei;
183 
184  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
185 };
186 
187 #endif
EcalMixingModuleValidation::~EcalMixingModuleValidation
~EcalMixingModuleValidation() override
Destructor.
Definition: EcalMixingModuleValidation.cc:127
edm::StreamID
Definition: StreamID.h:30
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
Definition: EcalMixingModuleValidation.h:110
mps_fire.i
i
Definition: mps_fire.py:355
EcalPedestals.h
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:177
MessageLogger.h
EcalMixingModuleValidation::HepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
Definition: EcalMixingModuleValidation.h:104
ESHandle.h
ESIntercalibConstants.h
EcalMixingModuleValidation::outputFile_
std::string outputFile_
Definition: EcalMixingModuleValidation.h:102
EBShape
Definition: EBShape.h:6
EcalMixingModuleValidation::meEEbunchCrossing_
MonitorElement * meEEbunchCrossing_
Definition: EcalMixingModuleValidation.h:125
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< edm::HepMCProduct >
edm
HLT enums.
Definition: AlignableModifier.h:19
CrossingFrame.h
EcalMixingModuleValidation::computeSDBunchDigi
void computeSDBunchDigi(const edm::EventSetup &eventSetup, const MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
Definition: EcalMixingModuleValidation.cc:695
EcalMixingModuleValidation::meEBDigiMixRatiogt100ADC_
MonitorElement * meEBDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:118
EcalMixingModuleValidation::theGeometry
const CaloGeometry * theGeometry
Definition: EcalMixingModuleValidation.h:174
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
EcalMixingModuleValidation::theESShape
ESShape * theESShape
Definition: EcalMixingModuleValidation.h:144
EcalMixingModuleValidation::meEEBunchShape_
MonitorElement * meEEBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:131
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
ESGain.h
ESShape.h
EcalMixingModuleValidation::EcalMixingModuleValidation
EcalMixingModuleValidation(const edm::ParameterSet &ps)
Constructor.
Definition: EcalMixingModuleValidation.cc:19
EcalMixingModuleValidation::crossingFramePCaloHitESToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
Definition: EcalMixingModuleValidation.h:110
EcalCondObjectContainer< EcalPedestal >
ESGainRcd.h
EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EcalMixingModuleValidation.h:110
EcalMixingModuleValidation::m_ESmips
const ESIntercalibConstants * m_ESmips
Definition: EcalMixingModuleValidation.h:181
DQMOneEDAnalyzer.h
EcalMixingModuleValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:135
EcalSimParameterMap.h
EBShape.h
ESDataFrame.h
EcalMixingModuleValidation::m_ESpeds
const ESPedestals * m_ESpeds
Definition: EcalMixingModuleValidation.h:180
EEShape.h
EcalMixingModuleValidation::meESbunchCrossing_
MonitorElement * meESbunchCrossing_
Definition: EcalMixingModuleValidation.h:126
EcalMixingModuleValidation::EBdigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:106
DetId
Definition: DetId.h:17
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
ESPedestals.h
EcalMixingModuleValidation::theMinBunch
int theMinBunch
Definition: EcalMixingModuleValidation.h:171
EcalMixingModuleValidation::EEdigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:107
EcalMixingModuleValidation::meEBShapeRatio_
MonitorElement * meEBShapeRatio_
Definition: EcalMixingModuleValidation.h:138
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
MixCollection.h
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:182
MixCollection
Definition: MixCollection.h:11
Service.h
EcalMixingModuleValidation::esBaseline_
double esBaseline_
Definition: EcalMixingModuleValidation.h:167
SimVertex.h
EcalDigiCollections.h
EcalMixingModuleValidation::meESShapeRatio_
MonitorElement * meESShapeRatio_
Definition: EcalMixingModuleValidation.h:140
ESMIPToGeVConstantRcd.h
EcalMixingModuleValidation::gainConv_
std::map< int, double, std::less< int > > gainConv_
Definition: EcalMixingModuleValidation.h:113
EEShape
Definition: EEShape.h:6
EcalMixingModuleValidation::verbose_
bool verbose_
Definition: EcalMixingModuleValidation.h:100
EcalMixingModuleValidation::theEBResponse
CaloHitResponse * theEBResponse
Definition: EcalMixingModuleValidation.h:150
EcalMixingModuleValidation::bunchSumTest
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
Definition: EcalMixingModuleValidation.cc:215
EcalMixingModuleValidation::meEEShape_
MonitorElement * meEEShape_
Definition: EcalMixingModuleValidation.h:135
EcalMixingModuleValidation::meESShape_
MonitorElement * meESShape_
Definition: EcalMixingModuleValidation.h:136
CLHEP
Definition: CocoaGlobals.h:27
EcalMixingModuleValidation::dqmEndRun
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: EcalMixingModuleValidation.cc:191
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ESIntercalibConstantsRcd.h
EcalMixingModuleValidation::m_ESgain
int m_ESgain
Definition: EcalMixingModuleValidation.h:179
EcalMixingModuleValidation::checkCalibrations
void checkCalibrations(edm::EventSetup const &c)
Definition: EcalMixingModuleValidation.cc:605
edm::ParameterSet
Definition: ParameterSet.h:36
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:115
Event.h
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:664
EcalMixingModuleValidation::checkPedestals
void checkPedestals(const edm::EventSetup &c)
Definition: EcalMixingModuleValidation.cc:656
EcalMixingModuleValidation::theMaxBunch
int theMaxBunch
Definition: EcalMixingModuleValidation.h:172
EcalMixingModuleValidation::theEEShape
EEShape * theEEShape
Definition: EcalMixingModuleValidation.h:146
PCaloHit.h
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
EcalMixingModuleValidation::meEEDigiMixRatioOriggt40pc_
MonitorElement * meEEDigiMixRatioOriggt40pc_
Definition: EcalMixingModuleValidation.h:122
EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
MonitorElement * meEEDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:119
EBDataFrame.h
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CaloHitResponse.h
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:786
ESCondObjectContainer< ESPedestal >
EcalMixingModuleValidation::meEEShapeRatio_
MonitorElement * meEEShapeRatio_
Definition: EcalMixingModuleValidation.h:139
EcalMixingModuleValidation::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:108
EcalMixingModuleValidation::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:129
EcalMixingModuleValidation::esThreshold_
double esThreshold_
Definition: EcalMixingModuleValidation.h:169
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EEDataFrame.h
EcalMixingModuleValidation::randomEngines_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
Definition: EcalMixingModuleValidation.h:184
EcalMixingModuleValidation::endcapADCtoGeV_
double endcapADCtoGeV_
Definition: EcalMixingModuleValidation.h:116
EcalMixingModuleValidation::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyze.
Definition: EcalMixingModuleValidation.cc:269
bscTrigger_cfi.theHits
theHits
Definition: bscTrigger_cfi.py:18
EcalMixingModuleValidation::meESBunchShape_
MonitorElement * meESBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:132
EcalMixingModuleValidation::meEBShape_
MonitorElement * meEBShape_
Definition: EcalMixingModuleValidation.h:134
EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
MonitorElement * meEBDigiMixRatioOriggt50pc_
Definition: EcalMixingModuleValidation.h:121
Frameworkfwd.h
EcalMixingModuleValidation::meEBBunchShape_
MonitorElement * meEBBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:130
EcalMixingModuleValidation::theParameterMap
const EcalSimParameterMap * theParameterMap
Definition: EcalMixingModuleValidation.h:142
EcalMixingModuleValidation
Definition: EcalMixingModuleValidation.h:72
CaloGeometry.h
ESMIPToGeVConstant.h
EventSetup.h
EcalMixingModuleValidation::theESResponse
CaloHitResponse * theESResponse
Definition: EcalMixingModuleValidation.h:149
PCaloHitContainer.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
SimTrack.h
ecalMGPA::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalMGPASample.h:13
ParameterSet.h
HepMCProduct.h
EcalMixingModuleValidation::theEEResponse
CaloHitResponse * theEEResponse
Definition: EcalMixingModuleValidation.h:151
EcalMixingModuleValidation::meEBbunchCrossing_
MonitorElement * meEBbunchCrossing_
Definition: EcalMixingModuleValidation.h:124
edm::Event
Definition: Event.h:73
ESShape
Definition: ESShape.h:16
EcalMixingModuleValidation::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: EcalMixingModuleValidation.h:73
SimTrackContainer.h
EcalMixingModuleValidation::theEBShape
EBShape * theEBShape
Definition: EcalMixingModuleValidation.h:145
SimVertexContainer.h
EcalMixingModuleValidation::nBunch
static const int nBunch
Definition: EcalMixingModuleValidation.h:128
ESPedestalsRcd.h
EcalMixingModuleValidation::esADCtokeV_
double esADCtokeV_
Definition: EcalMixingModuleValidation.h:168
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EncodedEventId.h