CMS 3D CMS Logo

DQMGenericClient.h
Go to the documentation of this file.
1 #ifndef DQMServices_ClientConfig_DQMGenericClient_H
2 #define DQMServices_ClientConfig_DQMGenericClient_H
3 
4 /*
5  * Class:DQMGenericClient
6  *
7  * DQM histogram post processor
8  *
9  *
10  * \author Junghwan Goh - SungKyunKwan University
11  */
12 
15 #include <set>
16 #include <string>
17 #include <vector>
18 #include <TH1.h>
19 #include <RVersion.h>
20 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
21 #include <TEfficiency.h>
22 #else
23 #include <TGraphAsymmErrors.h>
24 #endif
25 
26 class MonitorElement;
27 
29 {
30  public:
33 
34  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
35 
36  struct EfficOption
37  {
40  int type;
41  bool isProfile;
42  };
43 
44  struct ResolOption
45  {
48  };
49 
51  {
54  };
55 
56  struct NormOption
57  {
59  };
60 
61  struct CDOption
62  {
64  bool ascending;
65  };
66 
68  DQMStore::IGetter& igetter,
69  const std::string& startDir,
70  const std::string& efficMEName,
71  const std::string& efficMETitle,
72  const std::string& recoMEName,
73  const std::string& simMEName,
74  const int type=1,
75  const bool makeProfile = false);
77  DQMStore::IGetter& igetter,
78  const std::string& startDir,
79  const std::string& fitMEPrefix, const std::string& fitMETitlePrefix,
80  const std::string& srcMEName);
81  void computeProfile(DQMStore::IBooker& ibooker,
82  DQMStore::IGetter& igetter,
83  const std::string& startDir,
84  const std::string& profileMEName, const std::string& profileMETitle,
85  const std::string& srcMEName);
86 
88  DQMStore::IGetter& igetter,
89  const std::string& startDir,
90  const std::string& histName,
91  const std::string& normHistName);
93  DQMStore::IGetter& igetter,
94  const std::string& startDir,
95  const std::string& cdName,
96  bool ascending=true);
97 
98  void limitedFit(MonitorElement * srcME, MonitorElement * meanME, MonitorElement * sigmaME);
99 
100  private:
101  unsigned int verbose_;
104 
106  std::vector<std::string> subDirs_;
108 
109  std::vector<EfficOption> efficOptions_;
110  std::vector<ResolOption> resolOptions_;
111  std::vector<ProfileOption> profileOptions_;
112  std::vector<NormOption> normOptions_;
113  std::vector<CDOption> cdOptions_;
114 
115  void generic_eff (TH1 * denom, TH1 * numer, MonitorElement * efficiencyHist, const int type=1);
116 
118  DQMStore::IGetter& igetter,
120  std::set<std::string> * myList,
121  const TString& pattern);
122 
123 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
124 
125 #else
126  class TGraphAsymmErrorsWrapper : public TGraphAsymmErrors {
127  public:
128  std::pair<double, double> efficiency(int numerator, int denominator) {
129  double eff, low, high;
130  Efficiency(numerator, denominator, 0.683, eff, low, high);
131  double error = (eff - low > high - eff) ? eff - low : high - eff;
132  return std::pair<double, double>(eff, error);
133  }
134  };
135 #endif
136 
137 };
138 
139 #endif
140 
141 /* vim:set ts=2 sts=2 sw=2 expandtab: */
std::vector< EfficOption > efficOptions_
type
Definition: HCALResponse.h:21
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::vector< ProfileOption > profileOptions_
void makeCumulativeDist(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &cdName, bool ascending=true)
std::vector< ResolOption > resolOptions_
std::vector< std::string > subDirs_
void normalizeToEntries(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &histName, const std::string &normHistName)
void computeResolution(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &fitMEPrefix, const std::string &fitMETitlePrefix, const std::string &srcMEName)
std::string outputFileName_
void findAllSubdirectories(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string dir, std::set< std::string > *myList, const TString &pattern)
unsigned int verbose_
std::vector< CDOption > cdOptions_
void computeEfficiency(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &efficMEName, const std::string &efficMETitle, const std::string &recoMEName, const std::string &simMEName, const int type=1, const bool makeProfile=false)
DQMGenericClient(const edm::ParameterSet &pset)
void computeProfile(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &profileMEName, const std::string &profileMETitle, const std::string &srcMEName)
dbl *** dir
Definition: mlp_gen.cc:35
void limitedFit(MonitorElement *srcME, MonitorElement *meanME, MonitorElement *sigmaME)
void generic_eff(TH1 *denom, TH1 *numer, MonitorElement *efficiencyHist, const int type=1)
std::vector< NormOption > normOptions_