93 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")) {
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;
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>(
"optionalPlots",
false);
297 descriptions.
add(
"btlDigiHitsDefaultValid",
desc);
int getMTDTopologyMode() const
T getParameter(std::string const &) const
MonitorElement * meHitYlocal_[2]
BtlDigiHitsValidation(const edm::ParameterSet &)
MonitorElement * meHitZ_[2]
virtual void setCurrentFolder(std::string const &fullpath)
virtual const Topology & topology() const
virtual const PixelTopology & specificTopology() const
MonitorElement * meHitQvsEta_[2]
MonitorElement * meHitTvsZ_[2]
MonitorElement * meHitZlocal_[2]
MonitorElement * meHitY_[2]
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meHitX_[2]
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
edm::EDGetTokenT< BTLDigiCollection > btlDigiHitsToken_
const std::string folder_
MonitorElement * meLocalOccupancy_[2]
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * meHitTvsEta_[2]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
int nrows() const override
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
MonitorElement * meNhits_[2]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const bool optionalPlots_
MonitorElement * meOccupancy_[2]
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
MonitorElement * meHitTvsQ_[2]
constexpr uint32_t rawId() const
get the raw id
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meHitQvsZ_[2]
MonitorElement * meHitEta_[2]
MonitorElement * meHitPhi_[2]
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
MonitorElement * meHitTime_[2]
MonitorElement * meHitTvsPhi_[2]
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * meHitCharge_[2]
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)
auto makeValid(const U &iOtherHandleType) noexcept(false)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * meHitXlocal_[2]
~BtlDigiHitsValidation() override
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meHitQvsPhi_[2]