102 unsigned int n_digi_btl[2] = {0, 0};
104 for (
const auto& dataFrame : *btlDigiHitsHandle) {
108 if (thedet ==
nullptr)
109 throw cms::Exception(
"BtlDigiHitsValidation") <<
"GeographicalID: " << std::hex << geoId.
rawId() <<
" (" 110 << detId.
rawId() <<
") is invalid!" <<
std::dec << std::endl;
116 const auto& global_point = thedet->
toGlobal(local_point);
118 const auto& sample_L = dataFrame.sample(0);
119 const auto& sample_R = dataFrame.sample(1);
121 uint32_t
adc[2] = {sample_L.data(), sample_R.data()};
122 uint32_t tdc[2] = {sample_L.toa(), sample_R.toa()};
124 for (
int iside = 0; iside < 2; ++iside) {
153 if (n_digi_btl[0] > 0)
155 if (n_digi_btl[1] > 0)
167 meNhits_[0] = ibook.
book1D(
"BtlNhitsL",
"Number of BTL DIGI hits (L);log_{10}(N_{DIGI})", 100, 0., 5.25);
168 meNhits_[1] = ibook.
book1D(
"BtlNhitsR",
"Number of BTL DIGI hits (R);log_{10}(N_{DIGI})", 100, 0., 5.25);
170 meHitCharge_[0] = ibook.
book1D(
"BtlHitChargeL",
"BTL DIGI hits charge (L);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
171 meHitCharge_[1] = ibook.
book1D(
"BtlHitChargeR",
"BTL DIGI hits charge (R);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
172 meHitTime_[0] = ibook.
book1D(
"BtlHitTimeL",
"BTL DIGI hits ToA (L);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
173 meHitTime_[1] = ibook.
book1D(
"BtlHitTimeR",
"BTL DIGI hits ToA (R);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
176 "BTL DIGI hits occupancy (L);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
184 "BTL DIGI hits occupancy (R);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
192 meHitX_[0] = ibook.
book1D(
"BtlHitXL",
"BTL DIGI hits X (L);X_{DIGI} [cm]", 60, -120., 120.);
193 meHitX_[1] = ibook.
book1D(
"BtlHitXR",
"BTL DIGI hits X (R);X_{DIGI} [cm]", 60, -120., 120.);
194 meHitY_[0] = ibook.
book1D(
"BtlHitYL",
"BTL DIGI hits Y (L);Y_{DIGI} [cm]", 60, -120., 120.);
195 meHitY_[1] = ibook.
book1D(
"BtlHitYR",
"BTL DIGI hits Y (R);Y_{DIGI} [cm]", 60, -120., 120.);
196 meHitZ_[0] = ibook.
book1D(
"BtlHitZL",
"BTL DIGI hits Z (L);Z_{DIGI} [cm]", 100, -260., 260.);
197 meHitZ_[1] = ibook.
book1D(
"BtlHitZR",
"BTL DIGI hits Z (R);Z_{DIGI} [cm]", 100, -260., 260.);
198 meHitPhi_[0] = ibook.
book1D(
"BtlHitPhiL",
"BTL DIGI hits #phi (L);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
199 meHitPhi_[1] = ibook.
book1D(
"BtlHitPhiR",
"BTL DIGI hits #phi (R);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
200 meHitEta_[0] = ibook.
book1D(
"BtlHitEtaL",
"BTL DIGI hits #eta (L);#eta_{DIGI}", 100, -1.55, 1.55);
201 meHitEta_[1] = ibook.
book1D(
"BtlHitEtaR",
"BTL DIGI hits #eta (R);#eta_{DIGI}", 100, -1.55, 1.55);
204 "BTL DIGI ToA vs charge (L);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
211 "BTL DIGI ToA vs charge (R);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
218 "BTL DIGI charge vs #phi (L);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
225 "BTL DIGI charge vs #phi (R);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
232 "BtlHitQvsEtaL",
"BTL DIGI charge vs #eta (L);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
234 "BtlHitQvsEtaR",
"BTL DIGI charge vs #eta (R);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
236 "BtlHitQvsZL",
"BTL DIGI charge vs Z (L);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
238 "BtlHitQvsZR",
"BTL DIGI charge vs Z (R);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
240 "BtlHitTvsPhiL",
"BTL DIGI ToA vs #phi (L);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
242 "BtlHitTvsPhiR",
"BTL DIGI ToA vs #phi (R);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
244 "BtlHitTvsEtaL",
"BTL DIGI ToA vs #eta (L);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
246 "BtlHitTvsEtaR",
"BTL DIGI ToA vs #eta (R);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
248 "BtlHitTvsZL",
"BTL DIGI ToA vs Z (L);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
250 "BtlHitTvsZR",
"BTL DIGI ToA vs Z (R);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
260 descriptions.
add(
"btlDigiHitsDefault", desc);
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
BtlDigiHitsValidation(const edm::ParameterSet &)
MonitorElement * meHitZ_[2]
CaloTopology const * topology(0)
virtual const Topology & topology() const
void setCurrentFolder(std::string const &fullpath)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
int getMTDTopologyMode() const
MonitorElement * meHitQvsEta_[2]
constexpr uint32_t rawId() const
get the raw id
MonitorElement * meHitTvsZ_[2]
MonitorElement * meHitY_[2]
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meHitX_[2]
edm::EDGetTokenT< BTLDigiCollection > btlDigiHitsToken_
int nrows() const override
const std::string folder_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
const MTDGeomDet * idToDet(DetId) const override
#define DEFINE_FWK_MODULE(type)
BTLDetId geographicalId(CrysLayout lay) const
MonitorElement * meHitTvsEta_[2]
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
virtual const PixelTopology & specificTopology() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const
MonitorElement * meNhits_[2]
MonitorElement * meOccupancy_[2]
MonitorElement * meHitTvsQ_[2]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meHitQvsZ_[2]
MonitorElement * meHitEta_[2]
MonitorElement * meHitPhi_[2]
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
MonitorElement * meHitTime_[2]
MonitorElement * meHitTvsPhi_[2]
int column(unsigned nrows=16) const
MonitorElement * meHitCharge_[2]
auto makeValid(const U &iOtherHandleType) noexcept(false)
T const * product() const
~BtlDigiHitsValidation() override
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meHitQvsPhi_[2]
int row(unsigned nrows=16) const