90 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")) {
92 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
109 unsigned int n_digi_etl[4] = {0, 0, 0, 0};
110 for (
size_t i = 0;
i < 4;
i++) {
116 for (
const auto& dataFrame : *etlDigiHitsHandle) {
120 const auto&
sample = dataFrame.sample(isample);
125 if (thedet ==
nullptr)
126 throw cms::Exception(
"EtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 127 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
131 const auto& global_point = thedet->
toGlobal(local_point);
136 if (
detId.discSide() == 1) {
139 if ((
detId.zside() == -1) && (
detId.nDisc() == 1)) {
141 }
else if ((
detId.zside() == -1) && (
detId.nDisc() == 2)) {
143 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 1)) {
145 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 2)) {
153 LogDebug(
"EtlDigiHitsValidation") <<
"Digi # " <<
index <<
" DetId " <<
detId.rawId() <<
" idet " << idet;
161 if ((idet == 0) || (idet == 1)) {
166 }
else if ((idet == 2) || (idet == 3)) {
193 for (
int i = 0;
i < 4;
i++) {
210 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
215 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL DIGI hits (-Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
217 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
222 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL DIGI hits (+Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
225 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
230 ibook.
book1D(
"EtlNhitsPerLGADZnegD2",
"Number of ETL DIGI hits (-Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
232 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
237 ibook.
book1D(
"EtlNhitsPerLGADZposD2",
"Number of ETL DIGI hits (+Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
240 "ETL DIGI hits charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
245 ibook.
book1D(
"EtlHitChargeZnegD2",
"ETL DIGI hits charge (-Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
247 "ETL DIGI hits charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
252 ibook.
book1D(
"EtlHitChargeZposD2",
"ETL DIGI hits charge (+Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
255 "ETL DIGI hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
260 ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL DIGI hits ToA (-Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
262 "ETL DIGI hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
267 ibook.
book1D(
"EtlHitTimeZposD2",
"ETL DIGI hits ToA (+Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
270 "ETL DIGI hits ToT (-Z, Single(topo1D)/First(topo2D) disk);ToT_{DIGI} [TDC counts]",
275 ibook.
book1D(
"EtlHitToTZnegD2",
"ETL DIGI hits ToT (-Z, Second disk);ToT_{DIGI} [TDC counts]", 100, 0., 500.);
277 "ETL DIGI hits ToT (+Z, Single(topo1D)/First(topo2D) disk);ToT_{DIGI} [TDC counts]",
282 ibook.
book1D(
"EtlHitToTZposD2",
"ETL DIGI hits ToT (+Z, Second disk);ToT_{DIGI} [TDC counts]", 100, 0., 500.);
285 ibook.
book2D(
"EtlOccupancyZnegD1",
286 "ETL DIGI hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
294 "ETL DIGI hits occupancy (-Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
302 ibook.
book2D(
"EtlOccupancyZposD1",
303 "ETL DIGI hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
311 "ETL DIGI hits occupancy (+Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
320 "ETL DIGI hits local occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
328 "ETL DIGI hits local occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
335 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL DIGI local X (-Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
336 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL DIGI local X (+Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
337 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
338 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
341 "EtlHitXZnegD1",
"ETL DIGI hits X (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
342 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL DIGI hits X (-Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
344 "EtlHitXZposD1",
"ETL DIGI hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
345 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL DIGI hits X (+Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
347 "EtlHitYZnegD1",
"ETL DIGI hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
348 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL DIGI hits Y (-Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
350 "EtlHitYZposD1",
"ETL DIGI hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
351 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL DIGI hits Y (+Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
353 "EtlHitZZnegD1",
"ETL DIGI hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, -302., -298.);
354 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL DIGI hits Z (-Z, Second disk);Z_{DIGI} [cm]", 100, -304., -300.);
356 "EtlHitZZposD1",
"ETL DIGI hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, 298., 302.);
357 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL DIGI hits Z (+Z, Second disk);Z_{DIGI} [cm]", 100, 300., 304.);
360 "ETL DIGI hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
365 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL DIGI hits #phi (-Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
367 "ETL DIGI hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
372 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL DIGI hits #phi (+Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
374 "EtlHitEtaZnegD1",
"ETL DIGI hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, -3.2, -1.56);
375 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL DIGI hits #eta (-Z, Second disk);#eta_{DIGI}", 100, -3.2, -1.56);
377 "EtlHitEtaZposD1",
"ETL DIGI hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, 1.56, 3.2);
378 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL DIGI hits #eta (+Z, Second disk);#eta_{DIGI}", 100, 1.56, 3.2);
381 "ETL DIGI ToA vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
389 "ETL DIGI ToA vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
397 "ETL DIGI ToA vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
405 "ETL DIGI ToA vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
412 "EtlHitToTvsQZnegD1",
413 "ETL DIGI ToT vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToT_{DIGI} [TDC counts]",
421 "ETL DIGI ToT vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToT_{DIGI} [TDC counts]",
428 "EtlHitToTvsQZposD1",
429 "ETL DIGI ToT vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToT_{DIGI} [TDC counts]",
437 "ETL DIGI ToT vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToT_{DIGI} [TDC counts]",
444 "EtlHitQvsPhiZnegD1",
445 "ETL DIGI charge vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
453 "ETL DIGI charge vs #phi (-Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
460 "EtlHitQvsPhiZposD1",
461 "ETL DIGI charge vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
469 "ETL DIGI charge vs #phi (+Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
476 "EtlHitQvsEtaZnegD1",
477 "ETL DIGI charge vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
484 "ETL DIGI charge vs #eta (-Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
491 "EtlHitQvsEtaZposD1",
492 "ETL DIGI charge vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
499 "ETL DIGI charge vs #eta (+Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
506 "EtlHitTvsPhiZnegD1",
507 "ETL DIGI ToA vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
515 "ETL DIGI ToA vs #phi (-Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
522 "EtlHitTvsPhiZposD1",
523 "ETL DIGI ToA vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
531 "ETL DIGI ToA vs #phi (+Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
538 "EtlHitTvsEtaZnegD1",
539 "ETL DIGI ToA vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
546 "ETL DIGI ToA vs #eta (-Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
553 "EtlHitTvsEtaZposD1",
554 "ETL DIGI ToA vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
561 "ETL DIGI ToA vs #eta (+Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
575 desc.add<
bool>(
"optionalPlots",
false);
577 descriptions.
add(
"etlDigiHitsDefaultValid",
desc);
MonitorElement * meHitQvsPhi_[4]
T getParameter(std::string const &) const
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meHitXlocal_[2]
virtual const Topology & topology() const
MonitorElement * meHitEta_[4]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< ETLDigiCollection > etlDigiHitsToken_
std::array< std::unordered_map< uint32_t, uint32_t >, 4 > ndigiPerLGAD_
MonitorElement * meNhits_[4]
virtual float localX(float mpX) const =0
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meOccupancy_[4]
MonitorElement * meHitTvsQ_[4]
MonitorElement * meLocalOccupancy_[2]
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meHitQvsEta_[4]
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())
~EtlDigiHitsValidation() override
MonitorElement * meHitCharge_[4]
MonitorElement * meHitToTvsQ_[4]
MonitorElement * meHitY_[4]
MonitorElement * meHitTime_[4]
#define DEFINE_FWK_MODULE(type)
MonitorElement * meHitYlocal_[2]
MonitorElement * meHitTvsEta_[4]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MonitorElement * meHitX_[4]
MonitorElement * meHitZ_[4]
virtual float localY(float mpY) const =0
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())
edm::ESGetToken< MTDTopology, MTDTopologyRcd > mtdtopoToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meHitTvsPhi_[4]
MonitorElement * meHitPhi_[4]
Detector identifier class for the Endcap Timing Layer.
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
EtlDigiHitsValidation(const edm::ParameterSet &)
MonitorElement * meNhitsPerLGAD_[4]
Log< level::Warning, false > LogWarning
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 * meHitToT_[4]
const std::string folder_
const bool optionalPlots_