Skip to content

Commit f15d302

Browse files
committed
[DQM]: Improvements to ZDC DQM
1 parent 572d341 commit f15d302

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

DQM/HcalTasks/plugins/ZDCQIE10Task.cc

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
212212
_cfC_vs_TS_EChannel[didp()]->setAxisTitle("sum fC", 2);
213213

214214
histoname = "EM_P_" + std::to_string(channel);
215-
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
215+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
216+
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150,0,150);
216217
_cTDC_EChannel[didp()]->setAxisTitle("TDC", 1);
217218
_cTDC_EChannel[didp()]->setAxisTitle("N", 2);
218219

@@ -240,7 +241,8 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
240241
_cfC_vs_TS_EChannel[didm()]->setAxisTitle("sum fC", 2);
241242

242243
histoname = "EM_M_" + std::to_string(channel);
243-
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
244+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
245+
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150,0,150);
244246
_cTDC_EChannel[didm()]->setAxisTitle("TDC", 1);
245247
_cTDC_EChannel[didm()]->setAxisTitle("N", 2);
246248
}
@@ -250,7 +252,9 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
250252
// EM Minus
251253
HcalZDCDetId didm(HcalZDCDetId::EM, false, channel);
252254

253-
histoname = "EM_M_" + std::to_string(channel);
255+
std::vector<std::string> stationString = {"Station2_Top", "Station2_Bottom", "Station3_BottomLeft","Station3_BottomRight", "Station3_TopLeft", "Station3_TopRight"};
256+
257+
histoname = "FSC_M_" + stationString.at(channel-7);
254258
ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
255259
_cADC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
256260
_cADC_EChannel[didm()]->setAxisTitle("ADC", 1);
@@ -260,7 +264,7 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
260264
_cADC_vs_TS_EChannel[didm()]->setAxisTitle("TS", 1);
261265
_cADC_vs_TS_EChannel[didm()]->setAxisTitle("sum ADC", 2);
262266

263-
histoname = "EM_M_" + std::to_string(channel);
267+
histoname = "FSC_M_" + stationString.at(channel-7);
264268
ib.setCurrentFolder("Hcal/ZDCQIE10Task/fC_perChannel");
265269
_cfC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 100, 0, 8000);
266270
_cfC_EChannel[didm()]->setAxisTitle("fC", 1);
@@ -270,8 +274,9 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
270274
_cfC_vs_TS_EChannel[didm()]->setAxisTitle("TS", 1);
271275
_cfC_vs_TS_EChannel[didm()]->setAxisTitle("sum fC", 2);
272276

273-
histoname = "EM_M_" + std::to_string(channel);
274-
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
277+
histoname = "FSC_M_" + stationString.at(channel-7);
278+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
279+
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150,0,150);
275280
_cTDC_EChannel[didm()]->setAxisTitle("TDC", 1);
276281
_cTDC_EChannel[didm()]->setAxisTitle("N", 2);
277282
}
@@ -301,7 +306,8 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
301306
_cfC_vs_TS_EChannel[didp()]->setAxisTitle("sum fC", 2);
302307

303308
histoname = "HAD_P_" + std::to_string(channel);
304-
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
309+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
310+
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150,0,150);
305311
_cTDC_EChannel[didp()]->setAxisTitle("TDC", 1);
306312
_cTDC_EChannel[didp()]->setAxisTitle("N", 2);
307313

@@ -329,7 +335,7 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
329335
_cfC_vs_TS_EChannel[didm()]->setAxisTitle("sum fC", 2);
330336

331337
histoname = "HAD_M_" + std::to_string(channel);
332-
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
338+
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150,0,150);
333339
_cTDC_EChannel[didm()]->setAxisTitle("TDC", 1);
334340
_cTDC_EChannel[didm()]->setAxisTitle("N", 2);
335341
}
@@ -359,7 +365,8 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
359365
_cfC_vs_TS_EChannel[didp()]->setAxisTitle("sum fC", 2);
360366

361367
histoname = "RPD_P_" + std::to_string(channel);
362-
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
368+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
369+
_cTDC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150, 1, 150);
363370
_cTDC_EChannel[didp()]->setAxisTitle("TDC", 1);
364371
_cTDC_EChannel[didp()]->setAxisTitle("N", 2);
365372

@@ -386,7 +393,8 @@ ZDCQIE10Task::ZDCQIE10Task(edm::ParameterSet const& ps)
386393
_cfC_vs_TS_EChannel[didm()]->setAxisTitle("sum fC", 2);
387394

388395
histoname = "RPD_M_" + std::to_string(channel);
389-
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 50, 1, 50);
396+
ib.setCurrentFolder("Hcal/ZDCQIE10Task/TDC_perChannel");
397+
_cTDC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 150, 1, 150);
390398
_cTDC_EChannel[didm()]->setAxisTitle("TDC", 1);
391399
_cTDC_EChannel[didm()]->setAxisTitle("N", 2);
392400
}
@@ -488,7 +496,13 @@ void ZDCQIE10Task::_process(edm::Event const& e, edm::EventSetup const& es) {
488496
if (_cADC_EChannel.find(did()) != _cADC_EChannel.end()) {
489497
_cADC_EChannel[did()]->Fill(digi[i].adc());
490498
_cfC_EChannel[did()]->Fill(constants::adc2fC[digi[i].adc()]);
491-
_cTDC_EChannel[did()]->Fill(digi[i].le_tdc());
499+
// fill the tdc time the same way as in the reco
500+
float tmp_tdctime = 0;
501+
// TDC error codes will be 60=-1, 61 = -2, 62 = -3, 63 = -4
502+
// assume max amplitude should occur in TS2
503+
if (digi[i].le_tdc() >= 60) tmp_tdctime = -1 * (digi[i].le_tdc() - 59);
504+
else tmp_tdctime = 50. + (digi[i].le_tdc() / 2);
505+
_cTDC_EChannel[did()]->Fill(tmp_tdctime);
492506
}
493507
if (_cADC_vs_TS_EChannel.find(did()) != _cADC_vs_TS_EChannel.end()) {
494508
_cADC_vs_TS_EChannel[did()]->Fill(i, digi[i].adc());

0 commit comments

Comments
 (0)