19 EBuncalibrechitCollection_token_ =
27 meEBUncalibRecHitsOccupancy_ =
nullptr;
28 meEBUncalibRecHitsAmplitude_ =
nullptr;
29 meEBUncalibRecHitsPedestal_ =
nullptr;
30 meEBUncalibRecHitsJitter_ =
nullptr;
31 meEBUncalibRecHitsChi2_ =
nullptr;
32 meEBUncalibRecHitMaxSampleRatio_ =
nullptr;
33 meEBUncalibRecHitsOccupancyGt100adc_ =
nullptr;
34 meEBUncalibRecHitsAmplitudeGt100adc_ =
nullptr;
35 meEBUncalibRecHitsPedestalGt100adc_ =
nullptr;
36 meEBUncalibRecHitsJitterGt100adc_ =
nullptr;
37 meEBUncalibRecHitsChi2Gt100adc_ =
nullptr;
38 meEBUncalibRecHitMaxSampleRatioGt100adc_ =
nullptr;
39 meEBUncalibRecHitsAmpFullMap_ =
nullptr;
40 meEBUncalibRecHitsPedFullMap_ =
nullptr;
41 for (
int i = 0;
i < 36;
i++) {
42 meEBUncalibRecHitAmplMap_[
i] =
nullptr;
43 meEBUncalibRecHitPedMap_[
i] =
nullptr;
56 sprintf(
histo,
"EB Occupancy");
57 meEBUncalibRecHitsOccupancy_ = ibooker.
book2D(
histo,
histo, 170, -85., 85., 360, 0., 360.);
59 sprintf(
histo,
"EB Amplitude");
60 meEBUncalibRecHitsAmplitude_ = ibooker.
book1D(
histo,
histo, 201, -20., 4000.);
62 sprintf(
histo,
"EB Pedestal");
65 sprintf(
histo,
"EB Jitter");
68 sprintf(
histo,
"EB Chi2");
71 sprintf(
histo,
"EB RecHit Max Sample Ratio");
72 meEBUncalibRecHitMaxSampleRatio_ = ibooker.
book1D(
histo,
histo, 120, 0.90, 1.05);
74 sprintf(
histo,
"EB Occupancy gt 100 adc counts");
75 meEBUncalibRecHitsOccupancyGt100adc_ = ibooker.
book2D(
histo,
histo, 170, -85., 85., 360, 0., 360.);
77 sprintf(
histo,
"EB Amplitude gt 100 adc counts");
78 meEBUncalibRecHitsAmplitudeGt100adc_ = ibooker.
book1D(
histo,
histo, 200, 0., 4000.);
80 sprintf(
histo,
"EB Pedestal gt 100 adc counts");
81 meEBUncalibRecHitsPedestalGt100adc_ = ibooker.
book1D(
histo,
histo, 50, 190., 210.);
83 sprintf(
histo,
"EB Jitter gt 100 adc counts");
84 meEBUncalibRecHitsJitterGt100adc_ = ibooker.
book1D(
histo,
histo, 100, 0., 100.);
86 sprintf(
histo,
"EB Chi2 gt 100 adc counts");
87 meEBUncalibRecHitsChi2Gt100adc_ = ibooker.
book1D(
histo,
histo, 100, 18000., 22000.);
89 sprintf(
histo,
"EB RecHit Max Sample Ratio gt 100 adc counts");
90 meEBUncalibRecHitMaxSampleRatioGt100adc_ = ibooker.
book1D(
histo,
histo, 120, 0.90, 1.05);
92 sprintf(
histo,
"EB Amplitude Full Map");
93 meEBUncalibRecHitsAmpFullMap_ = ibooker.
bookProfile2D(
histo,
histo, 170, -85., 85., 360, 0., 360., 200, 0., 4000.);
95 sprintf(
histo,
"EB Pedestal Full Map");
96 meEBUncalibRecHitsPedFullMap_ = ibooker.
bookProfile2D(
histo,
histo, 170, -85., 85., 360, 0., 360., 50, 194., 201.);
98 for (
int i = 0;
i < 36;
i++) {
99 sprintf(
histo,
"EB Amp SM%02d",
i + 1);
100 meEBUncalibRecHitAmplMap_[
i] = ibooker.
bookProfile2D(
histo,
histo, 85, 0., 85., 20, 0., 20., 200, 0., 4000.);
102 sprintf(
histo,
"EB Ped SM%02d",
i + 1);
103 meEBUncalibRecHitPedMap_[
i] = ibooker.
bookProfile2D(
histo,
histo, 85, 0., 85., 20, 0., 20., 50, 194., 201.);
110 e.getByToken(EBuncalibrechitCollection_token_, EcalUncalibRecHitEB);
111 if (EcalUncalibRecHitEB.
isValid()) {
117 bool skipDigis =
false;
120 e.getByToken(EBdigiCollection_token_, EcalDigiEB);
138 if (meEBUncalibRecHitsOccupancy_)
139 meEBUncalibRecHitsOccupancy_->Fill(EBid.
ieta(), EBid.
iphi());
140 if (meEBUncalibRecHitsAmplitude_)
141 meEBUncalibRecHitsAmplitude_->Fill(uncalibRecHit->amplitude());
142 if (meEBUncalibRecHitsPedestal_)
143 meEBUncalibRecHitsPedestal_->Fill(uncalibRecHit->pedestal());
144 if (meEBUncalibRecHitsJitter_)
145 meEBUncalibRecHitsJitter_->Fill(uncalibRecHit->jitter());
146 if (meEBUncalibRecHitsChi2_)
147 meEBUncalibRecHitsChi2_->Fill(uncalibRecHit->chi2());
148 if (meEBUncalibRecHitsAmpFullMap_)
149 meEBUncalibRecHitsAmpFullMap_->Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->amplitude());
150 if (meEBUncalibRecHitsPedFullMap_)
151 meEBUncalibRecHitsPedFullMap_->Fill(EBid.
ieta(), EBid.
iphi(), uncalibRecHit->pedestal());
154 if (uncalibRecHit->amplitude() > 100) {
155 if (meEBUncalibRecHitsOccupancyGt100adc_)
156 meEBUncalibRecHitsOccupancyGt100adc_->Fill(EBid.
ieta(), EBid.
iphi());
157 if (meEBUncalibRecHitsAmplitudeGt100adc_)
158 meEBUncalibRecHitsAmplitudeGt100adc_->Fill(uncalibRecHit->amplitude());
159 if (meEBUncalibRecHitsPedestalGt100adc_)
160 meEBUncalibRecHitsPedestalGt100adc_->Fill(uncalibRecHit->pedestal());
161 if (meEBUncalibRecHitsJitterGt100adc_)
162 meEBUncalibRecHitsJitterGt100adc_->Fill(uncalibRecHit->jitter());
163 if (meEBUncalibRecHitsChi2Gt100adc_)
164 meEBUncalibRecHitsChi2Gt100adc_->Fill(uncalibRecHit->chi2());
169 int ie = (ic - 1) / 20 + 1;
170 int ip = (ic - 1) % 20 + 1;
172 float xie = ie - 0.5;
173 float xip = ip - 0.5;
174 if (meEBUncalibRecHitPedMap_[
ism - 1])
175 meEBUncalibRecHitPedMap_[
ism - 1]->Fill(xie, xip, uncalibRecHit->pedestal());
176 if (meEBUncalibRecHitAmplMap_[
ism - 1])
177 meEBUncalibRecHitAmplMap_[
ism - 1]->Fill(xie, xip, uncalibRecHit->amplitude());
184 if (myDigi !=
EBDigi->end()) {
187 double analogSample = thisSample.
adc();
188 if (
eMax < analogSample) {
200 if (
eMax > (*it).mean_x1 + 5 * (*it).rms_x1 &&
eMax != 0) {
202 if (meEBUncalibRecHitMaxSampleRatio_)
203 meEBUncalibRecHitMaxSampleRatio_->Fill((uncalibRecHit->amplitude() + uncalibRecHit->pedestal()) /
eMax);
204 if (meEBUncalibRecHitMaxSampleRatioGt100adc_ && (uncalibRecHit->amplitude() > 100))
205 meEBUncalibRecHitMaxSampleRatioGt100adc_->Fill((uncalibRecHit->amplitude() + uncalibRecHit->pedestal()) /
208 <<
"barrel, eMax = " <<
eMax <<
" Amplitude = " << uncalibRecHit->amplitude() + uncalibRecHit->pedestal();