|
|
#include <Validation/HcalDigis/src/HcalDigisValidation.cc>
|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
|
void | book1D (DQMStore::IBooker &ib, std::string name, const HistLim &limX) |
|
void | book1D (DQMStore::IBooker &ib, std::string name, int n, double min, double max) |
|
void | book2D (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY) |
|
void | booking (DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc) |
|
void | bookPf (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY) |
|
void | bookPf (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY, const char *option) |
|
void | fill1D (std::string name, double X, double weight=1) |
|
void | fill2D (std::string name, double X, double Y, double weight=1) |
|
void | fillPf (std::string name, double X, double Y) |
|
MonitorElement * | monitor (std::string name) |
|
template<class Digi > |
void | reco (const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok) |
|
template<class dataFrameType > |
void | reco (const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< HcalDataFrameContainer< dataFrameType > > &tok) |
|
std::string | str (int x) |
|
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 55 of file HcalDigisValidation.h.
◆ HcalDigisValidation()
Definition at line 23 of file HcalDigisValidation.cc.
42 if (iConfig.
exists(
"simHits")) {
59 tok_HRNDC_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
60 tok_Geom_ = esConsumes<CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun>();
61 tok_Decoder_ = esConsumes<CaloTPGTranscoder, CaloTPGRecord>();
62 tok_TPGeom_ = esConsumes<HcalTrigTowerGeometry, CaloGeometryRecord>();
63 tok_Topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
64 tok_Cond_ = esConsumes<HcalDbService, HcalDbRecord>();
72 msm_ =
new std::map<std::string, MonitorElement*>();
77 edm::LogVerbatim(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
References dataTPsTag_, dirName_, emulTPsTag_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HBPhase1_, hep17_, HEPhase1_, inputTag_, mc_, mode_, msm_, nevent1, nevent2, nevent3, nevent4, nevtot, outputFile_, Plot_TP_ver_, QIE10inputTag_, QIE11inputTag_, skipDataTPs, AlCaHLTBitMon_QueryRunRegistry::string, subdet_, testNumber_, tok_Cond_, tok_dataTPs_, tok_Decoder_, tok_emulTPs_, tok_Geom_, tok_hbhe_, tok_hf_, tok_ho_, tok_HRNDC_, tok_mc_, tok_qie10_hf_, tok_qie11_hbhe_, tok_Topo_, and tok_TPGeom_.
◆ ~HcalDigisValidation()
HcalDigisValidation::~HcalDigisValidation |
( |
| ) |
|
|
override |
◆ analyze()
Reimplemented from DQMEDAnalyzer.
Definition at line 413 of file HcalDigisValidation.cc.
487 int c = 0, chb = 0, che = 0, chf = 0, cv0 = 0, cv1 = 0, chfv0 = 0, chfv1 = 0;
493 int ieta = itr->id().ieta();
494 int iphi = itr->id().iphi();
500 else if (
abs(
ieta) < tp_geometry->firstHFTower(itr->id().version()))
509 float en = decoder->hcaletValue(itr->id(), itr->t0());
519 fill1D(
"HcalDigiTask_tp_et", en);
522 fillPf(
"HcalDigiTask_tp_ave_et_ieta",
ieta, en);
530 fill1D(
"HcalDigiTask_tp_et_v0", en);
531 fill2D(
"HcalDigiTask_tp_et_ieta_v0",
ieta, en);
533 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v0",
ieta, en);
537 fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v0",
ieta);
542 fill1D(
"HcalDigiTask_tp_et_v1", en);
543 fill2D(
"HcalDigiTask_tp_et_ieta_v1",
ieta, en);
545 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v1",
ieta, en);
549 fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v1",
ieta);
554 fill1D(
"HcalDigiTask_tp_et_HB", en);
562 fill1D(
"HcalDigiTask_tp_et_HE", en);
570 fill1D(
"HcalDigiTask_tp_et_HF", en);
574 fill1D(
"HcalDigiTask_tp_et_HF_v0", en);
580 fill1D(
"HcalDigiTask_tp_et_HF_v1", en);
588 fill1D(
"HcalDigiTask_tp_ntp",
c);
589 fill1D(
"HcalDigiTask_tp_ntp_HB", chb);
590 fill1D(
"HcalDigiTask_tp_ntp_HE", che);
591 fill1D(
"HcalDigiTask_tp_ntp_HF", chf);
593 fill1D(
"HcalDigiTask_tp_ntp_v0", cv0);
594 fill1D(
"HcalDigiTask_tp_ntp_v1", cv1);
595 fill1D(
"HcalDigiTask_tp_ntp_HF_v0", chfv0);
596 fill1D(
"HcalDigiTask_tp_ntp_HF_v1", chfv1);
References funct::abs(), c, conditions_, HcalDigisParam_cfi::dataTPs, HcalDigisParam_cfi::emulTPs, fill1D(), fill2D(), fillPf(), edm::EventSetup::getData(), HcalBarrel, HcalEndcap, HcalForward, htopo_, LEDCalibrationChannels::ieta, iEvent, LEDCalibrationChannels::iphi, nevtot, noise_, Plot_TP_ver_, skipDataTPs, subdet_, tok_Cond_, tok_dataTPs_, tok_Decoder_, tok_emulTPs_, tok_hbhe_, tok_hf_, tok_ho_, tok_qie10_hf_, tok_qie11_hbhe_, tok_Topo_, and tok_TPGeom_.
◆ book1D() [1/2]
◆ book1D() [2/2]
void HcalDigisValidation::book1D |
( |
DQMStore::IBooker & |
ib, |
|
|
std::string |
name, |
|
|
int |
n, |
|
|
double |
min, |
|
|
double |
max |
|
) |
| |
|
private |
◆ book2D()
Definition at line 1308 of file HcalDigisValidation.cc.
1310 (*
msm_)[
name] =
ib.book2D(
name.c_str(),
name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
References cuy::ib, HcalDigisValidation::HistLim::max, HcalDigisValidation::HistLim::min, msm_, HcalDigisValidation::HistLim::n, and Skims_PA_cff::name.
Referenced by bookHistograms(), and booking().
◆ bookHistograms()
Implements DQMEDAnalyzer.
Definition at line 107 of file HcalDigisValidation.cc.
130 HistLim tp_hl_et(260, -10, 250);
131 HistLim tp_hl_ntp(640, -20, 3180);
132 HistLim tp_hl_ntp_sub(404, -20, 2000);
133 HistLim tp_hl_ieta(85, -42.5, 42.5);
134 HistLim tp_hl_iphi(74, -0.5, 73.5);
136 book1D(
ib,
"HcalDigiTask_tp_et", tp_hl_et);
137 book1D(
ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
138 book1D(
ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
139 book1D(
ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
140 book1D(
ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
141 book1D(
ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
142 book1D(
ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
143 book1D(
ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
144 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
145 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi", tp_hl_iphi);
146 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
147 book2D(
ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
148 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi", tp_hl_ieta, tp_hl_iphi);
149 bookPf(
ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
151 book1D(
ib,
"HcalDigiTask_tp_et_v0", tp_hl_et);
152 book1D(
ib,
"HcalDigiTask_tp_et_v1", tp_hl_et);
153 book1D(
ib,
"HcalDigiTask_tp_et_HF_v0", tp_hl_et);
154 book1D(
ib,
"HcalDigiTask_tp_et_HF_v1", tp_hl_et);
155 book1D(
ib,
"HcalDigiTask_tp_ntp_v0", tp_hl_ntp);
156 book1D(
ib,
"HcalDigiTask_tp_ntp_v1", tp_hl_ntp);
157 book1D(
ib,
"HcalDigiTask_tp_ntp_HF_v0", tp_hl_ntp_sub);
158 book1D(
ib,
"HcalDigiTask_tp_ntp_HF_v1", tp_hl_ntp_sub);
159 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta_v0", tp_hl_ieta);
160 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta_v1", tp_hl_ieta);
161 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi_v0", tp_hl_iphi);
162 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi_v1", tp_hl_iphi);
163 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta_v0", tp_hl_ieta);
164 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta_v1", tp_hl_ieta);
165 book2D(
ib,
"HcalDigiTask_tp_et_ieta_v0", tp_hl_ieta, tp_hl_et);
166 book2D(
ib,
"HcalDigiTask_tp_et_ieta_v1", tp_hl_ieta, tp_hl_et);
167 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi_v0", tp_hl_ieta, tp_hl_iphi);
168 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi_v1", tp_hl_ieta, tp_hl_iphi);
169 bookPf(
ib,
"HcalDigiTask_tp_ave_et_ieta_v0", tp_hl_ieta, tp_hl_et,
" ");
170 bookPf(
ib,
"HcalDigiTask_tp_ave_et_ieta_v1", tp_hl_ieta, tp_hl_et,
" ");
References book1D(), book2D(), booking(), bookPf(), dirName_, cuy::ib, mc_, Plot_TP_ver_, skipDataTPs, and subdet_.
◆ booking()
void HcalDigisValidation::booking |
( |
DQMStore::IBooker & |
ib, |
|
|
std::string |
subdetopt, |
|
|
int |
bnoise, |
|
|
int |
bmc |
|
) |
| |
|
private |
Definition at line 174 of file HcalDigisValidation.cc.
177 HistLim Ndigis(2600, 0., 2600.);
178 HistLim sime(200, 0., 1.0);
180 HistLim digiAmp(360, -100., 7100.);
181 HistLim digiAmpWide(2410, -3000., 720000.);
182 HistLim
ratio(2000, -100., 3900.);
183 HistLim sumAmp(100, -500., 1500.);
185 HistLim nbin(11, -0.5, 10.5);
188 HistLim pedestalfC(400, -10., 30.);
190 HistLim
frac(80, -0.20, 1.40);
192 HistLim pedLim(80, 0., 8.);
193 HistLim pedWidthLim(100, 0., 2.);
195 HistLim gainLim(120, 0., 0.6);
196 HistLim gainWidthLim(160, 0., 0.32);
198 HistLim ietaLim(85, -42.5, 42.5);
199 HistLim iphiLim(74, -0.5, 73.5);
201 HistLim depthLim(15, -0.5, 14.5);
204 HistLim tdcLim(250, 0., 250.);
205 HistLim adcLim(256, 0., 256.);
207 if (bsubdet ==
"HB") {
208 Ndigis = HistLim(((
int)(
nChannels_[1] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[1] / 100) + 1) * 100);
209 }
else if (bsubdet ==
"HE") {
210 sime = HistLim(200, 0., 1.0);
211 Ndigis = HistLim(((
int)(
nChannels_[2] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[2] / 100) + 1) * 100);
212 }
else if (bsubdet ==
"HF") {
213 sime = HistLim(100, 0., 100.);
214 pedLim = HistLim(100, 0., 20.);
215 pedWidthLim = HistLim(100, 0., 5.);
216 frac = HistLim(400, -4.00, 4.00);
217 Ndigis = HistLim(((
int)(
nChannels_[4] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[4] / 100) + 1) * 100);
218 }
else if (bsubdet ==
"HO") {
219 sime = HistLim(200, 0., 1.0);
220 gainLim = HistLim(160, 0., 1.6);
221 Ndigis = HistLim(((
int)(
nChannels_[3] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[3] / 100) + 1) * 100);
227 else if (bsubdet ==
"HE")
229 else if (bsubdet ==
"HO")
231 else if (bsubdet ==
"HF")
234 edm::LogWarning(
"HcalDigisValidation") <<
"HcalDigisValidation Warning: not HB/HE/HF/HO " << bsubdet << std::endl;
237 const char* sub = bsubdet.c_str();
240 sprintf(
histo,
"HcalDigiTask_Ndigis_%s", sub);
245 sprintf(
histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth%d_%s",
depth, sub);
250 sprintf(
histo,
"HcalDigiTask_depths_%s", sub);
255 sprintf(
histo,
"HcalDigiTask_occupancy_vs_ieta_depth%d_%s",
depth, sub);
260 sprintf(
histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
266 sprintf(
histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
270 sprintf(
histo,
"HcalDigiTask_ADC0_adc_depth%d_%s",
depth, sub);
275 sprintf(
histo,
"HcalDigiTask_ADC0_fC_depth%d_%s",
depth, sub);
279 sprintf(
histo,
"HcalDigiTask_signal_amplitude_%s", sub);
285 if (
hep17_ && bsubdet ==
"HE") {
286 sprintf(
histo,
"HcalDigiTask_signal_amplitude_HEP17");
291 sprintf(
histo,
"HcalDigiTask_signal_amplitude_depth%d_%s",
depth, sub);
296 if (
hep17_ && bsubdet ==
"HE") {
297 sprintf(
histo,
"HcalDigiTask_signal_amplitude_depth%d_HEP17",
depth);
302 sprintf(
histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
307 if (
hep17_ && bsubdet ==
"HE") {
308 sprintf(
histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17");
313 sprintf(
histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_%s",
depth, sub);
315 if (
hep17_ && bsubdet ==
"HE") {
316 sprintf(
histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_HEP17",
depth);
321 sprintf(
histo,
"HcalDigiTask_SOI_frac_%s", sub);
323 sprintf(
histo,
"HcalDigiTask_postSOI_frac_%s", sub);
327 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
330 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_depth%d_%s",
depth, sub);
334 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
337 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth%d_%s",
depth, sub);
341 sprintf(
histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
344 sprintf(
histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth%d_%s",
depth, sub);
349 if (bsubdet ==
"HB" || bsubdet ==
"HE") {
350 sprintf(
histo,
"HcalDigiTask_TDCtime_%s", sub);
353 sprintf(
histo,
"HcalDigiTask_TDCtime_vs_ADC_%s", sub);
365 sprintf(
histo,
"HcalDigiTask_gain_capId0_Depth%d_%s",
depth, sub);
367 sprintf(
histo,
"HcalDigiTask_gain_capId1_Depth%d_%s",
depth, sub);
369 sprintf(
histo,
"HcalDigiTask_gain_capId2_Depth%d_%s",
depth, sub);
371 sprintf(
histo,
"HcalDigiTask_gain_capId3_Depth%d_%s",
depth, sub);
374 sprintf(
histo,
"HcalDigiTask_gainWidth_capId0_Depth%d_%s",
depth, sub);
376 sprintf(
histo,
"HcalDigiTask_gainWidth_capId1_Depth%d_%s",
depth, sub);
378 sprintf(
histo,
"HcalDigiTask_gainWidth_capId2_Depth%d_%s",
depth, sub);
380 sprintf(
histo,
"HcalDigiTask_gainWidth_capId3_Depth%d_%s",
depth, sub);
383 sprintf(
histo,
"HcalDigiTask_pedestal_capId0_Depth%d_%s",
depth, sub);
385 sprintf(
histo,
"HcalDigiTask_pedestal_capId1_Depth%d_%s",
depth, sub);
387 sprintf(
histo,
"HcalDigiTask_pedestal_capId2_Depth%d_%s",
depth, sub);
389 sprintf(
histo,
"HcalDigiTask_pedestal_capId3_Depth%d_%s",
depth, sub);
392 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId0_Depth%d_%s",
depth, sub);
394 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId1_Depth%d_%s",
depth, sub);
396 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId2_Depth%d_%s",
depth, sub);
398 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId3_Depth%d_%s",
depth, sub);
404 sprintf(
histo,
"HcalDigiTask_gainMap_Depth%d_%s",
depth, sub);
406 sprintf(
histo,
"HcalDigiTask_pwidthMap_Depth%d_%s",
depth, sub);
References book1D(), book2D(), bookPf(), LEDCalibrationChannels::depth, DivergingColor::frac, HBPhase1_, hep17_, HEPhase1_, timingPdfMaker::histo, cuy::ib, maxDepth_, nChannels_, EcalCondDBWriter_cfi::pedestal, and particleFlowDisplacedVertex_cfi::ratio.
Referenced by bookHistograms().
◆ bookPf() [1/2]
Definition at line 1317 of file HcalDigisValidation.cc.
1319 (*
msm_)[
name] =
ib.bookProfile(
name.c_str(),
name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
References cuy::ib, HcalDigisValidation::HistLim::max, HcalDigisValidation::HistLim::min, msm_, HcalDigisValidation::HistLim::n, and Skims_PA_cff::name.
Referenced by bookHistograms(), and booking().
◆ bookPf() [2/2]
Definition at line 1322 of file HcalDigisValidation.cc.
1326 ib.bookProfile(
name.c_str(),
name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max,
option);
References cuy::ib, HcalDigisValidation::HistLim::max, HcalDigisValidation::HistLim::min, msm_, HcalDigisValidation::HistLim::n, Skims_PA_cff::name, and fileinputsource_cfi::option.
◆ dqmBeginRun()
Reimplemented from DQMEDAnalyzer.
Definition at line 82 of file HcalDigisValidation.cc.
References edm::EventSetup::getData(), HcalGeometry::getHxSize(), HcalDDDRecConstants::getMaxDepth(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hcons_, maxDepth_, nChannels_, tok_Geom_, and tok_HRNDC_.
◆ fill1D()
void HcalDigisValidation::fill1D |
( |
std::string |
name, |
|
|
double |
X, |
|
|
double |
weight = 1 |
|
) |
| |
|
private |
◆ fill2D()
void HcalDigisValidation::fill2D |
( |
std::string |
name, |
|
|
double |
X, |
|
|
double |
Y, |
|
|
double |
weight = 1 |
|
) |
| |
|
private |
◆ fillPf()
void HcalDigisValidation::fillPf |
( |
std::string |
name, |
|
|
double |
X, |
|
|
double |
Y |
|
) |
| |
|
private |
◆ monitor()
◆ reco() [1/2]
Definition at line 603 of file HcalDigisValidation.cc.
640 std::vector<double> v_ampl_c(
maxDepth_[isubdet] + 1, 0);
647 double emax_Sim = -9999.;
655 if (isubdet != 0 &&
noise_ == 0) {
657 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
659 unsigned int id =
simhits->id();
672 if (en > emax_Sim && sub == isubdet) {
677 if (
mode_ ==
"multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
686 if (
mode_ !=
"multi" && emax_Sim > 0.)
696 int depth = cell.depth();
697 int iphi = cell.iphi();
698 int ieta = cell.ieta();
699 int sub = cell.subdet();
703 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
704 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
710 std::vector<double> v_ampl(
maxDepth_[isubdet] + 1, 0);
713 if (((
nevent1 == 1 && isubdet == 1) || (
nevent2 == 1 && isubdet == 2) || (
nevent3 == 1 && isubdet == 3) ||
714 (
nevent4 == 1 && isubdet == 4)) &&
715 noise_ == 1 && sub == isubdet) {
722 for (
int i = 0;
i < 4;
i++) {
743 if (sub == isubdet &&
noise_ == 0) {
749 coder.adc2fC(*digiItr, tool);
753 int lastbin = tool.
size() - 1;
755 double noiseADC = (*digiItr)[0].adc();
756 double noisefC = tool[0];
771 if (
ieta == ieta_Sim &&
iphi == iphi_Sim)
775 int capid = (*digiItr)[
ii].capid();
781 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
786 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
791 if (
ii >= soi &&
ii <= lastbin) {
805 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
806 fill1D(strtmp, v_ampl[0]);
808 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
809 double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
815 if (v_ampl[
depth] > 30.) {
816 double fbinSOI = tool[soi] -
calibrations.pedestal((*digiItr)[soi].capid());
819 for (
int j = soi + 1;
j <= lastbin;
j++)
822 fbinSOI /= v_ampl[
depth];
823 fbinPS /= v_ampl[
depth];
824 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
826 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
830 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
831 fill1D(strtmp, v_ampl[0]);
832 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
837 if (isubdet != 0 &&
noise_ == 0) {
838 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
843 std::vector<double> v_ehits(
maxDepth_[isubdet] + 1, 0);
849 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
851 unsigned int id =
simhits->id();
864 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " <<
depth
865 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
866 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
872 if (sub == isubdet &&
ieta == ieta_Sim &&
iphi == iphi_Sim) {
876 v_ehits[
depth] += en;
880 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
881 if (v_ehits[0] >
eps)
882 fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
884 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
889 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
890 if (v_ehits[0] >
eps)
891 fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
893 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
898 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
899 if (v_ehits[0] >
eps)
900 fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
902 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
905 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
912 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
913 fill1D(strtmp,
double(Ndig));
References HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, conditions_, LEDCalibrationChannels::depth, HcalDetId::depth(), apvshotsanalyzer_cfi::digiCollection, gpuVertexFinder::eps, fill1D(), fill2D(), fillPf(), PedestalClient_cfi::gain, HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HcalDbService::getPedestal(), HcalDbService::getPedestalWidth(), HcalGainWidth::getValue(), HcalPedestalWidth::getWidth(), hcons_, mps_fire::i, LEDCalibrationChannels::ieta, HcalDetId::ieta(), iEvent, cuy::ii, LEDCalibrationChannels::iphi, HcalDetId::iphi(), dqmiolumiharvest::j, maxDepth_, mc_, mode_, nevent1, nevent2, nevent3, nevent4, noise_, EcalCondDBWriter_cfi::pedestal, CaloSamples::presamples(), edm::Handle< T >::product(), HcalHitRelabeller::relabel(), HLTBitAnalyser_cfi::simhits, CaloSamples::size(), str(), AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), subdet_, testNumber_, tok_mc_, and heppy_batch::val.
◆ reco() [2/2]
template<class dataFrameType >
Definition at line 918 of file HcalDigisValidation.cc.
931 iEvent.getByToken(tok, digiHandle);
956 std::vector<double> v_ampl_c(
maxDepth_[isubdet] + 1, 0);
963 double emax_Sim = -9999.;
971 if (isubdet != 0 &&
noise_ == 0) {
973 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
975 unsigned int id =
simhits->id();
988 if (en > emax_Sim && sub == isubdet) {
993 if (
mode_ ==
"multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
1002 if (
mode_ !=
"multi" && emax_Sim > 0.)
1013 dataFrameType dataFrame = *digiItr;
1016 int depth = cell.depth();
1017 int iphi = cell.iphi();
1018 int ieta = cell.ieta();
1019 int sub = cell.subdet();
1022 bool isHEP17 = (
iphi >= 63) && (
iphi <= 66) && (
ieta > 0) && (sub == 2);
1026 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
1027 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
1033 std::vector<double> v_ampl(
maxDepth_[isubdet] + 1, 0);
1036 if (((
nevent1 == 1 && isubdet == 1) || (
nevent2 == 1 && isubdet == 2) || (
nevent3 == 1 && isubdet == 3) ||
1037 (
nevent4 == 1 && isubdet == 4)) &&
1038 noise_ == 1 && sub == isubdet) {
1045 for (
int i = 0;
i < 4;
i++) {
1067 if (sub == isubdet &&
noise_ == 0) {
1073 coder.adc2fC(dataFrame, tool);
1077 int lastbin = tool.
size() - 1;
1079 double noiseADC = (dataFrame)[0].
adc();
1080 double noisefC = tool[0];
1095 if (
ieta == ieta_Sim &&
iphi == iphi_Sim)
1096 closen = seedSimHit;
1099 int capid = (dataFrame)[
ii].capid();
1107 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
1110 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_HEP17";
1114 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
1122 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1125 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17";
1129 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1135 if (
ii >= soi &&
ii <= lastbin) {
1148 double digiADC = (dataFrame)[
ii].
adc();
1149 const QIE11DataFrame dataFrameHBHE = static_cast<const QIE11DataFrame>(*digiItr);
1150 double digiTDC = (dataFrameHBHE)[
ii].tdc();
1152 double time =
ii * 25. + (digiTDC * 0.5);
1153 strtmp =
"HcalDigiTask_TDCtime_" +
subdet_;
1156 strtmp =
"HcalDigiTask_TDCtime_vs_ADC_" +
subdet_;
1164 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
1165 fill1D(strtmp, v_ampl[0]);
1167 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
1168 double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
1176 (v_ampl[
depth] > 300.)) {
1177 double fbinSOI = tool[soi] -
calibrations.pedestal((dataFrame)[soi].capid());
1180 for (
int j = soi + 1;
j <= lastbin;
j++)
1181 fbinPS += tool[
j] -
calibrations.pedestal((dataFrame)[
j].capid());
1183 fbinSOI /= v_ampl[
depth];
1184 fbinPS /= v_ampl[
depth];
1185 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
1187 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
1193 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1194 fill1D(strtmp, v_ampl[0]);
1195 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
1198 strtmp =
"HcalDigiTask_signal_amplitude_HEP17";
1199 fill1D(strtmp, v_ampl[0]);
1200 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_HEP17";
1204 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1205 fill1D(strtmp, v_ampl[0]);
1206 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
1212 if (isubdet != 0 &&
noise_ == 0) {
1213 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
1218 std::vector<double> v_ehits(
maxDepth_[isubdet] + 1, 0);
1224 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
1226 unsigned int id =
simhits->id();
1239 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " <<
depth
1240 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
1241 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
1247 if (sub == isubdet &&
ieta == ieta_Sim &&
iphi == iphi_Sim) {
1248 double en =
simhits->energy();
1251 v_ehits[
depth] += en;
1255 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
1256 if (v_ehits[0] >
eps)
1257 fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
1259 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1264 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
1265 if (v_ehits[0] >
eps)
1266 fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
1268 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1273 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
1274 if (v_ehits[0] >
eps)
1275 fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
1277 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1280 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1287 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
1288 fill1D(strtmp,
double(Ndig));
References gpuClustering::adc, HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, conditions_, LEDCalibrationChannels::depth, HcalDetId::depth(), apvshotsanalyzer_cfi::digiCollection, gpuVertexFinder::eps, fill1D(), fill2D(), fillPf(), PedestalClient_cfi::gain, HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HcalDbService::getPedestal(), HcalDbService::getPedestalWidth(), HcalGainWidth::getValue(), HcalPedestalWidth::getWidth(), HBPhase1_, hcons_, hep17_, HEPhase1_, mps_fire::i, LEDCalibrationChannels::ieta, HcalDetId::ieta(), iEvent, cuy::ii, LEDCalibrationChannels::iphi, HcalDetId::iphi(), edm::HandleBase::isValid(), dqmiolumiharvest::j, maxDepth_, mc_, mode_, nevent1, nevent2, nevent3, nevent4, noise_, EcalCondDBWriter_cfi::pedestal, CaloSamples::presamples(), edm::Handle< T >::product(), HcalHitRelabeller::relabel(), HLTBitAnalyser_cfi::simhits, CaloSamples::size(), str(), AlCaHLTBitMon_QueryRunRegistry::string, HcalDetId::subdet(), subdet_, testNumber_, protons_cff::time, tok_mc_, and heppy_batch::val.
◆ str()
std::string HcalDigisValidation::str |
( |
int |
x | ) |
|
|
private |
◆ conditions_
◆ dataTPsTag_
◆ dirName_
std::string HcalDigisValidation::dirName_ |
|
private |
◆ emulTPsTag_
◆ HBPhase1_
bool HcalDigisValidation::HBPhase1_ |
|
private |
◆ hcons_
◆ hep17_
bool HcalDigisValidation::hep17_ |
|
private |
◆ HEPhase1_
bool HcalDigisValidation::HEPhase1_ |
|
private |
◆ htopo_
◆ inputTag_
◆ maxDepth_
int HcalDigisValidation::maxDepth_[5] |
|
private |
◆ mc_
std::string HcalDigisValidation::mc_ |
|
private |
◆ mode_
std::string HcalDigisValidation::mode_ |
|
private |
◆ msm_
◆ nChannels_
int HcalDigisValidation::nChannels_[5] |
|
private |
◆ nevent1
int HcalDigisValidation::nevent1 |
|
private |
◆ nevent2
int HcalDigisValidation::nevent2 |
|
private |
◆ nevent3
int HcalDigisValidation::nevent3 |
|
private |
◆ nevent4
int HcalDigisValidation::nevent4 |
|
private |
◆ nevtot
int HcalDigisValidation::nevtot |
|
private |
◆ noise_
int HcalDigisValidation::noise_ |
|
private |
◆ outputFile_
std::string HcalDigisValidation::outputFile_ |
|
private |
◆ Plot_TP_ver_
bool HcalDigisValidation::Plot_TP_ver_ |
|
private |
◆ QIE10inputTag_
◆ QIE11inputTag_
◆ skipDataTPs
bool HcalDigisValidation::skipDataTPs |
|
private |
◆ subdet_
std::string HcalDigisValidation::subdet_ |
|
private |
◆ testNumber_
bool HcalDigisValidation::testNumber_ |
|
private |
◆ tok_Cond_
◆ tok_dataTPs_
◆ tok_Decoder_
◆ tok_emulTPs_
◆ tok_Geom_
◆ tok_hbhe_
◆ tok_hf_
◆ tok_ho_
◆ tok_HRNDC_
◆ tok_mc_
◆ tok_qie10_hf_
◆ tok_qie11_hbhe_
◆ tok_Topo_
◆ tok_TPGeom_
◆ zside_
std::string HcalDigisValidation::zside_ |
|
private |
std::vector< T >::const_iterator const_iterator
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
T const * product() const
float getValue(int fCapId) const
get value for capId = 0..3
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const HcalTopology * htopo_
constexpr int iphi() const
get the cell iphi
int size() const
get the size
uint16_t *__restrict__ uint16_t const *__restrict__ adc
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
std::map< std::string, MonitorElement * > * msm_
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const HcalGain * getGain(const HcalGenericDetId &fId) const
constexpr int depth() const
get the tower depth
T getUntrackedParameter(std::string const &, T const &) const
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
Log< level::Warning, false > LogWarning
void fill2D(std::string name, double X, double Y, double weight=1)
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > tok_TPGeom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_Geom_
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_hbhe_
edm::InputTag QIE10inputTag_
const HcalDDDRecConstants * hcons_
edm::InputTag emulTPsTag_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_hf_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
constexpr int ieta() const
get the cell ieta
edm::InputTag dataTPsTag_
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_Cond_
constexpr HcalSubdetector subdet() const
get the subdetector
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_Topo_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > tok_Decoder_
bool getData(T &iHolder) const
edm::InputTag QIE11inputTag_
DetId relabel(const uint32_t testId) const
int presamples() const
access presample information
Log< level::Info, true > LogVerbatim
unsigned int getHxSize(const int type) const
std::vector< PCaloHit > PCaloHitContainer
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
T getParameter(std::string const &) const
int getMaxDepth(const int &type) const
void fill1D(std::string name, double X, double weight=1)
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< HODigiCollection > tok_ho_
const HcalDbService * conditions_
void fillPf(std::string name, double X, double Y)
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_