88 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")) {
90 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
104 const MTDTopology* topology = topologyHandle.product();
106 bool topo1Dis =
false;
107 bool topo2Dis =
false;
118 unsigned int n_digi_etl[4] = {0, 0, 0, 0};
119 for (
size_t i = 0;
i < 4;
i++) {
123 for (
const auto& dataFrame : *etlDigiHitsHandle) {
127 const auto&
sample = dataFrame.sample(isample);
132 if (thedet ==
nullptr)
133 throw cms::Exception(
"EtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 134 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
138 const auto& global_point = thedet->
toGlobal(local_point);
145 if (
detId.zside() == -1) {
147 }
else if (
detId.zside() == 1) {
155 if (
detId.discSide() == 1) {
158 if ((
detId.zside() == -1) && (
detId.nDisc() == 1)) {
160 }
else if ((
detId.zside() == -1) && (
detId.nDisc() == 2)) {
162 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 1)) {
164 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 2)) {
176 if ((idet == 0) || (idet == 1)) {
181 }
else if ((idet == 2) || (idet == 3)) {
219 for (
int i = 0;
i < 4;
i++) {
237 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
242 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL DIGI hits (-Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
244 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
249 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL DIGI hits (+Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
252 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
257 ibook.
book1D(
"EtlNhitsPerLGADZnegD2",
"Number of ETL DIGI hits (-Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
259 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
264 ibook.
book1D(
"EtlNhitsPerLGADZposD2",
"Number of ETL DIGI hits (+Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
267 "ETL DIGI hits charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
272 ibook.
book1D(
"EtlHitChargeZnegD2",
"ETL DIGI hits charge (-Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
274 "ETL DIGI hits charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
279 ibook.
book1D(
"EtlHitChargeZposD2",
"ETL DIGI hits charge (+Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
281 "ETL DIGI hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
286 ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL DIGI hits ToA (-Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
288 "ETL DIGI hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
293 ibook.
book1D(
"EtlHitTimeZposD2",
"ETL DIGI hits ToA (+Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
296 ibook.
book2D(
"EtlOccupancyZnegD1",
297 "ETL DIGI hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
305 "ETL DIGI hits occupancy (-Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
313 ibook.
book2D(
"EtlOccupancyZposD1",
314 "ETL DIGI hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
322 "ETL DIGI hits occupancy (+Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
331 "ETL DIGI hits local occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
339 "ETL DIGI hits local occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
346 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL DIGI local X (-Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
347 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL DIGI local X (+Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
348 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
349 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
352 "EtlHitXZnegD1",
"ETL DIGI hits X (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
353 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL DIGI hits X (-Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
355 "EtlHitXZposD1",
"ETL DIGI hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
356 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL DIGI hits X (+Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
358 "EtlHitYZnegD1",
"ETL DIGI hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
359 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL DIGI hits Y (-Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
361 "EtlHitYZposD1",
"ETL DIGI hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
362 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL DIGI hits Y (+Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
364 "EtlHitZZnegD1",
"ETL DIGI hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, -302., -298.);
365 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL DIGI hits Z (-Z, Second disk);Z_{DIGI} [cm]", 100, -304., -300.);
367 "EtlHitZZposD1",
"ETL DIGI hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, 298., 302.);
368 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL DIGI hits Z (+Z, Second disk);Z_{DIGI} [cm]", 100, 300., 304.);
371 "ETL DIGI hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
376 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL DIGI hits #phi (-Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
378 "ETL DIGI hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
383 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL DIGI hits #phi (+Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
385 "EtlHitEtaZnegD1",
"ETL DIGI hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, -3.2, -1.56);
386 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL DIGI hits #eta (-Z, Second disk);#eta_{DIGI}", 100, -3.2, -1.56);
388 "EtlHitEtaZposD1",
"ETL DIGI hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, 1.56, 3.2);
389 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL DIGI hits #eta (+Z, Second disk);#eta_{DIGI}", 100, 1.56, 3.2);
392 "ETL DIGI ToA vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
400 "ETL DIGI ToA vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
408 "ETL DIGI ToA vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
416 "ETL DIGI ToA vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
423 "EtlHitQvsPhiZnegD1",
424 "ETL DIGI charge vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
432 "ETL DIGI charge vs #phi (-Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
439 "EtlHitQvsPhiZposD1",
440 "ETL DIGI charge vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
448 "ETL DIGI charge vs #phi (+Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
455 "EtlHitQvsEtaZnegD1",
456 "ETL DIGI charge vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
463 "ETL DIGI charge vs #eta (-Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
470 "EtlHitQvsEtaZposD1",
471 "ETL DIGI charge vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
478 "ETL DIGI charge vs #eta (+Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
485 "EtlHitTvsPhiZnegD1",
486 "ETL DIGI ToA vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
494 "ETL DIGI ToA vs #phi (-Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
501 "EtlHitTvsPhiZposD1",
502 "ETL DIGI ToA vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
510 "ETL DIGI ToA vs #phi (+Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
517 "EtlHitTvsEtaZnegD1",
518 "ETL DIGI ToA vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
525 "ETL DIGI ToA vs #eta (-Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
532 "EtlHitTvsEtaZposD1",
533 "ETL DIGI ToA vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
540 "ETL DIGI ToA vs #eta (+Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
554 desc.add<
bool>(
"optionalPlots",
false);
556 descriptions.
add(
"etlDigiHitsDefaultValid",
desc);
MonitorElement * meHitQvsPhi_[4]
int getMTDTopologyMode() const
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 * meHitY_[4]
MonitorElement * meHitTime_[4]
#define DEFINE_FWK_MODULE(type)
MonitorElement * meHitYlocal_[2]
ETLDetId::EtlLayout etlLayoutFromTopoMode(const int &topoMode)
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]
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())
const std::string folder_
const bool optionalPlots_