Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13_2_X] Change of GE21 layouts and plots, and VFAT status with VFAT mask and missing VFATs #42483

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions DQM/GEM/interface/GEMDAQStatusSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ class GEMDAQStatusSource : public GEMDQMBase {
bErr = true;
};

void FillStatusSummaryPlot(std::map<ME4IdsKey, bool> &mapChamber,
void FillStatusSummaryPlot(std::map<ME5IdsKey, bool> &mapChamber,
MonitorElement *h2Plot,
std::map<ME4IdsKey, bool> *pmapSummary = nullptr) {
for (auto const &[key4, bFlag] : mapChamber) { // bFlag is not used
ME3IdsKey key3 = key4Tokey3(key4);
Int_t nChamber = keyToChamber(key4);
h2Plot->Fill(nChamber, mapStationToIdx_[key3]);
std::map<ME5IdsKey, bool> *pmapSummary = nullptr) {
for (auto const &[key5, bFlag] : mapChamber) { // bFlag is not used
ME4IdsKey key4 = key5Tokey4(key5);
Int_t nChamber = keyToChamber(key5);
h2Plot->Fill(nChamber, mapStationToIdx_[key4]);
if (pmapSummary != nullptr)
(*pmapSummary)[key4] = true;
(*pmapSummary)[key5] = true;
}
};

private:
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override;
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override;
int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) override;
int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key) override;

