1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
#ifndef ScoutingAnalyzerBase_h
#define ScoutingAnalyzerBase_h
/* This class, as this whole package, was inspired by the EGamma monitoring
* by David Chamont. The idea is to provide a base class for all the monitoring
* modules implemented as plugins.
* The methods of the base class will spare the developer the pain of allocating
* all the ME, make projections and manipulations with extremely ugly copy&paste
* code sections
* */
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include <Rtypes.h>
class ScoutingAnalyzerBase : public DQMEDAnalyzer {
protected:
explicit ScoutingAnalyzerBase(const edm::ParameterSet &conf);
~ScoutingAnalyzerBase() override;
// virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &,
// edm::EventSetup const &);
void analyze(const edm::Event &e, const edm::EventSetup &c) override {}
std::string newName(const std::string &name);
void prepareBooking(DQMStore::IBooker &);
// Members for ME booking
MonitorElement *bookH1(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
double lowX,
double highX,
const std::string &titleX = "",
const std::string &titleY = "Events",
Option_t *option = "E1 P");
MonitorElement *bookH1withSumw2(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
double lowX,
double highX,
const std::string &titleX = "",
const std::string &titleY = "Events",
Option_t *option = "E1 P");
MonitorElement *bookH1BinArray(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
float *xbinsize,
const std::string &titleX = "",
const std::string &titleY = "Events",
Option_t *option = "E1 P");
MonitorElement *bookH1withSumw2BinArray(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
float *xbinsize,
const std::string &titleX = "",
const std::string &titleY = "Events",
Option_t *option = "E1 P");
MonitorElement *bookH2(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
double lowX,
double highX,
int nchY,
double lowY,
double highY,
const std::string &titleX = "",
const std::string &titleY = "",
Option_t *option = "COLZ");
MonitorElement *bookH2withSumw2(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
double lowX,
double highX,
int nchY,
double lowY,
double highY,
const std::string &titleX = "",
const std::string &titleY = "",
Option_t *option = "COLZ");
MonitorElement *bookP1(DQMStore::IBooker &,
const std::string &name,
const std::string &title,
int nchX,
double lowX,
double highX,
double lowY,
double highY,
const std::string &titleX = "",
const std::string &titleY = "",
Option_t *option = "E1 P");
MonitorElement *bookH1andDivide(DQMStore::IBooker &,
const std::string &name,
MonitorElement *num,
MonitorElement *denom,
const std::string &titleX,
const std::string &titleY,
const std::string &title = "");
MonitorElement *bookH2andDivide(DQMStore::IBooker &,
const std::string &name,
MonitorElement *num,
MonitorElement *denom,
const std::string &titleX,
const std::string &titleY,
const std::string &title = "");
MonitorElement *profileX(DQMStore::IBooker &,
MonitorElement *me2d,
const std::string &title = "",
const std::string &titleX = "",
const std::string &titleY = "",
Double_t minimum = -1111,
Double_t maximum = -1111);
MonitorElement *profileY(DQMStore::IBooker &,
MonitorElement *me2d,
const std::string &title = "",
const std::string &titleX = "",
const std::string &titleY = "",
Double_t minimum = -1111,
Double_t maximum = -1111);
private:
std::string m_modulePath;
std::string m_MEsPath;
unsigned m_verbosityLevel;
};
#endif
|