1 #ifndef DQM_GEM_INTERFACE_GEMDQMBase_h 2 #define DQM_GEM_INTERFACE_GEMDQMBase_h 45 TString y_title =
"Entries") {
53 std::vector<double> &x_binning,
55 TString y_title =
"Entries") {
58 TH1F *h_obj =
new TH1F(
name,
title, x_binning.size() - 1, &x_binning[0]);
71 TString y_title =
"") {
88 TString y_title =
"") {
102 template <
class M,
class K>
108 GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX =
"", TString strTitleY =
"Entries")
122 TString strTitleX =
"",
123 TString strTitleY =
"Entries")
141 std::vector<Double_t> &x_binning,
142 TString strTitleX =
"",
143 TString strTitleY =
"Entries")
155 for (Int_t
i = 0;
i < (Int_t)x_binning.size();
i++)
168 TString strTitleX =
"",
169 TString strTitleY =
"")
199 TString strTitleX =
"",
200 TString strTitleY =
"")
313 strName_,
strTitle_,
nBinsX_,
dXL_,
dXH_,
nBinsY_,
dYL_,
dYH_,
dZL_,
dZH_,
strTitleX_,
strTitleY_);
331 <<
"WARNING: Cannot find the histogram corresponing to the given key\n";
349 if (histCurr ==
nullptr)
351 for (Int_t
i = 1;
i <= nNumBin;
i++) {
352 histCurr->
setBinLabel(
i, Form(
"%i", nIdxStart +
i - 1), nAxis);
371 if (histCurr ==
nullptr)
373 if (std::get<1>(
key) == 2) {
374 Int_t nNumVFATPerModule = 12;
375 if (nNumBin > nNumVFATPerModule) {
376 for (Int_t
i = 0;
i < nNumBin;
i++) {
377 Int_t nIModule =
i / nNumVFATPerModule + 1;
379 i + 1, Form((nAxis == 1 ?
"#splitline{%i}{M%i}" :
"%i (M%i)"),
i % nNumVFATPerModule, nIModule), nAxis);
382 for (Int_t
i = 0;
i < nNumBin;
i++) {
387 for (Int_t
i = 0;
i < nNumBin;
i++) {
389 histCurr->
setBinLabel(
i + 1, Form(
"%i (%i)",
i, nIEta), nAxis);
442 if ((unMask &
bits) != 0)
486 Int_t nNumEtaPartitions,
490 Int_t nMinIdxChamber,
491 Int_t nMaxIdxChamber)
609 template <
typename T>
610 inline bool checkRefs(
const std::vector<T *> &);
624 inline Float_t
restrictAngle(
const Float_t fTheta,
const Float_t fStart);
656 template <
typename T>
660 if (refs.front() ==
nullptr)
741 Float_t fLoop = (fTheta - fStart) / (2 *
M_PI);
742 int nLoop = (fLoop >= 0 ? (
int)fLoop : (
int)fLoop - 1);
743 return fTheta - nLoop * 2 *
M_PI;
748 char cRegion = (
keyToRegion(key3) > 0 ?
'P' :
'M');
750 return std::string(Form(
"GE%i1-%c-L%i", nStation, cRegion, nLayer));
755 char cRegion = (
keyToRegion(key4) > 0 ?
'P' :
'M');
759 return std::string(Form(
"GE%i1-%c-L%i-M%i", nStation, cRegion, nLayer, nModule));
761 return std::string(Form(
"GE%i1-%c-L%i", nStation, cRegion, nLayer));
766 char cRegion = (
keyToRegion(key4) > 0 ?
'P' :
'M');
768 return std::string(Form(
"GE%i1-%c-Ch%i", nStation, cRegion, nChamber));
770 #endif // DQM_GEM_INTERFACE_GEMDQMBase_h std::map< ME5IdsKey, bool > MEMap5WithChCheck_
virtual int ProcessWithMEMap2WithEtaCh(BookingHelper &bh, ME4IdsKey key)
void SetName(TString strName)
int keyToModule(ME4IdsKey key)
ME2IdsKey key3Tokey2(ME3IdsKey key)
std::map< ME3IdsKey, bool > MEMap2WithChCheck_
bool checkRefs(const std::vector< T *> &)
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
void SetBinLowEdgeZ(Double_t dZL)
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
int keyToChamber(ME3IdsKey key)
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
int getIdxModule(const int, const int)
virtual int ProcessWithMEMap4(BookingHelper &bh, ME4IdsKey key)
int getIEtaFromVFATGE0(const int vfat)
std::tuple< Int_t, Int_t, Int_t, Int_t, Int_t > ME5IdsKey
int keyToIEta(ME5IdsKey key)
std::vector< GEMDetId > listChamberId_
virtual int ProcessWithMEMap2AbsReWithEta(BookingHelper &bh, ME3IdsKey key)
int getVFATNumber(const int, const int, const int)
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1, Int_t nIdxStart=1)
int getVFATNumberByDigi(const int, const int, const int)
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
int getIEtaFromVFATGE21(const int vfat)
int initGeometry(edm::EventSetup const &iSetup)
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
int readGeometryRadiusInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
static const int maxVFatGE0_
BookingHelper(DQMStore::IBooker &ibooker, const TString &name_suffix, const TString &title_suffix)
Bool_t bIsNoUnderOverflowBin_
virtual int ProcessWithMEMap5WithChamber(BookingHelper &bh, ME5IdsKey key)
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, Int_t nBinsY, Double_t dYL, Double_t dYH, TString strTitleX="", TString strTitleY="")
static const int maxiEtaIdGE0_
int getNumModule(const int)
const TString name_suffix_
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
void SetBinHighEdgeZ(Double_t dZH)
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
int keyToRegion(ME2IdsKey key)
int readGeometryPhiInfoChamber(const GEMStation *station, MEStationInfo &stationInfo)
Double_t GetBinLowEdgeX()
void SetBinHighEdgeX(Double_t dXH)
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, TString strTitleX="", TString strTitleY="Entries")
static const int maxChan_
int keyToLayer(ME3IdsKey key)
Log< level::Error, false > LogError
std::vector< Float_t > listRadiusOddChamber_
int keyToStation(ME3IdsKey key)
int Fill(K key, Double_t x)
std::string log_category_
void SetTitleX(TString strTitleX)
int keyToRegion(ME5IdsKey key)
int SortingLayers(std::vector< ME4IdsKey > &listLayers)
std::map< ME3IdsKey, bool > MEMap2AbsReWithEtaCheck_
std::map< ME2IdsKey, bool > MEMap2Check_
virtual int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key)
Double_t GetBinLowEdgeY()
std::string log_category_own_
Double_t GetBinHighEdgeZ()
void SetBinLowEdgeX(Double_t dXL)
int keyToStation(ME5IdsKey key)
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
std::string getNameDirChamber(ME4IdsKey key4)
std::vector< Float_t > listRadiusEvenChamber_
std::map< ME3IdsKey, bool > MEMap3Check_
int keyToRegion(ME3IdsKey key)
int getIEtaFromVFATGE11(const int vfat)
DQMStore::IBooker * ibooker_
Float_t restrictAngle(const Float_t fTheta, const Float_t fStart)
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, std::vector< Double_t > &x_binning, TString strTitleX="", TString strTitleY="Entries")
int keyToRegion(ME4IdsKey key)
int getNumEtaPartitions(const GEMStation *)
static const int maxiEtaIdGE21_
virtual int ProcessWithMEMap2WithChamber(BookingHelper &bh, ME3IdsKey key)
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
virtual int ProcessWithMEMap5(BookingHelper &bh, ME5IdsKey key)
std::map< ME5IdsKey, bool > MEMap5Check_
void SetBinHighEdgeY(Double_t dYH)
key
prepare the HTCondor submission files and eventually submit them
MEMapInfT< MEMap2Ids, ME2IdsKey > MEMap2Inf
void SetNbinsY(Int_t nBinsY)
std::vector< double > x_binning_
int getMaxVFAT(const int)
std::map< ME4IdsKey, int > mapStationToIdx_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
int keyToStation(ME2IdsKey key)
void SetTitle(TString strTitle)
std::map< ME4IdsKey, bool > MEMap4Check_
int keyToStation(ME4IdsKey key)
virtual int ProcessWithMEMap4WithChamber(BookingHelper &bh, ME4IdsKey key)
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, TString strTitleX="", TString strTitleY="Entries")
Double_t GetBinHighEdgeX()
MEStationInfo(Int_t nRegion, Int_t nStation, Int_t nLayer, Int_t nNumChambers, Int_t nNumModules, Int_t nNumEtaPartitions, Int_t nMaxVFAT, Int_t nFirstStrip, Int_t nNumDigi, Int_t nMinIdxChamber, Int_t nMaxIdxChamber)
int keyToModule(ME5IdsKey key)
void SetOperating(Bool_t bOperating)
int keyToChamber(ME5IdsKey key)
const GEMGeometry * GEMGeometry_
int keyToIEta(ME4IdsKey key)
bool operator==(const MEStationInfo &other) const
void SetNoUnderOverflowBin()
MonitorElement * book1D(TString name, TString title, std::vector< double > &x_binning, TString x_title="", TString y_title="Entries")
int SetLabelForIEta(K key, Int_t nAxis, Int_t nNumBin=-1)
void SetTitleY(TString strTitleY)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::map< ME4IdsKey, bool > MEMap4WithChCheck_
int getDetOccXBin(const int, const int, const int)
virtual int ProcessWithMEMap2WithEta(BookingHelper &bh, ME3IdsKey key)
DQMStore::IBooker * getBooker()
const TString title_suffix_
int keyToChamber(ME4IdsKey key)
int getIEtaFromVFAT(const int station, const int vfat)
Double_t GetBinHighEdgeY()
int Fill(K key, Double_t x, Double_t y, Double_t w=1.0)
std::string getNameDirLayer(ME3IdsKey key3)
GEMDQMBase(const edm::ParameterSet &cfg)
std::map< ME3IdsKey, bool > MEMap2WithEtaCheck_
int bookND(BookingHelper &bh, K key)
ME3IdsKey key4Tokey3(ME4IdsKey key)
std::map< GEMDetId, std::vector< const GEMEtaPartition * > > mapEtaPartition_
MonitorElement * bookProfile2D(TString name, TString title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, double zlow, double zup, TString x_title="", TString y_title="")
MonitorElement * book1D(TString name, TString title, int nbinsx, double xlow, double xup, TString x_title="", TString y_title="Entries")
std::map< ME4IdsKey, bool > MEMap2WithEtaChCheck_
static const int maxiEtaIdGE11_
MEMapInfT< MEMap5Ids, ME5IdsKey > MEMap5Inf
void SetNbinsX(Int_t nBinsX)
static const int maxVFatGE21_
int getVFATNumberGE11(const int, const int, const int)
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
void SetProfile(Bool_t bIsProfile)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int keyToLayer(ME4IdsKey key)
MonitorElement * book2D(TString name, TString title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, TString x_title="", TString y_title="")
int FillBits(K key, Double_t x, UInt_t bits, Double_t w=1.0)
int keyToLayer(ME5IdsKey key)
Double_t GetBinLowEdgeZ()
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
dqm::impl::MonitorElement * FindHist(K key)
static const int maxVFatGE11_
MEMapInfT(GEMDQMBase *pDQMBase, TString strName, TString strTitle, Int_t nBinsX, Double_t dXL, Double_t dXH, Int_t nBinsY, Double_t dYL, Double_t dYH, Double_t dZL, Double_t dZH, TString strTitleX="", TString strTitleY="")
ME4IdsKey key5Tokey4(ME5IdsKey key)
void SetBinLowEdgeY(Double_t dYL)
virtual int ProcessWithMEMap2(BookingHelper &bh, ME2IdsKey key)