39 int findVFAT(
float min_,
float max_,
float x_,
int roll_);
45 std::unordered_map<UInt_t, MonitorElement*>
Digi_2D_;
46 std::unordered_map<UInt_t, MonitorElement*>
Digi_1D_;
47 std::unordered_map<UInt_t, MonitorElement*>
BxVsVFAT;
54 float step = max_ / 3;
55 if (x_ < (min_ +
step)) {
57 }
else if (x_ < (min_ + 2 *
step)) {
69 GEMGeometry_ = &*hGeom;
71 edm::LogError(
"MuonGEMBaseValidation") <<
"+++ Error : GEM geometry is unavailable on event loop. +++\n";
79 tagDigi_ = consumes<GEMDigiCollection>(
cfg.getParameter<
edm::InputTag>(
"digisInputLabel"));
85 descriptions.
add(
"GEMDQMSourceDigi",
desc);
89 GEMGeometry_ = initGeometry(iSetup);
90 if (GEMGeometry_ ==
nullptr)
93 const std::vector<const GEMSuperChamber*>& superChambers_ = GEMGeometry_->superChambers();
94 for (
auto sch : superChambers_) {
95 int n_lay = sch->nChambers();
96 for (
int l = 0;
l < n_lay;
l++) {
97 Bool_t bExist =
false;
98 for (
const auto& ch : gemChambers_)
99 if (ch.id() == sch->chamber(
l + 1)->id())
104 gemChambers_.push_back(*sch->chamber(
l + 1));
109 for (
const auto& ch : gemChambers_) {
113 to_string(gid.
station()) +
"_" + to_string(gid.
layer());
115 to_string(gid.
station()) +
"/" + to_string(gid.
layer());
117 string hName_digi =
"Digi_Strips_" + strIdxName;
118 string hTitle_digi =
"Digi Strip " + strIdxTitle;
119 string hAxis_digi =
";Strip;iEta";
120 Digi_2D_[ch.id()] = ibooker.
book2D(hName_digi, hTitle_digi + hAxis_digi, 384, 1, 385, 8, 0.5, 8.5);
121 Digi_1D_[ch.id()] = ibooker.
book1D(hName_digi +
"_VFAT", hTitle_digi +
" VFAT" + hAxis_digi, 24, 0, 24);
123 string hNameBx =
"bx_vs_VFAT_" + strIdxName;
124 string hTitleBx =
"bx vs VFAT " + strIdxTitle;
125 hTitleBx +=
";Bunch crossing;VFAT";
126 BxVsVFAT[ch.id()] = ibooker.
book2D(hNameBx, hTitleBx, 10, -5, 5, 24, 0, 24);
131 const GEMGeometry* GEMGeometry_ = initGeometry(eventSetup);
132 if (GEMGeometry_ ==
nullptr)
136 event.getByToken(this->tagDigi_, gemDigis);
137 for (
const auto& ch : gemChambers_) {
139 for (
auto roll : ch.etaPartitions()) {
141 const auto& digis_in_det = gemDigis->get(rId);
142 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
143 auto nVFAT = findVFAT(1, roll->nstrips(),
d->strip(), rId.
roll());
144 Digi_2D_[cId]->Fill(
d->strip(), rId.
roll());
145 Digi_1D_[cId]->Fill(nVFAT);
146 BxVsVFAT[cId]->Fill(
d->bx(), nVFAT);