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 
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 
153  //const CaloVShape * theEcalShape;
157 
158  //CaloHitResponse * theEcalResponse;
162 
163  void computeSDBunchDigi(const edm::EventSetup& eventSetup,
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
EcalMixingModuleValidation::~EcalMixingModuleValidation
~EcalMixingModuleValidation() override
Destructor.
Definition: EcalMixingModuleValidation.cc:134
edm::StreamID
Definition: StreamID.h:30
dqm::impl::MonitorElement
Definition: MonitorElement.h:99
EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
Definition: EcalMixingModuleValidation.h:112
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
mps_fire.i
i
Definition: mps_fire.py:428
EcalPedestals.h
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:187
MessageLogger.h
EcalMixingModuleValidation::HepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
Definition: EcalMixingModuleValidation.h:107
ESHandle.h
ESIntercalibConstants.h
EcalMixingModuleValidation::outputFile_
std::string outputFile_
Definition: EcalMixingModuleValidation.h:105
EBShape
Definition: EBShape.h:6
EcalMixingModuleValidation::meEEbunchCrossing_
MonitorElement * meEEbunchCrossing_
Definition: EcalMixingModuleValidation.h:135
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< edm::HepMCProduct >
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalBarrelDigisValidation.h
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:689
EcalMixingModuleValidation::meEBDigiMixRatiogt100ADC_
MonitorElement * meEBDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:128
EcalMixingModuleValidation::theGeometry
const CaloGeometry * theGeometry
Definition: EcalMixingModuleValidation.h:184
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
EcalMixingModuleValidation::theESShape
ESShape * theESShape
Definition: EcalMixingModuleValidation.h:154
EcalMixingModuleValidation::meEEBunchShape_
MonitorElement * meEEBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:141
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:112
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
ESGainRcd.h
EcalMixingModuleValidation::esgain_
edm::ESGetToken< ESGain, ESGainRcd > esgain_
Definition: EcalMixingModuleValidation.h:116
EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EcalMixingModuleValidation.h:112
EcalMixingModuleValidation::m_ESmips
const ESIntercalibConstants * m_ESmips
Definition: EcalMixingModuleValidation.h:191
DQMOneEDAnalyzer.h
EcalMixingModuleValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:142
EcalTrivialConditionRetriever.h
EcalSimParameterMap.h
EBShape.h
ESDataFrame.h
EcalMixingModuleValidation::m_ESpeds
const ESPedestals * m_ESpeds
Definition: EcalMixingModuleValidation.h:190
EEShape.h
EcalMixingModuleValidation::meESbunchCrossing_
MonitorElement * meESbunchCrossing_
Definition: EcalMixingModuleValidation.h:136
EcalMixingModuleValidation::EBdigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:109
DetId
Definition: DetId.h:17
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
ESPedestals.h
EcalMixingModuleValidation::theMinBunch
int theMinBunch
Definition: EcalMixingModuleValidation.h:181
EcalMixingModuleValidation::EEdigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:110
EcalMixingModuleValidation::meEBShapeRatio_
MonitorElement * meEBShapeRatio_
Definition: EcalMixingModuleValidation.h:148
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
MixCollection.h
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:192
MixCollection
Definition: MixCollection.h:10
Service.h
EcalMixingModuleValidation::esBaseline_
double esBaseline_
Definition: EcalMixingModuleValidation.h:177
SimVertex.h
EcalDigiCollections.h
EcalMixingModuleValidation::meESShapeRatio_
MonitorElement * meESShapeRatio_
Definition: EcalMixingModuleValidation.h:150
ESMIPToGeVConstantRcd.h
EcalMixingModuleValidation::gainConv_
std::map< int, double, std::less< int > > gainConv_
Definition: EcalMixingModuleValidation.h:123
EcalMixingModuleValidation::pAgc
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > pAgc
Definition: EcalMixingModuleValidation.h:115
EEShape
Definition: EEShape.h:6
EcalMixingModuleValidation::verbose_
bool verbose_
Definition: EcalMixingModuleValidation.h:103
EcalMixingModuleValidation::theEBResponse
CaloHitResponse * theEBResponse
Definition: EcalMixingModuleValidation.h:160
EcalMixingModuleValidation::bunchSumTest
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
Definition: EcalMixingModuleValidation.cc:223
EcalMixingModuleValidation::meEEShape_
MonitorElement * meEEShape_
Definition: EcalMixingModuleValidation.h:145
CaloGeometryRecord.h
EcalMixingModuleValidation::meESShape_
MonitorElement * meESShape_
Definition: EcalMixingModuleValidation.h:146
CLHEP
Definition: CocoaGlobals.h:27
EcalMixingModuleValidation::dqmEndRun
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: EcalMixingModuleValidation.cc:198
EcalMixingModuleValidation::dbPed
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > dbPed
Definition: EcalMixingModuleValidation.h:120
ESIntercalibConstantsRcd.h
EcalMixingModuleValidation::m_ESgain
int m_ESgain
Definition: EcalMixingModuleValidation.h:189
EcalMixingModuleValidation::checkCalibrations
void checkCalibrations(edm::EventSetup const &c)
Definition: EcalMixingModuleValidation.cc:613
edm::ParameterSet
Definition: ParameterSet.h:47
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:125
Event.h
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:658
EcalMixingModuleValidation::checkPedestals
void checkPedestals(const edm::EventSetup &c)
Definition: EcalMixingModuleValidation.cc:652
EcalMixingModuleValidation::theMaxBunch
int theMaxBunch
Definition: EcalMixingModuleValidation.h:182
EcalMixingModuleValidation::theEEShape
EEShape * theEEShape
Definition: EcalMixingModuleValidation.h:156
PCaloHit.h
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
EcalMixingModuleValidation::meEEDigiMixRatioOriggt40pc_
MonitorElement * meEEDigiMixRatioOriggt40pc_
Definition: EcalMixingModuleValidation.h:132
EcalMixingModuleValidation::esMIPs_
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > esMIPs_
Definition: EcalMixingModuleValidation.h:119
EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
MonitorElement * meEEDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:129
EBDataFrame.h
edm::EventSetup
Definition: EventSetup.h:58
CaloHitResponse.h
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:778
ESCondObjectContainer< ESPedestal >
EcalMixingModuleValidation::meEEShapeRatio_
MonitorElement * meEEShapeRatio_
Definition: EcalMixingModuleValidation.h:149
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalMixingModuleValidation::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:111
EcalMixingModuleValidation::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:136
EcalMixingModuleValidation::esThreshold_
double esThreshold_
Definition: EcalMixingModuleValidation.h:179
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EEDataFrame.h
EcalMixingModuleValidation::randomEngines_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
Definition: EcalMixingModuleValidation.h:194
EcalMixingModuleValidation::endcapADCtoGeV_
double endcapADCtoGeV_
Definition: EcalMixingModuleValidation.h:126
EcalMixingModuleValidation::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyze.
Definition: EcalMixingModuleValidation.cc:277
bscTrigger_cfi.theHits
theHits
Definition: bscTrigger_cfi.py:18
EcalMixingModuleValidation::meESBunchShape_
MonitorElement * meESBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:142
EcalMixingModuleValidation::meEBShape_
MonitorElement * meEBShape_
Definition: EcalMixingModuleValidation.h:144
EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
MonitorElement * meEBDigiMixRatioOriggt50pc_
Definition: EcalMixingModuleValidation.h:131
Frameworkfwd.h
EcalMixingModuleValidation::meEBBunchShape_
MonitorElement * meEBBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:140
EcalMixingModuleValidation::theParameterMap
const EcalSimParameterMap * theParameterMap
Definition: EcalMixingModuleValidation.h:152
EcalMixingModuleValidation
Definition: EcalMixingModuleValidation.h:75
CaloGeometry.h
ESMIPToGeVConstant.h
EventSetup.h
EcalMixingModuleValidation::theESResponse
CaloHitResponse * theESResponse
Definition: EcalMixingModuleValidation.h:159
PCaloHitContainer.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
EcalMixingModuleValidation::esMIPToGeV_
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > esMIPToGeV_
Definition: EcalMixingModuleValidation.h:117
SimTrack.h
ParameterSet.h
HepMCProduct.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
EcalMixingModuleValidation::theEEResponse
CaloHitResponse * theEEResponse
Definition: EcalMixingModuleValidation.h:161
EcalMixingModuleValidation::meEBbunchCrossing_
MonitorElement * meEBbunchCrossing_
Definition: EcalMixingModuleValidation.h:134
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:76
EcalMixingModuleValidation::hGeometry
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > hGeometry
Definition: EcalMixingModuleValidation.h:121
SimTrackContainer.h
EcalMixingModuleValidation::theEBShape
EBShape * theEBShape
Definition: EcalMixingModuleValidation.h:155
SimVertexContainer.h
EcalMixingModuleValidation::nBunch
static const int nBunch
Definition: EcalMixingModuleValidation.h:138
ESPedestalsRcd.h
EcalMixingModuleValidation::esPedestals_
edm::ESGetToken< ESPedestals, ESPedestalsRcd > esPedestals_
Definition: EcalMixingModuleValidation.h:118
EcalMixingModuleValidation::esADCtokeV_
double esADCtokeV_
Definition: EcalMixingModuleValidation.h:178
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EncodedEventId.h