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 
50  struct NormOption
51  {
53  };
54 
55  struct CDOption
56  {
58  };
59 
61  DQMStore::IGetter& igetter,
62  const std::string& startDir,
63  const std::string& efficMEName,
64  const std::string& efficMETitle,
65  const std::string& recoMEName,
66  const std::string& simMEName,
67  const int type=1,
68  const bool makeProfile = false);
70  DQMStore::IGetter& igetter,
71  const std::string& startDir,
72  const std::string& fitMEPrefix, const std::string& fitMETitlePrefix,
73  const std::string& srcMEName);
74 
76  DQMStore::IGetter& igetter,
77  const std::string& startDir,
78  const std::string& histName,
79  const std::string& normHistName);
81  DQMStore::IGetter& igetter,
82  const std::string& startDir,
83  const std::string& cdName);
84 
85  void limitedFit(MonitorElement * srcME, MonitorElement * meanME, MonitorElement * sigmaME);
86 
87  private:
88  unsigned int verbose_;
91 
93  std::vector<std::string> subDirs_;
95 
96  std::vector<EfficOption> efficOptions_;
97  std::vector<ResolOption> resolOptions_;
98  std::vector<NormOption> normOptions_;
99  std::vector<CDOption> cdOptions_;
100 
101  void generic_eff (TH1 * denom, TH1 * numer, MonitorElement * efficiencyHist, const int type=1);
102 
104  DQMStore::IGetter& igetter,
106  std::set<std::string> * myList,
107  const TString& pattern);
108 
109 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
110 
111 #else
112  class TGraphAsymmErrorsWrapper : public TGraphAsymmErrors {
113  public:
114  std::pair<double, double> efficiency(int numerator, int denominator) {
115  double eff, low, high;
116  Efficiency(numerator, denominator, 0.683, eff, low, high);
117  double error = (eff - low > high - eff) ? eff - low : high - eff;
118  return std::pair<double, double>(eff, error);
119  }
120  };
121 #endif
122 
123 };
124 
125 #endif
126 
127 /* 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< 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)
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_