CMS 3D CMS Logo

L1TdeCSCTPGShowerClient.cc
Go to the documentation of this file.
2 
9 #include "TRandom.h"
10 using namespace edm;
11 using namespace std;
12 
14  : monitorDir_(ps.getUntrackedParameter<string>("monitorDir")) {}
15 
17 
19  DQMStore::IGetter &igetter,
20  const edm::LuminosityBlock &lumiSeg,
21  const edm::EventSetup &c) {
22  book(ibooker);
23  processHistograms(igetter);
24 }
25 
26 //--------------------------------------------------------
28  book(ibooker);
29  processHistograms(igetter);
30 }
31 
34 
35  lctShowerDataNomSummary_eff_ = iBooker.book2D("lct_cscshower_data_nom_summary_eff",
36  "Efficiency of data LCT Nominal shower being correctly emulated",
37  36,
38  1,
39  37,
40  18,
41  0,
42  18);
43  alctShowerDataNomSummary_eff_ = iBooker.book2D("alct_cscshower_data_nom_summary_eff",
44  "Efficiency of data ALCT Nominal shower being correctly emulated",
45  36,
46  1,
47  37,
48  18,
49  0,
50  18);
51  clctShowerDataNomSummary_eff_ = iBooker.book2D("clct_cscshower_data_nom_summary_eff",
52  "Efficiency of data CLCT Nominal shower being correctly emulated",
53  36,
54  1,
55  37,
56  18,
57  0,
58  18);
59 
60  lctShowerEmulNomSummary_eff_ = iBooker.book2D("lct_cscshower_emul_nom_summary_eff",
61  "Fraction of emulated LCT Nominal shower without matching data LCT",
62  36,
63  1,
64  37,
65  18,
66  0,
67  18);
68  alctShowerEmulNomSummary_eff_ = iBooker.book2D("alct_cscshower_emul_nom_summary_eff",
69  "Fraction of emulated ALCT Nominal shower without matching data ALCT",
70  36,
71  1,
72  37,
73  18,
74  0,
75  18);
76  clctShowerEmulNomSummary_eff_ = iBooker.book2D("clct_cscshower_emul_nom_summary_eff",
77  "Fraction of emulated CLCT Nominal shower without matching data CLCT",
78  36,
79  1,
80  37,
81  18,
82  0,
83  18);
84 
85  lctShowerDataTightSummary_eff_ = iBooker.book2D("lct_cscshower_data_tight_summary_eff",
86  "Efficiency of data LCT Tight shower being correctly emulated",
87  36,
88  1,
89  37,
90  18,
91  0,
92  18);
93  alctShowerDataTightSummary_eff_ = iBooker.book2D("alct_cscshower_data_tight_summary_eff",
94  "Efficiency of data ALCT Tight shower being correctly emulated",
95  36,
96  1,
97  37,
98  18,
99  0,
100  18);
101  clctShowerDataTightSummary_eff_ = iBooker.book2D("clct_cscshower_data_tight_summary_eff",
102  "Efficiency of data CLCT Tight shower being correctly emulated",
103  36,
104  1,
105  37,
106  18,
107  0,
108  18);
109 
110  lctShowerEmulTightSummary_eff_ = iBooker.book2D("lct_cscshower_emul_tight_summary_eff",
111  "Fraction of emulated LCT Tight shower without matching data LCT",
112  36,
113  1,
114  37,
115  18,
116  0,
117  18);
118  alctShowerEmulTightSummary_eff_ = iBooker.book2D("alct_cscshower_emul_tight_summary_eff",
119  "Fraction of emulated ALCT Tight shower without matching data ALCT",
120  36,
121  1,
122  37,
123  18,
124  0,
125  18);
126  clctShowerEmulTightSummary_eff_ = iBooker.book2D("clct_cscshower_emul_tight_summary_eff",
127  "Fraction of emulated CLCT Tight shower without matching data CLCT",
128  36,
129  1,
130  37,
131  18,
132  0,
133  18);
134 
135  // x labels
139 
143 
147 
151 
152  // plotting option
156 
160 
164 
168 
169  // summary plots
170  const std::array<std::string, 9> suffix_label{{"4/2", "4/1", "3/2", "3/1", " 2/2", "2/1", "1/3", "1/2", "1/1"}};
171 
172  // y labels
173  for (int ybin = 1; ybin <= 9; ++ybin) {
174  lctShowerDataNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
175  alctShowerDataNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
176  clctShowerDataNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
177 
178  lctShowerEmulNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
179  alctShowerEmulNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
180  clctShowerEmulNomSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
181 
182  lctShowerDataNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
183  alctShowerDataNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
184  clctShowerDataNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
185 
186  lctShowerEmulNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
187  alctShowerEmulNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
188  clctShowerEmulNomSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
189 
190  lctShowerDataTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
191  alctShowerDataTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
192  clctShowerDataTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
193 
194  lctShowerEmulTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
195  alctShowerEmulTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
196  clctShowerEmulTightSummary_eff_->setBinLabel(ybin, "ME-" + suffix_label[ybin - 1], 2);
197 
198  lctShowerDataTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
199  alctShowerDataTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
200  clctShowerDataTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
201 
202  lctShowerEmulTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
203  alctShowerEmulTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
204  clctShowerEmulTightSummary_eff_->setBinLabel(19 - ybin, "ME+" + suffix_label[ybin - 1], 2);
205  }
206 }
207 
209  MonitorElement *lctShowerDataNomSummary_denom_ = igetter.get(monitorDir_ + "/lct_cscshower_data_nom_summary_denom");
210  MonitorElement *lctShowerDataNomSummary_num_ = igetter.get(monitorDir_ + "/lct_cscshower_data_nom_summary_num");
211  MonitorElement *alctShowerDataNomSummary_denom_ = igetter.get(monitorDir_ + "/alct_cscshower_data_nom_summary_denom");
212  MonitorElement *alctShowerDataNomSummary_num_ = igetter.get(monitorDir_ + "/alct_cscshower_data_nom_summary_num");
213  MonitorElement *clctShowerDataNomSummary_denom_ = igetter.get(monitorDir_ + "/clct_cscshower_data_nom_summary_denom");
214  MonitorElement *clctShowerDataNomSummary_num_ = igetter.get(monitorDir_ + "/clct_cscshower_data_nom_summary_num");
215 
216  MonitorElement *lctShowerEmulNomSummary_denom_ = igetter.get(monitorDir_ + "/lct_cscshower_emul_nom_summary_denom");
217  MonitorElement *lctShowerEmulNomSummary_num_ = igetter.get(monitorDir_ + "/lct_cscshower_emul_nom_summary_num");
218  MonitorElement *alctShowerEmulNomSummary_denom_ = igetter.get(monitorDir_ + "/alct_cscshower_emul_nom_summary_denom");
219  MonitorElement *alctShowerEmulNomSummary_num_ = igetter.get(monitorDir_ + "/alct_cscshower_emul_nom_summary_num");
220  MonitorElement *clctShowerEmulNomSummary_denom_ = igetter.get(monitorDir_ + "/clct_cscshower_emul_nom_summary_denom");
221  MonitorElement *clctShowerEmulNomSummary_num_ = igetter.get(monitorDir_ + "/clct_cscshower_emul_nom_summary_num");
222 
223  MonitorElement *lctShowerDataTightSummary_denom_ =
224  igetter.get(monitorDir_ + "/lct_cscshower_data_tight_summary_denom");
225  MonitorElement *lctShowerDataTightSummary_num_ = igetter.get(monitorDir_ + "/lct_cscshower_data_tight_summary_num");
226  MonitorElement *alctShowerDataTightSummary_denom_ =
227  igetter.get(monitorDir_ + "/alct_cscshower_data_tight_summary_denom");
228  MonitorElement *alctShowerDataTightSummary_num_ = igetter.get(monitorDir_ + "/alct_cscshower_data_tight_summary_num");
229  MonitorElement *clctShowerDataTightSummary_denom_ =
230  igetter.get(monitorDir_ + "/clct_cscshower_data_tight_summary_denom");
231  MonitorElement *clctShowerDataTightSummary_num_ = igetter.get(monitorDir_ + "/clct_cscshower_data_tight_summary_num");
232 
233  MonitorElement *lctShowerEmulTightSummary_denom_ =
234  igetter.get(monitorDir_ + "/lct_cscshower_emul_tight_summary_denom");
235  MonitorElement *lctShowerEmulTightSummary_num_ = igetter.get(monitorDir_ + "/lct_cscshower_emul_tight_summary_num");
236  MonitorElement *alctShowerEmulTightSummary_denom_ =
237  igetter.get(monitorDir_ + "/alct_cscshower_emul_tight_summary_denom");
238  MonitorElement *alctShowerEmulTightSummary_num_ = igetter.get(monitorDir_ + "/alct_cscshower_emul_tight_summary_num");
239  MonitorElement *clctShowerEmulTightSummary_denom_ =
240  igetter.get(monitorDir_ + "/clct_cscshower_emul_tight_summary_denom");
241  MonitorElement *clctShowerEmulTightSummary_num_ = igetter.get(monitorDir_ + "/clct_cscshower_emul_tight_summary_num");
242 
244  lctShowerDataNomSummary_num_->getTH2F(), lctShowerDataNomSummary_denom_->getTH2F(), 1, 1, "");
246  alctShowerDataNomSummary_num_->getTH2F(), alctShowerDataNomSummary_denom_->getTH2F(), 1, 1, "");
248  clctShowerDataNomSummary_num_->getTH2F(), clctShowerDataNomSummary_denom_->getTH2F(), 1, 1, "");
249 
251  lctShowerEmulNomSummary_num_->getTH2F(), lctShowerEmulNomSummary_denom_->getTH2F(), 1, 1, "");
253  alctShowerEmulNomSummary_num_->getTH2F(), alctShowerEmulNomSummary_denom_->getTH2F(), 1, 1, "");
255  clctShowerEmulNomSummary_num_->getTH2F(), clctShowerEmulNomSummary_denom_->getTH2F(), 1, 1, "");
256 
258  lctShowerDataTightSummary_num_->getTH2F(), lctShowerDataTightSummary_denom_->getTH2F(), 1, 1, "");
260  alctShowerDataTightSummary_num_->getTH2F(), alctShowerDataTightSummary_denom_->getTH2F(), 1, 1, "");
262  clctShowerDataTightSummary_num_->getTH2F(), clctShowerDataTightSummary_denom_->getTH2F(), 1, 1, "");
263 
265  lctShowerEmulTightSummary_num_->getTH2F(), lctShowerEmulTightSummary_denom_->getTH2F(), 1, 1, "");
267  alctShowerEmulTightSummary_num_->getTH2F(), alctShowerEmulTightSummary_denom_->getTH2F(), 1, 1, "");
269  clctShowerEmulTightSummary_num_->getTH2F(), clctShowerEmulTightSummary_denom_->getTH2F(), 1, 1, "");
270 
271  lctShowerDataNomSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
272  alctShowerDataNomSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
273  clctShowerDataNomSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
274 
275  lctShowerDataTightSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
276  alctShowerDataTightSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
277  clctShowerDataTightSummary_eff_->getTH2F()->GetZaxis()->SetRangeUser(0.95, 1);
278 }
MonitorElement * alctShowerEmulTightSummary_eff_
MonitorElement * clctShowerDataTightSummary_eff_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setOption(const char *option)
~L1TdeCSCTPGShowerClient() override
Destructor.
L1TdeCSCTPGShowerClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * lctShowerEmulNomSummary_eff_
MonitorElement * clctShowerEmulNomSummary_eff_
MonitorElement * clctShowerEmulTightSummary_eff_
virtual TH2F * getTH2F() const
MonitorElement * clctShowerDataNomSummary_eff_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * lctShowerDataNomSummary_eff_
MonitorElement * alctShowerDataNomSummary_eff_
MonitorElement * lctShowerEmulTightSummary_eff_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * alctShowerDataTightSummary_eff_
void book(DQMStore::IBooker &ibooker)
MonitorElement * alctShowerEmulNomSummary_eff_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
void processHistograms(DQMStore::IGetter &)
MonitorElement * lctShowerDataTightSummary_eff_
HLT enums.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)