CMS 3D CMS Logo

HcalDigisValidation.h
Go to the documentation of this file.
1 #ifndef HCALDIGISVALIDATION_H
2 #define HCALDIGISVALIDATION_H
3 
4 #include <memory>
5 
8 
10 
13 
16 
24 
28 
30 
35 
39 
40 /*TP Code*/
44 /*~TP Code*/
45 
46 #include <map>
47 #include <vector>
48 #include <utility>
49 #include <ostream>
50 #include <string>
51 #include <algorithm>
52 #include <cmath>
53 #include <iostream>
54 
56 public:
57  explicit HcalDigisValidation(const edm::ParameterSet &);
58 
59  ~HcalDigisValidation() override;
60 
61  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
62  void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override;
63 
64 private:
65  struct HistLim {
66  HistLim(int nbin, double mini, double maxi) : n(nbin), min(mini), max(maxi) {}
67  int n;
68  double min;
69  double max;
70  };
71 
72  void analyze(const edm::Event &, const edm::EventSetup &) override;
73 
74  std::map<std::string, MonitorElement *> *msm_;
75 
76  void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max);
77 
78  void book1D(DQMStore::IBooker &ib, std::string name, const HistLim &limX);
79 
80  void fill1D(std::string name, double X, double weight = 1);
81 
82  void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY);
83 
84  void fill2D(std::string name, double X, double Y, double weight = 1);
85 
86  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY);
87 
88  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY, const char *option);
89 
90  void fillPf(std::string name, double X, double Y);
91 
93 
94  void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc);
95 
96  std::string str(int x);
97 
98  template <class Digi>
99  void reco(const edm::Event &iEvent,
100  const edm::EventSetup &iSetup,
102  template <class dataFrameType>
103  void reco(const edm::Event &iEvent,
104  const edm::EventSetup &iSetup,
106 
111  // std::string inputLabel_;
119  int noise_;
121  bool hep17_;
122  bool HEPhase1_;
123  bool HBPhase1_;
125 
132 
135 
142 
146 
147  int nevent1;
148  int nevent2;
149  int nevent3;
150  int nevent4;
151  int nevtot;
152 
153  int maxDepth_[5]; // 0:any, 1:HB, 2:HE, 3:HF
154  int nChannels_[5]; // 0:any, 1:HB, 2:HE,
155 
157 };
158 
159 #endif
HcalDigisValidation::~HcalDigisValidation
~HcalDigisValidation() override
Definition: HcalDigisValidation.cc:80
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
HcalQIEShape.h
HcalCalibrations.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalDataFrameContainer
Definition: HcalDigiCollections.h:35
HcalDigisValidation::htopo_
const HcalTopology * htopo_
Definition: HcalDigisValidation.h:145
X
#define X(str)
Definition: MuonsGrabber.cc:38
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT
Definition: EDGetToken.h:33
HcalDigisValidation::HcalDigisValidation
HcalDigisValidation(const edm::ParameterSet &)
Definition: HcalDigisValidation.cc:23
HcalDigisValidation::tok_emulTPs_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
Definition: HcalDigisValidation.h:130
HcalTopology
Definition: HcalTopology.h:26
HcalDigisValidation::nevtot
int nevtot
Definition: HcalDigisValidation.h:151
HcalDigisValidation::hep17_
bool hep17_
Definition: HcalDigisValidation.h:121
HcalDigisValidation::msm_
std::map< std::string, MonitorElement * > * msm_
Definition: HcalDigisValidation.h:74
edm::SortedCollection
Definition: SortedCollection.h:49
DQMStore.h
HcalRecNumberingRecord.h
HcalDigisValidation::nevent3
int nevent3
Definition: HcalDigisValidation.h:149
DDAxes::x
HcalDigisValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HcalDigisValidation.cc:413
HcalDigisValidation::zside_
std::string zside_
Definition: HcalDigisValidation.h:109
HcalDigisValidation::book2D
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisValidation.cc:1308
CaloTPGTranscoder.h
HcalDigisValidation::HEPhase1_
bool HEPhase1_
Definition: HcalDigisValidation.h:122
HcalDigisValidation::book1D
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
Definition: HcalDigisValidation.cc:1294
HcalDigisValidation::dirName_
std::string dirName_
Definition: HcalDigisValidation.h:110
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
HcalDigisValidation::fill2D
void fill2D(std::string name, double X, double Y, double weight=1)
Definition: HcalDigisValidation.cc:1313
HcalGeometry.h
HcalCoderDb.h
HcalDigisValidation::nevent4
int nevent4
Definition: HcalDigisValidation.h:150
HcalDigisValidation::booking
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
Definition: HcalDigisValidation.cc:174
HcalDigisValidation::noise_
int noise_
Definition: HcalDigisValidation.h:119
HcalDigisValidation::HistLim::HistLim
HistLim(int nbin, double mini, double maxi)
Definition: HcalDigisValidation.h:66
Service.h
HcalDigiCollections.h
HcalDigisValidation::subdet_
std::string subdet_
Definition: HcalDigisValidation.h:108
HcalDigisValidation::HistLim::max
double max
Definition: HcalDigisValidation.h:69
HcalDigisValidation::tok_TPGeom_
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > tok_TPGeom_
Definition: HcalDigisValidation.h:139
HcalDigisValidation::mode_
std::string mode_
Definition: HcalDigisValidation.h:117
HcalDigisValidation::tok_Geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_Geom_
Definition: HcalDigisValidation.h:137
HcalDbRecord.h
HcalDigisValidation::HistLim::n
int n
Definition: HcalDigisValidation.h:67
EDGetToken.h
HcalDigisValidation::monitor
MonitorElement * monitor(std::string name)
Definition: HcalDigisValidation.cc:1331
HcalDigisValidation::tok_qie11_hbhe_
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_hbhe_
Definition: HcalDigisValidation.h:134
HcalDigisValidation::QIE10inputTag_
edm::InputTag QIE10inputTag_
Definition: HcalDigisValidation.h:113
HcalDigisValidation::inputTag_
edm::InputTag inputTag_
Definition: HcalDigisValidation.h:112
DQMEDAnalyzer.h
CaloGeometryRecord.h
HcalDigisValidation::hcons_
const HcalDDDRecConstants * hcons_
Definition: HcalDigisValidation.h:144
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDigisValidation::emulTPsTag_
edm::InputTag emulTPsTag_
Definition: HcalDigisValidation.h:115
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
HcalDigisValidation::tok_mc_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
Definition: HcalDigisValidation.h:126
HcalDigisValidation::tok_qie10_hf_
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_hf_
Definition: HcalDigisValidation.h:133
HcalDigisValidation::tok_hf_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
Definition: HcalDigisValidation.h:129
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalDigisValidation::dataTPsTag_
edm::InputTag dataTPsTag_
Definition: HcalDigisValidation.h:116
HcalDigisValidation::tok_Cond_
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_Cond_
Definition: HcalDigisValidation.h:141
iEvent
int iEvent
Definition: GenABIO.cc:224
cuy.ib
ib
Definition: cuy.py:662
HcalDigisValidation::tok_HRNDC_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
Definition: HcalDigisValidation.h:136
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
HcalTrigTowerGeometry.h
HcalDigisValidation::Plot_TP_ver_
bool Plot_TP_ver_
Definition: HcalDigisValidation.h:124
CaloTPGRecord.h
HcalDigisValidation::tok_Topo_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_Topo_
Definition: HcalDigisValidation.h:140
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord >
HcalDigisValidation::nChannels_
int nChannels_[5]
Definition: HcalDigisValidation.h:154
HcalDigisValidation::tok_dataTPs_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
Definition: HcalDigisValidation.h:131
HcalDigisValidation::tok_Decoder_
edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > tok_Decoder_
Definition: HcalDigisValidation.h:138
HcalDigisValidation::HistLim::min
double min
Definition: HcalDigisValidation.h:68
HcalDigisValidation::nevent2
int nevent2
Definition: HcalDigisValidation.h:148
HcalDigisValidation::QIE11inputTag_
edm::InputTag QIE11inputTag_
Definition: HcalDigisValidation.h:114
HcalTopology.h
CaloCellGeometry.h
HcalDigisValidation::maxDepth_
int maxDepth_[5]
Definition: HcalDigisValidation.h:153
HcalDbService
Definition: HcalDbService.h:26
HcalDigisValidation
Definition: HcalDigisValidation.h:55
HcalDigisValidation::HBPhase1_
bool HBPhase1_
Definition: HcalDigisValidation.h:123
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HcalDigisValidation::testNumber_
bool testNumber_
Definition: HcalDigisValidation.h:120
Frameworkfwd.h
HcalDigisValidation::outputFile_
std::string outputFile_
Definition: HcalDigisValidation.h:107
HcalDigisValidation::dqmBeginRun
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: HcalDigisValidation.cc:82
CaloGeometry.h
HcalDDDRecConstants.h
HcalDigisValidation::mc_
std::string mc_
Definition: HcalDigisValidation.h:118
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HcalDigisValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HcalDigisValidation.cc:107
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:32
PCaloHitContainer.h
HcalDigisValidation::reco
void reco(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok)
Definition: HcalDigisValidation.cc:603
dqm::implementation::IBooker
Definition: DQMStore.h:43
HcalDbService.h
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalDigisValidation::nevent1
int nevent1
Definition: HcalDigisValidation.h:147
HcalDigisValidation::fill1D
void fill1D(std::string name, double X, double weight=1)
Definition: HcalDigisValidation.cc:1304
HcalDigisValidation::HistLim
Definition: HcalDigisValidation.h:65
HcalDigisValidation::tok_ho_
edm::EDGetTokenT< HODigiCollection > tok_ho_
Definition: HcalDigisValidation.h:128
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
HcalGeometryRecord.h
HcalDigisValidation::conditions_
const HcalDbService * conditions_
Definition: HcalDigisValidation.h:143
HcalDigisValidation::fillPf
void fillPf(std::string name, double X, double Y)
Definition: HcalDigisValidation.cc:1329
edm::Event
Definition: Event.h:73
HcalDigisValidation::str
std::string str(int x)
Definition: HcalDigisValidation.cc:1338
HcalDigisValidation::bookPf
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisValidation.cc:1317
edm::InputTag
Definition: InputTag.h:15
HcalDigisValidation::skipDataTPs
bool skipDataTPs
Definition: HcalDigisValidation.h:156
weight
Definition: weight.py:1
HcalDigisValidation::tok_hbhe_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
Definition: HcalDigisValidation.h:127
HBHEDataFrame.h