File indexing completed on 2024-04-06 12:07:24
0001 #ifndef DQM_GEM_GEMDQMEfficiencyClientBase_h
0002 #define DQM_GEM_GEMDQMEfficiencyClientBase_h
0003
0004
0005
0006
0007
0008
0009 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0010 #include "DQMServices/Core/interface/DQMStore.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0013
0014 class GEMDQMEfficiencyClientBase : public DQMEDHarvester {
0015 public:
0016 using MEPair = std::pair<const MonitorElement*, const MonitorElement*>;
0017
0018 GEMDQMEfficiencyClientBase(const edm::ParameterSet&);
0019
0020 std::tuple<bool, std::string, std::string, bool> parseEfficiencySourceName(std::string);
0021 GEMDetId parseGEMLabel(const std::string, const std::string delimiter = "-");
0022
0023 std::map<std::string, MEPair> makeEfficiencySourcePair(DQMStore::IBooker&,
0024 DQMStore::IGetter&,
0025 const std::string&,
0026 const std::string prefix = "");
0027 void setBins(TH1F*, const TAxis*);
0028 TH1F* projectHistogram(const TH2F*, const unsigned int);
0029 bool checkConsistency(const TH1&, const TH1&);
0030 TH1F* makeEfficiency(const TH1F*, const TH1F*, const char* name = nullptr, const char* title = nullptr);
0031 TH2F* makeEfficiency(const TH2F*, const TH2F*, const char* name = nullptr, const char* title = nullptr);
0032 void bookEfficiencyAuto(DQMStore::IBooker&, DQMStore::IGetter&, const std::string&);
0033
0034 const double kConfidenceLevel_;
0035 const std::string kLogCategory_;
0036 };
0037
0038 #endif