void SetLabelAMC13Status(MonitorElement *h2Status);
void SetLabelAMCStatus(MonitorElement *h2Status);
Expand All @@ -80,12 +80,12 @@ class GEMDAQStatusSource : public GEMDQMBase {

MonitorElement *h2AMC13Status_;

MEMap3Inf mapStatusOH_;
MEMap3Inf mapStatusVFAT_;
MEMap4Inf mapStatusOH_;
MEMap4Inf mapStatusVFAT_;

MEMap3Inf mapStatusWarnVFATPerLayer_;
MEMap3Inf mapStatusErrVFATPerLayer_;
MEMap4Inf mapStatusVFATPerCh_;
MEMap4Inf mapStatusWarnVFATPerLayer_;
MEMap4Inf mapStatusErrVFATPerLayer_;
MEMap5Inf mapStatusVFATPerCh_;

MonitorElement *h2SummaryStatusAll;
MonitorElement *h2SummaryStatusWarning;
Expand All @@ -111,11 +111,12 @@ class GEMDAQStatusSource : public GEMDQMBase {
std::map<int, std::vector<GEMDetId>> mapAMC13ToListChamber_;
std::map<std::tuple<int, int>, std::vector<GEMDetId>> mapAMCToListChamber_;
Int_t nAMCSlots_;
Bool_t useDBEMap_;

int nBitAMC13_ = 10;
int nBitAMC_ = 12;
int nBitOH_ = 17;
int nBitVFAT_ = 7;
int nBitOH_ = 18;
int nBitVFAT_ = 8;
};

#endif // DQM_GEM_INTERFACE_GEMDAQStatusSource_h
48 changes: 35 additions & 13 deletions DQM/GEM/interface/GEMDQMBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class GEMDQMBase : public DQMEDAnalyzer {
return mapHist[key];
};

int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin = -1, Int_t nIdxStart = 1, Int_t nNumModules = 1) {
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin = -1, Int_t nIdxStart = 1) {
if (!bOperating_)
return 0;
if (nNumBin <= 0) {
Expand All @@ -349,13 +349,7 @@ class GEMDQMBase : public DQMEDAnalyzer {
if (histCurr == nullptr)
return -999;
for (Int_t i = 1; i <= nNumBin; i++) {
Int_t nIdxCh = (nIdxStart + i - 2) / nNumModules + 1;
Int_t nIdxMod = (nIdxStart + i - 2) % nNumModules + 1;
if (nNumModules > 1) {
histCurr->setBinLabel(i, Form("#splitline{%i}{M%i}", nIdxCh, nIdxMod), nAxis);
} else {
histCurr->setBinLabel(i, Form("%i", nIdxStart + i - 1), nAxis);
}
histCurr->setBinLabel(i, Form("%i", nIdxStart + i - 1), nAxis);
}
return 0;
};
Expand Down Expand Up @@ -479,6 +473,7 @@ class GEMDQMBase : public DQMEDAnalyzer {
typedef MEMapInfT<MEMap2Ids, ME2IdsKey> MEMap2Inf;
typedef MEMapInfT<MEMap3Ids, ME3IdsKey> MEMap3Inf;
typedef MEMapInfT<MEMap4Ids, ME4IdsKey> MEMap4Inf;
typedef MEMapInfT<MEMap5Ids, ME5IdsKey> MEMap5Inf;

class MEStationInfo {
public:
Expand Down Expand Up @@ -561,19 +556,27 @@ class GEMDQMBase : public DQMEDAnalyzer {
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap5(BookingHelper &bh, ME5IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap4WithChamber(BookingHelper &bh, ME4IdsKey key) { return 0; }; // must be overrided
virtual int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key) { return 0; }; // must be overrided

int keyToRegion(ME2IdsKey key) { return std::get<0>(key); };
int keyToRegion(ME3IdsKey key) { return std::get<0>(key); };
int keyToRegion(ME4IdsKey key) { return std::get<0>(key); };
int keyToRegion(ME5IdsKey key) { return std::get<0>(key); };
int keyToStation(ME2IdsKey key) { return std::get<1>(key); };
int keyToStation(ME3IdsKey key) { return std::get<1>(key); };
int keyToStation(ME4IdsKey key) { return std::get<1>(key); };
int keyToStation(ME5IdsKey key) { return std::get<1>(key); };
int keyToLayer(ME3IdsKey key) { return std::get<2>(key); };
int keyToLayer(ME4IdsKey key) { return std::get<2>(key); };
int keyToLayer(ME5IdsKey key) { return std::get<2>(key); };
int keyToModule(ME4IdsKey key) { return std::get<3>(key); };
int keyToModule(ME5IdsKey key) { return std::get<3>(key); };
int keyToChamber(ME4IdsKey key) { return std::get<3>(key); };
int keyToIEta(ME3IdsKey key) { return std::get<2>(key); };
int keyToChamber(ME5IdsKey key) { return std::get<4>(key); };
int keyToIEta(ME4IdsKey key) { return std::get<3>(key); };
int keyToIEta(ME5IdsKey key) { return std::get<4>(key); };

ME2IdsKey key3Tokey2(ME3IdsKey key) {
auto keyNew = ME2IdsKey{keyToRegion(key), keyToStation(key)};
Expand All @@ -585,7 +588,12 @@ class GEMDQMBase : public DQMEDAnalyzer {
return keyNew;
};

int SortingLayers(std::vector<ME3IdsKey> &listLayers);
ME4IdsKey key5Tokey4(ME5IdsKey key) {
auto keyNew = ME4IdsKey{keyToRegion(key), keyToStation(key), keyToLayer(key), keyToModule(key)};
return keyNew;
};

int SortingLayers(std::vector<ME4IdsKey> &listLayers);
dqm::impl::MonitorElement *CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName);

template <typename T>
Expand All @@ -605,6 +613,7 @@ class GEMDQMBase : public DQMEDAnalyzer {
inline int getDetOccXBin(const int, const int, const int);
inline Float_t restrictAngle(const Float_t fTheta, const Float_t fStart);
inline std::string getNameDirLayer(ME3IdsKey key3);
inline std::string getNameDirLayer(ME4IdsKey key4);

const GEMGeometry *GEMGeometry_;
edm::ESGetToken<GEMGeometry, MuonGeometryRecord> geomToken_;
Expand All @@ -616,12 +625,14 @@ class GEMDQMBase : public DQMEDAnalyzer {
std::map<ME3IdsKey, bool> MEMap2WithEtaCheck_;
std::map<ME3IdsKey, bool> MEMap2AbsReWithEtaCheck_;
std::map<ME3IdsKey, bool> MEMap3Check_;
std::map<ME4IdsKey, bool> MEMap3WithChCheck_;
std::map<ME4IdsKey, bool> MEMap4Check_;
std::map<ME4IdsKey, bool> MEMap4WithChCheck_;
std::map<ME5IdsKey, bool> MEMap5WithChCheck_;
std::map<ME5IdsKey, bool> MEMap5Check_;

int nMaxNumCh_;
std::map<ME3IdsKey, int> mapStationToIdx_;
std::map<ME3IdsKey, MEStationInfo> mapStationInfo_;
std::map<ME4IdsKey, int> mapStationToIdx_;
};

// Borrwed from DQM/GEM/interface/GEMOfflineDQMBase.h
Expand Down Expand Up @@ -722,4 +733,15 @@ inline std::string GEMDQMBase::getNameDirLayer(ME3IdsKey key3) {
return std::string(Form("GE%i1-%c-L%i", nStation, cRegion, nLayer));
}

inline std::string GEMDQMBase::getNameDirLayer(ME4IdsKey key4) {
auto nStation = keyToStation(key4);
char cRegion = (keyToRegion(key4) > 0 ? 'P' : 'M');
auto nLayer = keyToLayer(key4);
if (nStation == 2) {
auto nModule = keyToModule(key4);
return std::string(Form("GE%i1-%c-L%i-M%i", nStation, cRegion, nLayer, nModule));
}
return std::string(Form("GE%i1-%c-L%i", nStation, cRegion, nLayer));
}

#endif // DQM_GEM_INTERFACE_GEMDQMBase_h
16 changes: 10 additions & 6 deletions DQM/GEM/interface/GEMDigiSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class GEMDigiSource : public GEMDQMBase {
int ProcessWithMEMap2WithEta(BookingHelper& bh, ME3IdsKey key) override;
int ProcessWithMEMap2(BookingHelper& bh, ME2IdsKey key) override;
int ProcessWithMEMap3(BookingHelper& bh, ME3IdsKey key) override;
int ProcessWithMEMap3WithChamber(BookingHelper& bh, ME4IdsKey key) override;
int ProcessWithMEMap4(BookingHelper& bh, ME4IdsKey key) override;
int ProcessWithMEMap5WithChamber(BookingHelper& bh, ME5IdsKey key) override;

const static int nNumBitDigiOcc_ = 16384;

Expand All @@ -59,18 +60,21 @@ class GEMDigiSource : public GEMDQMBase {
std::map<ME4IdsKey, Int_t> mapChamberType_;
std::map<ME3IdsKey, Int_t> mapStripToVFAT_;

MEMap3Inf mapTotalDigi_layer_;
MEMap3Inf mapDigiWheel_layer_;
MEMap3Inf mapDigiOcc_ieta_;
MEMap3Inf mapDigiOcc_phi_;
MEMap3Inf mapTotalDigiPerEvtLayer_;

MEMap4Inf mapTotalDigi_layer_;
MEMap4Inf mapDigiOcc_ieta_;
MEMap4Inf mapDigiOcc_phi_;
MEMap4Inf mapTotalDigiPerEvtLayer_;
MEMap3Inf mapTotalDigiPerEvtIEta_;
MEMap2Inf mapBX_;

MEMap4Inf mapDigiOccPerCh_;
MEMap5Inf mapDigiOccPerCh_;

std::string strFolderMain_;

Bool_t useDBEMap_;

Int_t nBXMin_, nBXMax_;
Float_t fRadiusMin_;
Float_t fRadiusMax_;
Expand Down
2 changes: 1 addition & 1 deletion DQM/GEM/interface/GEMRecHitSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GEMRecHitSource : public GEMDQMBase {
int ProcessWithMEMap2WithEta(BookingHelper& bh, ME3IdsKey key) override;
int ProcessWithMEMap2AbsReWithEta(BookingHelper& bh, ME3IdsKey key) override;
int ProcessWithMEMap3(BookingHelper& bh, ME3IdsKey key) override;
int ProcessWithMEMap3WithChamber(BookingHelper& bh, ME4IdsKey key) override;
int ProcessWithMEMap4WithChamber(BookingHelper& bh, ME4IdsKey key) override;

edm::EDGetToken tagRecHit_;

Expand Down
Loading