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 DQMStore;
27 class MonitorElement;
28 
30 {
31  public:
34 
35  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) {};
36  void endJob();
37 
39  void endRun(const edm::Run& r, const edm::EventSetup& c);
40 
41  struct EfficOption
42  {
45  int type;
46  bool isProfile;
47  };
48 
49  struct ResolOption
50  {
53  };
54 
55  struct NormOption
56  {
58  };
59 
60  struct CDOption
61  {
63  };
64 
65  void computeEfficiency(const std::string& startDir,
66  const std::string& efficMEName,
67  const std::string& efficMETitle,
68  const std::string& recoMEName,
69  const std::string& simMEName,
70  const int type=1,
71  const bool makeProfile = false);
72  void computeResolution(const std::string& startDir,
73  const std::string& fitMEPrefix, const std::string& fitMETitlePrefix,
74  const std::string& srcMEName);
75 
76  void normalizeToEntries(const std::string& startDir, const std::string& histName, const std::string& normHistName);
77  void makeCumulativeDist(const std::string& startDir, const std::string& cdName);
78 
79  void limitedFit(MonitorElement * srcME, MonitorElement * meanME, MonitorElement * sigmaME);
80 
81  private:
82  unsigned int verbose_;
85 
87  std::vector<std::string> subDirs_;
89 
90  std::vector<EfficOption> efficOptions_;
91  std::vector<ResolOption> resolOptions_;
92  std::vector<NormOption> normOptions_;
93  std::vector<CDOption> cdOptions_;
94 
95  void generic_eff (TH1 * denom, TH1 * numer, MonitorElement * efficiencyHist, const int type=1);
96 
97  void findAllSubdirectories (std::string dir, std::set<std::string> * myList, const TString& pattern);
98 
99 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
100 
101 #else
102  class TGraphAsymmErrorsWrapper : public TGraphAsymmErrors {
103  public:
104  std::pair<double, double> efficiency(int numerator, int denominator) {
105  double eff, low, high;
106  Efficiency(numerator, denominator, 0.683, eff, low, high);
107  double error = (eff - low > high - eff) ? eff - low : high - eff;
108  return std::pair<double, double>(eff, error);
109  }
110  };
111 #endif
112 
113 };
114 
115 #endif
116 
117 /* vim:set ts=2 sts=2 sw=2 expandtab: */
std::vector< EfficOption > efficOptions_
type
Definition: HCALResponse.h:21
list numerator
Definition: cuy.py:483
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void makeCumulativeDist(const std::string &startDir, const std::string &cdName)
std::vector< ResolOption > resolOptions_
list denominator
Definition: cuy.py:484
std::vector< std::string > subDirs_
void computeResolution(const std::string &startDir, const std::string &fitMEPrefix, const std::string &fitMETitlePrefix, const std::string &srcMEName)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::string outputFileName_
void findAllSubdirectories(std::string dir, std::set< std::string > *myList, const TString &pattern)
unsigned int verbose_
std::vector< CDOption > cdOptions_
void computeEfficiency(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)
dbl *** dir
Definition: mlp_gen.cc:35
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
void normalizeToEntries(const std::string &startDir, const std::string &histName, const std::string &normHistName)
void limitedFit(MonitorElement *srcME, MonitorElement *meanME, MonitorElement *sigmaME)
void generic_eff(TH1 *denom, TH1 *numer, MonitorElement *efficiencyHist, const int type=1)
Definition: Run.h:41
std::vector< NormOption > normOptions_