17 htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
18 paramsToken_ = esConsumes<HcalLongRecoParams, HcalLongRecoParamsRcd>();
32 histoname =
"Crate28";
33 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/DigiSize");
34 _cDigiSize_Crate[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 21, -0.5, 20.5);
38 histoname =
"FED1136";
39 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/DigiSize");
40 _cDigiSize_FED[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 21, -0.5, 20.5);
45 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC");
46 _cADC_PM[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
51 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC");
52 _cADC_PM[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
57 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADCvsTS");
58 _cADC_vs_TS_PM[0] =
ib.book2DD(histoname.c_str(), histoname.c_str(), 6, 0, 6, 256, 0, 256);
63 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADCvsTS");
64 _cADC_vs_TS_PM[1] =
ib.book2DD(histoname.c_str(), histoname.c_str(), 6, 0, 6, 256, 0, 256);
68 histoname =
"Crate28";
69 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Occupancy/Crate");
70 _cOccupancy_Crate[0] =
ib.book2DD(histoname.c_str(), histoname.c_str(), 12, 0, 12, 144, 0, 144);
74 histoname =
"Crate28S3";
75 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Occupancy/CrateSlote");
80 histoname =
"uTCA_for_FED1136";
81 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Occupancy/Electronics");
86 histoname =
"ZDCP_Sum";
87 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
88 _cZDC_SUMS[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, -1, 5000);
92 histoname =
"ZDCM_Sum";
93 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
94 _cZDC_SUMS[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, -1, 5000);
98 histoname =
"ZDCM_SumBX";
99 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
100 _cZDC_BXSUMS[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 3500, 0, 3500);
104 histoname =
"ZDCP_SumBX";
105 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
106 _cZDC_BXSUMS[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 3500, 0, 3500);
110 histoname =
"ZDCM_EmuSumBX";
111 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
112 _cZDC_BX_EmuSUMS[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 3500, 0, 3500);
116 histoname =
"ZDCP_EmuSumBX";
117 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/Sums");
118 _cZDC_BX_EmuSUMS[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 3500, 0, 3500);
122 histoname =
"CapIDs";
123 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task");
124 _cZDC_CapIDS[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 4, 0, 4);
128 histoname =
"EM_M_Timings";
129 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task");
130 _cZDC_EM_TM[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 1, 11);
133 _cZDC_EM_TM[0]->setBinLabel(1,
"EM_M_1 good timing");
134 _cZDC_EM_TM[0]->setBinLabel(2,
"EM_M_1 bad timing");
135 _cZDC_EM_TM[0]->setBinLabel(3,
"EM_M_2 good timing");
136 _cZDC_EM_TM[0]->setBinLabel(4,
"EM_M_2 bad timing");
137 _cZDC_EM_TM[0]->setBinLabel(5,
"EM_M_3 good timing");
138 _cZDC_EM_TM[0]->setBinLabel(6,
"EM_M_3 bad timing");
139 _cZDC_EM_TM[0]->setBinLabel(7,
"EM_M_4 good timing");
140 _cZDC_EM_TM[0]->setBinLabel(8,
"EM_M_4 bad timing");
141 _cZDC_EM_TM[0]->setBinLabel(9,
"EM_M_5 good timing");
142 _cZDC_EM_TM[0]->setBinLabel(10,
"EM_M_5 bad timing");
144 histoname =
"EM_P_Timings";
145 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task");
146 _cZDC_EM_TM[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 1, 11);
149 _cZDC_EM_TM[1]->setBinLabel(1,
"EM_P_1 good timing");
150 _cZDC_EM_TM[1]->setBinLabel(2,
"EM_P_1 bad timing");
151 _cZDC_EM_TM[1]->setBinLabel(3,
"EM_P_2 good timing");
152 _cZDC_EM_TM[1]->setBinLabel(4,
"EM_P_2 bad timing");
153 _cZDC_EM_TM[1]->setBinLabel(5,
"EM_P_3 good timing");
154 _cZDC_EM_TM[1]->setBinLabel(6,
"EM_P_3 bad timing");
155 _cZDC_EM_TM[1]->setBinLabel(7,
"EM_P_4 good timing");
156 _cZDC_EM_TM[1]->setBinLabel(8,
"EM_P_4 bad timing");
157 _cZDC_EM_TM[1]->setBinLabel(9,
"EM_P_5 good timing");
158 _cZDC_EM_TM[1]->setBinLabel(10,
"EM_P_5 bad timing");
160 histoname =
"HAD_M_Timings";
161 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task");
162 _cZDC_HAD_TM[0] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 8, 1, 9);
174 histoname =
"HAD_P_Timings";
175 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task");
176 _cZDC_HAD_TM[1] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 8, 1, 9);
190 for (
int channel = 1; channel < 6; channel++) {
195 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
196 _cADC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
199 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
205 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
206 _cfC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
209 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
215 _cTDC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
223 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
224 _cADC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
227 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
233 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
234 _cfC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
237 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
243 _cTDC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
248 for (
int channel = 1; channel < 5; channel++) {
253 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
254 _cADC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
257 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
263 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
264 _cfC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
267 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
273 _cTDC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
281 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
282 _cADC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
285 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
291 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
292 _cfC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
295 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
301 _cTDC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
306 for (
int channel = 1; channel < 17; channel++) {
311 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
312 _cADC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
315 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
321 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
322 _cfC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
325 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
331 _cTDC_EChannel[didp()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
339 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_perChannel");
340 _cADC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
343 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
348 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_perChannel");
349 _cfC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
352 ib.setCurrentFolder(
"Hcal/ZDCQIE10Task/fC_vs_TS_perChannel");
358 _cTDC_EChannel[didm()] =
ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
371 int bx =
e.bunchCrossing();
376 int startBX = sums->getFirstBX();
378 for (
int ibx = startBX; ibx <= sums->getLastBX(); ++ibx) {
379 for (
auto itr = sums->begin(ibx); itr != sums->end(ibx); ++itr) {
398 double HADM_sum = 0, HADP_sum = 0, EMM_sum = 0, EMP_sum = 0;
399 double HADM_tot_sum = 0, HADP_tot_sum = 0, EMM_tot_sum = 0, EMP_tot_sum = 0;
425 double sample_ZDCm_TS1 = 0, sample_ZDCp_TS1 = 0, sample_ZDCm_TS2 = 0, sample_ZDCp_TS2 = 0;
426 double sample[2][6] = {{0}};
430 if (did.
zside() > 0) {
470 EMM_sum += (sample_ZDCm_TS2 - sample_ZDCm_TS1);
471 EMP_sum += (sample_ZDCp_TS2 - sample_ZDCp_TS1);
472 for (
int k = 0;
k < 6;
k++) {
476 if (did.
zside() == -1) {
477 if (
sample[0][2] > (0.0 * EMM_tot_sum)) {
483 if (did.
zside() == 1) {
484 if (
sample[1][2] > (0.0 * EMP_tot_sum)) {
494 HADP_sum += (sample_ZDCp_TS2 - sample_ZDCp_TS1);
495 HADM_sum += (sample_ZDCm_TS2 - sample_ZDCm_TS1);
496 for (
int k = 0;
k < 6;
k++) {
500 if (did.
zside() == -1) {
501 if (
sample[0][2] > (0.0 * HADM_tot_sum)) {
507 if (did.
zside() == 1) {
508 if (
sample[1][2] > (0.0 * HADP_tot_sum)) {
519 _cZDC_SUMS[0]->Fill(((EMM_sum * 0.1) + HADM_sum) * 0.5031);
520 _cZDC_SUMS[1]->Fill(((EMP_sum * 0.12) + HADP_sum) * 0.9397);
522 _cZDC_BXSUMS[1]->Fill(
bx, ((EMP_sum * 0.12) + HADP_sum) * 0.9397);
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
constexpr DetId detid() const
Get the detector id.
std::map< uint32_t, MonitorElement * > _cDigiSize_FED
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::map< uint32_t, MonitorElement * > _cfC_vs_TS_EChannel
dbs
Find files in dataset.
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
ZDCQIE10Task(edm::ParameterSet const &)
edm::EDGetToken sumToken_
std::map< uint32_t, MonitorElement * > _cZDC_CapIDS
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
std::map< uint32_t, MonitorElement * > _cOccupancy_Crate
static std::string to_string(const XMLCh *ch)
std::map< uint32_t, MonitorElement * > _cZDC_EM_TM
std::map< uint32_t, MonitorElement * > _cADC_vs_TS_EChannel
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getUntrackedParameter(std::string const &, T const &) const
uint32_t lookup(DetId const &)
std::map< uint32_t, MonitorElement * > _cOccupancy_ElectronicsuTCA
std::map< uint32_t, MonitorElement * > _cZDC_BXSUMS
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static const float adc2fC[128]
#define DEFINE_FWK_MODULE(type)
std::map< uint32_t, MonitorElement * > _cOccupancy_CrateSlot
void _process(edm::Event const &, edm::EventSetup const &) override
HcalElectronicsMap const * _emap
std::vector< HcalElectronicsId > allElectronicsId() const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::map< uint32_t, MonitorElement * > _cADC_PM
std::map< uint32_t, MonitorElement * > _cADC_vs_TS_PM
std::map< uint32_t, MonitorElement * > _cDigiSize_Crate
std::map< uint32_t, MonitorElement * > _cZDC_BX_EmuSUMS
const_iterator end() const
std::unique_ptr< HcalLongRecoParams > longRecoParams_
const_iterator begin() const
The iterator returned can not safely be used across threads.
std::map< uint32_t, MonitorElement * > _cZDC_HAD_TM
constexpr Section section() const
get the section
std::map< uint32_t, MonitorElement * > _cADC_EChannel
std::map< uint32_t, MonitorElement * > _cfC_EChannel
std::map< uint32_t, MonitorElement * > _cTDC_EChannel
edm::ESGetToken< HcalLongRecoParams, HcalLongRecoParamsRcd > paramsToken_
constexpr int32_t channel() const
get the channel
constexpr int32_t zside() const
get the z-side of the cell (1/-1)
std::map< uint32_t, MonitorElement * > _cZDC_SUMS
Readout chain identification for Hcal.
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
constexpr int samples() const
total number of samples in the digi
uint16_t *__restrict__ uint16_t const *__restrict__ adc