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) {
165 meNhits_[0] = ibook.
book1D(
"BtlNhitsL",
"Number of BTL DIGI hits (L);N_{DIGI}", 100, 0., 5000.);
166 meNhits_[1] = ibook.
book1D(
"BtlNhitsR",
"Number of BTL DIGI hits (R);N_{DIGI}", 100, 0., 5000.);
168 meHitCharge_[0] = ibook.
book1D(
"BtlHitChargeL",
"BTL DIGI hits charge (L);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
169 meHitCharge_[1] = ibook.
book1D(
"BtlHitChargeR",
"BTL DIGI hits charge (R);Q_{DIGI} [ADC counts]", 100, 0., 1024.);
170 meHitTime_[0] = ibook.
book1D(
"BtlHitTimeL",
"BTL DIGI hits ToA (L);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
171 meHitTime_[1] = ibook.
book1D(
"BtlHitTimeR",
"BTL DIGI hits ToA (R);ToA_{DIGI} [TDC counts]", 100, 0., 1024.);
174 "BTL DIGI hits occupancy (L);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
182 "BTL DIGI hits occupancy (R);Z_{DIGI} [cm]; #phi_{DIGI} [rad]",
190 meHitX_[0] = ibook.
book1D(
"BtlHitXL",
"BTL DIGI hits X (L);X_{DIGI} [cm]", 60, -120., 120.);
191 meHitX_[1] = ibook.
book1D(
"BtlHitXR",
"BTL DIGI hits X (R);X_{DIGI} [cm]", 60, -120., 120.);
192 meHitY_[0] = ibook.
book1D(
"BtlHitYL",
"BTL DIGI hits Y (L);Y_{DIGI} [cm]", 60, -120., 120.);
193 meHitY_[1] = ibook.
book1D(
"BtlHitYR",
"BTL DIGI hits Y (R);Y_{DIGI} [cm]", 60, -120., 120.);
194 meHitZ_[0] = ibook.
book1D(
"BtlHitZL",
"BTL DIGI hits Z (L);Z_{DIGI} [cm]", 100, -260., 260.);
195 meHitZ_[1] = ibook.
book1D(
"BtlHitZR",
"BTL DIGI hits Z (R);Z_{DIGI} [cm]", 100, -260., 260.);
196 meHitPhi_[0] = ibook.
book1D(
"BtlHitPhiL",
"BTL DIGI hits #phi (L);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
197 meHitPhi_[1] = ibook.
book1D(
"BtlHitPhiR",
"BTL DIGI hits #phi (R);#phi_{DIGI} [rad]", 126, -3.15, 3.15);
198 meHitEta_[0] = ibook.
book1D(
"BtlHitEtaL",
"BTL DIGI hits #eta (L);#eta_{DIGI}", 100, -1.55, 1.55);
199 meHitEta_[1] = ibook.
book1D(
"BtlHitEtaR",
"BTL DIGI hits #eta (R);#eta_{DIGI}", 100, -1.55, 1.55);
202 "BTL DIGI ToA vs charge (L);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
209 "BTL DIGI ToA vs charge (R);Q_{DIGI} [ADC counts];ToA_{DIGI} [TDC counts]",
216 "BTL DIGI charge vs #phi (L);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
223 "BTL DIGI charge vs #phi (R);#phi_{DIGI} [rad];Q_{DIGI} [ADC counts]",
230 "BtlHitQvsEtaL",
"BTL DIGI charge vs #eta (L);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
232 "BtlHitQvsEtaR",
"BTL DIGI charge vs #eta (R);#eta_{DIGI};Q_{DIGI} [ADC counts]", 50, -1.55, 1.55, 0., 1024.);
234 "BtlHitQvsZL",
"BTL DIGI charge vs Z (L);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
236 "BtlHitQvsZR",
"BTL DIGI charge vs Z (R);Z_{DIGI} [cm];Q_{DIGI} [ADC counts]", 50, -260., 260., 0., 1024.);
238 "BtlHitTvsPhiL",
"BTL DIGI ToA vs #phi (L);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
240 "BtlHitTvsPhiR",
"BTL DIGI ToA vs #phi (R);#phi_{DIGI} [rad];ToA_{DIGI} [TDC counts]", 50, -3.15, 3.15, 0., 1024.);
242 "BtlHitTvsEtaL",
"BTL DIGI ToA vs #eta (L);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
244 "BtlHitTvsEtaR",
"BTL DIGI ToA vs #eta (R);#eta_{DIGI};ToA_{DIGI} [TDC counts]", 50, -1.55, 1.55, 0., 1024.);
246 "BtlHitTvsZL",
"BTL DIGI ToA vs Z (L);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
248 "BtlHitTvsZR",
"BTL DIGI ToA vs Z (R);Z_{DIGI} [cm];ToA_{DIGI} [TDC counts]", 50, -260., 260., 0., 1024.);
258 descriptions.
add(
"btlDigiHitsDefault", desc);
T getParameter(std::string const &) const
BtlDigiHitsValidation(const edm::ParameterSet &)
MonitorElement * meHitZ_[2]
CaloTopology const * topology(0)
MonitorElement * bookProfile(Args &&...args)
virtual const Topology & topology() const
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
void setCurrentFolder(std::string const &fullpath)
MonitorElement * meHitTvsEta_[2]
virtual const PixelTopology & specificTopology() const
MonitorElement * book1D(Args &&...args)
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 * book2D(Args &&...args)
MonitorElement * meHitTvsQ_[2]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meHitQvsZ_[2]
MonitorElement * meHitEta_[2]
MonitorElement * meHitPhi_[2]
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