Skip to content

Commit

Permalink
Merge pull request #37995 from quark2/GEM-onlineDQMFixOnGE21GE0-12_5_X
Browse files Browse the repository at this point in the history
[GEM] add DQM plots for GE21/GE0 and Fix on massive LogWarnings
  • Loading branch information
cmsbuild authored May 25, 2022
2 parents 159ceb6 + 6cd7be1 commit 8ea0fcd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
26 changes: 20 additions & 6 deletions DQM/GEM/interface/GEMDQMBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,9 @@ class GEMDQMBase : public DQMEDAnalyzer {
inline int getVFATNumberGE11(const int, const int, const int);
inline int getVFATNumberByDigi(const int, const int, const int);
inline int getIEtaFromVFAT(const int station, const int vfat);
inline int getIEtaFromVFATGE0(const int vfat);
inline int getIEtaFromVFATGE11(const int vfat);
inline int getIEtaFromVFATGE21(const int vfat);
inline int getMaxVFAT(const int);
inline int getDetOccXBin(const int, const int, const int);
inline Float_t restrictAngle(const Float_t fTheta, const Float_t fStart);
Expand All @@ -583,10 +585,6 @@ class GEMDQMBase : public DQMEDAnalyzer {
int nMaxNumCh_;
std::map<ME3IdsKey, int> mapStationToIdx_;
std::map<ME3IdsKey, MEStationInfo> mapStationInfo_;

Int_t nNumEtaPartitionGE0_;
Int_t nNumEtaPartitionGE11_;
Int_t nNumEtaPartitionGE21_;
};

// Borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
Expand All @@ -601,6 +599,8 @@ inline bool GEMDQMBase::checkRefs(const std::vector<T *> &refs) {

// The 'get...' functions in the below are borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
inline int GEMDQMBase::getMaxVFAT(const int station) {
if (station == 0)
return GEMeMap::maxVFatGE0_;
if (station == 1)
return GEMeMap::maxVFatGE11_;
else if (station == 2)
Expand All @@ -616,7 +616,7 @@ inline int GEMDQMBase::getVFATNumber(const int station, const int ieta, const in
}

inline int GEMDQMBase::getVFATNumberGE11(const int station, const int ieta, const int vfat_phi) {
return vfat_phi * nNumEtaPartitionGE11_ + (nNumEtaPartitionGE11_ - ieta);
return vfat_phi * GEMeMap::maxiEtaIdGE11_ + (GEMeMap::maxiEtaIdGE11_ - ieta);
}

inline int GEMDQMBase::getVFATNumberByDigi(const int station, const int ieta, const int digi) {
Expand All @@ -625,12 +625,26 @@ inline int GEMDQMBase::getVFATNumberByDigi(const int station, const int ieta, co
}

inline int GEMDQMBase::getIEtaFromVFAT(const int station, const int vfat) {
if (station == 0)
return getIEtaFromVFATGE0(vfat);
if (station == 1)
return getIEtaFromVFATGE11(vfat);
if (station == 2)
return getIEtaFromVFATGE21(vfat);
return getIEtaFromVFATGE11(vfat); // FIXME: What about GE21 and GE0?
}

inline int GEMDQMBase::getIEtaFromVFATGE11(const int vfat) { return 8 - (vfat % nNumEtaPartitionGE11_); }
inline int GEMDQMBase::getIEtaFromVFATGE0(const int vfat) {
return GEMeMap::maxiEtaIdGE0_ - (vfat % GEMeMap::maxiEtaIdGE0_);
}

inline int GEMDQMBase::getIEtaFromVFATGE11(const int vfat) {
return GEMeMap::maxiEtaIdGE11_ - (vfat % GEMeMap::maxiEtaIdGE11_);
}

inline int GEMDQMBase::getIEtaFromVFATGE21(const int vfat) {
return GEMeMap::maxiEtaIdGE21_ - (vfat % GEMeMap::maxiEtaIdGE21_);
}

inline int GEMDQMBase::getDetOccXBin(const int chamber, const int layer, const int n_chambers) {
return n_chambers * (chamber - 1) + layer;
Expand Down
12 changes: 0 additions & 12 deletions DQM/GEM/src/GEMDQMBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ GEMDQMBase::GEMDQMBase(const edm::ParameterSet& cfg) : geomToken_(esConsumes<edm
}

log_category_ = cfg.getUntrackedParameter<std::string>("logCategory");

nNumEtaPartitionGE0_ = 0;
nNumEtaPartitionGE11_ = 0;
nNumEtaPartitionGE21_ = 0;
}

int GEMDQMBase::initGeometry(edm::EventSetup const& iSetup) {
Expand Down Expand Up @@ -110,13 +106,6 @@ int GEMDQMBase::loadChambers() {
}
}

if (mapStationInfo_.find(ME3IdsKey(-1, 0, 1)) != mapStationInfo_.end())
nNumEtaPartitionGE0_ = mapStationInfo_[ME3IdsKey(-1, 0, 1)].nNumEtaPartitions_;
if (mapStationInfo_.find(ME3IdsKey(-1, 1, 1)) != mapStationInfo_.end())
nNumEtaPartitionGE11_ = mapStationInfo_[ME3IdsKey(-1, 1, 1)].nNumEtaPartitions_;
if (mapStationInfo_.find(ME3IdsKey(-1, 2, 1)) != mapStationInfo_.end())
nNumEtaPartitionGE21_ = mapStationInfo_[ME3IdsKey(-1, 2, 1)].nNumEtaPartitions_;

return 0;
}

Expand Down Expand Up @@ -301,7 +290,6 @@ int GEMDQMBase::readGeometryRadiusInfoChamber(const GEMStation* station, MEStati

int GEMDQMBase::readGeometryPhiInfoChamber(const GEMStation* station, MEStationInfo& stationInfo) {
auto listSuperChambers = station->superChambers();
//Int_t nNumStripVFAT = stationInfo.nNumDigi_ / ( stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_ );
Int_t nNumStripEta = stationInfo.nNumDigi_ * (stationInfo.nMaxVFAT_ / stationInfo.nNumEtaPartitions_);

std::vector<std::pair<Int_t, std::pair<std::pair<Float_t, Float_t>, Bool_t>>> listDivPhi;
Expand Down

0 comments on commit 8ea0fcd

Please sign in to comment.