88 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")) {
90 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
107 unsigned int n_digi_etl[4] = {0, 0, 0, 0};
108 for (
size_t i = 0;
i < 4;
i++) {
114 for (
const auto& dataFrame : *etlDigiHitsHandle) {
118 const auto&
sample = dataFrame.sample(isample);
123 if (thedet ==
nullptr)
124 throw cms::Exception(
"EtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 125 <<
detId.rawId() <<
") is invalid!" <<
std::dec << std::endl;
129 const auto& global_point = thedet->
toGlobal(local_point);
134 if (
detId.discSide() == 1) {
137 if ((
detId.zside() == -1) && (
detId.nDisc() == 1)) {
139 }
else if ((
detId.zside() == -1) && (
detId.nDisc() == 2)) {
141 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 1)) {
143 }
else if ((
detId.zside() == 1) && (
detId.nDisc() == 2)) {
151 LogDebug(
"EtlDigiHitsValidation") <<
"Digi # " <<
index <<
" DetId " <<
detId.rawId() <<
" idet " << idet;
158 if ((idet == 0) || (idet == 1)) {
163 }
else if ((idet == 2) || (idet == 3)) {
189 for (
int i = 0;
i < 4;
i++) {
206 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
211 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL DIGI hits (-Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
213 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
218 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL DIGI hits (+Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5.25);
221 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
226 ibook.
book1D(
"EtlNhitsPerLGADZnegD2",
"Number of ETL DIGI hits (-Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
228 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk) per LGAD;N_{DIGI}",
233 ibook.
book1D(
"EtlNhitsPerLGADZposD2",
"Number of ETL DIGI hits (+Z, Second disk) per LGAD;N_{DIGI}", 50, 0., 50.);
236 "ETL DIGI hits charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
241 ibook.
book1D(
"EtlHitChargeZnegD2",
"ETL DIGI hits charge (-Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
243 "ETL DIGI hits charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
248 ibook.
book1D(
"EtlHitChargeZposD2",
"ETL DIGI hits charge (+Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
250 "ETL DIGI hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
255 ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL DIGI hits ToA (-Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
257 "ETL DIGI hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
262 ibook.
book1D(
"EtlHitTimeZposD2",
"ETL DIGI hits ToA (+Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
265 ibook.
book2D(
"EtlOccupancyZnegD1",
266 "ETL DIGI hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
274 "ETL DIGI hits occupancy (-Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
282 ibook.
book2D(
"EtlOccupancyZposD1",
283 "ETL DIGI hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
291 "ETL DIGI hits occupancy (+Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
300 "ETL DIGI hits local occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
308 "ETL DIGI hits local occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
315 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL DIGI local X (-Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
316 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL DIGI local X (+Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
317 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
318 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
321 "EtlHitXZnegD1",
"ETL DIGI hits X (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
322 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL DIGI hits X (-Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
324 "EtlHitXZposD1",
"ETL DIGI hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
325 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL DIGI hits X (+Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
327 "EtlHitYZnegD1",
"ETL DIGI hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
328 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL DIGI hits Y (-Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
330 "EtlHitYZposD1",
"ETL DIGI hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
331 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL DIGI hits Y (+Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
333 "EtlHitZZnegD1",
"ETL DIGI hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, -302., -298.);
334 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL DIGI hits Z (-Z, Second disk);Z_{DIGI} [cm]", 100, -304., -300.);
336 "EtlHitZZposD1",
"ETL DIGI hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, 298., 302.);
337 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL DIGI hits Z (+Z, Second disk);Z_{DIGI} [cm]", 100, 300., 304.);
340 "ETL DIGI hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
345 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL DIGI hits #phi (-Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
347 "ETL DIGI hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
352 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL DIGI hits #phi (+Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
354 "EtlHitEtaZnegD1",
"ETL DIGI hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, -3.2, -1.56);
355 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL DIGI hits #eta (-Z, Second disk);#eta_{DIGI}", 100, -3.2, -1.56);
357 "EtlHitEtaZposD1",
"ETL DIGI hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, 1.56, 3.2);
358 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL DIGI hits #eta (+Z, Second disk);#eta_{DIGI}", 100, 1.56, 3.2);
361 "ETL DIGI ToA vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
369 "ETL DIGI ToA vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
377 "ETL DIGI ToA vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
385 "ETL DIGI ToA vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
392 "EtlHitQvsPhiZnegD1",
393 "ETL DIGI charge vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
401 "ETL DIGI charge vs #phi (-Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
408 "EtlHitQvsPhiZposD1",
409 "ETL DIGI charge vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
417 "ETL DIGI charge vs #phi (+Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
424 "EtlHitQvsEtaZnegD1",
425 "ETL DIGI charge vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
432 "ETL DIGI charge vs #eta (-Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
439 "EtlHitQvsEtaZposD1",
440 "ETL DIGI charge vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
447 "ETL DIGI charge vs #eta (+Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
454 "EtlHitTvsPhiZnegD1",
455 "ETL DIGI ToA vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
463 "ETL DIGI ToA vs #phi (-Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
470 "EtlHitTvsPhiZposD1",
471 "ETL DIGI ToA vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
479 "ETL DIGI ToA vs #phi (+Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
486 "EtlHitTvsEtaZnegD1",
487 "ETL DIGI ToA vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
494 "ETL DIGI ToA vs #eta (-Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
501 "EtlHitTvsEtaZposD1",
502 "ETL DIGI ToA vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
509 "ETL DIGI ToA vs #eta (+Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
523 desc.add<
bool>(
"optionalPlots",
false);
525 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 * 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())
const std::string folder_
const bool optionalPlots_