Skip to content

Commit

Permalink
Merge pull request #33193 from quark2/GEMonlineDQM_PR_113X
Browse files Browse the repository at this point in the history
Fix on the indexing of VFATs in GEM onlineDQM
  • Loading branch information
cmsbuild committed Mar 17, 2021
2 parents 53893ec + f051705 commit 709c175
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DQM/GEM/interface/GEMDQMBase.h
Expand Up @@ -446,7 +446,7 @@ inline int GEMDQMBase::getVFATNumberGE11(const int station, const int ieta, cons
}

inline int GEMDQMBase::getVFATNumberByStrip(const int station, const int ieta, const int strip) {
const int vfat_phi = (strip % GEMeMap::maxChan_) ? strip / GEMeMap::maxChan_ + 1 : strip / GEMeMap::maxChan_;
const int vfat_phi = (strip % GEMeMap::maxChan_) ? strip / GEMeMap::maxChan_ : strip / GEMeMap::maxChan_ - 1;
return getVFATNumber(station, ieta, vfat_phi);
}

Expand Down
2 changes: 1 addition & 1 deletion DQM/GEM/plugins/GEMDAQStatusSource.cc
Expand Up @@ -393,7 +393,7 @@ void GEMDAQStatusSource::analyze(edm::Event const &event, edm::EventSetup const
mapChamberStatus[key4Ch] = false;
}

Int_t nIdxVFAT = getVFATNumber(gid.station(), gid.roll(), vfatStat->phi() + 1);
Int_t nIdxVFAT = getVFATNumber(gid.station(), gid.roll(), vfatStat->phi());
mapStatusVFAT_.FillBits(key3, nIdxVFAT, unQFVFAT);
mapStatusVFATPerCh_.FillBits(key4Ch, nIdxVFAT, unQFVFAT);
}
Expand Down
9 changes: 9 additions & 0 deletions DQM/GEM/plugins/GEMDigiSource.cc
Expand Up @@ -16,6 +16,8 @@

#include "DataFormats/GEMDigi/interface/GEMDigiCollection.h"

#include "DataFormats/Scalers/interface/LumiScalers.h"

#include "DQM/GEM/interface/GEMDQMBase.h"

#include <string>
Expand All @@ -39,6 +41,8 @@ class GEMDigiSource : public GEMDQMBase {

edm::EDGetToken tagDigi_;

edm::EDGetTokenT<LumiScalersCollection> lumiScalers_;

MEMap3Inf mapTotalDigi_layer_;
MEMap3Inf mapStripOcc_ieta_;
MEMap3Inf mapStripOcc_phi_;
Expand All @@ -58,6 +62,8 @@ using namespace edm;

GEMDigiSource::GEMDigiSource(const edm::ParameterSet& cfg) : GEMDQMBase(cfg) {
tagDigi_ = consumes<GEMDigiCollection>(cfg.getParameter<edm::InputTag>("digisInputLabel"));
lumiScalers_ = consumes<LumiScalersCollection>(
cfg.getUntrackedParameter<edm::InputTag>("lumiCollection", edm::InputTag("scalersRawToDigi")));
}

void GEMDigiSource::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
Expand Down Expand Up @@ -161,6 +167,9 @@ int GEMDigiSource::ProcessWithMEMap3WithChamber(BookingHelper& bh, ME4IdsKey key
void GEMDigiSource::analyze(edm::Event const& event, edm::EventSetup const& eventSetup) {
edm::Handle<GEMDigiCollection> gemDigis;
event.getByToken(this->tagDigi_, gemDigis);
edm::Handle<LumiScalersCollection> lumiScalers;
event.getByToken(lumiScalers_, lumiScalers);

std::map<ME3IdsKey, Int_t> total_strip_layer;
for (const auto& ch : gemChambers_) {
GEMDetId gid = ch.id();
Expand Down

0 comments on commit 709c175

Please sign in to comment.