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";
85 descriptions.
add(
"GEMDQMSourceDigi", desc);
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;
99 if (ch.id() == sch->chamber(
l + 1)->id())
104 gemChambers_.push_back(*sch->chamber(
l + 1));
108 ibooker.setCurrentFolder(
"GEM/digi");
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);
132 if (GEMGeometry_ ==
nullptr)
136 event.getByToken(this->
tagDigi_, gemDigis);
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());
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const GEMGeometry * initGeometry(edm::EventSetup const &iSetup)
#define DEFINE_FWK_MODULE(type)
std::vector< GEMChamber > gemChambers_
int findVFAT(float min_, float max_, float x_, int roll_)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const GEMGeometry * GEMGeometry_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
std::unordered_map< UInt_t, MonitorElement * > Digi_1D_
~GEMDQMSourceDigi() override
std::unordered_map< UInt_t, MonitorElement * > BxVsVFAT
GEMDQMSourceDigi(const edm::ParameterSet &cfg)
std::unordered_map< UInt_t, MonitorElement * > Digi_2D_