93 LocalPosDebug_(iConfig.getParameter<
bool>(
"LocalPositionDebug")) {
95 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
109 const MTDTopology* topology = topologyHandle.product();
115 unsigned int n_digi_btl[2] = {0, 0};
117 for (
const auto& dataFrame : *btlDigiHitsHandle) {
121 if (thedet ==
nullptr)
122 throw cms::Exception(
"BtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" ("
123 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
128 local_point = topo.pixelToModuleLocalPoint(local_point, detId.
row(topo.nrows()), detId.
column(topo.nrows()));
129 const auto& global_point = thedet->
toGlobal(local_point);
131 const auto& sample_L = dataFrame.sample(0);
132 const auto& sample_R = dataFrame.sample(1);
134 uint32_t
adc[2] = {sample_L.data(), sample_R.data()};
135 uint32_t tdc[2] = {sample_L.toa(), sample_R.toa()};
137 for (
int iside = 0; iside < 2; ++iside) {
173 if (n_digi_btl[0] > 0)
175 if (n_digi_btl[1] > 0)
186 meNhits_[0] = ibook.
book1D(
"BtlNhitsL",
"Number of BTL DIGI hits (L);log_{10}(N_{DIGI})", 100, 0., 5.25);
187 meNhits_[1] = ibook.
book1D(
"BtlNhitsR",
"Number of BTL DIGI hits (R);log_{10}(N_{DIGI})", 100, 0., 5.25);
189 meHitCharge_[0] = ibook.
book1D(
"BtlHitChargeL",
"BTL DIGI hits charge (L);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
190 meHitCharge_[1] = ibook.
book1D(
"BtlHitChargeR",
"BTL DIGI hits charge (R);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
191 meHitTime_[0] = ibook.
book1D(
"BtlHitTimeL",
"BTL DIGI hits ToA (L);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
192 meHitTime_[1] = ibook.
book1D(
"BtlHitTimeR",
"BTL DIGI hits ToA (R);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
194 "BTL DIGI hits occupancy (L);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
202 "BTL DIGI hits occupancy (R);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
211 "BTL DIGI hits local occupancy (L);X_{DIGI} [cm]; Y_{DIGI} [cm]",
219 "BtlLocalOccupancyR",
"BTL DIGI hits occupancy (R);X_{DIGI} [cm]; Y_{DIGI} [cm]", 100, -10., 10., 60, -3., 3.);
220 meHitXlocal_[0] = ibook.
book1D(
"BtlHitXlocalL",
"BTL DIGI local X (L);X_{DIGI}^{LOC} [cm]", 100, -10., 10.);
221 meHitXlocal_[1] = ibook.
book1D(
"BtlHitXlocalR",
"BTL DIGI local X (R);X_{DIGI}^{LOC} [cm]", 100, -10., 10.);
222 meHitYlocal_[0] = ibook.
book1D(
"BtlHitYlocalL",
"BTL DIGI local Y (L);Y_{DIGI}^{LOC} [cm]", 60, -3., 3.);
223 meHitYlocal_[1] = ibook.
book1D(
"BtlHitYlocalR",
"BTL DIGI local Y (R);Y_{DIGI}^{LOC} [cm]", 60, -3., 3.);
224 meHitZlocal_[0] = ibook.
book1D(
"BtlHitZlocalL",
"BTL DIGI local z (L);z_{DIGI}^{LOC} [cm]", 10, -1, 1);
225 meHitZlocal_[1] = ibook.
book1D(
"BtlHitZlocalR",
"BTL DIGI local z (R);z_{DIGI}^{LOC} [cm]", 10, -1, 1);
228 meHitX_[0] = ibook.
book1D(
"BtlHitXL",
"BTL DIGI hits X (L);X_{DIGI} [cm]", 60, -120., 120.);
229 meHitX_[1] = ibook.
book1D(
"BtlHitXR",
"BTL DIGI hits X (R);X_{DIGI} [cm]", 60, -120., 120.);
230 meHitY_[0] = ibook.
book1D(
"BtlHitYL",
"BTL DIGI hits Y (L);Y_{DIGI} [cm]", 60, -120., 120.);
231 meHitY_[1] = ibook.
book1D(
"BtlHitYR",
"BTL DIGI hits Y (R);Y_{DIGI} [cm]", 60, -120., 120.);
232 meHitZ_[0] = ibook.
book1D(
"BtlHitZL",
"BTL DIGI hits Z (L);Z_{DIGI} [cm]", 100, -260., 260.);
233 meHitZ_[1] = ibook.
book1D(
"BtlHitZR",
"BTL DIGI hits Z (R);Z_{DIGI} [cm]", 100, -260., 260.);
234 meHitPhi_[0] = ibook.
book1D(
"BtlHitPhiL",
"BTL DIGI hits #phi (L);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
235 meHitPhi_[1] = ibook.
book1D(
"BtlHitPhiR",
"BTL DIGI hits #phi (R);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
236 meHitEta_[0] = ibook.
book1D(
"BtlHitEtaL",
"BTL DIGI hits #eta (L);#eta_{DIGI}", 100, -1.55, 1.55);
237 meHitEta_[1] = ibook.
book1D(
"BtlHitEtaR",
"BTL DIGI hits #eta (R);#eta_{DIGI}", 100, -1.55, 1.55);
240 "BTL DIGI ToA vs charge (L);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
247 "BTL DIGI ToA vs charge (R);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
254 "BTL DIGI charge vs #phi (L);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
261 "BTL DIGI charge vs #phi (R);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
268 "BtlHitQvsEtaL",
"BTL DIGI charge vs #eta (L);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
270 "BtlHitQvsEtaR",
"BTL DIGI charge vs #eta (R);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
272 "BtlHitQvsZL",
"BTL DIGI charge vs Z (L);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
274 "BtlHitQvsZR",
"BTL DIGI charge vs Z (R);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
276 "BtlHitTvsPhiL",
"BTL DIGI ToA vs #phi (L);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
278 "BtlHitTvsPhiR",
"BTL DIGI ToA vs #phi (R);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
280 "BtlHitTvsEtaL",
"BTL DIGI ToA vs #eta (L);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
282 "BtlHitTvsEtaR",
"BTL DIGI ToA vs #eta (R);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
284 "BtlHitTvsZL",
"BTL DIGI ToA vs Z (L);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
286 "BtlHitTvsZR",
"BTL DIGI ToA vs Z (R);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
295 desc.add<
bool>(
"LocalPositionDebug",
false);
297 descriptions.
add(
"btlDigiHitsDefault",
desc);