85 optionalPlots_(iConfig.getParameter<
bool>(
"optionalPlots")) {
87 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
101 const MTDTopology* topology = topologyHandle.product();
103 bool topo1Dis =
false;
104 bool topo2Dis =
false;
115 unsigned int n_digi_etl[4] = {0, 0, 0, 0};
117 for (
const auto& dataFrame : *etlDigiHitsHandle) {
121 const auto&
sample = dataFrame.sample(isample);
126 if (thedet ==
nullptr)
127 throw cms::Exception(
"EtlDigiHitsValidation") <<
"GeographicalID: " << std::hex <<
geoId.rawId() <<
" (" 128 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
132 const auto& global_point = thedet->
toGlobal(local_point);
139 if (detId.
zside() == -1) {
141 }
else if (detId.
zside() == 1) {
152 if ((detId.
zside() == -1) && (detId.
nDisc() == 1)) {
154 }
else if ((detId.
zside() == -1) && (detId.
nDisc() == 2)) {
156 }
else if ((detId.
zside() == 1) && (detId.
nDisc() == 1)) {
158 }
else if ((detId.
zside() == 1) && (detId.
nDisc() == 2)) {
170 if ((idet == 0) || (idet == 1)) {
175 }
else if ((idet == 2) || (idet == 3)) {
204 for (
int i = 0;
i < 4;
i++) {
219 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
224 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL DIGI hits (-Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5000.);
226 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
231 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL DIGI hits (+Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5000.);
234 "ETL DIGI hits charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
239 ibook.
book1D(
"EtlHitChargeZnegD2",
"ETL DIGI hits charge (-Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
241 "ETL DIGI hits charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
246 ibook.
book1D(
"EtlHitChargeZposD2",
"ETL DIGI hits charge (+Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
248 "ETL DIGI hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
253 ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL DIGI hits ToA (-Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
255 "ETL DIGI hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
260 ibook.
book1D(
"EtlHitTimeZposD2",
"ETL DIGI hits ToA (+Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
263 ibook.
book2D(
"EtlOccupancyZnegD1",
264 "ETL DIGI hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
272 "ETL DIGI hits occupancy (-Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
280 ibook.
book2D(
"EtlOccupancyZposD1",
281 "ETL DIGI hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
289 "ETL DIGI hits occupancy (+Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
298 "ETL DIGI hits local occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
306 "ETL DIGI hits local occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
313 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL DIGI local X (-Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
314 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL DIGI local X (+Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
315 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
316 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
319 "EtlHitXZnegD1",
"ETL DIGI hits X (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
320 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL DIGI hits X (-Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
322 "EtlHitXZposD1",
"ETL DIGI hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
323 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL DIGI hits X (+Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
325 "EtlHitYZnegD1",
"ETL DIGI hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
326 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL DIGI hits Y (-Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
328 "EtlHitYZposD1",
"ETL DIGI hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
329 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL DIGI hits Y (+Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
331 "EtlHitZZnegD1",
"ETL DIGI hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, -302., -298.);
332 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL DIGI hits Z (-Z, Second disk);Z_{DIGI} [cm]", 100, -304., -300.);
334 "EtlHitZZposD1",
"ETL DIGI hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, 298., 302.);
335 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL DIGI hits Z (+Z, Second disk);Z_{DIGI} [cm]", 100, 300., 304.);
338 "ETL DIGI hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
343 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL DIGI hits #phi (-Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
345 "ETL DIGI hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
350 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL DIGI hits #phi (+Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
352 "EtlHitEtaZnegD1",
"ETL DIGI hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, -3.2, -1.56);
353 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL DIGI hits #eta (-Z, Second disk);#eta_{DIGI}", 100, -3.2, -1.56);
355 "EtlHitEtaZposD1",
"ETL DIGI hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, 1.56, 3.2);
356 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL DIGI hits #eta (+Z, Second disk);#eta_{DIGI}", 100, 1.56, 3.2);
359 "ETL DIGI ToA vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
367 "ETL DIGI ToA vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
375 "ETL DIGI ToA vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
383 "ETL DIGI ToA vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
390 "EtlHitQvsPhiZnegD1",
391 "ETL DIGI charge vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
399 "ETL DIGI charge vs #phi (-Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
406 "EtlHitQvsPhiZposD1",
407 "ETL DIGI charge vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
415 "ETL DIGI charge vs #phi (+Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
422 "EtlHitQvsEtaZnegD1",
423 "ETL DIGI charge vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
430 "ETL DIGI charge vs #eta (-Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
437 "EtlHitQvsEtaZposD1",
438 "ETL DIGI charge vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
445 "ETL DIGI charge vs #eta (+Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
452 "EtlHitTvsPhiZnegD1",
453 "ETL DIGI ToA vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
461 "ETL DIGI ToA vs #phi (-Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
468 "EtlHitTvsPhiZposD1",
469 "ETL DIGI ToA vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
477 "ETL DIGI ToA vs #phi (+Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
484 "EtlHitTvsEtaZnegD1",
485 "ETL DIGI ToA vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
492 "ETL DIGI ToA vs #eta (-Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
499 "EtlHitTvsEtaZposD1",
500 "ETL DIGI ToA vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
507 "ETL DIGI ToA vs #eta (+Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
521 desc.add<
bool>(
"optionalPlots",
false);
523 descriptions.
add(
"etlDigiHitsDefaultValid",
desc);
uint8_t geoId(const VFATFrame &frame)
retrieve the GEO information for this channel
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_
ETLDetId geographicalId() const
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 &)
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_