CMS 3D CMS Logo

GEMTnPEfficiencyTask.cc
Go to the documentation of this file.
1 /*
2  * \file GEMTnPEfficiencyTask.cc
3  * \author Qianying
4  *
5  * \interited from the TnP framework of
6  * \author L. Lunerti - INFN Bologna
7  *
8  */
9 
11 
14 
16 
18 public:
21 
23  ~GEMTnPEfficiencyTask() override;
24 
25 protected:
26  std::string topFolder() const override;
27 
28  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& run, edm::EventSetup const& context) override;
29 
31  void analyze(const edm::Event& event, const edm::EventSetup& context) override;
32 };
33 
35  LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask") << "[GEMTnPEfficiencyTask]: Constructor" << std::endl;
36 }
37 
39  LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask")
40  << "[GEMTnPEfficiencyTask]: analyzed " << m_nEvents << " events" << std::endl;
41 }
42 
44  edm::Run const& run,
45  edm::EventSetup const& context) {
47 
48  LogTrace("DQMOffline|MuonDPG|GEMTnPEfficiencyTask") << "[GEMTnPEfficiencyTask]: bookHistograms" << std::endl;
49 
50  auto baseDir = topFolder() + "Task/";
51  iBooker.setCurrentFolder(baseDir);
52 
53  MonitorElement* me_GE11_pass_Ch_region =
54  iBooker.book2D("GE11_nPassingProbe_Ch_region", "GE11_nPassingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37);
55  MonitorElement* me_GE11_fail_Ch_region =
56  iBooker.book2D("GE11_nFailingProbe_Ch_region", "GE11_nFailingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37);
57  MonitorElement* me_GE21_pass_Ch_region =
58  iBooker.book2D("GE21_nPassingProbe_Ch_region", "GE21_nPassingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37);
59  MonitorElement* me_GE21_fail_Ch_region =
60  iBooker.book2D("GE21_nFailingProbe_Ch_region", "GE21_nFailingProbe_Ch_region", 2, -1.5, 1.5, 36, 1, 37);
61  MonitorElement* me_GEM_pass_Ch_region_GE1 =
62  iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1", "GEM_nPassingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37);
63  MonitorElement* me_GEM_fail_Ch_region_GE1 =
64  iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1", "GEM_nFailingProbe_Ch_region_GE1", 4, 0, 4, 36, 1, 37);
65  MonitorElement* me_GEM_pass_Ch_region_GE1_NoL =
66  iBooker.book2D("GEM_nPassingProbe_Ch_region_GE1_NoL", "GEM_nPassingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37);
67  MonitorElement* me_GEM_fail_Ch_region_GE1_NoL =
68  iBooker.book2D("GEM_nFailingProbe_Ch_region_GE1_NoL", "GEM_nFailingProbe_Ch_region_GE1_NoL", 2, 0, 2, 36, 1, 37);
69  MonitorElement* me_GE11_pass_Ch_ieta =
70  iBooker.book2D("GE11_nPassingProbe_Ch_ieta", "GE11_nPassingProbe_Ch_ieta", 8, 1, 9, 36, 1, 37);
71  MonitorElement* me_GE11_fail_Ch_ieta =
72  iBooker.book2D("GE11_nFailingProbe_Ch_ieta", "GE11_nFailingProbe_Ch_ieta", 8, 1, 9, 36, 1, 37);
73  MonitorElement* me_GE11_pass_Ch_phi = iBooker.book2D(
74  "GE11_nPassingProbe_Ch_phi", "GE11_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37);
75  MonitorElement* me_GE11_fail_Ch_phi = iBooker.book2D(
76  "GE11_nFailingProbe_Ch_phi", "GE11_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 36, 1, 37);
77  MonitorElement* me_GE11_pass_allCh_1D =
78  iBooker.book1D("GE11_nPassingProbe_allCh_1D", "GE11_nPassingProbe_allCh_1D", 2, -1.5, 1.5);
79  MonitorElement* me_GE11_fail_allCh_1D =
80  iBooker.book1D("GE11_nFailingProbe_allCh_1D", "GE11_nFailingProbe_allCh_1D", 2, -1.5, 1.5);
81  MonitorElement* me_GE11_pass_chamber_1D =
82  iBooker.book1D("GE11_nPassingProbe_chamber_1D", "GE11_nPassingProbe_chamber_1D", 36, 1, 37);
83  MonitorElement* me_GE11_fail_chamber_1D =
84  iBooker.book1D("GE11_nFailingProbe_chamber_1D", "GE11_nFailingProbe_chamber_1D", 36, 1, 37);
85  MonitorElement* me_GE21_pass_Ch_ieta =
86  iBooker.book2D("GE21_nPassingProbe_Ch_ieta", "GE21_nPassingProbe_Ch_ieta", 16, 1, 17, 18, 1, 19);
87  MonitorElement* me_GE21_fail_Ch_ieta =
88  iBooker.book2D("GE21_nFailingProbe_Ch_ieta", "GE21_nFailingProbe_Ch_ieta", 16, 1, 17, 18, 1, 19);
89  MonitorElement* me_GE21_pass_Ch_phi = iBooker.book2D(
90  "GE21_nPassingProbe_Ch_phi", "GE21_nPassingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 18, 1, 19);
91  MonitorElement* me_GE21_fail_Ch_phi = iBooker.book2D(
92  "GE21_nFailingProbe_Ch_phi", "GE21_nFailingProbe_Ch_phi", 20, -TMath::Pi(), TMath::Pi(), 18, 1, 19);
93  MonitorElement* me_GE21_pass_allCh_1D =
94  iBooker.book1D("GE21_nPassingProbe_allCh_1D", "GE21_nPassingProbe_allCh_1D", 2, -1.5, 1.5);
95  MonitorElement* me_GE21_fail_allCh_1D =
96  iBooker.book1D("GE21_nFailingProbe_allCh_1D", "GE21_nFailingProbe_allCh_1D", 2, -1.5, 1.5);
97  MonitorElement* me_GE21_pass_chamber_1D =
98  iBooker.book1D("GE21_nPassingProbe_chamber_1D", "GE21_nPassingProbe_chamber_1D", 18, 1, 19);
99  MonitorElement* me_GE21_fail_chamber_1D =
100  iBooker.book1D("GE21_nFailingProbe_chamber_1D", "GE21_nFailingProbe_chamber_1D", 18, 1, 19);
101  MonitorElement* me_GEM_pass_chamber_p1_1D =
102  iBooker.book1D("GEM_nPassingProbe_chamber_p1_1D", "GEM_nPassingProbe_chamber_p1_1D", 36, 1, 37);
103  MonitorElement* me_GEM_fail_chamber_p1_1D =
104  iBooker.book1D("GEM_nFailingProbe_chamber_p1_1D", "GEM_nFailingProbe_chamber_p1_1D", 36, 1, 37);
105  MonitorElement* me_GEM_pass_chamber_p2_1D =
106  iBooker.book1D("GEM_nPassingProbe_chamber_p2_1D", "GEM_nPassingProbe_chamber_p2_1D", 36, 1, 37);
107  MonitorElement* me_GEM_fail_chamber_p2_1D =
108  iBooker.book1D("GEM_nFailingProbe_chamber_p2_1D", "GEM_nFailingProbe_chamber_p2_1D", 36, 1, 37);
109  MonitorElement* me_GEM_pass_chamber_n1_1D =
110  iBooker.book1D("GEM_nPassingProbe_chamber_n1_1D", "GEM_nPassingProbe_chamber_n1_1D", 36, 1, 37);
111  MonitorElement* me_GEM_fail_chamber_n1_1D =
112  iBooker.book1D("GEM_nFailingProbe_chamber_n1_1D", "GEM_nFailingProbe_chamber_n1_1D", 36, 1, 37);
113  MonitorElement* me_GEM_pass_chamber_n2_1D =
114  iBooker.book1D("GEM_nPassingProbe_chamber_n2_1D", "GEM_nPassingProbe_chamber_n2_1D", 36, 1, 37);
115  MonitorElement* me_GEM_fail_chamber_n2_1D =
116  iBooker.book1D("GEM_nFailingProbe_chamber_n2_1D", "GEM_nFailingProbe_chamber_n2_1D", 36, 1, 37);
117  //
118  MonitorElement* me_GEM_pass_pt_1D = iBooker.book1D("GEM_nPassingProbe_pt_1D", "GEM_nPassingProbe_pt_1D", 20, 0, 100);
119  MonitorElement* me_GEM_fail_pt_1D = iBooker.book1D("GEM_nFailingProbe_pt_1D", "GEM_nFailingProbe_pt_1D", 20, 0, 100);
120  MonitorElement* me_GEM_pass_eta_1D =
121  iBooker.book1D("GEM_nPassingProbe_eta_1D", "GEM_nPassingProbe_eta_1D", 24, 0, 2.4);
122  MonitorElement* me_GEM_fail_eta_1D =
123  iBooker.book1D("GEM_nFailingProbe_eta_1D", "GEM_nFailingProbe_eta_1D", 24, 0, 2.4);
124  MonitorElement* me_GEM_pass_phi_1D =
125  iBooker.book1D("GEM_nPassingProbe_phi_1D", "GEM_nPassingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi());
126  MonitorElement* me_GEM_fail_phi_1D =
127  iBooker.book1D("GEM_nFailingProbe_phi_1D", "GEM_nFailingProbe_phi_1D", 20, -TMath::Pi(), TMath::Pi());
129  MonitorElement* me_GEM_pass_pt_p1_1D =
130  iBooker.book1D("GEM_nPassingProbe_pt_p1_1D", "GEM_nPassingProbe_pt_p1_1D", 20, 0, 100);
131  MonitorElement* me_GEM_fail_pt_p1_1D =
132  iBooker.book1D("GEM_nFailingProbe_pt_p1_1D", "GEM_nFailingProbe_pt_p1_1D", 20, 0, 100);
133  MonitorElement* me_GEM_pass_eta_p1_1D =
134  iBooker.book1D("GEM_nPassingProbe_eta_p1_1D", "GEM_nPassingProbe_eta_p1_1D", 24, 0, 2.4);
135  MonitorElement* me_GEM_fail_eta_p1_1D =
136  iBooker.book1D("GEM_nFailingProbe_eta_p1_1D", "GEM_nFailingProbe_eta_p1_1D", 24, 0, 2.4);
137  MonitorElement* me_GEM_pass_phi_p1_1D =
138  iBooker.book1D("GEM_nPassingProbe_phi_p1_1D", "GEM_nPassingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi());
139  MonitorElement* me_GEM_fail_phi_p1_1D =
140  iBooker.book1D("GEM_nFailingProbe_phi_p1_1D", "GEM_nFailingProbe_phi_p1_1D", 20, -TMath::Pi(), TMath::Pi());
141  MonitorElement* me_GEM_pass_pt_p2_1D =
142  iBooker.book1D("GEM_nPassingProbe_pt_p2_1D", "GEM_nPassingProbe_pt_p2_1D", 20, 0, 100);
143  MonitorElement* me_GEM_fail_pt_p2_1D =
144  iBooker.book1D("GEM_nFailingProbe_pt_p2_1D", "GEM_nFailingProbe_pt_p2_1D", 20, 0, 100);
145  MonitorElement* me_GEM_pass_eta_p2_1D =
146  iBooker.book1D("GEM_nPassingProbe_eta_p2_1D", "GEM_nPassingProbe_eta_p2_1D", 24, 0, 2.4);
147  MonitorElement* me_GEM_fail_eta_p2_1D =
148  iBooker.book1D("GEM_nFailingProbe_eta_p2_1D", "GEM_nFailingProbe_eta_p2_1D", 24, 0, 2.4);
149  MonitorElement* me_GEM_pass_phi_p2_1D =
150  iBooker.book1D("GEM_nPassingProbe_phi_p2_1D", "GEM_nPassingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi());
151  MonitorElement* me_GEM_fail_phi_p2_1D =
152  iBooker.book1D("GEM_nFailingProbe_phi_p2_1D", "GEM_nFailingProbe_phi_p2_1D", 20, -TMath::Pi(), TMath::Pi());
153  MonitorElement* me_GEM_pass_pt_n1_1D =
154  iBooker.book1D("GEM_nPassingProbe_pt_n1_1D", "GEM_nPassingProbe_pt_n1_1D", 20, 0, 100);
155  MonitorElement* me_GEM_fail_pt_n1_1D =
156  iBooker.book1D("GEM_nFailingProbe_pt_n1_1D", "GEM_nFailingProbe_pt_n1_1D", 20, 0, 100);
157  MonitorElement* me_GEM_pass_eta_n1_1D =
158  iBooker.book1D("GEM_nPassingProbe_eta_n1_1D", "GEM_nPassingProbe_eta_n1_1D", 24, 0, 2.4);
159  MonitorElement* me_GEM_fail_eta_n1_1D =
160  iBooker.book1D("GEM_nFailingProbe_eta_n1_1D", "GEM_nFailingProbe_eta_n1_1D", 24, 0, 2.4);
161  MonitorElement* me_GEM_pass_phi_n1_1D =
162  iBooker.book1D("GEM_nPassingProbe_phi_n1_1D", "GEM_nPassingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi());
163  MonitorElement* me_GEM_fail_phi_n1_1D =
164  iBooker.book1D("GEM_nFailingProbe_phi_n1_1D", "GEM_nFailingProbe_phi_n1_1D", 20, -TMath::Pi(), TMath::Pi());
165  MonitorElement* me_GEM_pass_pt_n2_1D =
166  iBooker.book1D("GEM_nPassingProbe_pt_n2_1D", "GEM_nPassingProbe_pt_n2_1D", 20, 0, 100);
167  MonitorElement* me_GEM_fail_pt_n2_1D =
168  iBooker.book1D("GEM_nFailingProbe_pt_n2_1D", "GEM_nFailingProbe_pt_n2_1D", 20, 0, 100);
169  MonitorElement* me_GEM_pass_eta_n2_1D =
170  iBooker.book1D("GEM_nPassingProbe_eta_n2_1D", "GEM_nPassingProbe_eta_n2_1D", 24, 0, 2.4);
171  MonitorElement* me_GEM_fail_eta_n2_1D =
172  iBooker.book1D("GEM_nFailingProbe_eta_n2_1D", "GEM_nFailingProbe_eta_n2_1D", 24, 0, 2.4);
173  MonitorElement* me_GEM_pass_phi_n2_1D =
174  iBooker.book1D("GEM_nPassingProbe_phi_n2_1D", "GEM_nPassingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi());
175  MonitorElement* me_GEM_fail_phi_n2_1D =
176  iBooker.book1D("GEM_nFailingProbe_phi_n2_1D", "GEM_nFailingProbe_phi_n2_1D", 20, -TMath::Pi(), TMath::Pi());
178  MonitorElement* me_ME0_pass_chamber_1D =
179  iBooker.book1D("ME0_nPassingProbe_chamber_1D", "ME0_nPassingProbe_chamber_1D", 18, 1, 19);
180  MonitorElement* me_ME0_fail_chamber_1D =
181  iBooker.book1D("ME0_nFailingProbe_chamber_1D", "ME0_nFailingProbe_chamber_1D", 18, 1, 19);
182  MonitorElement* me_GEM_pass_Ch_region_layer_phase2 = iBooker.book2D(
183  "GEM_nPassingProbe_Ch_region_layer_phase2", "GEM_nPassingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37);
184  MonitorElement* me_GEM_fail_Ch_region_layer_phase2 = iBooker.book2D(
185  "GEM_nFailingProbe_Ch_region_layer_phase2", "GEM_nFailingProbe_Ch_region_layer_phase2", 10, 0, 10, 36, 1, 37);
186 
187  me_GE11_pass_allCh_1D->setBinLabel(1, "GE-11", 1);
188  me_GE11_pass_allCh_1D->setBinLabel(2, "GE+11", 1);
189  me_GE11_pass_allCh_1D->setAxisTitle("Number of passing probes", 2);
190 
191  me_GE11_fail_allCh_1D->setBinLabel(1, "GE-11", 1);
192  me_GE11_fail_allCh_1D->setBinLabel(2, "GE+11", 1);
193  me_GE11_fail_allCh_1D->setAxisTitle("Number of failing probes", 2);
194 
195  me_GE11_pass_chamber_1D->setAxisTitle("Chamber", 1);
196  me_GE11_pass_chamber_1D->setAxisTitle("Number of passing probes", 2);
197  me_GE11_fail_chamber_1D->setAxisTitle("Chamber", 1);
198  me_GE11_fail_chamber_1D->setAxisTitle("Number of failing probes", 2);
199 
200  me_GE21_pass_allCh_1D->setBinLabel(1, "GE-21", 1);
201  me_GE21_pass_allCh_1D->setBinLabel(2, "GE+21", 1);
202  me_GE21_pass_allCh_1D->setAxisTitle("Number of passing probes", 2);
203 
204  me_GE21_fail_allCh_1D->setBinLabel(1, "GE-21", 1);
205  me_GE21_fail_allCh_1D->setBinLabel(2, "GE+21", 1);
206  me_GE21_fail_allCh_1D->setAxisTitle("Number of failing probes", 2);
207 
208  me_GE21_pass_chamber_1D->setAxisTitle("Chamber", 1);
209  me_GE21_pass_chamber_1D->setAxisTitle("Number of passing probes", 2);
210  me_GE21_fail_chamber_1D->setAxisTitle("Chamber", 1);
211  me_GE21_fail_chamber_1D->setAxisTitle("Number of failing probes", 2);
212 
213  me_GEM_pass_chamber_p1_1D->setAxisTitle("Chamber", 1);
214  me_GEM_pass_chamber_p1_1D->setAxisTitle("Number of passing probes", 2);
215  me_GEM_fail_chamber_p1_1D->setAxisTitle("Chamber", 1);
216  me_GEM_fail_chamber_p1_1D->setAxisTitle("Number of failing probes", 2);
217 
218  me_GEM_pass_chamber_p2_1D->setAxisTitle("Chamber", 1);
219  me_GEM_pass_chamber_p2_1D->setAxisTitle("Number of passing probes", 2);
220  me_GEM_fail_chamber_p2_1D->setAxisTitle("Chamber", 1);
221  me_GEM_fail_chamber_p2_1D->setAxisTitle("Number of failing probes", 2);
222 
223  me_GEM_pass_chamber_n1_1D->setAxisTitle("Chamber", 1);
224  me_GEM_pass_chamber_n1_1D->setAxisTitle("Number of passing probes", 2);
225  me_GEM_fail_chamber_n1_1D->setAxisTitle("Chamber", 1);
226  me_GEM_fail_chamber_n1_1D->setAxisTitle("Number of failing probes", 2);
227 
228  me_GEM_pass_chamber_n2_1D->setAxisTitle("Chamber", 1);
229  me_GEM_pass_chamber_n2_1D->setAxisTitle("Number of passing probes", 2);
230  me_GEM_fail_chamber_n2_1D->setAxisTitle("Chamber", 1);
231  me_GEM_fail_chamber_n2_1D->setAxisTitle("Number of failing probes", 2);
232 
233  me_GEM_pass_pt_1D->setAxisTitle("P_{T}", 1);
234  me_GEM_pass_pt_1D->setAxisTitle("Number of passing probes", 2);
235  me_GEM_fail_pt_1D->setAxisTitle("P_{T}", 1);
236  me_GEM_fail_pt_1D->setAxisTitle("Number of failing probes", 2);
237 
238  me_GEM_pass_eta_1D->setAxisTitle("#eta", 1);
239  me_GEM_pass_eta_1D->setAxisTitle("Number of passing probes", 2);
240  me_GEM_fail_eta_1D->setAxisTitle("#eta", 1);
241  me_GEM_fail_eta_1D->setAxisTitle("Number of failing probes", 2);
242 
243  me_GEM_pass_phi_1D->setAxisTitle("#phi", 1);
244  me_GEM_pass_phi_1D->setAxisTitle("Number of passing probes", 2);
245  me_GEM_fail_phi_1D->setAxisTitle("#phi", 1);
246  me_GEM_fail_phi_1D->setAxisTitle("Number of failing probes", 2);
247 
248  me_GEM_pass_pt_p1_1D->setAxisTitle("P_{T}", 1);
249  me_GEM_pass_pt_p1_1D->setAxisTitle("Number of passing probes", 2);
250  me_GEM_fail_pt_p1_1D->setAxisTitle("P_{T}", 1);
251  me_GEM_fail_pt_p1_1D->setAxisTitle("Number of failing probes", 2);
252 
253  me_GEM_pass_eta_p1_1D->setAxisTitle("#eta", 1);
254  me_GEM_pass_eta_p1_1D->setAxisTitle("Number of passing probes", 2);
255  me_GEM_fail_eta_p1_1D->setAxisTitle("#eta", 1);
256  me_GEM_fail_eta_p1_1D->setAxisTitle("Number of failing probes", 2);
257 
258  me_GEM_pass_phi_p1_1D->setAxisTitle("#phi", 1);
259  me_GEM_pass_phi_p1_1D->setAxisTitle("Number of passing probes", 2);
260  me_GEM_fail_phi_p1_1D->setAxisTitle("#phi", 1);
261  me_GEM_fail_phi_p1_1D->setAxisTitle("Number of failing probes", 2);
262 
263  me_GEM_pass_pt_p2_1D->setAxisTitle("P_{T}", 1);
264  me_GEM_pass_pt_p2_1D->setAxisTitle("Number of passing probes", 2);
265  me_GEM_fail_pt_p2_1D->setAxisTitle("P_{T}", 1);
266  me_GEM_fail_pt_p2_1D->setAxisTitle("Number of failing probes", 2);
267 
268  me_GEM_pass_eta_p2_1D->setAxisTitle("#eta", 1);
269  me_GEM_pass_eta_p2_1D->setAxisTitle("Number of passing probes", 2);
270  me_GEM_fail_eta_p2_1D->setAxisTitle("#eta", 1);
271  me_GEM_fail_eta_p2_1D->setAxisTitle("Number of failing probes", 2);
272 
273  me_GEM_pass_phi_p2_1D->setAxisTitle("#phi", 1);
274  me_GEM_pass_phi_p2_1D->setAxisTitle("Number of passing probes", 2);
275  me_GEM_fail_phi_p2_1D->setAxisTitle("#phi", 1);
276  me_GEM_fail_phi_p2_1D->setAxisTitle("Number of failing probes", 2);
277 
278  me_GEM_pass_pt_n1_1D->setAxisTitle("P_{T}", 1);
279  me_GEM_pass_pt_n1_1D->setAxisTitle("Number of passing probes", 2);
280  me_GEM_fail_pt_n1_1D->setAxisTitle("P_{T}", 1);
281  me_GEM_fail_pt_n1_1D->setAxisTitle("Number of failing probes", 2);
282 
283  me_GEM_pass_eta_n1_1D->setAxisTitle("#eta", 1);
284  me_GEM_pass_eta_n1_1D->setAxisTitle("Number of passing probes", 2);
285  me_GEM_fail_eta_n1_1D->setAxisTitle("#eta", 1);
286  me_GEM_fail_eta_n1_1D->setAxisTitle("Number of failing probes", 2);
287 
288  me_GEM_pass_phi_n1_1D->setAxisTitle("#phi", 1);
289  me_GEM_pass_phi_n1_1D->setAxisTitle("Number of passing probes", 2);
290  me_GEM_fail_phi_n1_1D->setAxisTitle("#phi", 1);
291  me_GEM_fail_phi_n1_1D->setAxisTitle("Number of failing probes", 2);
292 
293  me_GEM_pass_pt_n2_1D->setAxisTitle("P_{T}", 1);
294  me_GEM_pass_pt_n2_1D->setAxisTitle("Number of passing probes", 2);
295  me_GEM_fail_pt_n2_1D->setAxisTitle("P_{T}", 1);
296  me_GEM_fail_pt_n2_1D->setAxisTitle("Number of failing probes", 2);
297 
298  me_GEM_pass_eta_n2_1D->setAxisTitle("#eta", 1);
299  me_GEM_pass_eta_n2_1D->setAxisTitle("Number of passing probes", 2);
300  me_GEM_fail_eta_n2_1D->setAxisTitle("#eta", 1);
301  me_GEM_fail_eta_n2_1D->setAxisTitle("Number of failing probes", 2);
302 
303  me_GEM_pass_phi_n2_1D->setAxisTitle("#phi", 1);
304  me_GEM_pass_phi_n2_1D->setAxisTitle("Number of passing probes", 2);
305  me_GEM_fail_phi_n2_1D->setAxisTitle("#phi", 1);
306  me_GEM_fail_phi_n2_1D->setAxisTitle("Number of failing probes", 2);
307 
308  me_GE11_fail_Ch_region->setBinLabel(1, "GE-11", 1);
309  me_GE11_fail_Ch_region->setBinLabel(2, "GE+11", 1);
310  for (int i = 1; i < 37; ++i) {
311  me_GE11_fail_Ch_region->setBinLabel(i, std::to_string(i), 2);
312  }
313  me_GE11_fail_Ch_region->setAxisTitle("Chamber", 2);
314  me_GE11_fail_Ch_region->setAxisTitle("Number of failing probes", 3);
315 
316  me_GE11_pass_Ch_region->setBinLabel(1, "GE-11", 1);
317  me_GE11_pass_Ch_region->setBinLabel(2, "GE+11", 1);
318  for (int i = 1; i < 37; ++i) {
319  me_GE11_pass_Ch_region->setBinLabel(i, std::to_string(i), 2);
320  }
321  me_GE11_pass_Ch_region->setAxisTitle("Chamber", 2);
322  me_GE11_pass_Ch_region->setAxisTitle("Number of passing probes", 3);
323 
324  me_GE21_fail_Ch_region->setBinLabel(1, "GE-21", 1);
325  me_GE21_fail_Ch_region->setBinLabel(2, "GE+21", 1);
326  for (int i = 1; i < 19; ++i) {
327  me_GE21_fail_Ch_region->setBinLabel(i, std::to_string(i), 2);
328  }
329  me_GE21_fail_Ch_region->setAxisTitle("Chamber", 2);
330  me_GE21_fail_Ch_region->setAxisTitle("Number of failing probes", 3);
331 
332  me_GE21_pass_Ch_region->setBinLabel(1, "GE-21", 1);
333  me_GE21_pass_Ch_region->setBinLabel(2, "GE+21", 1);
334  for (int i = 1; i < 19; ++i) {
335  me_GE21_pass_Ch_region->setBinLabel(i, std::to_string(i), 2);
336  }
337  me_GE21_pass_Ch_region->setAxisTitle("Chamber", 2);
338  me_GE21_pass_Ch_region->setAxisTitle("Number of passing probes", 3);
339 
340  me_GEM_fail_Ch_region_GE1->setBinLabel(1, "GE-1/1_L2", 1);
341  me_GEM_fail_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1);
342  me_GEM_fail_Ch_region_GE1->setBinLabel(3, "GE+1/1_L1", 1);
343  me_GEM_fail_Ch_region_GE1->setBinLabel(4, "GE+1/1_L2", 1);
344  for (int i = 1; i < 37; ++i) {
345  me_GEM_fail_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2);
346  }
347  me_GEM_fail_Ch_region_GE1->setAxisTitle("Chamber", 2);
348  me_GEM_fail_Ch_region_GE1->setAxisTitle("Number of passing probes", 3);
349 
350  me_GEM_pass_Ch_region_GE1->setBinLabel(1, "GE-1/1_L2", 1);
351  me_GEM_pass_Ch_region_GE1->setBinLabel(2, "GE-1/1_L1", 1);
352  me_GEM_pass_Ch_region_GE1->setBinLabel(3, "GE+1/1_L1", 1);
353  me_GEM_pass_Ch_region_GE1->setBinLabel(4, "GE+1/1_L2", 1);
354  for (int i = 1; i < 37; ++i) {
355  me_GEM_pass_Ch_region_GE1->setBinLabel(i, std::to_string(i), 2);
356  }
357  me_GEM_pass_Ch_region_GE1->setAxisTitle("Chamber", 2);
358  me_GEM_pass_Ch_region_GE1->setAxisTitle("Number of passing probes", 3);
359 
360  me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1);
361  me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1);
362  for (int i = 1; i < 37; ++i) {
363  me_GEM_fail_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2);
364  }
365  me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2);
366  me_GEM_fail_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3);
367 
368  me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(1, "GE-1", 1);
369  me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(2, "GE+1", 1);
370  for (int i = 1; i < 37; ++i) {
371  me_GEM_pass_Ch_region_GE1_NoL->setBinLabel(i, std::to_string(i), 2);
372  }
373  me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Chamber", 2);
374  me_GEM_pass_Ch_region_GE1_NoL->setAxisTitle("Number of passing probes", 3);
376  for (int i = 1; i < 37; ++i) {
377  me_GE11_fail_Ch_ieta->setBinLabel(i, std::to_string(i), 2);
378  }
379  for (int i = 1; i < 9; ++i) {
380  me_GE11_fail_Ch_ieta->setBinLabel(i, std::to_string(i), 1);
381  }
382  me_GE11_fail_Ch_ieta->setAxisTitle("#ieta", 1);
383  me_GE11_fail_Ch_ieta->setAxisTitle("Chamber", 2);
384  me_GE11_fail_Ch_ieta->setAxisTitle("Number of failing probes", 3);
385 
386  for (int i = 1; i < 37; ++i) {
387  me_GE11_pass_Ch_ieta->setBinLabel(i, std::to_string(i), 2);
388  }
389  for (int i = 1; i < 9; ++i) {
390  me_GE11_pass_Ch_ieta->setBinLabel(i, std::to_string(i), 1);
391  }
392  me_GE11_pass_Ch_ieta->setAxisTitle("#ieta", 1);
393  me_GE11_pass_Ch_ieta->setAxisTitle("Chamber", 2);
394  me_GE11_pass_Ch_ieta->setAxisTitle("Number of passing probes", 3);
395 
396  for (int i = 1; i < 37; ++i) {
397  me_GE11_fail_Ch_phi->setBinLabel(i, std::to_string(i), 2);
398  }
399  me_GE11_fail_Ch_phi->setAxisTitle("#phi", 1);
400  me_GE11_fail_Ch_phi->setAxisTitle("Chamber", 2);
401  me_GE11_fail_Ch_phi->setAxisTitle("Number of failing probes", 3);
402 
403  for (int i = 1; i < 37; ++i) {
404  me_GE11_pass_Ch_phi->setBinLabel(i, std::to_string(i), 2);
405  }
406  me_GE11_pass_Ch_phi->setAxisTitle("#phi", 1);
407  me_GE11_pass_Ch_phi->setAxisTitle("Chamber", 2);
408  me_GE11_pass_Ch_phi->setAxisTitle("Number of passing probes", 3);
409 
410  for (int i = 1; i < 19; ++i) {
411  me_GE21_fail_Ch_ieta->setBinLabel(i, std::to_string(i), 2);
412  }
413  for (int i = 1; i < 17; ++i) {
414  me_GE21_fail_Ch_ieta->setBinLabel(i, std::to_string(i), 1);
415  }
416  me_GE21_fail_Ch_ieta->setAxisTitle("#ieta", 1);
417  me_GE21_fail_Ch_ieta->setAxisTitle("Chamber", 2);
418  me_GE21_fail_Ch_ieta->setAxisTitle("Number of failing probes", 3);
419 
420  for (int i = 1; i < 19; ++i) {
421  me_GE21_pass_Ch_ieta->setBinLabel(i, std::to_string(i), 2);
422  }
423  for (int i = 1; i < 17; ++i) {
424  me_GE21_pass_Ch_ieta->setBinLabel(i, std::to_string(i), 1);
425  }
426  me_GE21_pass_Ch_ieta->setAxisTitle("#ieta", 1);
427  me_GE21_pass_Ch_ieta->setAxisTitle("Chamber", 2);
428  me_GE21_pass_Ch_ieta->setAxisTitle("Number of passing probes", 3);
430  for (int i = 1; i < 19; ++i) {
431  me_GE21_fail_Ch_phi->setBinLabel(i, std::to_string(i), 2);
432  }
433  me_GE21_fail_Ch_phi->setAxisTitle("#phi", 1);
434  me_GE21_fail_Ch_phi->setAxisTitle("Chamber", 2);
435  me_GE21_fail_Ch_phi->setAxisTitle("Number of failing probes", 3);
436 
437  for (int i = 1; i < 19; ++i) {
438  me_GE21_pass_Ch_phi->setBinLabel(i, std::to_string(i), 2);
439  }
440  me_GE21_pass_Ch_phi->setAxisTitle("#phi", 1);
441  me_GE21_pass_Ch_phi->setAxisTitle("Chamber", 2);
442  me_GE21_pass_Ch_phi->setAxisTitle("Number of passing probes", 3);
443 
444  for (int i = 1; i < 19; ++i) {
445  me_ME0_pass_chamber_1D->setBinLabel(i, std::to_string(i), 1);
446  }
447  me_ME0_pass_chamber_1D->setAxisTitle("Chamber", 1);
448  me_ME0_pass_chamber_1D->setAxisTitle("Number of passing probes", 2);
449  for (int i = 1; i < 19; ++i) {
450  me_ME0_fail_chamber_1D->setBinLabel(i, std::to_string(i), 1);
451  }
452  me_ME0_fail_chamber_1D->setAxisTitle("Chamber", 1);
453  me_ME0_fail_chamber_1D->setAxisTitle("Number of failing probes", 2);
454 
455  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(1, "GE-2/1_L2", 1);
456  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(2, "GE-2/1_L1", 1);
457  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(3, "GE-1/1_L2", 1);
458  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(4, "GE-1/1_L1", 1);
459  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(5, "GE0-", 1);
460  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(6, "GE0+", 1);
461  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(7, "GE+1/1_L1", 1);
462  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(8, "GE+1/1_L2", 1);
463  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(9, "GE+2/1_L1", 1);
464  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(10, "GE+2/1_L2", 1);
465  for (int i = 1; i < 37; ++i) {
466  me_GEM_fail_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2);
467  }
468  me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Chamber", 2);
469  me_GEM_fail_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3);
470 
471  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(1, "GE-2/1_L2", 1);
472  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(2, "GE-2/1_L1", 1);
473  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(3, "GE-1/1_L2", 1);
474  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(4, "GE-1/1_L1", 1);
475  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(5, "GE0-", 1);
476  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(6, "GE0+", 1);
477  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(7, "GE+1/1_L1", 1);
478  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(8, "GE+1/1_L2", 1);
479  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(9, "GE+2/1_L1", 1);
480  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(10, "GE+2/1_L2", 1);
481 
482  for (int i = 1; i < 37; ++i) {
483  me_GEM_pass_Ch_region_layer_phase2->setBinLabel(i, std::to_string(i), 2);
484  }
485  me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Chamber", 2);
486  me_GEM_pass_Ch_region_layer_phase2->setAxisTitle("Number of passing probes", 3);
487 
488  m_histos["GE11_nPassingProbe_Ch_region"] = me_GE11_pass_Ch_region;
489  m_histos["GE11_nFailingProbe_Ch_region"] = me_GE11_fail_Ch_region;
490  m_histos["GE21_nPassingProbe_Ch_region"] = me_GE21_pass_Ch_region;
491  m_histos["GE21_nFailingProbe_Ch_region"] = me_GE21_fail_Ch_region;
492  m_histos["GEM_nPassingProbe_Ch_region_GE1"] = me_GEM_pass_Ch_region_GE1;
493  m_histos["GEM_nFailingProbe_Ch_region_GE1"] = me_GEM_fail_Ch_region_GE1;
494  m_histos["GEM_nPassingProbe_Ch_region_GE1_NoL"] = me_GEM_pass_Ch_region_GE1_NoL;
495  m_histos["GEM_nFailingProbe_Ch_region_GE1_NoL"] = me_GEM_fail_Ch_region_GE1_NoL;
496  m_histos["GE11_nPassingProbe_Ch_ieta"] = me_GE11_pass_Ch_ieta;
497  m_histos["GE11_nFailingProbe_Ch_ieta"] = me_GE11_fail_Ch_ieta;
498  m_histos["GE11_nPassingProbe_Ch_phi"] = me_GE11_pass_Ch_phi;
499  m_histos["GE11_nFailingProbe_Ch_phi"] = me_GE11_fail_Ch_phi;
500  m_histos["GE21_nPassingProbe_Ch_ieta"] = me_GE21_pass_Ch_ieta;
501  m_histos["GE21_nFailingProbe_Ch_ieta"] = me_GE21_fail_Ch_ieta;
502  m_histos["GE21_nPassingProbe_Ch_phi"] = me_GE21_pass_Ch_phi;
503  m_histos["GE21_nFailingProbe_Ch_phi"] = me_GE21_fail_Ch_phi;
504  m_histos["GE11_nPassingProbe_allCh_1D"] = me_GE11_pass_allCh_1D;
505  m_histos["GE11_nFailingProbe_allCh_1D"] = me_GE11_fail_allCh_1D;
506  m_histos["GE21_nPassingProbe_allCh_1D"] = me_GE21_pass_allCh_1D;
507  m_histos["GE21_nFailingProbe_allCh_1D"] = me_GE21_fail_allCh_1D;
508  m_histos["GE11_nPassingProbe_chamber_1D"] = me_GE11_pass_chamber_1D;
509  m_histos["GE11_nFailingProbe_chamber_1D"] = me_GE11_fail_chamber_1D;
510  m_histos["GE21_nPassingProbe_chamber_1D"] = me_GE21_pass_chamber_1D;
511  m_histos["GE21_nFailingProbe_chamber_1D"] = me_GE21_fail_chamber_1D;
512  m_histos["GEM_nPassingProbe_chamber_p1_1D"] = me_GEM_pass_chamber_p1_1D;
513  m_histos["GEM_nFailingProbe_chamber_p1_1D"] = me_GEM_fail_chamber_p1_1D;
514  m_histos["GEM_nPassingProbe_chamber_p2_1D"] = me_GEM_pass_chamber_p2_1D;
515  m_histos["GEM_nFailingProbe_chamber_p2_1D"] = me_GEM_fail_chamber_p2_1D;
516  m_histos["GEM_nPassingProbe_chamber_n1_1D"] = me_GEM_pass_chamber_n1_1D;
517  m_histos["GEM_nFailingProbe_chamber_n1_1D"] = me_GEM_fail_chamber_n1_1D;
518  m_histos["GEM_nPassingProbe_chamber_n2_1D"] = me_GEM_pass_chamber_n2_1D;
519  m_histos["GEM_nFailingProbe_chamber_n2_1D"] = me_GEM_fail_chamber_n2_1D;
520  m_histos["GEM_nPassingProbe_pt_1D"] = me_GEM_pass_pt_1D;
521  m_histos["GEM_nFailingProbe_pt_1D"] = me_GEM_fail_pt_1D;
522  m_histos["GEM_nPassingProbe_eta_1D"] = me_GEM_pass_eta_1D;
523  m_histos["GEM_nFailingProbe_eta_1D"] = me_GEM_fail_eta_1D;
524  m_histos["GEM_nPassingProbe_phi_1D"] = me_GEM_pass_phi_1D;
525  m_histos["GEM_nFailingProbe_phi_1D"] = me_GEM_fail_phi_1D;
526  m_histos["GEM_nPassingProbe_pt_p1_1D"] = me_GEM_pass_pt_p1_1D;
527  m_histos["GEM_nFailingProbe_pt_p1_1D"] = me_GEM_fail_pt_p1_1D;
528  m_histos["GEM_nPassingProbe_eta_p1_1D"] = me_GEM_pass_eta_p1_1D;
529  m_histos["GEM_nFailingProbe_eta_p1_1D"] = me_GEM_fail_eta_p1_1D;
530  m_histos["GEM_nPassingProbe_phi_p1_1D"] = me_GEM_pass_phi_p1_1D;
531  m_histos["GEM_nFailingProbe_phi_p1_1D"] = me_GEM_fail_phi_p1_1D;
532  m_histos["GEM_nPassingProbe_pt_p2_1D"] = me_GEM_pass_pt_p2_1D;
533  m_histos["GEM_nFailingProbe_pt_p2_1D"] = me_GEM_fail_pt_p2_1D;
534  m_histos["GEM_nPassingProbe_eta_p2_1D"] = me_GEM_pass_eta_p2_1D;
535  m_histos["GEM_nFailingProbe_eta_p2_1D"] = me_GEM_fail_eta_p2_1D;
536  m_histos["GEM_nPassingProbe_phi_p2_1D"] = me_GEM_pass_phi_p2_1D;
537  m_histos["GEM_nFailingProbe_phi_p2_1D"] = me_GEM_fail_phi_p2_1D;
538  m_histos["GEM_nPassingProbe_pt_n1_1D"] = me_GEM_pass_pt_n1_1D;
539  m_histos["GEM_nFailingProbe_pt_n1_1D"] = me_GEM_fail_pt_n1_1D;
540  m_histos["GEM_nPassingProbe_eta_n1_1D"] = me_GEM_pass_eta_n1_1D;
541  m_histos["GEM_nFailingProbe_eta_n1_1D"] = me_GEM_fail_eta_n1_1D;
542  m_histos["GEM_nPassingProbe_phi_n1_1D"] = me_GEM_pass_phi_n1_1D;
543  m_histos["GEM_nFailingProbe_phi_n1_1D"] = me_GEM_fail_phi_n1_1D;
544  m_histos["GEM_nPassingProbe_pt_n2_1D"] = me_GEM_pass_pt_n2_1D;
545  m_histos["GEM_nFailingProbe_pt_n2_1D"] = me_GEM_fail_pt_n2_1D;
546  m_histos["GEM_nPassingProbe_eta_n2_1D"] = me_GEM_pass_eta_n2_1D;
547  m_histos["GEM_nFailingProbe_eta_n2_1D"] = me_GEM_fail_eta_n2_1D;
548  m_histos["GEM_nPassingProbe_phi_n2_1D"] = me_GEM_pass_phi_n2_1D;
549  m_histos["GEM_nFailingProbe_phi_n2_1D"] = me_GEM_fail_phi_n2_1D;
550  m_histos["ME0_nPassingProbe_chamber_1D"] = me_ME0_pass_chamber_1D;
551  m_histos["ME0_nFailingProbe_chamber_1D"] = me_ME0_fail_chamber_1D;
552  m_histos["GEM_nPassingProbe_Ch_region_layer_phase2"] = me_GEM_pass_Ch_region_layer_phase2;
553  m_histos["GEM_nFailingProbe_Ch_region_layer_phase2"] = me_GEM_fail_Ch_region_layer_phase2;
554 
555  std::string baseDir_ = topFolder() + "/detailed/";
556  iBooker.setCurrentFolder(baseDir_);
557  m_histos["GEMseg_dx_ME0"] = iBooker.book1D("GEMseg_dx_ME0", "GEMseg_dx;probe dx [cm];Events", 100, 0., 20.);
558  m_histos["GEMhit_dx_GE1"] = iBooker.book1D("GEMhit_dx_GE1", "GEMhit_dx;probe dx [cm];Events", 100, 0., 10.);
559  m_histos["GEMhit_dx_GE2"] = iBooker.book1D("GEMhit_dx_GE2", "GEMhit_dx;probe dx [cm];Events", 100, 0., 10.);
560 
561  m_histos["GEMseg_x_ME0"] = iBooker.book1D("GEMhit_x_ME0", "GEMhit_x;probe x [cm];Events", 100, -10., 10.);
562  m_histos["GEMhit_x_GE1"] = iBooker.book1D("GEMhit_x_GE1", "GEMhit_x;probe x [cm];Events", 100, -10., 10.);
563  m_histos["GEMhit_x_GE2"] = iBooker.book1D("GEMhit_x_GE2", "GEMhit_x;probe x [cm];Events", 100, -10., 10.);
564  m_histos["Cham_x_ME0"] = iBooker.book1D("Cham_x_ME0", "Cham_x;probe x [cm];Events", 100, -10., 10.);
565  m_histos["Cham_x_GE1"] = iBooker.book1D("Cham_x_GE1", "Cham_x;probe x [cm];Events", 100, -10., 10.);
566  m_histos["Cham_x_GE2"] = iBooker.book1D("Cham_x_GE2", "Cham_x;probe x [cm];Events", 100, -10., 10.);
567 }
568 
571 
573  event.getByToken(m_muToken, muons);
574 
575  //GE11 variables
576  std::vector<std::vector<int>> probe_coll_GE11_region;
577  std::vector<std::vector<int>> probe_coll_GE11_lay;
578  std::vector<std::vector<int>> probe_coll_GE11_chamber;
579  std::vector<std::vector<float>> probe_coll_GE11_pt;
580  std::vector<std::vector<float>> probe_coll_GE11_eta;
581  std::vector<std::vector<float>> probe_coll_GE11_ieta;
582  std::vector<std::vector<float>> probe_coll_GE11_phi;
583  std::vector<std::vector<int>> probe_coll_GE11_sta;
584  std::vector<std::vector<float>> probe_coll_GE11_dx;
585 
586  //GE21 variables
587  std::vector<std::vector<int>> probe_coll_GE21_region;
588  std::vector<std::vector<int>> probe_coll_GE21_lay;
589  std::vector<std::vector<int>> probe_coll_GE21_chamber;
590  std::vector<std::vector<float>> probe_coll_GE21_pt;
591  std::vector<std::vector<float>> probe_coll_GE21_eta;
592  std::vector<std::vector<float>> probe_coll_GE21_ieta;
593  std::vector<std::vector<float>> probe_coll_GE21_phi;
594  std::vector<std::vector<int>> probe_coll_GE21_sta;
595  std::vector<std::vector<float>> probe_coll_GE21_dx;
596 
597  std::vector<uint8_t> probe_coll_GEM_staMatch; // ME0 to 0b0001, GE11 to 0b0010, GE21 to 0b0100
598 
599  //ME0 variables
600  std::vector<std::vector<int>> probe_coll_ME0_region;
601  std::vector<std::vector<int>> probe_coll_ME0_roll;
602  std::vector<std::vector<int>> probe_coll_ME0_lay;
603  std::vector<std::vector<int>> probe_coll_ME0_chamber;
604  std::vector<std::vector<float>> probe_coll_ME0_pt;
605  std::vector<std::vector<float>> probe_coll_ME0_eta;
606  std::vector<std::vector<float>> probe_coll_ME0_ieta;
607  std::vector<std::vector<float>> probe_coll_ME0_phi;
608  std::vector<std::vector<int>> probe_coll_ME0_sta;
609  std::vector<std::vector<float>> probe_coll_ME0_dx;
610 
611  std::vector<unsigned> probe_indices;
612  if (!m_probeIndices.empty())
613  probe_indices = m_probeIndices.back();
614 
615  //Fill probe dx + subdetector coordinates
616  for (const auto i : probe_indices) {
617  //GE11 variables
618  std::vector<int> probe_GE11_region;
619  std::vector<int> probe_GE11_sta;
620  std::vector<int> probe_GE11_lay;
621  std::vector<int> probe_GE11_chamber;
622  std::vector<float> probe_GE11_pt;
623  std::vector<float> probe_GE11_eta;
624  std::vector<float> probe_GE11_ieta;
625  std::vector<float> probe_GE11_phi;
626  std::vector<float> probe_GE11_dx;
627  //GE21 variables
628  std::vector<int> probe_GE21_region;
629  std::vector<int> probe_GE21_sta;
630  std::vector<int> probe_GE21_lay;
631  std::vector<int> probe_GE21_chamber;
632  std::vector<float> probe_GE21_pt;
633  std::vector<float> probe_GE21_eta;
634  std::vector<float> probe_GE21_ieta;
635  std::vector<float> probe_GE21_phi;
636  std::vector<float> probe_GE21_dx;
637  //std::vector<float> probe_GEM_dx_seg;
638  uint8_t GEM_stationMatching = 0;
639  //ME0 variables
640  std::vector<int> probe_ME0_region;
641  std::vector<int> probe_ME0_roll;
642  std::vector<int> probe_ME0_sta;
643  std::vector<int> probe_ME0_lay;
644  std::vector<int> probe_ME0_chamber;
645  std::vector<float> probe_ME0_pt;
646  std::vector<float> probe_ME0_eta;
647  std::vector<float> probe_ME0_ieta;
648  std::vector<float> probe_ME0_phi;
649  std::vector<float> probe_ME0_dx;
650 
651  bool gem_matched = false; // fill detailed plots only for probes matching GEM
652 
653  for (const auto& chambMatch : (*muons).at(i).matches()) {
654  // look in GEMs
655  bool hit_matched = false; // true if chambermatch has at least one hit (GE11, GE21) or segment (ME0)
656  if (chambMatch.detector() == MuonSubdetId::GEM) {
657  if (chambMatch.edgeX < m_borderCut && chambMatch.edgeY < m_borderCut) {
658  gem_matched = true; //fill detailed plots if at least one GEM probe match
659 
660  GEMDetId chId(chambMatch.id.rawId());
661 
662  const int roll = chId.roll();
663  const int region = chId.region();
664  const int station = chId.station();
665  const int layer = chId.layer();
666  const int chamber = chId.chamber();
667  const int ieta = chId.ieta();
668  const float pt = (*muons).at(i).pt();
669  const float eta = (*muons).at(i).eta();
670  const float phi = (*muons).at(i).phi();
671  GEM_stationMatching = GEM_stationMatching | (1 << station);
672 
673  if (station == 1 || station == 2) {
674  reco::MuonGEMHitMatch closest_matchedHit;
675  double smallestDx = 99999.;
676  double matched_GEMHit_x = 99999.;
677 
678  for (auto& gemHit : chambMatch.gemHitMatches) {
679  float dx = std::abs(chambMatch.x - gemHit.x);
680  if (dx < smallestDx) {
681  smallestDx = dx;
682  closest_matchedHit = gemHit;
683  matched_GEMHit_x = gemHit.x;
684  hit_matched = true;
685  }
686  }
687 
688  if (station == 1) {
689  probe_GE11_region.push_back(region);
690  probe_GE11_sta.push_back(station);
691  probe_GE11_lay.push_back(layer);
692  probe_GE11_chamber.push_back(chamber);
693  probe_GE11_ieta.push_back(ieta);
694  probe_GE11_pt.push_back(pt);
695  probe_GE11_eta.push_back(eta);
696  probe_GE11_phi.push_back(phi);
697  probe_GE11_dx.push_back(smallestDx);
698  }
699 
700  if (station == 2) {
701  probe_GE21_region.push_back(region);
702  probe_GE21_sta.push_back(station);
703  probe_GE21_lay.push_back(layer);
704  probe_GE21_chamber.push_back(chamber);
705  probe_GE21_ieta.push_back(ieta);
706  probe_GE21_pt.push_back(pt);
707  probe_GE21_eta.push_back(eta);
708  probe_GE21_phi.push_back(phi);
709  probe_GE21_dx.push_back(smallestDx);
710  }
711 
712  if (m_detailedAnalysis && hit_matched) {
713  if (station == 1) {
714  m_histos.find("GEMhit_dx_GE1")->second->Fill(smallestDx);
715  m_histos.find("GEMhit_x_GE1")->second->Fill(matched_GEMHit_x);
716  m_histos.find("Cham_x_GE1")->second->Fill(chambMatch.x);
717  }
718  if (station == 2) {
719  m_histos.find("GEMhit_dx_GE2")->second->Fill(smallestDx);
720  m_histos.find("GEMhit_x_GE2")->second->Fill(matched_GEMHit_x);
721  m_histos.find("Cham_x_GE2")->second->Fill(chambMatch.x);
722  }
723  }
724  }
725 
726  if (station == 0) {
727  reco::MuonSegmentMatch closest_matchedSegment;
728  double smallestDx_seg = 99999.;
729 
730  for (auto& seg : chambMatch.gemMatches) {
731  float dx_seg = std::abs(chambMatch.x - seg.x);
732  if (dx_seg < smallestDx_seg) {
733  smallestDx_seg = dx_seg;
734  closest_matchedSegment = seg;
735  hit_matched = true;
736  }
737  }
738 
739  probe_ME0_region.push_back(region);
740  probe_ME0_roll.push_back(roll);
741  probe_ME0_sta.push_back(station);
742  probe_ME0_lay.push_back(layer);
743  probe_ME0_chamber.push_back(chamber);
744  probe_ME0_ieta.push_back(ieta);
745  probe_ME0_pt.push_back(pt);
746  probe_ME0_eta.push_back(eta);
747  probe_ME0_phi.push_back(phi);
748  probe_ME0_dx.push_back(smallestDx_seg);
749 
750  if (m_detailedAnalysis && hit_matched) {
751  m_histos.find("GEMseg_dx_ME0")->second->Fill(smallestDx_seg);
752  m_histos.find("GEMseg_x_ME0")->second->Fill(closest_matchedSegment.x);
753  m_histos.find("Cham_x_ME0")->second->Fill(chambMatch.x);
754  }
755  }
756  }
757  } else
758  continue;
759  } //loop over chamber matches
760 
761  //Fill detailed plots
762  if (m_detailedAnalysis && gem_matched) {
763  m_histos.find("probeEta")->second->Fill((*muons).at(i).eta());
764  m_histos.find("probePhi")->second->Fill((*muons).at(i).phi());
765  m_histos.find("probeNumberOfMatchedStations")->second->Fill((*muons).at(i).numberOfMatchedStations());
766  m_histos.find("probePt")->second->Fill((*muons).at(i).pt());
767  //for(int ii=0; i<probe_GEM_dx.size(); ii++)
768  //{
769  // m_histos.find("GEMhit_dx")->second->Fill(probe_GEM_dx[ii]);
770  // m_histos.find("GEMseg_dx")->second->Fill(probe_GEM_dx_seg[ii]);
771  //}
772  }
773 
774  //Fill GEM variables
775  probe_coll_GE11_region.push_back(probe_GE11_region);
776  probe_coll_GE11_sta.push_back(probe_GE11_sta);
777  probe_coll_GE11_lay.push_back(probe_GE11_lay);
778  probe_coll_GE11_chamber.push_back(probe_GE11_chamber);
779  probe_coll_GE11_ieta.push_back(probe_GE11_ieta);
780  probe_coll_GE11_pt.push_back(probe_GE11_pt);
781  probe_coll_GE11_eta.push_back(probe_GE11_eta);
782  probe_coll_GE11_phi.push_back(probe_GE11_phi);
783  probe_coll_GE11_dx.push_back(probe_GE11_dx);
784 
785  probe_coll_GEM_staMatch.push_back(GEM_stationMatching);
786 
787  //Fill GE21 variables
788  probe_coll_GE21_region.push_back(probe_GE21_region);
789  probe_coll_GE21_sta.push_back(probe_GE21_sta);
790  probe_coll_GE21_lay.push_back(probe_GE21_lay);
791  probe_coll_GE21_chamber.push_back(probe_GE21_chamber);
792  probe_coll_GE21_ieta.push_back(probe_GE21_ieta);
793  probe_coll_GE21_pt.push_back(probe_GE21_pt);
794  probe_coll_GE21_eta.push_back(probe_GE21_eta);
795  probe_coll_GE21_phi.push_back(probe_GE21_phi);
796  probe_coll_GE21_dx.push_back(probe_GE21_dx);
797 
798  //Fill ME0 variables
799  probe_coll_ME0_region.push_back(probe_ME0_region);
800  probe_coll_ME0_roll.push_back(probe_ME0_roll); // same as ieta
801  probe_coll_ME0_sta.push_back(probe_ME0_sta);
802  probe_coll_ME0_lay.push_back(probe_ME0_lay);
803  probe_coll_ME0_chamber.push_back(probe_ME0_chamber);
804  probe_coll_ME0_ieta.push_back(probe_ME0_ieta);
805  probe_coll_ME0_pt.push_back(probe_ME0_pt);
806  probe_coll_ME0_eta.push_back(probe_ME0_eta);
807  probe_coll_ME0_phi.push_back(probe_ME0_phi);
808  probe_coll_ME0_dx.push_back(probe_ME0_dx);
809 
810  } //loop over probe collection
811 
812  //Loop over probes
813  for (unsigned i = 0; i < probe_indices.size(); ++i) {
814  //uint8_t GEM_matchPatt = probe_coll_GEM_staMatch.at(i); // ME0 to 0b0001, GE11 to 0b0010, GE21 to 0b0100
815 
816  //Loop over ME0 matches
817  unsigned nME0_matches = probe_coll_ME0_region.at(i).size();
818  for (unsigned j = 0; j < nME0_matches; ++j) {
819  //ME0 variables
820  int ME0_region = probe_coll_ME0_region.at(i).at(j);
821  //int ME0_roll = probe_coll_ME0_roll.at(i).at(j);
822  //int ME0_sta = probe_coll_ME0_sta.at(i).at(j);
823  //int ME0_lay = probe_coll_ME0_lay.at(i).at(j);
824  int ME0_chamber = probe_coll_ME0_chamber.at(i).at(j);
825  //float ME0_pt = probe_coll_ME0_pt.at(i).at(j);
826  float ME0_dx = probe_coll_ME0_dx.at(i).at(j);
827  //float ME0_eta = probe_coll_ME0_eta.at(i).at(j);
828  //float ME0_phi = probe_coll_ME0_phi.at(i).at(j);
829 
830  if (ME0_dx < m_dxCut) {
831  m_histos.find("ME0_nPassingProbe_chamber_1D")->second->Fill(ME0_chamber);
832  if (ME0_region < 0)
833  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber);
834  else if (ME0_region > 0)
835  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber);
836  } else {
837  m_histos.find("ME0_nFailingProbe_chamber_1D")->second->Fill(ME0_chamber);
838  if (ME0_region < 0)
839  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(4, ME0_chamber);
840  else if (ME0_region > 0)
841  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(5, ME0_chamber);
842  }
843  }
844  //
845 
846  //Loop over GE11 matches
847  unsigned nGE11_matches = probe_coll_GE11_region.at(i).size();
848  for (unsigned j = 0; j < nGE11_matches; ++j) {
849  //GEM variables
850  int GEM_region = probe_coll_GE11_region.at(i).at(j);
851  int GEM_sta = probe_coll_GE11_sta.at(i).at(j);
852  int GEM_lay = probe_coll_GE11_lay.at(i).at(j);
853  int GEM_chamber = probe_coll_GE11_chamber.at(i).at(j);
854  int GEM_ieta = probe_coll_GE11_ieta.at(i).at(j);
855  float GEM_pt = probe_coll_GE11_pt.at(i).at(j);
856  float GEM_dx = probe_coll_GE11_dx.at(i).at(j);
857  float GEM_eta = probe_coll_GE11_eta.at(i).at(j);
858  float GEM_phi = probe_coll_GE11_phi.at(i).at(j);
859  //Fill GEM plots
860  if (GEM_dx < m_dxCut) {
861  m_histos.find("GE11_nPassingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber);
862  m_histos.find("GE11_nPassingProbe_Ch_ieta")->second->Fill(GEM_ieta, GEM_chamber);
863  m_histos.find("GE11_nPassingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber);
864  m_histos.find("GE11_nPassingProbe_allCh_1D")->second->Fill(GEM_region);
865  m_histos.find("GE11_nPassingProbe_chamber_1D")->second->Fill(GEM_chamber);
866  if (GEM_region < 0) {
867  if (GEM_lay == 2)
868  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber);
869  else if (GEM_lay == 1)
870  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber);
871  }
872  if (GEM_region > 0) {
873  if (GEM_lay == 1)
874  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber);
875  else if (GEM_lay == 2)
876  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber);
877  }
878  if (GEM_region == -1) {
879  m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber);
880  } else if (GEM_region == 1) {
881  m_histos.find("GEM_nPassingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber);
882  }
883 
884  if (GEM_region == 1 && GEM_lay == 1) {
885  m_histos.find("GEM_nPassingProbe_chamber_p1_1D")->second->Fill(GEM_chamber);
886  m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber);
887  m_histos.find("GEM_nPassingProbe_pt_p1_1D")->second->Fill(GEM_pt);
888  m_histos.find("GEM_nPassingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta));
889  m_histos.find("GEM_nPassingProbe_phi_p1_1D")->second->Fill(GEM_phi);
890  } else if (GEM_region == 1 && GEM_lay == 2) {
891  m_histos.find("GEM_nPassingProbe_chamber_p2_1D")->second->Fill(GEM_chamber);
892  m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber);
893  m_histos.find("GEM_nPassingProbe_pt_p2_1D")->second->Fill(GEM_pt);
894  m_histos.find("GEM_nPassingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta));
895  m_histos.find("GEM_nPassingProbe_phi_p2_1D")->second->Fill(GEM_phi);
896  } else if (GEM_region == -1 && GEM_lay == 1) {
897  m_histos.find("GEM_nPassingProbe_chamber_n1_1D")->second->Fill(GEM_chamber);
898  m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber);
899  m_histos.find("GEM_nPassingProbe_pt_n1_1D")->second->Fill(GEM_pt);
900  m_histos.find("GEM_nPassingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta));
901  m_histos.find("GEM_nPassingProbe_phi_n1_1D")->second->Fill(GEM_phi);
902  } else if (GEM_region == -1 && GEM_lay == 2) {
903  m_histos.find("GEM_nPassingProbe_chamber_n2_1D")->second->Fill(GEM_chamber);
904  m_histos.find("GEM_nPassingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber);
905  m_histos.find("GEM_nPassingProbe_pt_n2_1D")->second->Fill(GEM_pt);
906  m_histos.find("GEM_nPassingProbe_eta_n2_1D")->second->Fill(abs(GEM_eta));
907  m_histos.find("GEM_nPassingProbe_phi_n2_1D")->second->Fill(GEM_phi);
908  }
909  m_histos.find("GEM_nPassingProbe_pt_1D")->second->Fill(GEM_pt);
910  m_histos.find("GEM_nPassingProbe_eta_1D")->second->Fill(abs(GEM_eta));
911  m_histos.find("GEM_nPassingProbe_phi_1D")->second->Fill(GEM_phi);
912  } else {
913  m_histos.find("GE11_nFailingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber);
914  m_histos.find("GE11_nFailingProbe_Ch_ieta")->second->Fill(GEM_ieta, GEM_chamber);
915  m_histos.find("GE11_nFailingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber);
916  m_histos.find("GE11_nFailingProbe_allCh_1D")->second->Fill(GEM_region);
917  m_histos.find("GE11_nFailingProbe_chamber_1D")->second->Fill(GEM_chamber);
918  if (GEM_region < 0) {
919  if (GEM_sta == 2 and GEM_lay == 2)
920  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber);
921  else if (GEM_sta == 2 and GEM_lay == 1)
922  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber);
923  else if (GEM_sta == 1 and GEM_lay == 2)
924  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(2, GEM_chamber);
925  else if (GEM_sta == 1 and GEM_lay == 1)
926  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(3, GEM_chamber);
927  }
928  if (GEM_region > 0) {
929  if (GEM_sta == 1 and GEM_lay == 1)
930  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(6, GEM_chamber);
931  else if (GEM_sta == 1 and GEM_lay == 2)
932  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(7, GEM_chamber);
933  else if (GEM_sta == 2 and GEM_lay == 1)
934  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber);
935  else if (GEM_sta == 2 and GEM_lay == 2)
936  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber);
937  }
938  if (GEM_region == -1) {
939  m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(0, GEM_chamber);
940  } else if (GEM_region == 1) {
941  m_histos.find("GEM_nFailingProbe_Ch_region_GE1_NoL")->second->Fill(1, GEM_chamber);
942  }
943  //
944  if (GEM_region == 1 && GEM_lay == 1) {
945  m_histos.find("GEM_nFailingProbe_chamber_p1_1D")->second->Fill(GEM_chamber);
946  m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(2, GEM_chamber);
947  m_histos.find("GEM_nFailingProbe_pt_p1_1D")->second->Fill(GEM_pt);
948  m_histos.find("GEM_nFailingProbe_eta_p1_1D")->second->Fill(abs(GEM_eta));
949  m_histos.find("GEM_nFailingProbe_phi_p1_1D")->second->Fill(GEM_phi);
950  } else if (GEM_region == 1 && GEM_lay == 2) {
951  m_histos.find("GEM_nFailingProbe_chamber_p2_1D")->second->Fill(GEM_chamber);
952  m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(3, GEM_chamber);
953  m_histos.find("GEM_nFailingProbe_pt_p2_1D")->second->Fill(GEM_pt);
954  m_histos.find("GEM_nFailingProbe_eta_p2_1D")->second->Fill(abs(GEM_eta));
955  m_histos.find("GEM_nFailingProbe_phi_p2_1D")->second->Fill(GEM_phi);
956  } else if (GEM_region == -1 && GEM_lay == 1) {
957  m_histos.find("GEM_nFailingProbe_chamber_n1_1D")->second->Fill(GEM_chamber);
958  m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(1, GEM_chamber);
959  m_histos.find("GEM_nFailingProbe_pt_n1_1D")->second->Fill(GEM_pt);
960  m_histos.find("GEM_nFailingProbe_eta_n1_1D")->second->Fill(abs(GEM_eta));
961  m_histos.find("GEM_nFailingProbe_phi_n1_1D")->second->Fill(GEM_phi);
962  } else if (GEM_region == -1 && GEM_lay == 2) {
963  m_histos.find("GEM_nFailingProbe_chamber_n2_1D")->second->Fill(GEM_chamber);
964  m_histos.find("GEM_nFailingProbe_Ch_region_GE1")->second->Fill(0, GEM_chamber);
965  m_histos.find("GEM_nFailingProbe_pt_n2_1D")->second->Fill(GEM_pt);
966  m_histos.find("GEM_nFailingProbe_eta_n2_1D")->second->Fill(abs(GEM_eta));
967  m_histos.find("GEM_nFailingProbe_phi_n2_1D")->second->Fill(GEM_phi);
968  }
969  m_histos.find("GEM_nFailingProbe_pt_1D")->second->Fill(GEM_pt);
970  m_histos.find("GEM_nFailingProbe_eta_1D")->second->Fill(abs(GEM_eta));
971  m_histos.find("GEM_nFailingProbe_phi_1D")->second->Fill(GEM_phi);
972  }
973  }
974 
975  //Loop over GE21 matches
976  unsigned nGE21_matches = probe_coll_GE21_region.at(i).size();
977  for (unsigned j = 0; j < nGE21_matches; ++j) {
978  //GEM variables
979  int GEM_region = probe_coll_GE21_region.at(i).at(j);
980  int GEM_lay = probe_coll_GE21_lay.at(i).at(j);
981  int GEM_chamber = probe_coll_GE21_chamber.at(i).at(j);
982  float GEM_ieta = probe_coll_GE21_ieta.at(i).at(j);
983  float GEM_dx = probe_coll_GE21_dx.at(i).at(j);
984  float GEM_phi = probe_coll_GE21_phi.at(i).at(j);
985 
986  //Fill GEM plots
987  if (GEM_dx < m_dxCut) {
988  m_histos.find("GE21_nPassingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber);
989  m_histos.find("GE21_nPassingProbe_Ch_ieta")->second->Fill(GEM_ieta, GEM_chamber);
990  m_histos.find("GE21_nPassingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber);
991  m_histos.find("GE21_nPassingProbe_allCh_1D")->second->Fill(GEM_region);
992  m_histos.find("GE21_nPassingProbe_chamber_1D")->second->Fill(GEM_chamber);
993  if (GEM_region < 0) {
994  if (GEM_lay == 2)
995  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber);
996  else if (GEM_lay == 1)
997  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber);
998  }
999  if (GEM_region > 0) {
1000  if (GEM_lay == 1)
1001  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber);
1002  else if (GEM_lay == 2)
1003  m_histos.find("GEM_nPassingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber);
1004  }
1005  } else {
1006  m_histos.find("GE21_nFailingProbe_Ch_region")->second->Fill(GEM_region, GEM_chamber);
1007  m_histos.find("GE21_nFailingProbe_Ch_ieta")->second->Fill(GEM_ieta, GEM_chamber);
1008  m_histos.find("GE21_nFailingProbe_Ch_phi")->second->Fill(GEM_phi, GEM_chamber);
1009  m_histos.find("GE21_nFailingProbe_allCh_1D")->second->Fill(GEM_region);
1010  m_histos.find("GE21_nFailingProbe_chamber_1D")->second->Fill(GEM_chamber);
1011  if (GEM_region < 0) {
1012  if (GEM_lay == 2)
1013  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(0, GEM_chamber);
1014  else if (GEM_lay == 1)
1015  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(1, GEM_chamber);
1016  }
1017  if (GEM_region > 0) {
1018  if (GEM_lay == 1)
1019  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(8, GEM_chamber);
1020  else if (GEM_lay == 2)
1021  m_histos.find("GEM_nFailingProbe_Ch_region_layer_phase2")->second->Fill(9, GEM_chamber);
1022  }
1023  }
1024  }
1025  }
1026 }
1027 
1028 std::string GEMTnPEfficiencyTask::topFolder() const { return "GEM/Segment_TnP/"; };
1029 
const double Pi
static constexpr int GEM
Definition: MuonSubdetId.h:14
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
~GEMTnPEfficiencyTask() override
Destructor.
const edm::EDGetTokenT< reco::MuonCollection > m_muToken
Definition: config.py:1
static std::string to_string(const XMLCh *ch)
#define LogTrace(id)
std::vector< std::vector< unsigned > > m_probeIndices
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::map< std::string, MonitorElement * > m_histos
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &run, edm::EventSetup const &context) override
void analyze(const edm::Event &event, const edm::EventSetup &context) override
Analyze.
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)
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &run, edm::EventSetup const &context) override
void analyze(const edm::Event &event, const edm::EventSetup &context) override
Analyze.
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
GEMTnPEfficiencyTask(const edm::ParameterSet &config)
Constructor.
std::string topFolder() const override
Return the top folder.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
Definition: event.py:1
Definition: Run.h:45
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)