85 LocalPosDebug_(iConfig.getParameter<
bool>(
"LocalPositionDebug")) {
87 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
101 const MTDTopology* topology = topologyHandle.product();
103 bool topo1Dis =
false;
104 bool topo2Dis =
false;
116 unsigned int n_digi_etl[4] = {0, 0, 0, 0};
118 for (
const auto& dataFrame : *etlDigiHitsHandle) {
122 const auto&
sample = dataFrame.sample(isample);
127 if (thedet ==
nullptr)
128 throw cms::Exception(
"EtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 129 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
133 const auto& global_point = thedet->
toGlobal(local_point);
140 if (detId.
zside() == -1) {
142 }
else if (detId.
zside() == 1) {
153 if ((detId.
zside() == -1) && (detId.
nDisc() == 1)) {
155 }
else if ((detId.
zside() == -1) && (detId.
nDisc() == 2)) {
157 }
else if ((detId.
zside() == 1) && (detId.
nDisc() == 1)) {
159 }
else if ((detId.
zside() == 1) && (detId.
nDisc() == 2)) {
171 if ((idet == 0) || (idet == 1)) {
176 }
else if ((idet == 2) || (idet == 3)) {
205 for (
int i = 0;
i < 4;
i++) {
220 "Number of ETL DIGI hits (-Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
225 ibook.
book1D(
"EtlNhitsZnegD2",
"Number of ETL DIGI hits (-Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5000.);
227 "Number of ETL DIGI hits (+Z, Single(topo1D)/First(topo2D) disk);log_{10}(N_{DIGI})",
232 ibook.
book1D(
"EtlNhitsZposD2",
"Number of ETL DIGI hits (+Z, Second disk);log_{10}(N_{DIGI})", 100, 0., 5000.);
235 "ETL DIGI hits charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
240 ibook.
book1D(
"EtlHitChargeZnegD2",
"ETL DIGI hits charge (-Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
242 "ETL DIGI hits charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts]",
247 ibook.
book1D(
"EtlHitChargeZposD2",
"ETL DIGI hits charge (+Z, Second disk);Q_{DIGI} [ADC counts]", 100, 0., 256.);
249 "ETL DIGI hits ToA (-Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
254 ibook.
book1D(
"EtlHitTimeZnegD2",
"ETL DIGI hits ToA (-Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
256 "ETL DIGI hits ToA (+Z, Single(topo1D)/First(topo2D) disk);ToA_{DIGI} [TDC counts]",
261 ibook.
book1D(
"EtlHitTimeZposD2",
"ETL DIGI hits ToA (+Z, Second disk);ToA_{DIGI} [TDC counts]", 100, 0., 2000.);
264 ibook.
book2D(
"EtlOccupancyZnegD1",
265 "ETL DIGI hits occupancy (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
273 "ETL DIGI hits occupancy (-Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
281 ibook.
book2D(
"EtlOccupancyZposD1",
282 "ETL DIGI hits occupancy (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
290 "ETL DIGI hits occupancy (+Z, Second disk);X_{DIGI} [cm];Y_{DIGI} [cm]",
299 "ETL DIGI hits local occupancy (-Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
307 "ETL DIGI hits local occupancy (+Z);X_{DIGI} [cm];Y_{DIGI} [cm]",
314 meHitXlocal_[0] = ibook.
book1D(
"EtlHitXlocalZneg",
"ETL DIGI local X (-Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
315 meHitXlocal_[1] = ibook.
book1D(
"EtlHitXlocalZpos",
"ETL DIGI local X (+Z);X_{DIGI}^{LOC} [cm]", 100, -2.2, 2.2);
316 meHitYlocal_[0] = ibook.
book1D(
"EtlHitYlocalZneg",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
317 meHitYlocal_[1] = ibook.
book1D(
"EtlHitYlocalZpos",
"ETL DIGI local Y (-Z);Y_{DIGI}^{LOC} [cm]", 50, -1.1, 1.1);
320 "EtlHitXZnegD1",
"ETL DIGI hits X (-Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
321 meHitX_[1] = ibook.
book1D(
"EtlHitXZnegD2",
"ETL DIGI hits X (-Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
323 "EtlHitXZposD1",
"ETL DIGI hits X (+Z, Single(topo1D)/First(topo2D) disk);X_{DIGI} [cm]", 100, -130., 130.);
324 meHitX_[3] = ibook.
book1D(
"EtlHitXZposD2",
"ETL DIGI hits X (+Z, Second disk);X_{DIGI} [cm]", 100, -130., 130.);
326 "EtlHitYZnegD1",
"ETL DIGI hits Y (-Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
327 meHitY_[1] = ibook.
book1D(
"EtlHitYZnegD2",
"ETL DIGI hits Y (-Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
329 "EtlHitYZposD1",
"ETL DIGI hits Y (+Z, Single(topo1D)/First(topo2D) disk);Y_{DIGI} [cm]", 100, -130., 130.);
330 meHitY_[3] = ibook.
book1D(
"EtlHitYZposD2",
"ETL DIGI hits Y (+Z, Second disk);Y_{DIGI} [cm]", 100, -130., 130.);
332 "EtlHitZZnegD1",
"ETL DIGI hits Z (-Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, -302., -298.);
333 meHitZ_[1] = ibook.
book1D(
"EtlHitZZnegD2",
"ETL DIGI hits Z (-Z, Second disk);Z_{DIGI} [cm]", 100, -304., -300.);
335 "EtlHitZZposD1",
"ETL DIGI hits Z (+Z, Single(topo1D)/First(topo2D) disk);Z_{DIGI} [cm]", 100, 298., 302.);
336 meHitZ_[3] = ibook.
book1D(
"EtlHitZZposD2",
"ETL DIGI hits Z (+Z, Second disk);Z_{DIGI} [cm]", 100, 300., 304.);
339 "ETL DIGI hits #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
344 ibook.
book1D(
"EtlHitPhiZnegD2",
"ETL DIGI hits #phi (-Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
346 "ETL DIGI hits #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad]",
351 ibook.
book1D(
"EtlHitPhiZposD2",
"ETL DIGI hits #phi (+Z, Second disk);#phi_{DIGI} [rad]", 100, -3.15, 3.15);
353 "EtlHitEtaZnegD1",
"ETL DIGI hits #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, -3.2, -1.56);
354 meHitEta_[1] = ibook.
book1D(
"EtlHitEtaZnegD2",
"ETL DIGI hits #eta (-Z, Second disk);#eta_{DIGI}", 100, -3.2, -1.56);
356 "EtlHitEtaZposD1",
"ETL DIGI hits #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI}", 100, 1.56, 3.2);
357 meHitEta_[3] = ibook.
book1D(
"EtlHitEtaZposD2",
"ETL DIGI hits #eta (+Z, Second disk);#eta_{DIGI}", 100, 1.56, 3.2);
360 "ETL DIGI ToA vs charge (-Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
368 "ETL DIGI ToA vs charge (-Z, Second Disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
376 "ETL DIGI ToA vs charge (+Z, Single(topo1D)/First(topo2D) disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
384 "ETL DIGI ToA vs charge (+Z, Second disk);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
391 "EtlHitQvsPhiZnegD1",
392 "ETL DIGI charge vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
400 "ETL DIGI charge vs #phi (-Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
407 "EtlHitQvsPhiZposD1",
408 "ETL DIGI charge vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
416 "ETL DIGI charge vs #phi (+Z, Second disk);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
423 "EtlHitQvsEtaZnegD1",
424 "ETL DIGI charge vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
431 "ETL DIGI charge vs #eta (-Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
438 "EtlHitQvsEtaZposD1",
439 "ETL DIGI charge vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
446 "ETL DIGI charge vs #eta (+Z, Second disk);#eta_{DIGI};Q_{DIGI} [ADC counts]",
453 "EtlHitTvsPhiZnegD1",
454 "ETL DIGI ToA vs #phi (-Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
462 "ETL DIGI ToA vs #phi (-Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
469 "EtlHitTvsPhiZposD1",
470 "ETL DIGI ToA vs #phi (+Z, Single(topo1D)/First(topo2D) disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
478 "ETL DIGI ToA vs #phi (+Z, Second disk);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]",
485 "EtlHitTvsEtaZnegD1",
486 "ETL DIGI ToA vs #eta (-Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
493 "ETL DIGI ToA vs #eta (-Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
500 "EtlHitTvsEtaZposD1",
501 "ETL DIGI ToA vs #eta (+Z, Single(topo1D)/First(topo2D) disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
508 "ETL DIGI ToA vs #eta (+Z, Second disk);#eta_{DIGI};ToA_{DIGI} [TDC counts]",
522 desc.add<
bool>(
"LocalPositionDebug",
false);
524 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
#define DEFINE_FWK_MODULE(type)
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]
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 &)
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 LocalPosDebug_