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  * $Date: 2010/06/24 13:38:38 $
10  * $Revision: 1.8 $
11  *
12  * \author Junghwan Goh - SungKyunKwan University
13  */
14 
17 #include <set>
18 #include <string>
19 #include <vector>
20 #include <TH1.h>
21 #include <RVersion.h>
22 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
23 #include <TEfficiency.h>
24 #else
25 #include <TGraphAsymmErrors.h>
26 #endif
27 
28 class DQMStore;
29 class MonitorElement;
30 
32 {
33  public:
36 
37  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) {};
38  void endJob();
39 
41  void endRun(const edm::Run& r, const edm::EventSetup& c);
42 
43  struct EfficOption
44  {
45  std::string name, title;
46  std::string numerator, denominator;
47  int type;
48  bool isProfile;
49  };
50 
51  struct ResolOption
52  {
53  std::string namePrefix, titlePrefix;
54  std::string srcName;
55  };
56 
57  struct NormOption
58  {
59  std::string name, normHistName;
60  };
61 
62  struct CDOption
63  {
64  std::string name;
65  };
66 
67  void computeEfficiency(const std::string& startDir,
68  const std::string& efficMEName,
69  const std::string& efficMETitle,
70  const std::string& recoMEName,
71  const std::string& simMEName,
72  const int type=1,
73  const bool makeProfile = false);
74  void computeResolution(const std::string& startDir,
75  const std::string& fitMEPrefix, const std::string& fitMETitlePrefix,
76  const std::string& srcMEName);
77 
78  void normalizeToEntries(const std::string& startDir, const std::string& histName, const std::string& normHistName);
79  void makeCumulativeDist(const std::string& startDir, const std::string& cdName);
80 
81  void limitedFit(MonitorElement * srcME, MonitorElement * meanME, MonitorElement * sigmaME);
82 
83  private:
84  unsigned int verbose_;
87 
89  std::vector<std::string> subDirs_;
90  std::string outputFileName_;
91 
92  std::vector<EfficOption> efficOptions_;
93  std::vector<ResolOption> resolOptions_;
94  std::vector<NormOption> normOptions_;
95  std::vector<CDOption> cdOptions_;
96 
97  void generic_eff (TH1 * denom, TH1 * numer, MonitorElement * efficiencyHist, const int type=1);
98 
99  void findAllSubdirectories (std::string dir, std::set<std::string> * myList, TString pattern);
100 
101 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,27,0)
102 
103 #else
104  class TGraphAsymmErrorsWrapper : public TGraphAsymmErrors {
105  public:
106  std::pair<double, double> efficiency(int numerator, int denominator) {
107  double eff, low, high;
108  Efficiency(numerator, denominator, 0.683, eff, low, high);
109  double error = (eff - low > high - eff) ? eff - low : high - eff;
110  return std::pair<double, double>(eff, error);
111  }
112  };
113 #endif
114 
115 };
116 
117 #endif
118 
119 /* vim:set ts=2 sts=2 sw=2 expandtab: */
std::vector< EfficOption > efficOptions_
type
Definition: HCALResponse.h:22
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_
void findAllSubdirectories(std::string dir, std::set< std::string > *myList, TString pattern)
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_
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:32
std::vector< NormOption > normOptions_