test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  };
65 
67  DQMStore::IGetter& igetter,
68  const std::string& startDir,
69  const std::string& efficMEName,
70  const std::string& efficMETitle,
71  const std::string& recoMEName,
72  const std::string& simMEName,
73  const int type=1,
74  const bool makeProfile = false);
76  DQMStore::IGetter& igetter,
77  const std::string& startDir,
78  const std::string& fitMEPrefix, const std::string& fitMETitlePrefix,
79  const std::string& srcMEName);
80  void computeProfile(DQMStore::IBooker& ibooker,
81  DQMStore::IGetter& igetter,
82  const std::string& startDir,
83  const std::string& profileMEName, const std::string& profileMETitle,
84  const std::string& srcMEName);
85 
87  DQMStore::IGetter& igetter,
88  const std::string& startDir,
89  const std::string& histName,
90  const std::string& normHistName);
92  DQMStore::IGetter& igetter,
93  const std::string& startDir,
94  const std::string& cdName);
95 
96  void limitedFit(MonitorElement * srcME, MonitorElement * meanME, MonitorElement * sigmaME);
97 
98  private:
99  unsigned int verbose_;
102 
104  std::vector<std::string> subDirs_;
106 
107  std::vector<EfficOption> efficOptions_;
108  std::vector<ResolOption> resolOptions_;
109  std::vector<ProfileOption> profileOptions_;
110  std::vector<NormOption> normOptions_;
111  std::vector<CDOption> cdOptions_;
112 
113  void generic_eff (TH1 * denom, TH1 * numer, MonitorElement * efficiencyHist, const int type=1);
114 
116  DQMStore::IGetter& igetter,
118  std::set<std::string> * myList,
119  const TString& pattern);
120 
121 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
122 
123 #else
124  class TGraphAsymmErrorsWrapper : public TGraphAsymmErrors {
125  public:
126  std::pair<double, double> efficiency(int numerator, int denominator) {
127  double eff, low, high;
128  Efficiency(numerator, denominator, 0.683, eff, low, high);
129  double error = (eff - low > high - eff) ? eff - low : high - eff;
130  return std::pair<double, double>(eff, error);
131  }
132  };
133 #endif
134 
135 };
136 
137 #endif
138 
139 /* 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
list numerator
Definition: cuy.py:483
std::vector< ProfileOption > profileOptions_
std::vector< ResolOption > resolOptions_
list denominator
Definition: cuy.py:484
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)
void makeCumulativeDist(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &startDir, const std::string &cdName)
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_