1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
#ifndef PedestalTask_h
#define PedestalTask_h
/*
* file: PedestalTask.h
* Author: Viktor Khristenko
* Date: 16.10.2015
*/
#include "DQM/HcalCommon/interface/DQTask.h"
#include "DQM/HcalCommon/interface/Utilities.h"
#include "DQM/HcalCommon/interface/Container1D.h"
#include "DQM/HcalCommon/interface/Container2D.h"
#include "DQM/HcalCommon/interface/ContainerProf1D.h"
#include "DQM/HcalCommon/interface/ContainerProf2D.h"
#include "DQM/HcalCommon/interface/ContainerSingle2D.h"
#include "DQM/HcalCommon/interface/ContainerXXX.h"
#include "DQM/HcalCommon/interface/HashFilter.h"
#include "DQM/HcalCommon/interface/ElectronicsMap.h"
class PedestalTask : public hcaldqm::DQTask {
public:
PedestalTask(edm::ParameterSet const &);
~PedestalTask() override {}
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
std::shared_ptr<hcaldqm::Cache> globalBeginLuminosityBlock(edm::LuminosityBlock const &,
edm::EventSetup const &) const override;
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override;
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override;
protected:
// funcs
void _process(edm::Event const &, edm::EventSetup const &) override;
void _resetMonitors(hcaldqm::UpdateFreq) override;
bool _isApplicable(edm::Event const &) override;
virtual void _dump();
// tags and tokens
edm::InputTag _tagQIE11;
edm::InputTag _tagHO;
edm::InputTag _tagQIE10;
edm::InputTag _tagTrigger;
edm::InputTag _taguMN;
edm::EDGetTokenT<HcalUMNioDigi> _tokuMN;
edm::EDGetTokenT<QIE11DigiCollection> _tokQIE11;
edm::EDGetTokenT<HODigiCollection> _tokHO;
edm::EDGetTokenT<QIE10DigiCollection> _tokQIE10;
edm::EDGetTokenT<HcalTBTriggerData> _tokTrigger;
edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
std::vector<hcaldqm::flag::Flag> _vflags;
enum PedestalFlag { fMsn = 0, fBadM = 1, fBadR = 2, nPedestalFlag = 3 };
// emap
hcaldqm::electronicsmap::ElectronicsMap _ehashmap;
hcaldqm::filter::HashFilter _filter_uTCA;
hcaldqm::filter::HashFilter _filter_VME;
hcaldqm::filter::HashFilter _filter_C38;
// thresholds
double _thresh_mean, _thresh_rms, _thresh_badm, _thresh_badr;
double _thresh_missing_high, _thresh_missing_low;
// hashed ids of FEDs
std::vector<uint32_t> _vhashFEDs;
// need containers total over the run and per 1LS
hcaldqm::ContainerXXX<double> _xPedSum1LS;
hcaldqm::ContainerXXX<double> _xPedSum21LS;
hcaldqm::ContainerXXX<int> _xPedEntries1LS;
hcaldqm::ContainerXXX<double> _xPedSumTotal;
hcaldqm::ContainerXXX<double> _xPedSum2Total;
hcaldqm::ContainerXXX<int> _xPedEntriesTotal;
hcaldqm::ContainerXXX<int> _xNChs; // number of channels per FED as in emap
hcaldqm::ContainerXXX<int> _xNMsn1LS; // #missing for 1LS per FED
hcaldqm::ContainerXXX<int> _xNBadMean1LS, _xNBadRMS1LS;
// CondBD Reference
hcaldqm::ContainerXXX<double> _xPedRefMean;
hcaldqm::ContainerXXX<double> _xPedRefRMS;
// 1D actual Means/RMSs
hcaldqm::Container1D _cMeanTotal_Subdet;
hcaldqm::Container1D _cRMSTotal_Subdet;
hcaldqm::Container1D _cMean1LS_Subdet; // 1LS
hcaldqm::Container1D _cRMS1LS_Subdet; // 1LS
// 2D actual values
hcaldqm::ContainerProf2D _cMean1LS_depth; // 1LS
hcaldqm::ContainerProf2D _cRMS1LS_depth; // 1lS
hcaldqm::ContainerProf2D _cMean1LS_FEDuTCA; // 1ls
hcaldqm::ContainerProf2D _cRMS1LS_FEDuTCA; // 1ls
hcaldqm::ContainerProf2D _cMeanTotal_depth;
hcaldqm::ContainerProf2D _cRMSTotal_depth;
hcaldqm::ContainerProf2D _cMeanTotal_FEDuTCA;
hcaldqm::ContainerProf2D _cRMSTotal_FEDuTCA;
// Comparison with DB Conditions
hcaldqm::Container1D _cMeanDBRef1LS_Subdet; // 1LS
hcaldqm::Container1D _cRMSDBRef1LS_Subdet; // 1LS
hcaldqm::Container1D _cMeanDBRefTotal_Subdet;
hcaldqm::Container1D _cRMSDBRefTotal_Subdet;
hcaldqm::ContainerProf2D _cMeanDBRef1LS_depth;
hcaldqm::ContainerProf2D _cRMSDBRef1LS_depth;
hcaldqm::ContainerProf2D _cMeanDBRef1LS_FEDuTCA;
hcaldqm::ContainerProf2D _cRMSDBRef1LS_FEDuTCA;
hcaldqm::ContainerProf2D _cMeanDBRefTotal_depth;
hcaldqm::ContainerProf2D _cRMSDBRefTotal_depth;
hcaldqm::ContainerProf2D _cMeanDBRefTotal_FEDuTCA;
hcaldqm::ContainerProf2D _cRMSDBRefTotal_FEDuTCA;
// vs LS
hcaldqm::Container1D _cMissingvsLS_Subdet;
hcaldqm::Container1D _cOccupancyvsLS_Subdet;
hcaldqm::Container1D _cNBadMeanvsLS_Subdet;
hcaldqm::Container1D _cNBadRMSvsLS_Subdet;
// averaging per event
hcaldqm::ContainerProf1D _cOccupancyEAvsLS_Subdet;
// map of missing channels
hcaldqm::Container2D _cMissing1LS_depth;
hcaldqm::Container2D _cMissing1LS_FEDuTCA;
hcaldqm::Container2D _cMissingTotal_depth;
hcaldqm::Container2D _cMissingTotal_FEDuTCA;
// Mean/RMS Bad Maps
hcaldqm::Container2D _cMeanBad1LS_depth;
hcaldqm::Container2D _cRMSBad1LS_depth;
hcaldqm::Container2D _cRMSBad1LS_FEDuTCA;
hcaldqm::Container2D _cMeanBad1LS_FEDuTCA;
hcaldqm::Container2D _cMeanBadTotal_depth;
hcaldqm::Container2D _cRMSBadTotal_depth;
hcaldqm::Container2D _cRMSBadTotal_FEDuTCA;
hcaldqm::Container2D _cMeanBadTotal_FEDuTCA;
hcaldqm::Container1D _cADC_SubdetPM;
// Summaries
hcaldqm::Container2D _cSummaryvsLS_FED;
hcaldqm::ContainerSingle2D _cSummaryvsLS;
};
#endif
|