|
|
#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 56 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::LogInfo(
"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 416 of file HcalDigisValidation.cc.
490 int c = 0, chb = 0, che = 0, chf = 0, cv0 = 0, cv1 = 0, chfv0 = 0, chfv1 = 0;
503 else if (
abs(
ieta) < tp_geometry->firstHFTower(
itr->id().version()))
512 float en = decoder->hcaletValue(
itr->id(),
itr->t0());
522 fill1D(
"HcalDigiTask_tp_et", en);
525 fillPf(
"HcalDigiTask_tp_ave_et_ieta",
ieta, en);
533 fill1D(
"HcalDigiTask_tp_et_v0", en);
534 fill2D(
"HcalDigiTask_tp_et_ieta_v0",
ieta, en);
536 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v0",
ieta, en);
540 fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v0",
ieta);
545 fill1D(
"HcalDigiTask_tp_et_v1", en);
546 fill2D(
"HcalDigiTask_tp_et_ieta_v1",
ieta, en);
548 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v1",
ieta, en);
552 fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v1",
ieta);
557 fill1D(
"HcalDigiTask_tp_et_HB", en);
565 fill1D(
"HcalDigiTask_tp_et_HE", en);
573 fill1D(
"HcalDigiTask_tp_et_HF", en);
577 fill1D(
"HcalDigiTask_tp_et_HF_v0", en);
583 fill1D(
"HcalDigiTask_tp_et_HF_v1", en);
591 fill1D(
"HcalDigiTask_tp_ntp",
c);
592 fill1D(
"HcalDigiTask_tp_ntp_HB", chb);
593 fill1D(
"HcalDigiTask_tp_ntp_HE", che);
594 fill1D(
"HcalDigiTask_tp_ntp_HF", chf);
596 fill1D(
"HcalDigiTask_tp_ntp_v0", cv0);
597 fill1D(
"HcalDigiTask_tp_ntp_v1", cv1);
598 fill1D(
"HcalDigiTask_tp_ntp_HF_v0", chfv0);
599 fill1D(
"HcalDigiTask_tp_ntp_HF_v1", chfv1);
References funct::abs(), HltBtagPostValidation_cff::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 1311 of file HcalDigisValidation.cc.
1313 (*
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 110 of file HcalDigisValidation.cc.
133 HistLim tp_hl_et(260, -10, 250);
134 HistLim tp_hl_ntp(640, -20, 3180);
135 HistLim tp_hl_ntp_sub(404, -20, 2000);
136 HistLim tp_hl_ieta(85, -42.5, 42.5);
137 HistLim tp_hl_iphi(74, -0.5, 73.5);
139 book1D(
ib,
"HcalDigiTask_tp_et", tp_hl_et);
140 book1D(
ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
141 book1D(
ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
142 book1D(
ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
143 book1D(
ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
144 book1D(
ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
145 book1D(
ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
146 book1D(
ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
147 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
148 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi", tp_hl_iphi);
149 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
150 book2D(
ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
151 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi", tp_hl_ieta, tp_hl_iphi);
152 bookPf(
ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
154 book1D(
ib,
"HcalDigiTask_tp_et_v0", tp_hl_et);
155 book1D(
ib,
"HcalDigiTask_tp_et_v1", tp_hl_et);
156 book1D(
ib,
"HcalDigiTask_tp_et_HF_v0", tp_hl_et);
157 book1D(
ib,
"HcalDigiTask_tp_et_HF_v1", tp_hl_et);
158 book1D(
ib,
"HcalDigiTask_tp_ntp_v0", tp_hl_ntp);
159 book1D(
ib,
"HcalDigiTask_tp_ntp_v1", tp_hl_ntp);
160 book1D(
ib,
"HcalDigiTask_tp_ntp_HF_v0", tp_hl_ntp_sub);
161 book1D(
ib,
"HcalDigiTask_tp_ntp_HF_v1", tp_hl_ntp_sub);
162 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta_v0", tp_hl_ieta);
163 book1D(
ib,
"HcalDigiTask_tp_ntp_ieta_v1", tp_hl_ieta);
164 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi_v0", tp_hl_iphi);
165 book1D(
ib,
"HcalDigiTask_tp_ntp_iphi_v1", tp_hl_iphi);
166 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta_v0", tp_hl_ieta);
167 book1D(
ib,
"HcalDigiTask_tp_ntp_10_ieta_v1", tp_hl_ieta);
168 book2D(
ib,
"HcalDigiTask_tp_et_ieta_v0", tp_hl_ieta, tp_hl_et);
169 book2D(
ib,
"HcalDigiTask_tp_et_ieta_v1", tp_hl_ieta, tp_hl_et);
170 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi_v0", tp_hl_ieta, tp_hl_iphi);
171 book2D(
ib,
"HcalDigiTask_tp_ieta_iphi_v1", tp_hl_ieta, tp_hl_iphi);
172 bookPf(
ib,
"HcalDigiTask_tp_ave_et_ieta_v0", tp_hl_ieta, tp_hl_et,
" ");
173 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 177 of file HcalDigisValidation.cc.
180 HistLim Ndigis(2600, 0., 2600.);
181 HistLim sime(200, 0., 1.0);
183 HistLim digiAmp(360, -100., 7100.);
184 HistLim digiAmpWide(2410, -3000., 720000.);
185 HistLim
ratio(2000, -100., 3900.);
186 HistLim sumAmp(100, -500., 1500.);
188 HistLim
nbin(11, -0.5, 10.5);
191 HistLim pedestalfC(400, -10., 30.);
193 HistLim
frac(80, -0.20, 1.40);
195 HistLim pedLim(80, 0., 8.);
196 HistLim pedWidthLim(100, 0., 2.);
198 HistLim gainLim(120, 0., 0.6);
199 HistLim gainWidthLim(160, 0., 0.32);
201 HistLim ietaLim(85, -42.5, 42.5);
202 HistLim iphiLim(74, -0.5, 73.5);
204 HistLim depthLim(15, -0.5, 14.5);
207 HistLim tdcLim(250, 0., 250.);
208 HistLim adcLim(256, 0., 256.);
210 if (bsubdet ==
"HB") {
211 Ndigis = HistLim(((
int)(
nChannels_[1] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[1] / 100) + 1) * 100);
212 }
else if (bsubdet ==
"HE") {
213 sime = HistLim(200, 0., 1.0);
214 Ndigis = HistLim(((
int)(
nChannels_[2] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[2] / 100) + 1) * 100);
215 }
else if (bsubdet ==
"HF") {
216 sime = HistLim(100, 0., 100.);
217 pedLim = HistLim(100, 0., 20.);
218 pedWidthLim = HistLim(100, 0., 5.);
219 frac = HistLim(400, -4.00, 4.00);
220 Ndigis = HistLim(((
int)(
nChannels_[4] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[4] / 100) + 1) * 100);
221 }
else if (bsubdet ==
"HO") {
222 sime = HistLim(200, 0., 1.0);
223 gainLim = HistLim(160, 0., 1.6);
224 Ndigis = HistLim(((
int)(
nChannels_[3] / 100) + 1) * 100, 0., (
float)((
int)(
nChannels_[3] / 100) + 1) * 100);
230 else if (bsubdet ==
"HE")
232 else if (bsubdet ==
"HO")
234 else if (bsubdet ==
"HF")
237 edm::LogWarning(
"HcalDigisValidation") <<
"HcalDigisValidation Warning: not HB/HE/HF/HO " << bsubdet << std::endl;
240 const char* sub = bsubdet.c_str();
243 sprintf(
histo,
"HcalDigiTask_Ndigis_%s", sub);
248 sprintf(
histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth%d_%s",
depth, sub);
253 sprintf(
histo,
"HcalDigiTask_depths_%s", sub);
258 sprintf(
histo,
"HcalDigiTask_occupancy_vs_ieta_depth%d_%s",
depth, sub);
263 sprintf(
histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
269 sprintf(
histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
273 sprintf(
histo,
"HcalDigiTask_ADC0_adc_depth%d_%s",
depth, sub);
278 sprintf(
histo,
"HcalDigiTask_ADC0_fC_depth%d_%s",
depth, sub);
282 sprintf(
histo,
"HcalDigiTask_signal_amplitude_%s", sub);
288 if (
hep17_ && bsubdet ==
"HE") {
289 sprintf(
histo,
"HcalDigiTask_signal_amplitude_HEP17");
294 sprintf(
histo,
"HcalDigiTask_signal_amplitude_depth%d_%s",
depth, sub);
299 if (
hep17_ && bsubdet ==
"HE") {
300 sprintf(
histo,
"HcalDigiTask_signal_amplitude_depth%d_HEP17",
depth);
305 sprintf(
histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
310 if (
hep17_ && bsubdet ==
"HE") {
311 sprintf(
histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17");
316 sprintf(
histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_%s",
depth, sub);
318 if (
hep17_ && bsubdet ==
"HE") {
319 sprintf(
histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_HEP17",
depth);
324 sprintf(
histo,
"HcalDigiTask_SOI_frac_%s", sub);
326 sprintf(
histo,
"HcalDigiTask_postSOI_frac_%s", sub);
330 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
333 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_depth%d_%s",
depth, sub);
337 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
340 sprintf(
histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth%d_%s",
depth, sub);
344 sprintf(
histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
347 sprintf(
histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth%d_%s",
depth, sub);
352 if (bsubdet ==
"HB" || bsubdet ==
"HE") {
353 sprintf(
histo,
"HcalDigiTask_TDCtime_%s", sub);
356 sprintf(
histo,
"HcalDigiTask_TDCtime_vs_ADC_%s", sub);
368 sprintf(
histo,
"HcalDigiTask_gain_capId0_Depth%d_%s",
depth, sub);
370 sprintf(
histo,
"HcalDigiTask_gain_capId1_Depth%d_%s",
depth, sub);
372 sprintf(
histo,
"HcalDigiTask_gain_capId2_Depth%d_%s",
depth, sub);
374 sprintf(
histo,
"HcalDigiTask_gain_capId3_Depth%d_%s",
depth, sub);
377 sprintf(
histo,
"HcalDigiTask_gainWidth_capId0_Depth%d_%s",
depth, sub);
379 sprintf(
histo,
"HcalDigiTask_gainWidth_capId1_Depth%d_%s",
depth, sub);
381 sprintf(
histo,
"HcalDigiTask_gainWidth_capId2_Depth%d_%s",
depth, sub);
383 sprintf(
histo,
"HcalDigiTask_gainWidth_capId3_Depth%d_%s",
depth, sub);
386 sprintf(
histo,
"HcalDigiTask_pedestal_capId0_Depth%d_%s",
depth, sub);
388 sprintf(
histo,
"HcalDigiTask_pedestal_capId1_Depth%d_%s",
depth, sub);
390 sprintf(
histo,
"HcalDigiTask_pedestal_capId2_Depth%d_%s",
depth, sub);
392 sprintf(
histo,
"HcalDigiTask_pedestal_capId3_Depth%d_%s",
depth, sub);
395 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId0_Depth%d_%s",
depth, sub);
397 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId1_Depth%d_%s",
depth, sub);
399 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId2_Depth%d_%s",
depth, sub);
401 sprintf(
histo,
"HcalDigiTask_pedestal_width_capId3_Depth%d_%s",
depth, sub);
407 sprintf(
histo,
"HcalDigiTask_gainMap_Depth%d_%s",
depth, sub);
409 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_, ZMuMuCategoriesSequences_cff::nbin, nChannels_, EcalCondDBWriter_cfi::pedestal, and particleFlowDisplacedVertex_cfi::ratio.
Referenced by bookHistograms().
◆ bookPf() [1/2]
Definition at line 1320 of file HcalDigisValidation.cc.
1322 (*
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 1325 of file HcalDigisValidation.cc.
1329 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, htopology, 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 606 of file HcalDigisValidation.cc.
643 std::vector<double> v_ampl_c(
maxDepth_[isubdet] + 1, 0);
650 double emax_Sim = -9999.;
658 if (isubdet != 0 &&
noise_ == 0) {
660 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
662 unsigned int id_ =
simhits->id();
675 if (en > emax_Sim && sub == isubdet) {
680 if (
mode_ ==
"multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
689 if (
mode_ !=
"multi" && emax_Sim > 0.)
699 int depth = cell.depth();
700 int iphi = cell.iphi();
701 int ieta = cell.ieta();
702 int sub = cell.subdet();
706 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
707 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
713 std::vector<double> v_ampl(
maxDepth_[isubdet] + 1, 0);
716 if (((
nevent1 == 1 && isubdet == 1) || (
nevent2 == 1 && isubdet == 2) || (
nevent3 == 1 && isubdet == 3) ||
717 (
nevent4 == 1 && isubdet == 4)) &&
718 noise_ == 1 && sub == isubdet) {
725 for (
int i = 0;
i < 4;
i++) {
746 if (sub == isubdet &&
noise_ == 0) {
752 coder.adc2fC(*digiItr, tool);
756 int lastbin = tool.
size() - 1;
758 double noiseADC = (*digiItr)[0].adc();
759 double noisefC = tool[0];
774 if (
ieta == ieta_Sim &&
iphi == iphi_Sim)
778 int capid = (*digiItr)[
ii].capid();
784 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
789 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
794 if (
ii >= soi &&
ii <= lastbin) {
808 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
809 fill1D(strtmp, v_ampl[0]);
811 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
812 double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
818 if (v_ampl[
depth] > 30.) {
819 double fbinSOI = tool[soi] -
calibrations.pedestal((*digiItr)[soi].capid());
822 for (
int j = soi + 1;
j <= lastbin;
j++)
825 fbinSOI /= v_ampl[
depth];
826 fbinPS /= v_ampl[
depth];
827 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
829 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
833 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
834 fill1D(strtmp, v_ampl[0]);
835 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
840 if (isubdet != 0 &&
noise_ == 0) {
841 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
846 std::vector<double> v_ehits(
maxDepth_[isubdet] + 1, 0);
852 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
854 unsigned int id_ =
simhits->id();
867 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " <<
depth
868 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
869 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
875 if (sub == isubdet &&
ieta == ieta_Sim &&
iphi == iphi_Sim) {
879 v_ehits[
depth] += en;
883 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
884 if (v_ehits[0] > eps)
885 fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
887 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
888 if (v_ehits[
depth] > eps)
892 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
893 if (v_ehits[0] > eps)
894 fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
896 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
897 if (v_ehits[
depth] > eps)
901 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
902 if (v_ehits[0] > eps)
903 fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
905 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
906 if (v_ehits[
depth] > eps)
908 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
909 if (v_ehits[
depth] > eps)
915 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
916 fill1D(strtmp,
double(Ndig));
References HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, conditions, LEDCalibrationChannels::depth, HcalDetId::depth(), apvshotsanalyzer_cfi::digiCollection, 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 921 of file HcalDigisValidation.cc.
934 iEvent.getByToken(tok, digiHandle);
959 std::vector<double> v_ampl_c(
maxDepth_[isubdet] + 1, 0);
966 double emax_Sim = -9999.;
974 if (isubdet != 0 &&
noise_ == 0) {
976 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
978 unsigned int id_ =
simhits->id();
991 if (en > emax_Sim && sub == isubdet) {
996 if (
mode_ ==
"multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
1005 if (
mode_ !=
"multi" && emax_Sim > 0.)
1016 dataFrameType dataFrame = *digiItr;
1019 int depth = cell.depth();
1020 int iphi = cell.iphi();
1021 int ieta = cell.ieta();
1022 int sub = cell.subdet();
1025 bool isHEP17 = (
iphi >= 63) && (
iphi <= 66) && (
ieta > 0) && (sub == 2);
1029 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
1030 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
1036 std::vector<double> v_ampl(
maxDepth_[isubdet] + 1, 0);
1039 if (((
nevent1 == 1 && isubdet == 1) || (
nevent2 == 1 && isubdet == 2) || (
nevent3 == 1 && isubdet == 3) ||
1040 (
nevent4 == 1 && isubdet == 4)) &&
1041 noise_ == 1 && sub == isubdet) {
1048 for (
int i = 0;
i < 4;
i++) {
1070 if (sub == isubdet &&
noise_ == 0) {
1076 coder.adc2fC(dataFrame, tool);
1080 int lastbin = tool.
size() - 1;
1082 double noiseADC = (dataFrame)[0].
adc();
1083 double noisefC = tool[0];
1098 if (
ieta == ieta_Sim &&
iphi == iphi_Sim)
1099 closen = seedSimHit;
1102 int capid = (dataFrame)[
ii].capid();
1110 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
1113 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_HEP17";
1117 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(
depth) +
"_" +
subdet_;
1125 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1128 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17";
1132 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1138 if (
ii >= soi &&
ii <= lastbin) {
1151 double digiADC = (dataFrame)[
ii].
adc();
1152 const QIE11DataFrame dataFrameHBHE = static_cast<const QIE11DataFrame>(*digiItr);
1153 double digiTDC = (dataFrameHBHE)[
ii].tdc();
1155 double time =
ii * 25. + (digiTDC * 0.5);
1156 strtmp =
"HcalDigiTask_TDCtime_" +
subdet_;
1159 strtmp =
"HcalDigiTask_TDCtime_vs_ADC_" +
subdet_;
1167 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
1168 fill1D(strtmp, v_ampl[0]);
1170 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
1171 double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
1179 (v_ampl[
depth] > 300.)) {
1180 double fbinSOI = tool[soi] -
calibrations.pedestal((dataFrame)[soi].capid());
1183 for (
int j = soi + 1;
j <= lastbin;
j++)
1184 fbinPS += tool[
j] -
calibrations.pedestal((dataFrame)[
j].capid());
1186 fbinSOI /= v_ampl[
depth];
1187 fbinPS /= v_ampl[
depth];
1188 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
1190 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
1196 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1197 fill1D(strtmp, v_ampl[0]);
1198 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
1201 strtmp =
"HcalDigiTask_signal_amplitude_HEP17";
1202 fill1D(strtmp, v_ampl[0]);
1203 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_HEP17";
1207 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1208 fill1D(strtmp, v_ampl[0]);
1209 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(
depth) +
"_" +
subdet_;
1215 if (isubdet != 0 &&
noise_ == 0) {
1216 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
1221 std::vector<double> v_ehits(
maxDepth_[isubdet] + 1, 0);
1227 for (std::vector<PCaloHit>::const_iterator
simhits = simhitResult->begin();
simhits != simhitResult->end();
1229 unsigned int id_ =
simhits->id();
1242 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " <<
depth
1243 <<
", iphi: " <<
iphi <<
", ieta: " <<
ieta
1244 <<
". Max depth from geometry is: " <<
maxDepth_[isubdet]
1250 if (sub == isubdet &&
ieta == ieta_Sim &&
iphi == iphi_Sim) {
1251 double en =
simhits->energy();
1254 v_ehits[
depth] += en;
1258 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
1259 if (v_ehits[0] > eps)
1260 fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
1262 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1263 if (v_ehits[
depth] > eps)
1267 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
1268 if (v_ehits[0] > eps)
1269 fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
1271 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1272 if (v_ehits[
depth] > eps)
1276 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
1277 if (v_ehits[0] > eps)
1278 fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
1280 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1281 if (v_ehits[
depth] > eps)
1283 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1284 if (v_ehits[
depth] > eps)
1290 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
1291 fill1D(strtmp,
double(Ndig));
References ecalLiteDTU::adc(), HcalCoderDb::adc2fC(), AlignmentProducer_cff::calibrations, conditions, LEDCalibrationChannels::depth, HcalDetId::depth(), apvshotsanalyzer_cfi::digiCollection, 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_, ntuplemaker::time, tok_mc_, and heppy_batch::val.
◆ str()
std::string HcalDigisValidation::str |
( |
int |
x | ) |
|
|
private |
◆ conditions
◆ dataTPsTag_
◆ dirName_
std::string HcalDigisValidation::dirName_ |
|
private |
◆ emulTPsTag_
◆ geometry
◆ HBPhase1_
bool HcalDigisValidation::HBPhase1_ |
|
private |
◆ hcons
◆ hep17_
bool HcalDigisValidation::hep17_ |
|
private |
◆ HEPhase1_
bool HcalDigisValidation::HEPhase1_ |
|
private |
◆ htopo
◆ htopology
◆ 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 * htopology
const HcalDDDRecConstants * hcons
constexpr int iphi() const
get the cell iphi
int size() const
get the size
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)
Log< level::Info, false > LogInfo
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
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
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_
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_
std::vector< std::pair< float, float > >::iterator itr
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
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_
edm::ESHandle< HcalDbService > conditions
edm::ESHandle< HcalTopology > htopo
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_