CMS 3D CMS Logo

SiStripTrackingRecHitsValid.cc
Go to the documentation of this file.
1 #include <memory>
2 #include <string>
3 #include <iostream>
4 #include <TMath.h>
6 
8 
14 
19 
22 
30 
31 using namespace std;
32 using namespace edm;
33 
34 // ROOT
35 #include "TROOT.h"
36 #include "TFile.h"
37 #include "TTree.h"
38 #include "TBranch.h"
39 #include "TH1.h"
40 #include "TH2.h"
41 class TFile;
42 
43 //Constructor
45  : m_geomToken(esConsumes()),
46  m_topoToken(esConsumes()),
47  m_topoTokenBR(esConsumes<edm::Transition::BeginRun>()),
48  m_SiStripDetCablingToken(esConsumes<edm::Transition::BeginRun>()),
49  m_stripCPEToken(esConsumes(edm::ESInputTag("", "SimpleStripCPE"))),
50  dbe_(edm::Service<DQMStore>().operator->()),
51  conf_(ps),
52  trackerHitAssociatorConfig_(ps, consumesCollector())
53 // trajectoryInput_( ps.getParameter<edm::InputTag>("trajectoryInput") )
54 {
55  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
56 
57  runStandalone = conf_.getParameter<bool>("runStandalone");
58 
59  outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
60 
62 
63  tracksInputToken_ = consumes<std::vector<reco::Track> >(conf_.getParameter<edm::InputTag>("tracksInput"));
64 
65  edm::ParameterSet ParametersResolx_LF = conf_.getParameter<edm::ParameterSet>("TH1Resolx_LF");
66  layerswitchResolx_LF = ParametersResolx_LF.getParameter<bool>("layerswitchon");
67 
68  edm::ParameterSet ParametersResolx_MF = conf_.getParameter<edm::ParameterSet>("TH1Resolx_MF");
69  layerswitchResolx_MF = ParametersResolx_MF.getParameter<bool>("layerswitchon");
70 
71  edm::ParameterSet ParametersRes_LF = conf_.getParameter<edm::ParameterSet>("TH1Res_LF");
72  layerswitchRes_LF = ParametersRes_LF.getParameter<bool>("layerswitchon");
73 
74  edm::ParameterSet ParametersRes_MF = conf_.getParameter<edm::ParameterSet>("TH1Res_MF");
75  layerswitchRes_MF = ParametersRes_MF.getParameter<bool>("layerswitchon");
76 
77  edm::ParameterSet ParametersPull_LF = conf_.getParameter<edm::ParameterSet>("TH1Pull_LF");
78  layerswitchPull_LF = ParametersPull_LF.getParameter<bool>("layerswitchon");
79 
80  edm::ParameterSet ParametersPull_MF = conf_.getParameter<edm::ParameterSet>("TH1Pull_MF");
81  layerswitchPull_MF = ParametersPull_MF.getParameter<bool>("layerswitchon");
82 
83  edm::ParameterSet ParametersCategory = conf_.getParameter<edm::ParameterSet>("TH1Category");
84  layerswitchCategory = ParametersCategory.getParameter<bool>("layerswitchon");
85 
86  edm::ParameterSet ParametersTrackwidth = conf_.getParameter<edm::ParameterSet>("TH1Trackwidth");
87  layerswitchTrackwidth = ParametersTrackwidth.getParameter<bool>("layerswitchon");
88 
89  edm::ParameterSet ParametersExpectedwidth = conf_.getParameter<edm::ParameterSet>("TH1Expectedwidth");
90  layerswitchExpectedwidth = ParametersExpectedwidth.getParameter<bool>("layerswitchon");
91 
92  edm::ParameterSet ParametersClusterwidth = conf_.getParameter<edm::ParameterSet>("TH1Clusterwidth");
93  layerswitchClusterwidth = ParametersClusterwidth.getParameter<bool>("layerswitchon");
94 
95  edm::ParameterSet ParametersTrackanglealpha = conf_.getParameter<edm::ParameterSet>("TH1Trackanglealpha");
96  layerswitchTrackanglealpha = ParametersTrackanglealpha.getParameter<bool>("layerswitchon");
97 
98  edm::ParameterSet ParametersTrackanglebeta = conf_.getParameter<edm::ParameterSet>("TH1Trackanglebeta");
99  layerswitchTrackanglebeta = ParametersTrackanglebeta.getParameter<bool>("layerswitchon");
100 
101  edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus1 =
102  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_WClus1");
104  ParametersResolxMFTrackwidthProfile_WClus1.getParameter<bool>("layerswitchon");
105 
106  edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus2 =
107  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_WClus2");
109  ParametersResolxMFTrackwidthProfile_WClus2.getParameter<bool>("layerswitchon");
110 
111  edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus3 =
112  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_WClus3");
114  ParametersResolxMFTrackwidthProfile_WClus3.getParameter<bool>("layerswitchon");
115 
116  edm::ParameterSet ParametersResolxMFTrackwidthProfile_WClus4 =
117  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_WClus4");
119  ParametersResolxMFTrackwidthProfile_WClus4.getParameter<bool>("layerswitchon");
120 
121  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus1 =
122  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus1");
124  ParametersResMFTrackwidthProfile_WClus1.getParameter<bool>("layerswitchon");
125 
126  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus2 =
127  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus2");
129  ParametersResMFTrackwidthProfile_WClus2.getParameter<bool>("layerswitchon");
130 
131  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus21 =
132  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus21");
134  ParametersResMFTrackwidthProfile_WClus21.getParameter<bool>("layerswitchon");
135 
136  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus22 =
137  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus22");
139  ParametersResMFTrackwidthProfile_WClus22.getParameter<bool>("layerswitchon");
140 
141  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus23 =
142  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus23");
144  ParametersResMFTrackwidthProfile_WClus23.getParameter<bool>("layerswitchon");
145 
146  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus3 =
147  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus3");
149  ParametersResMFTrackwidthProfile_WClus3.getParameter<bool>("layerswitchon");
150 
151  edm::ParameterSet ParametersResMFTrackwidthProfile_WClus4 =
152  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfile_WClus4");
154  ParametersResMFTrackwidthProfile_WClus4.getParameter<bool>("layerswitchon");
155 
156  edm::ParameterSet ParametersResolxMFTrackwidthProfile =
157  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile");
158  layerswitchResolxMFTrackwidthProfile = ParametersResolxMFTrackwidthProfile.getParameter<bool>("layerswitchon");
159 
160  edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category1 =
161  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_Category1");
163  ParametersResolxMFTrackwidthProfile_Category1.getParameter<bool>("layerswitchon");
164 
165  edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category2 =
166  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_Category2");
168  ParametersResolxMFTrackwidthProfile_Category2.getParameter<bool>("layerswitchon");
169 
170  edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category3 =
171  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_Category3");
173  ParametersResolxMFTrackwidthProfile_Category3.getParameter<bool>("layerswitchon");
174 
175  edm::ParameterSet ParametersResolxMFTrackwidthProfile_Category4 =
176  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfile_Category4");
178  ParametersResolxMFTrackwidthProfile_Category4.getParameter<bool>("layerswitchon");
179 
180  edm::ParameterSet ParametersResolxMFClusterwidthProfile_Category1 =
181  conf_.getParameter<edm::ParameterSet>("TProfResolxMFClusterwidthProfile_Category1");
183  ParametersResolxMFClusterwidthProfile_Category1.getParameter<bool>("layerswitchon");
184 
185  edm::ParameterSet ParametersResolxMFAngleProfile = conf_.getParameter<edm::ParameterSet>("TProfResolxMFAngleProfile");
186  layerswitchResolxMFAngleProfile = ParametersResolxMFAngleProfile.getParameter<bool>("layerswitchon");
187 
188  edm::ParameterSet ParametersWclusRphi = conf_.getParameter<edm::ParameterSet>("TH1WclusRphi");
189  layerswitchWclusRphi = ParametersWclusRphi.getParameter<bool>("layerswitchon");
190 
191  edm::ParameterSet ParametersAdcRphi = conf_.getParameter<edm::ParameterSet>("TH1AdcRphi");
192  layerswitchAdcRphi = ParametersAdcRphi.getParameter<bool>("layerswitchon");
193 
194  edm::ParameterSet ParametersResolxLFRphi = conf_.getParameter<edm::ParameterSet>("TH1ResolxLFRphi");
195  layerswitchResolxLFRphi = ParametersResolxLFRphi.getParameter<bool>("layerswitchon");
196 
197  edm::ParameterSet ParametersResolxMFRphi = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFRphi");
198  layerswitchResolxMFRphi = ParametersResolxMFRphi.getParameter<bool>("layerswitchon");
199 
200  edm::ParameterSet ParametersResolxMFRphiwclus1 = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFRphiwclus1");
201  layerswitchResolxMFRphiwclus1 = ParametersResolxMFRphiwclus1.getParameter<bool>("layerswitchon");
202 
203  edm::ParameterSet ParametersResolxMFRphiwclus2 = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFRphiwclus2");
204  layerswitchResolxMFRphiwclus2 = ParametersResolxMFRphiwclus2.getParameter<bool>("layerswitchon");
205 
206  edm::ParameterSet ParametersResolxMFRphiwclus3 = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFRphiwclus3");
207  layerswitchResolxMFRphiwclus3 = ParametersResolxMFRphiwclus3.getParameter<bool>("layerswitchon");
208 
209  edm::ParameterSet ParametersResolxMFRphiwclus4 = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFRphiwclus4");
210  layerswitchResolxMFRphiwclus4 = ParametersResolxMFRphiwclus4.getParameter<bool>("layerswitchon");
211 
212  edm::ParameterSet ParametersResLFRphi = conf_.getParameter<edm::ParameterSet>("TH1ResLFRphi");
213  layerswitchResLFRphi = ParametersResLFRphi.getParameter<bool>("layerswitchon");
214 
215  edm::ParameterSet ParametersResMFRphi = conf_.getParameter<edm::ParameterSet>("TH1ResMFRphi");
216  layerswitchResMFRphi = ParametersResMFRphi.getParameter<bool>("layerswitchon");
217 
218  edm::ParameterSet ParametersResMFRphiwclus1 = conf_.getParameter<edm::ParameterSet>("TH1ResMFRphiwclus1");
219  layerswitchResMFRphiwclus1 = ParametersResMFRphiwclus1.getParameter<bool>("layerswitchon");
220 
221  edm::ParameterSet ParametersResMFRphiwclus2 = conf_.getParameter<edm::ParameterSet>("TH1ResMFRphiwclus2");
222  layerswitchResMFRphiwclus2 = ParametersResMFRphiwclus2.getParameter<bool>("layerswitchon");
223 
224  edm::ParameterSet ParametersResMFRphiwclus3 = conf_.getParameter<edm::ParameterSet>("TH1ResMFRphiwclus3");
225  layerswitchResMFRphiwclus3 = ParametersResMFRphiwclus3.getParameter<bool>("layerswitchon");
226 
227  edm::ParameterSet ParametersResMFRphiwclus4 = conf_.getParameter<edm::ParameterSet>("TH1ResMFRphiwclus4");
228  layerswitchResMFRphiwclus4 = ParametersResMFRphiwclus4.getParameter<bool>("layerswitchon");
229 
230  edm::ParameterSet ParametersPullLFRphi = conf_.getParameter<edm::ParameterSet>("TH1PullLFRphi");
231  layerswitchPullLFRphi = ParametersPullLFRphi.getParameter<bool>("layerswitchon");
232 
233  edm::ParameterSet ParametersPullMFRphi = conf_.getParameter<edm::ParameterSet>("TH1PullMFRphi");
234  layerswitchPullMFRphi = ParametersPullMFRphi.getParameter<bool>("layerswitchon");
235 
236  edm::ParameterSet ParametersPullMFRphiwclus1 = conf_.getParameter<edm::ParameterSet>("TH1PullMFRphiwclus1");
237  layerswitchPullMFRphiwclus1 = ParametersPullMFRphiwclus1.getParameter<bool>("layerswitchon");
238 
239  edm::ParameterSet ParametersPullMFRphiwclus2 = conf_.getParameter<edm::ParameterSet>("TH1PullMFRphiwclus2");
240  layerswitchPullMFRphiwclus2 = ParametersPullMFRphiwclus2.getParameter<bool>("layerswitchon");
241 
242  edm::ParameterSet ParametersPullMFRphiwclus3 = conf_.getParameter<edm::ParameterSet>("TH1PullMFRphiwclus3");
243  layerswitchPullMFRphiwclus3 = ParametersPullMFRphiwclus3.getParameter<bool>("layerswitchon");
244 
245  edm::ParameterSet ParametersPullMFRphiwclus4 = conf_.getParameter<edm::ParameterSet>("TH1PullMFRphiwclus4");
246  layerswitchPullMFRphiwclus4 = ParametersPullMFRphiwclus4.getParameter<bool>("layerswitchon");
247 
248  edm::ParameterSet ParametersTrackangleRphi = conf_.getParameter<edm::ParameterSet>("TH1TrackangleRphi");
249  layerswitchTrackangleRphi = ParametersTrackangleRphi.getParameter<bool>("layerswitchon");
250 
251  edm::ParameterSet ParametersTrackanglebetaRphi = conf_.getParameter<edm::ParameterSet>("TH1TrackanglebetaRphi");
252  layerswitchTrackanglebetaRphi = ParametersTrackanglebetaRphi.getParameter<bool>("layerswitchon");
253 
254  edm::ParameterSet ParametersTrackangle2Rphi = conf_.getParameter<edm::ParameterSet>("TH1Trackangle2Rphi");
255  layerswitchTrackangle2Rphi = ParametersTrackangle2Rphi.getParameter<bool>("layerswitchon");
256 
257  edm::ParameterSet ParametersPullTrackangleProfileRphi =
258  conf_.getParameter<edm::ParameterSet>("TProfPullTrackangleProfileRphi");
259  layerswitchPullTrackangleProfileRphi = ParametersPullTrackangleProfileRphi.getParameter<bool>("layerswitchon");
260 
261  edm::ParameterSet ParametersPullTrackangle2DRphi = conf_.getParameter<edm::ParameterSet>("TH1PullTrackangle2DRphi");
262  layerswitchPullTrackangle2DRphi = ParametersPullTrackangle2DRphi.getParameter<bool>("layerswitchon");
263 
264  edm::ParameterSet ParametersTrackwidthRphi = conf_.getParameter<edm::ParameterSet>("TH1TrackwidthRphi");
265  layerswitchTrackwidthRphi = ParametersTrackwidthRphi.getParameter<bool>("layerswitchon");
266 
267  edm::ParameterSet ParametersExpectedwidthRphi = conf_.getParameter<edm::ParameterSet>("TH1ExpectedwidthRphi");
268  layerswitchExpectedwidthRphi = ParametersExpectedwidthRphi.getParameter<bool>("layerswitchon");
269 
270  edm::ParameterSet ParametersClusterwidthRphi = conf_.getParameter<edm::ParameterSet>("TH1ClusterwidthRphi");
271  layerswitchClusterwidthRphi = ParametersClusterwidthRphi.getParameter<bool>("layerswitchon");
272 
273  edm::ParameterSet ParametersCategoryRphi = conf_.getParameter<edm::ParameterSet>("TH1CategoryRphi");
274  layerswitchCategoryRphi = ParametersCategoryRphi.getParameter<bool>("layerswitchon");
275 
276  edm::ParameterSet ParametersPullTrackwidthProfileRphi =
277  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileRphi");
278  layerswitchPullTrackwidthProfileRphi = ParametersPullTrackwidthProfileRphi.getParameter<bool>("layerswitchon");
279 
280  edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus1 =
281  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileRphiwclus1");
283  ParametersPullTrackwidthProfileRphiwclus1.getParameter<bool>("layerswitchon");
284 
285  edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus2 =
286  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileRphiwclus2");
288  ParametersPullTrackwidthProfileRphiwclus2.getParameter<bool>("layerswitchon");
289 
290  edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus3 =
291  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileRphiwclus3");
293  ParametersPullTrackwidthProfileRphiwclus3.getParameter<bool>("layerswitchon");
294 
295  edm::ParameterSet ParametersPullTrackwidthProfileRphiwclus4 =
296  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileRphiwclus4");
298  ParametersPullTrackwidthProfileRphiwclus4.getParameter<bool>("layerswitchon");
299 
300  edm::ParameterSet ParametersPullTrackwidthProfileCategory1Rphi =
301  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory1Rphi");
303  ParametersPullTrackwidthProfileCategory1Rphi.getParameter<bool>("layerswitchon");
304 
305  edm::ParameterSet ParametersPullTrackwidthProfileCategory2Rphi =
306  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory2Rphi");
308  ParametersPullTrackwidthProfileCategory2Rphi.getParameter<bool>("layerswitchon");
309 
310  edm::ParameterSet ParametersPullTrackwidthProfileCategory3Rphi =
311  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory3Rphi");
313  ParametersPullTrackwidthProfileCategory3Rphi.getParameter<bool>("layerswitchon");
314 
315  edm::ParameterSet ParametersPullTrackwidthProfileCategory4Rphi =
316  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory4Rphi");
318  ParametersPullTrackwidthProfileCategory4Rphi.getParameter<bool>("layerswitchon");
319 
320  edm::ParameterSet ParametersResolxMFTrackwidthProfileRphi =
321  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileRphi");
323  ParametersResolxMFTrackwidthProfileRphi.getParameter<bool>("layerswitchon");
324 
325  edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus1Rphi =
326  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileWclus1Rphi");
328  ParametersResolxMFTrackwidthProfileWclus1Rphi.getParameter<bool>("layerswitchon");
329 
330  edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus2Rphi =
331  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileWclus2Rphi");
333  ParametersResolxMFTrackwidthProfileWclus2Rphi.getParameter<bool>("layerswitchon");
334 
335  edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus3Rphi =
336  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileWclus3Rphi");
338  ParametersResolxMFTrackwidthProfileWclus3Rphi.getParameter<bool>("layerswitchon");
339 
340  edm::ParameterSet ParametersResolxMFTrackwidthProfileWclus4Rphi =
341  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileWclus4Rphi");
343  ParametersResolxMFTrackwidthProfileWclus4Rphi.getParameter<bool>("layerswitchon");
344 
345  edm::ParameterSet ParametersResMFTrackwidthProfileWclus1Rphi =
346  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfileWclus1Rphi");
348  ParametersResMFTrackwidthProfileWclus1Rphi.getParameter<bool>("layerswitchon");
349 
350  edm::ParameterSet ParametersResMFTrackwidthProfileWclus2Rphi =
351  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfileWclus2Rphi");
353  ParametersResMFTrackwidthProfileWclus2Rphi.getParameter<bool>("layerswitchon");
354 
355  edm::ParameterSet ParametersResMFTrackwidthProfileWclus3Rphi =
356  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfileWclus3Rphi");
358  ParametersResMFTrackwidthProfileWclus3Rphi.getParameter<bool>("layerswitchon");
359 
360  edm::ParameterSet ParametersResMFTrackwidthProfileWclus4Rphi =
361  conf_.getParameter<edm::ParameterSet>("TProfResMFTrackwidthProfileWclus4Rphi");
363  ParametersResMFTrackwidthProfileWclus4Rphi.getParameter<bool>("layerswitchon");
364 
365  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory1Rphi =
366  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory1Rphi");
368  ParametersResolxMFTrackwidthProfileCategory1Rphi.getParameter<bool>("layerswitchon");
369 
370  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory2Rphi =
371  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory2Rphi");
373  ParametersResolxMFTrackwidthProfileCategory2Rphi.getParameter<bool>("layerswitchon");
374 
375  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory3Rphi =
376  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory3Rphi");
378  ParametersResolxMFTrackwidthProfileCategory3Rphi.getParameter<bool>("layerswitchon");
379 
380  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory4Rphi =
381  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory4Rphi");
383  ParametersResolxMFTrackwidthProfileCategory4Rphi.getParameter<bool>("layerswitchon");
384 
385  edm::ParameterSet ParametersResolxMFAngleProfileRphi =
386  conf_.getParameter<edm::ParameterSet>("TProfResolxMFAngleProfileRphi");
387  layerswitchResolxMFAngleProfileRphi = ParametersResolxMFAngleProfileRphi.getParameter<bool>("layerswitchon");
388 
389  edm::ParameterSet ParametersResolxMFClusterwidthProfileCategory1Rphi =
390  conf_.getParameter<edm::ParameterSet>("TProfResolxMFClusterwidthProfileCategory1Rphi");
392  ParametersResolxMFClusterwidthProfileCategory1Rphi.getParameter<bool>("layerswitchon");
393 
394  edm::ParameterSet ParametersrapidityResProfilewclus1 =
395  conf_.getParameter<edm::ParameterSet>("TProfrapidityResProfilewclus1");
396  layerswitchrapidityResProfilewclus1 = ParametersrapidityResProfilewclus1.getParameter<bool>("layerswitchon");
397 
398  edm::ParameterSet ParametersrapidityResProfilewclus2 =
399  conf_.getParameter<edm::ParameterSet>("TProfrapidityResProfilewclus2");
400  layerswitchrapidityResProfilewclus2 = ParametersrapidityResProfilewclus2.getParameter<bool>("layerswitchon");
401 
402  edm::ParameterSet ParametersrapidityResProfilewclus3 =
403  conf_.getParameter<edm::ParameterSet>("TProfrapidityResProfilewclus3");
404  layerswitchrapidityResProfilewclus3 = ParametersrapidityResProfilewclus3.getParameter<bool>("layerswitchon");
405 
406  edm::ParameterSet ParametersrapidityResProfilewclus4 =
407  conf_.getParameter<edm::ParameterSet>("TProfrapidityResProfilewclus4");
408  layerswitchrapidityResProfilewclus4 = ParametersrapidityResProfilewclus4.getParameter<bool>("layerswitchon");
409 
410  edm::ParameterSet ParametersWclusSas = conf_.getParameter<edm::ParameterSet>("TH1WclusSas");
411  layerswitchWclusSas = ParametersWclusSas.getParameter<bool>("layerswitchon");
412 
413  edm::ParameterSet ParametersAdcSas = conf_.getParameter<edm::ParameterSet>("TH1AdcSas");
414  layerswitchAdcSas = ParametersAdcSas.getParameter<bool>("layerswitchon");
415 
416  edm::ParameterSet ParametersResolxLFSas = conf_.getParameter<edm::ParameterSet>("TH1ResolxLFSas");
417  layerswitchResolxLFSas = ParametersResolxLFSas.getParameter<bool>("layerswitchon");
418 
419  edm::ParameterSet ParametersResolxMFSas = conf_.getParameter<edm::ParameterSet>("TH1ResolxMFSas");
420  layerswitchResolxMFSas = ParametersResolxMFSas.getParameter<bool>("layerswitchon");
421 
422  edm::ParameterSet ParametersResLFSas = conf_.getParameter<edm::ParameterSet>("TH1ResLFSas");
423  layerswitchResLFSas = ParametersResLFSas.getParameter<bool>("layerswitchon");
424 
425  edm::ParameterSet ParametersResMFSas = conf_.getParameter<edm::ParameterSet>("TH1ResMFSas");
426  layerswitchResMFSas = ParametersResMFSas.getParameter<bool>("layerswitchon");
427 
428  edm::ParameterSet ParametersPullLFSas = conf_.getParameter<edm::ParameterSet>("TH1PullLFSas");
429  layerswitchPullLFSas = ParametersPullLFSas.getParameter<bool>("layerswitchon");
430 
431  edm::ParameterSet ParametersPullMFSas = conf_.getParameter<edm::ParameterSet>("TH1PullMFSas");
432  layerswitchPullMFSas = ParametersPullMFSas.getParameter<bool>("layerswitchon");
433 
434  edm::ParameterSet ParametersTrackangleSas = conf_.getParameter<edm::ParameterSet>("TH1TrackangleSas");
435  layerswitchTrackangleSas = ParametersTrackangleSas.getParameter<bool>("layerswitchon");
436 
437  edm::ParameterSet ParametersTrackanglebetaSas = conf_.getParameter<edm::ParameterSet>("TH1TrackanglebetaSas");
438  layerswitchTrackanglebetaSas = ParametersTrackanglebetaSas.getParameter<bool>("layerswitchon");
439 
440  edm::ParameterSet ParametersPullTrackangleProfileSas =
441  conf_.getParameter<edm::ParameterSet>("TProfPullTrackangleProfileSas");
442  layerswitchPullTrackangleProfileSas = ParametersPullTrackangleProfileSas.getParameter<bool>("layerswitchon");
443 
444  edm::ParameterSet ParametersTrackwidthSas = conf_.getParameter<edm::ParameterSet>("TH1TrackwidthSas");
445  layerswitchTrackwidthSas = ParametersTrackwidthSas.getParameter<bool>("layerswitchon");
446 
447  edm::ParameterSet ParametersExpectedwidthSas = conf_.getParameter<edm::ParameterSet>("TH1ExpectedwidthSas");
448  layerswitchExpectedwidthSas = ParametersExpectedwidthSas.getParameter<bool>("layerswitchon");
449 
450  edm::ParameterSet ParametersClusterwidthSas = conf_.getParameter<edm::ParameterSet>("TH1ClusterwidthSas");
451  layerswitchClusterwidthSas = ParametersClusterwidthSas.getParameter<bool>("layerswitchon");
452 
453  edm::ParameterSet ParametersCategorySas = conf_.getParameter<edm::ParameterSet>("TH1CategorySas");
454  layerswitchCategorySas = ParametersCategorySas.getParameter<bool>("layerswitchon");
455 
456  edm::ParameterSet ParametersPullTrackwidthProfileSas =
457  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileSas");
458  layerswitchPullTrackwidthProfileSas = ParametersPullTrackwidthProfileSas.getParameter<bool>("layerswitchon");
459 
460  edm::ParameterSet ParametersPullTrackwidthProfileCategory1Sas =
461  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory1Sas");
463  ParametersPullTrackwidthProfileCategory1Sas.getParameter<bool>("layerswitchon");
464 
465  edm::ParameterSet ParametersPullTrackwidthProfileCategory2Sas =
466  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory2Sas");
468  ParametersPullTrackwidthProfileCategory2Sas.getParameter<bool>("layerswitchon");
469 
470  edm::ParameterSet ParametersPullTrackwidthProfileCategory3Sas =
471  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory3Sas");
473  ParametersPullTrackwidthProfileCategory3Sas.getParameter<bool>("layerswitchon");
474 
475  edm::ParameterSet ParametersPullTrackwidthProfileCategory4Sas =
476  conf_.getParameter<edm::ParameterSet>("TProfPullTrackwidthProfileCategory4Sas");
478  ParametersPullTrackwidthProfileCategory4Sas.getParameter<bool>("layerswitchon");
479 
480  edm::ParameterSet ParametersResolxMFTrackwidthProfileSas =
481  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileSas");
482  layerswitchResolxMFTrackwidthProfileSas = ParametersResolxMFTrackwidthProfileSas.getParameter<bool>("layerswitchon");
483 
484  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory1Sas =
485  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory1Sas");
487  ParametersResolxMFTrackwidthProfileCategory1Sas.getParameter<bool>("layerswitchon");
488 
489  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory2Sas =
490  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory2Sas");
492  ParametersResolxMFTrackwidthProfileCategory2Sas.getParameter<bool>("layerswitchon");
493 
494  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory3Sas =
495  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory3Sas");
497  ParametersResolxMFTrackwidthProfileCategory3Sas.getParameter<bool>("layerswitchon");
498 
499  edm::ParameterSet ParametersResolxMFTrackwidthProfileCategory4Sas =
500  conf_.getParameter<edm::ParameterSet>("TProfResolxMFTrackwidthProfileCategory4Sas");
502  ParametersResolxMFTrackwidthProfileCategory4Sas.getParameter<bool>("layerswitchon");
503 
504  edm::ParameterSet ParametersResolxMFAngleProfileSas =
505  conf_.getParameter<edm::ParameterSet>("TProfResolxMFAngleProfileSas");
506  layerswitchResolxMFAngleProfileSas = ParametersResolxMFAngleProfileSas.getParameter<bool>("layerswitchon");
507 
508  edm::ParameterSet ParametersResolxMFClusterwidthProfileCategory1Sas =
509  conf_.getParameter<edm::ParameterSet>("TProfResolxMFClusterwidthProfileCategory1Sas");
511  ParametersResolxMFClusterwidthProfileCategory1Sas.getParameter<bool>("layerswitchon");
512 
513  edm::ParameterSet ParametersPosxMatched = conf_.getParameter<edm::ParameterSet>("TH1PosxMatched");
514  layerswitchPosxMatched = ParametersPosxMatched.getParameter<bool>("layerswitchon");
515 
516  edm::ParameterSet ParametersPosyMatched = conf_.getParameter<edm::ParameterSet>("TH1PosyMatched");
517  layerswitchPosyMatched = ParametersPosyMatched.getParameter<bool>("layerswitchon");
518 
519  edm::ParameterSet ParametersResolxMatched = conf_.getParameter<edm::ParameterSet>("TH1ResolxMatched");
520  layerswitchResolxMatched = ParametersResolxMatched.getParameter<bool>("layerswitchon");
521 
522  edm::ParameterSet ParametersResolyMatched = conf_.getParameter<edm::ParameterSet>("TH1ResolyMatched");
523  layerswitchResolyMatched = ParametersResolyMatched.getParameter<bool>("layerswitchon");
524 
525  edm::ParameterSet ParametersResxMatched = conf_.getParameter<edm::ParameterSet>("TH1ResxMatched");
526  layerswitchResxMatched = ParametersResxMatched.getParameter<bool>("layerswitchon");
527 
528  edm::ParameterSet ParametersResyMatched = conf_.getParameter<edm::ParameterSet>("TH1ResyMatched");
529  layerswitchResyMatched = ParametersResyMatched.getParameter<bool>("layerswitchon");
530 
531  edm::ParameterSet ParametersPullxMatched = conf_.getParameter<edm::ParameterSet>("TH1PullxMatched");
532  layerswitchPullxMatched = ParametersPullxMatched.getParameter<bool>("layerswitchon");
533 
534  edm::ParameterSet ParametersPullyMatched = conf_.getParameter<edm::ParameterSet>("TH1PullyMatched");
535  layerswitchPullyMatched = ParametersPullyMatched.getParameter<bool>("layerswitchon");
536 }
537 
538 //Destructor
540 //--------------------------------------------------------------------------------------------
542  const edm::Run &run,
543  const edm::EventSetup &es) {
545  edm::LogInfo("SiStripRecHitsValid") << "SiStripRecHitsValid::beginRun: "
546  << " Creating MEs for new Cabling ";
547 
548  createMEs(ibooker, es);
549  }
550 }
551 
552 // Functions that gets called by framework every event
554  LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
555  //cout << " Run = " << e.id().run() << " Event = " << e.id().event() << endl;
556 
557  int isrechitrphi = 0;
558  int isrechitsas = 0;
559  int isrechitmatched = 0;
560 
561  DetId detid;
562  uint32_t myid;
563 
565 
566  //Retrieve tracker topology from geometry
567  const TrackerTopology *const tTopo = &es.getData(m_topoToken);
569  const auto &stripcpe = &es.getData(m_stripCPEToken);
570 
571  // Mangano's
572 
573  edm::Handle<std::vector<reco::Track> > trackCollectionHandle;
574  e.getByToken(tracksInputToken_, trackCollectionHandle);
575 
576  edm::LogVerbatim("TrajectoryAnalyzer") << "trackColl->size(): " << trackCollectionHandle->size();
577  auto const &tracks = *trackCollectionHandle;
578  for (auto const &track : tracks) {
579  if (track.pt() < 0.5)
580  continue;
581  edm::LogVerbatim("TrajectoryAnalyzer") << "this track has " << track.found() << " valid hits";
582 
583  auto const &trajParams = track.extra()->trajParams();
584  assert(trajParams.size() == track.recHitsSize());
585  auto hb = track.recHitsBegin();
586  for (unsigned int h = 0; h < track.recHitsSize(); h++) {
587  auto recHit = *(hb + h);
588  if (!recHit->isValid())
589  continue;
590  auto ldir = trajParams[h].direction();
591  auto gmom = recHit->surface()->toGlobal(trajParams[h].momentum());
592  if (gmom.perp() < 0.5)
593  continue; // redundant...
594  {
595  auto thit2 = recHit;
596  DetId detid2 = thit2->geographicalId();
597  const SiStripMatchedRecHit2D *matchedhit = dynamic_cast<const SiStripMatchedRecHit2D *>(thit2);
598  const SiStripRecHit2D *hit2d = dynamic_cast<const SiStripRecHit2D *>(thit2);
599  const SiStripRecHit1D *hit1d = dynamic_cast<const SiStripRecHit1D *>(thit2);
600 
601  auto thit = thit2;
602 
603  detid = (thit)->geographicalId();
604  myid = detid.rawId();
605  //Here due to the fact that the SiStripHistoId::getSubdetid complains when
606  //a subdet of 1 or 2 appears we add an if statement.
607  if (detid.subdetId() == 1 || detid.subdetId() == 2) {
608  continue;
609  }
610  SiStripHistoId hidmanager;
611  std::string label = hidmanager.getSubdetid(myid, tTopo, true);
612  // std::cout<< "label " << label << " and id " << detid.subdetId() << std::endl;
613 
614  StripSubdetector StripSubdet = (StripSubdetector)detid;
615  //Variable to define the case we are dealing with
616  std::string matchedmonorstereo;
617 
618  isrechitmatched = 0;
619 
620  if (matchedhit) {
621  isrechitmatched = 1;
622  const GluedGeomDet *gluedDet = (const GluedGeomDet *)tracker.idToDet(matchedhit->geographicalId());
623  //Analysis
624  rechitanalysis_matched(ldir, thit2, gluedDet, associate, stripcpe, MatchStatus::matched);
625  // rechitmatched.push_back(rechitpro);
626  }
627 
628  std::map<std::string, StereoAndMatchedMEs>::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label);
629 
630  //Filling Histograms for Matched hits
631 
632  if (isrechitmatched) {
633  if (iStereoAndMatchedME != StereoAndMatchedMEsMap.end()) {
634  fillME(iStereoAndMatchedME->second.mePosxMatched, rechitpro.x);
635  fillME(iStereoAndMatchedME->second.mePosyMatched, rechitpro.y);
636  fillME(iStereoAndMatchedME->second.meResolxMatched, sqrt(rechitpro.resolxx));
637  fillME(iStereoAndMatchedME->second.meResolyMatched, sqrt(rechitpro.resolyy));
638  fillME(iStereoAndMatchedME->second.meResxMatched, rechitpro.resx);
639  fillME(iStereoAndMatchedME->second.meResyMatched, rechitpro.resy);
640  fillME(iStereoAndMatchedME->second.mePullxMatched, rechitpro.pullx);
641  fillME(iStereoAndMatchedME->second.mePullyMatched, rechitpro.pully);
642  }
643  }
644 
645  //Reset Variables here for the current event
646  isrechitrphi = 0;
647  isrechitsas = 0;
648 
650  // simple hits from matched hits
652 
653  if (gmom.transverse() != 0) {
654  track_rapidity = gmom.eta();
655  } else {
656  track_rapidity = -999.0;
657  }
658 
659  if (matchedhit) {
660  auto hm = matchedhit->monoHit();
661  const SiStripRecHit2D *monohit = &hm;
662  // const GeomDetUnit * monodet=gdet->monoDet();
663  GluedGeomDet *gdet = (GluedGeomDet *)tracker.idToDet(matchedhit->geographicalId());
664 
665  if (monohit) {
666  isrechitrphi = 1;
667 
668  //Analysis
669  rechitanalysis_matched(ldir, thit2, gdet, associate, stripcpe, MatchStatus::monoHit);
670  }
671 
672  auto s = matchedhit->stereoHit();
673  const SiStripRecHit2D *stereohit = &s;
674 
675  if (stereohit) {
676  isrechitsas = 1;
677 
678  //Analysis
679  rechitanalysis_matched(ldir, thit2, gdet, associate, stripcpe, MatchStatus::stereoHit);
680  }
681  }
682 
683  if (hit1d) {
684  // simple hits are mono or stereo
685  // cout<<"simple hit"<<endl;
686  if (StripSubdet.stereo()) {
687  //cout<<"simple hit stereo"<<endl;
688  isrechitsas = 1;
689 
690  const GeomDetUnit *det = tracker.idToDetUnit(detid2);
691  const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *)(det);
692 
693  //Analysis for hit1d stereo
694  rechitanalysis(ldir, thit2, stripdet, stripcpe, associate, true);
695  } else {
696  isrechitrphi = 1;
697  // cout<<"simple hit mono"<<endl;
698 
699  const GeomDetUnit *det = tracker.idToDetUnit(detid2);
700  const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *)(det);
701 
702  //Analysis for hit1d mono
703  rechitanalysis(ldir, thit2, stripdet, stripcpe, associate, true);
704  }
705  }
706 
707  if (hit2d) {
708  // simple hits are mono or stereo
709  // cout<<"simple hit"<<endl;
710  if (StripSubdet.stereo()) {
711  //cout<<"simple hit stereo"<<endl;
712  isrechitsas = 1;
713 
714  const GeomDetUnit *det = tracker.idToDetUnit(detid2);
715  const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *)(det);
716 
717  //Analysis for hit2d stereo
718  rechitanalysis(ldir, thit2, stripdet, stripcpe, associate, false);
719 
720  } else {
721  isrechitrphi = 1;
722  // cout<<"simple hit mono"<<endl;
723 
724  const GeomDetUnit *det = tracker.idToDetUnit(detid2);
725  const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *)(det);
726 
727  //Analysis for hit2d mono
728  rechitanalysis(ldir, thit2, stripdet, stripcpe, associate, false);
729  }
730  }
731 
732  //------------------------------------------------------------------------------------------------------------------------------------------------------
733 
734  //Filling Histograms for simple hits
735  //cout<<"isrechitrphi,isrechitsas = "<<isrechitrphi<<","<<isrechitsas<<endl;
736 
737  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
738  if (isrechitrphi) {
745 
748 
749  if (rechitpro.clusiz == 1) {
752  } else if (rechitpro.clusiz == 2) {
758  } else if (rechitpro.clusiz == 3) {
761  } else if (rechitpro.clusiz == 4) {
764  }
765 
766  if (rechitpro.category == 1) {
769  } else if (rechitpro.category == 2) {
771  } else if (rechitpro.category == 3) {
773  } else if (rechitpro.category == 4) {
775  }
776 
783 
784  if (iLayerME != LayerMEsMap.end()) {
785  fillME(iLayerME->second.meWclusRphi, rechitpro.clusiz);
786  fillME(iLayerME->second.meAdcRphi, rechitpro.cluchg);
787  fillME(iLayerME->second.meResolxLFRphi, sqrt(rechitpro.resolxx));
788  fillME(iLayerME->second.meResolxMFRphi, sqrt(rechitpro.resolxxMF));
789 
790  if ((min(rechitpro.clusiz, 4) - 1) == 1) {
791  fillME(iLayerME->second.meResolxMFRphiwclus1, sqrt(rechitpro.resolxxMF));
792  }
793  if ((min(rechitpro.clusiz, 4) - 1) == 2) {
794  fillME(iLayerME->second.meResolxMFRphiwclus2, sqrt(rechitpro.resolxxMF));
795  }
796  if ((min(rechitpro.clusiz, 4) - 1) == 3) {
797  fillME(iLayerME->second.meResolxMFRphiwclus3, sqrt(rechitpro.resolxxMF));
798  }
799  if ((min(rechitpro.clusiz, 4) - 1) == 4) {
800  fillME(iLayerME->second.meResolxMFRphiwclus4, sqrt(rechitpro.resolxxMF));
801  }
802 
803  fillME(iLayerME->second.meResLFRphi, rechitpro.resx);
804  fillME(iLayerME->second.meResMFRphi, rechitpro.resxMF);
805 
806  if ((min(rechitpro.clusiz, 4) - 1) == 1) {
807  fillME(iLayerME->second.merapidityResProfilewclus1, track_rapidity, fabs(rechitpro.resxMF));
808  }
809  if ((min(rechitpro.clusiz, 4) - 1) == 2) {
810  fillME(iLayerME->second.merapidityResProfilewclus2, track_rapidity, fabs(rechitpro.resxMF));
811  }
812  if ((min(rechitpro.clusiz, 4) - 1) == 3) {
813  fillME(iLayerME->second.merapidityResProfilewclus3, track_rapidity, fabs(rechitpro.resxMF));
814  }
815  if ((min(rechitpro.clusiz, 4) - 1) == 4) {
816  fillME(iLayerME->second.merapidityResProfilewclus4, track_rapidity, fabs(rechitpro.resxMF));
817  }
818 
819  if ((min(rechitpro.clusiz, 4) - 1) == 1) {
820  fillME(iLayerME->second.meResMFRphiwclus1, rechitpro.resxMF);
821  }
822  if ((min(rechitpro.clusiz, 4) - 1) == 2) {
823  fillME(iLayerME->second.meResMFRphiwclus2, rechitpro.resxMF);
824  }
825  if ((min(rechitpro.clusiz, 4) - 1) == 3) {
826  fillME(iLayerME->second.meResMFRphiwclus3, rechitpro.resxMF);
827  }
828  if ((min(rechitpro.clusiz, 4) - 1) == 4) {
829  fillME(iLayerME->second.meResMFRphiwclus4, rechitpro.resxMF);
830  }
831 
832  fillME(iLayerME->second.mePullLFRphi, rechitpro.pullx);
833  fillME(iLayerME->second.mePullMFRphi, rechitpro.pullxMF);
834 
835  if ((min(rechitpro.clusiz, 4) - 1) == 1) {
836  fillME(iLayerME->second.mePullMFRphiwclus1, rechitpro.pullxMF);
837  }
838  if ((min(rechitpro.clusiz, 4) - 1) == 2) {
839  fillME(iLayerME->second.mePullMFRphiwclus2, rechitpro.pullxMF);
840  }
841  if ((min(rechitpro.clusiz, 4) - 1) == 3) {
842  fillME(iLayerME->second.mePullMFRphiwclus3, rechitpro.pullxMF);
843  }
844  if ((min(rechitpro.clusiz, 4) - 1) == 4) {
845  fillME(iLayerME->second.mePullMFRphiwclus4, rechitpro.pullxMF);
846  }
847 
848  fillME(iLayerME->second.meTrackangleRphi, rechitpro.trackangle);
849  fillME(iLayerME->second.mePullTrackangleProfileRphi, rechitpro.trackangle, fabs(rechitpro.pullxMF));
850 
851  if ((min(rechitpro.clusiz, 4) - 1) == 1) {
852  fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus1, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
853  }
854  if ((min(rechitpro.clusiz, 4) - 1) == 2) {
855  fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus2, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
856  }
857  if ((min(rechitpro.clusiz, 4) - 1) == 3) {
858  fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus3, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
859  }
860  if ((min(rechitpro.clusiz, 4) - 1) == 4) {
861  fillME(iLayerME->second.mePullTrackwidthProfileRphiwclus4, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
862  }
863 
864  if (rechitpro.clusiz == 1) {
865  fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus1Rphi,
868  fillME(iLayerME->second.meResMFTrackwidthProfileWclus1Rphi, rechitpro.trackwidth, fabs(rechitpro.resxMF));
869  }
870  if (rechitpro.clusiz == 2) {
871  fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus2Rphi,
874  fillME(iLayerME->second.meResMFTrackwidthProfileWclus2Rphi, rechitpro.trackwidth, fabs(rechitpro.resxMF));
875  }
876  if (rechitpro.clusiz == 3) {
877  fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus3Rphi,
880  fillME(iLayerME->second.meResMFTrackwidthProfileWclus3Rphi, rechitpro.trackwidth, fabs(rechitpro.resxMF));
881  }
882  if (rechitpro.clusiz == 4) {
883  fillME(iLayerME->second.meResolxMFTrackwidthProfileWclus4Rphi,
886  fillME(iLayerME->second.meResMFTrackwidthProfileWclus4Rphi, rechitpro.trackwidth, fabs(rechitpro.resxMF));
887  }
888 
889  if (rechitpro.category == 1) {
890  fillME(
891  iLayerME->second.mePullTrackwidthProfileCategory1Rphi, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
892  fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory1Rphi,
895  fillME(iLayerME->second.meResolxMFClusterwidthProfileCategory1Rphi,
898  } else if (rechitpro.category == 2) {
899  fillME(
900  iLayerME->second.mePullTrackwidthProfileCategory2Rphi, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
901  fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory2Rphi,
904  } else if (rechitpro.category == 3) {
905  fillME(
906  iLayerME->second.mePullTrackwidthProfileCategory3Rphi, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
907  fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory3Rphi,
910  } else if (rechitpro.category == 4) {
911  fillME(
912  iLayerME->second.mePullTrackwidthProfileCategory4Rphi, rechitpro.trackwidth, fabs(rechitpro.pullxMF));
913  fillME(iLayerME->second.meResolxMFTrackwidthProfileCategory4Rphi,
916  }
917 
918  fillME(iLayerME->second.meTrackwidthRphi, rechitpro.trackwidth);
919  fillME(iLayerME->second.meExpectedwidthRphi, rechitpro.expectedwidth);
920  fillME(iLayerME->second.meClusterwidthRphi, rechitpro.clusiz);
921  fillME(iLayerME->second.meCategoryRphi, rechitpro.category);
922  fillME(iLayerME->second.meResolxMFTrackwidthProfileRphi, rechitpro.trackwidth, sqrt(rechitpro.resolxxMF));
923  fillME(iLayerME->second.meResolxMFAngleProfileRphi, rechitpro.trackangle, sqrt(rechitpro.resolxxMF));
924  }
925  }
926 
927  if (isrechitsas > 0) {
934 
937 
938  if (rechitpro.clusiz == 1) {
941  } else if (rechitpro.clusiz == 2) {
944  } else if (rechitpro.clusiz == 3) {
947  } else if (rechitpro.clusiz == 4) {
950  }
951  if (rechitpro.category == 1) {
954  } else if (rechitpro.category == 2) {
956  } else if (rechitpro.category == 3) {
958  } else if (rechitpro.category == 4) {
960  }
961 
968 
969  if (iStereoAndMatchedME != StereoAndMatchedMEsMap.end()) {
970  fillME(iStereoAndMatchedME->second.meWclusSas, rechitpro.clusiz);
971  fillME(iStereoAndMatchedME->second.meAdcSas, rechitpro.cluchg);
972  fillME(iStereoAndMatchedME->second.meResolxLFSas, sqrt(rechitpro.resolxx));
973  fillME(iStereoAndMatchedME->second.meResLFSas, rechitpro.resx);
974  fillME(iStereoAndMatchedME->second.mePullLFSas, rechitpro.pullx);
975  fillME(iStereoAndMatchedME->second.meResolxMFSas, sqrt(rechitpro.resolxxMF));
976  fillME(iStereoAndMatchedME->second.meResMFSas, rechitpro.resxMF);
977  fillME(iStereoAndMatchedME->second.mePullMFSas, rechitpro.pullxMF);
978  fillME(iStereoAndMatchedME->second.meTrackangleSas, rechitpro.trackangle);
979  fillME(iStereoAndMatchedME->second.mePullTrackangleProfileSas, rechitpro.trackangle, rechitpro.pullxMF);
980  fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileSas, rechitpro.trackwidth, rechitpro.pullxMF);
981  if (rechitpro.category == 1) {
982  fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory1Sas,
985  fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory1Sas,
988  fillME(iStereoAndMatchedME->second.meResolxMFClusterwidthProfileCategory1Sas,
991  } else if (rechitpro.category == 2) {
992  fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory2Sas,
995  fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory2Sas,
998  } else if (rechitpro.category == 3) {
999  fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory3Sas,
1001  rechitpro.pullxMF);
1002  fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory3Sas,
1005  } else if (rechitpro.category == 4) {
1006  fillME(iStereoAndMatchedME->second.mePullTrackwidthProfileCategory4Sas,
1008  rechitpro.pullxMF);
1009  fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileCategory4Sas,
1012  }
1013  fillME(iStereoAndMatchedME->second.meTrackwidthSas, rechitpro.trackwidth);
1014  fillME(iStereoAndMatchedME->second.meExpectedwidthSas, rechitpro.expectedwidth);
1015  fillME(iStereoAndMatchedME->second.meClusterwidthSas, rechitpro.clusiz);
1016  fillME(iStereoAndMatchedME->second.meCategorySas, rechitpro.category);
1017  fillME(iStereoAndMatchedME->second.meResolxMFTrackwidthProfileSas,
1020  fillME(iStereoAndMatchedME->second.meResolxMFAngleProfileSas, rechitpro.trackangle, rechitpro.resolxxMF);
1021  }
1022  }
1023  }
1024  }
1025  }
1026 }
1027 
1028 //needed by to do the residual for matched hits
1029 std::pair<LocalPoint, LocalVector> SiStripTrackingRecHitsValid::projectHit(const PSimHit &hit,
1030  const StripGeomDetUnit *stripDet,
1031  const BoundPlane &plane) {
1032  // const StripGeomDetUnit* stripDet = dynamic_cast<const StripGeomDetUnit*>(hit.det());
1033  //if (stripDet == 0) throw MeasurementDetException("HitMatcher hit is not on StripGeomDetUnit");
1034 
1035  const StripTopology &topol = stripDet->specificTopology();
1036  GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition());
1037  LocalPoint localHit = plane.toLocal(globalpos);
1038  //track direction
1039  LocalVector locdir = hit.localDirection();
1040  //rotate track in new frame
1041 
1042  GlobalVector globaldir = stripDet->surface().toGlobal(locdir);
1043  LocalVector dir = plane.toLocal(globaldir);
1044  float scale = -localHit.z() / dir.z();
1045 
1046  LocalPoint projectedPos = localHit + scale * dir;
1047 
1048  // std::cout << "projectedPos " << projectedPos << std::endl;
1049 
1050  float selfAngle = topol.stripAngle(topol.strip(hit.localPosition()));
1051 
1052  LocalVector stripDir(sin(selfAngle), cos(selfAngle), 0); // vector along strip in hit frame
1053 
1054  LocalVector localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir)));
1055 
1056  return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
1057 }
1058 //--------------------------------------------------------------------------------------------
1060  const TrackingRecHit *rechit,
1061  const GluedGeomDet *gluedDet,
1062  TrackerHitAssociator &associate,
1063  const StripClusterParameterEstimator *stripcpe,
1064  const MatchStatus matchedmonorstereo) {
1065  rechitpro.resx = -999999.;
1066  rechitpro.resy = -999999.;
1067  rechitpro.resxMF = -999999.;
1068  rechitpro.pullx = -999999.;
1069  rechitpro.pully = -999999.;
1070  rechitpro.pullxMF = -999999.;
1071  rechitpro.trackangle = -999999.;
1072  rechitpro.trackanglebeta = -999999.;
1073 
1074  const GeomDetUnit *monodet = gluedDet->monoDet();
1075  const GeomDetUnit *stereodet = gluedDet->stereoDet();
1076  //We initialized it to monoHit case because it complains that it may be uninitialized
1077  //and it will change value in the stereoHit case. The matched case do not use this
1078  const StripGeomDetUnit *stripdet = (const StripGeomDetUnit *)(monodet);
1079 
1080  const SiStripMatchedRecHit2D *matchedhit = dynamic_cast<const SiStripMatchedRecHit2D *>(rechit);
1081  const SiStripRecHit2D *monohit = nullptr;
1082  const SiStripRecHit2D *stereohit = nullptr;
1084 
1085  if (matchedmonorstereo == MatchStatus::monoHit) {
1086  auto hm = matchedhit->monoHit();
1087  monohit = &hm;
1088  stripdet = (const StripGeomDetUnit *)(monodet);
1089  } else if (matchedmonorstereo == MatchStatus::stereoHit) {
1090  auto s = matchedhit->stereoHit();
1091  stereohit = &s;
1092  stripdet = (const StripGeomDetUnit *)(stereodet);
1093  }
1094  //if(matchedhit) cout<<"manganomatchedhit"<<endl;
1095  //if(hit) cout<<"manganosimplehit"<<endl;
1096  //if (hit && matchedhit) cout<<"manganosimpleandmatchedhit"<<endl;
1097  const StripTopology &topol = (const StripTopology &)stripdet->topology();
1098 
1099  const LocalVector &trackdirection = ldir;
1100 
1101  GlobalVector gtrkdir = gluedDet->toGlobal(trackdirection);
1102  LocalVector monotkdir = monodet->toLocal(gtrkdir);
1103  LocalVector stereotkdir = stereodet->toLocal(gtrkdir);
1104 
1106  LocalError error;
1107  MeasurementPoint Mposition;
1108  MeasurementError Merror;
1109 
1110  if (matchedmonorstereo == MatchStatus::matched) {
1111  position = rechit->localPosition();
1112  error = rechit->localPositionError();
1113  } else if (matchedmonorstereo == MatchStatus::monoHit) {
1114  position = monohit->localPosition();
1115  error = monohit->localPositionError();
1116  Mposition = topol.measurementPosition(position);
1117  Merror = topol.measurementError(position, error);
1118  if (monotkdir.z()) {
1119  rechitpro.trackangle = atan(monotkdir.x() / monotkdir.z()) * TMath::RadToDeg();
1120  rechitpro.trackanglebeta = atan(monotkdir.y() / monotkdir.z()) * TMath::RadToDeg();
1121  }
1122  clust = monohit->cluster();
1123  } else if (matchedmonorstereo == MatchStatus::stereoHit) {
1124  position = stereohit->localPosition();
1125  error = stereohit->localPositionError();
1126  Mposition = topol.measurementPosition(position);
1127  Merror = topol.measurementError(position, error);
1128  if (stereotkdir.z()) {
1129  rechitpro.trackangle = atan(stereotkdir.x() / stereotkdir.z()) * TMath::RadToDeg();
1130  rechitpro.trackanglebeta = atan(stereotkdir.y() / stereotkdir.z()) * TMath::RadToDeg();
1131  }
1132  clust = stereohit->cluster();
1133  }
1134 
1135  LocalVector drift = stripcpe->driftDirection(stripdet);
1136  rechitpro.thickness = stripdet->surface().bounds().thickness();
1137  float pitch = topol.localPitch(position);
1138  float tanalpha = tan(rechitpro.trackangle * TMath::DegToRad());
1139  float tanalphaL = drift.x() / drift.z();
1140  rechitpro.trackwidth = fabs((rechitpro.thickness / pitch) * tanalpha - (rechitpro.thickness / pitch) * tanalphaL);
1141  float SLorentz = 0.5 * (rechitpro.thickness / pitch) * tanalphaL;
1142  int Sp = int(position.x() / pitch + SLorentz + 0.5 * rechitpro.trackwidth);
1143  int Sm = int(position.x() / pitch + SLorentz - 0.5 * rechitpro.trackwidth);
1144  rechitpro.expectedwidth = 1 + Sp - Sm;
1145 
1146  const auto &amplitudes = clust->amplitudes();
1147  rechitpro.clusiz = amplitudes.size();
1148  int totcharge = 0;
1149  for (size_t ia = 0; ia < amplitudes.size(); ++ia) {
1150  totcharge += amplitudes[ia];
1151  }
1152 
1153  rechitpro.x = position.x();
1154  rechitpro.y = position.y();
1155  rechitpro.z = position.z();
1156  rechitpro.resolxx = error.xx();
1157  rechitpro.resolxy = error.xy();
1158  rechitpro.resolyy = error.yy();
1159  rechitpro.resolxxMF = Merror.uu();
1160  rechitpro.cluchg = totcharge;
1161 
1163  rechitpro.category = 1;
1164  } else if (rechitpro.expectedwidth == 1) {
1165  rechitpro.category = 2;
1166  } else if (rechitpro.clusiz <= rechitpro.expectedwidth) {
1167  rechitpro.category = 3;
1168  } else {
1169  rechitpro.category = 4;
1170  }
1171 
1172  if (matchedmonorstereo == MatchStatus::matched) {
1173  matched.clear();
1174  matched = associate.associateHit(*matchedhit);
1175  } else if (matchedmonorstereo == MatchStatus::monoHit) {
1176  matched.clear();
1177  matched = associate.associateHit(*monohit);
1178  } else if (matchedmonorstereo == MatchStatus::stereoHit) {
1179  matched.clear();
1180  matched = associate.associateHit(*stereohit);
1181  }
1182 
1183  if (!matched.empty()) {
1184  float mindist = std::numeric_limits<float>::max();
1185  float dist = std::numeric_limits<float>::max();
1186  float distx = std::numeric_limits<float>::max();
1187  float disty = std::numeric_limits<float>::max();
1188 
1189  if (matchedmonorstereo == MatchStatus::matched) {
1190  const StripGeomDetUnit *partnerstripdet = static_cast<const StripGeomDetUnit *>(gluedDet->stereoDet());
1191  std::pair<LocalPoint, LocalVector> hitPair;
1192  std::pair<LocalPoint, LocalVector> closestPair;
1193  for (auto &m : matched) {
1194  //project simhit;
1195  hitPair = projectHit(m, partnerstripdet, gluedDet->surface());
1196  distx = fabs(rechitpro.x - hitPair.first.x());
1197  disty = fabs(rechitpro.y - hitPair.first.y());
1198  dist = distx * distx + disty * disty;
1199  if (dist < mindist) {
1200  mindist = dist;
1201  closestPair = hitPair;
1202  }
1203  }
1204  float closestX = closestPair.first.x();
1205  float closestY = closestPair.first.y();
1206  rechitpro.resx = rechitpro.x - closestX;
1207  rechitpro.resy = rechitpro.y - closestPair.first.y();
1208  rechitpro.pullx = ((rechit)->localPosition().x() - closestX) / sqrt(error.xx());
1209  rechitpro.pully = ((rechit)->localPosition().y() - closestY) / sqrt(error.yy());
1210  } else if (matchedmonorstereo == MatchStatus::monoHit) {
1211  PSimHit *closest = nullptr;
1212  for (auto &m : matched) {
1213  //project simhit;
1214  dist = abs((monohit)->localPosition().x() - m.localPosition().x());
1215  if (dist < mindist) {
1216  mindist = dist;
1217  closest = &m;
1218  }
1219  }
1220 
1221  if (!closest)
1222  return;
1223 
1224  float closestX = closest->localPosition().x();
1225  rechitpro.resx = rechitpro.x - closestX;
1226  rechitpro.resxMF = Mposition.x() - (topol.measurementPosition(closest->localPosition())).x();
1227  rechitpro.pullx = (rechit->localPosition().x() - closestX) / sqrt(error.xx());
1228  rechitpro.pullxMF = (rechitpro.resxMF) / sqrt(Merror.uu());
1229  } else if (matchedmonorstereo == MatchStatus::stereoHit) {
1230  PSimHit *closest = nullptr;
1231  for (auto &m : matched) {
1232  //project simhit;
1233  dist = abs((stereohit)->localPosition().x() - m.localPosition().x());
1234  if (dist < mindist) {
1235  mindist = dist;
1236  closest = &m;
1237  }
1238  }
1239 
1240  if (!closest)
1241  return;
1242 
1243  float closestX = closest->localPosition().x();
1244  rechitpro.resx = rechitpro.x - closestX;
1245  rechitpro.resxMF = Mposition.x() - (topol.measurementPosition(closest->localPosition())).x();
1246  rechitpro.pullx = (rechit->localPosition().x() - closestX) / sqrt(error.xx());
1247  rechitpro.pullxMF = (rechitpro.resxMF) / sqrt(Merror.uu());
1248  }
1249  }
1250 }
1251 //--------------------------------------------------------------------------------------------
1253  const TrackingRecHit *rechit,
1254  const StripGeomDetUnit *stripdet,
1255  const StripClusterParameterEstimator *stripcpe,
1256  TrackerHitAssociator &associate,
1257  bool simplehit1or2D) {
1258  rechitpro.resx = -999999.;
1259  rechitpro.resy = -999999.;
1260  rechitpro.resxMF = -999999.;
1261  rechitpro.pullx = -999999.;
1262  rechitpro.pully = -999999.;
1263  rechitpro.pullxMF = -999999.;
1264 
1265  //If simplehit1or2D is true we are dealing with hit1d, false is for hit2d
1266  const SiStripRecHit2D *hit2d = dynamic_cast<const SiStripRecHit2D *>(rechit);
1267  const SiStripRecHit1D *hit1d = dynamic_cast<const SiStripRecHit1D *>(rechit);
1268 
1269  const StripTopology &topol = (const StripTopology &)stripdet->topology();
1270 
1271  LocalPoint position = rechit->localPosition();
1272  LocalError error = rechit->localPositionError();
1273  MeasurementPoint Mposition = topol.measurementPosition(position);
1275 
1276  const LocalVector &trackdirection = ldir;
1277  rechitpro.trackangle = std::atan(trackdirection.x() / trackdirection.z()) * TMath::RadToDeg();
1278  rechitpro.trackanglebeta = std::atan(trackdirection.y() / trackdirection.z()) * TMath::RadToDeg();
1279 
1280  LocalVector drift = stripcpe->driftDirection(stripdet);
1281  rechitpro.thickness = stripdet->surface().bounds().thickness();
1282  float pitch = topol.localPitch(position);
1283  float tanalpha = tan(rechitpro.trackangle * TMath::DegToRad());
1284  float tanalphaL = drift.x() / drift.z();
1285  rechitpro.trackwidth = fabs((rechitpro.thickness / pitch) * tanalpha - (rechitpro.thickness / pitch) * tanalphaL);
1286  float SLorentz = 0.5 * (rechitpro.thickness / pitch) * tanalphaL;
1287  int Sp = int(position.x() / pitch + SLorentz + 0.5 * rechitpro.trackwidth);
1288  int Sm = int(position.x() / pitch + SLorentz - 0.5 * rechitpro.trackwidth);
1289  rechitpro.expectedwidth = 1 + Sp - Sm;
1290 
1291  int totcharge = 0;
1292  if (simplehit1or2D) {
1294  clust1d = hit1d->cluster();
1295  const auto &amplitudes1d = clust1d->amplitudes();
1296  rechitpro.clusiz = amplitudes1d.size();
1297  for (size_t ia = 0; ia < amplitudes1d.size(); ++ia) {
1298  totcharge += amplitudes1d[ia];
1299  }
1300  } else {
1302  clust2d = hit2d->cluster();
1303  const auto &amplitudes2d = clust2d->amplitudes();
1304  rechitpro.clusiz = amplitudes2d.size();
1305  for (size_t ia = 0; ia < amplitudes2d.size(); ++ia) {
1306  totcharge += amplitudes2d[ia];
1307  }
1308  }
1309 
1310  rechitpro.x = position.x();
1311  rechitpro.y = position.y();
1312  rechitpro.z = position.z();
1313  rechitpro.resolxx = error.xx();
1314  rechitpro.resolxy = error.xy();
1315  rechitpro.resolyy = error.yy();
1316  rechitpro.resolxxMF = Merror.uu();
1317  rechitpro.cluchg = totcharge;
1318 
1320  rechitpro.category = 1;
1321  } else if (rechitpro.expectedwidth == 1) {
1322  rechitpro.category = 2;
1323  } else if (rechitpro.clusiz <= rechitpro.expectedwidth) {
1324  rechitpro.category = 3;
1325  } else {
1326  rechitpro.category = 4;
1327  }
1328 
1329  matched.clear();
1330  float mindist = std::numeric_limits<float>::max();
1331  float dist = std::numeric_limits<float>::max();
1332  PSimHit *closest = nullptr;
1333 
1334  if (simplehit1or2D) {
1335  matched = associate.associateHit(*hit1d);
1336  if (!matched.empty()) {
1337  for (auto &m : matched) {
1338  dist = abs((hit1d)->localPosition().x() - m.localPosition().x());
1339  if (dist < mindist) {
1340  mindist = dist;
1341  closest = &m;
1342  }
1343  }
1344 
1345  if (!closest)
1346  return;
1347 
1348  float closestX = closest->localPosition().x();
1349  rechitpro.resx = rechitpro.x - closestX;
1350  rechitpro.resxMF = Mposition.x() - (topol.measurementPosition(closest->localPosition())).x();
1351  rechitpro.pullx = (rechit->localPosition().x() - closestX) / sqrt(error.xx());
1352  rechitpro.pullxMF = (rechitpro.resxMF) / sqrt(Merror.uu());
1353  }
1354  } else {
1355  matched = associate.associateHit(*hit2d);
1356  if (!matched.empty()) {
1357  for (auto &m : matched) {
1358  dist = abs((hit2d)->localPosition().x() - m.localPosition().x());
1359  if (dist < mindist) {
1360  mindist = dist;
1361  closest = &m;
1362  }
1363  }
1364 
1365  if (!closest)
1366  return;
1367 
1368  float closestX = closest->localPosition().x();
1369  rechitpro.resx = rechitpro.x - closestX;
1370  rechitpro.resxMF = Mposition.x() - (topol.measurementPosition(closest->localPosition())).x();
1371  rechitpro.pullx = (rechit->localPosition().x() - closestX) / sqrt(error.xx());
1372  rechitpro.pullxMF = (rechitpro.resxMF) / sqrt(Merror.uu());
1373  }
1374  }
1375 }
1376 //--------------------------------------------------------------------------------------------
1378  //Retrieve tracker topology from geometry
1379  const TrackerTopology *const tTopo = &es.getData(m_topoTokenBR);
1380 
1381  // take from eventSetup the SiStripDetCabling object - here will use SiStripDetControl later on
1382  const auto &SiStripDetCabling_ = &es.getData(m_SiStripDetCablingToken);
1383 
1384  // get list of active detectors from SiStripDetCabling
1385  std::vector<uint32_t> activeDets;
1386  SiStripDetCabling_->addActiveDetectorsRawIds(activeDets);
1387 
1388  SiStripFolderOrganizer folder_organizer;
1389  // folder_organizer.setSiStripFolderName(topFolderName_);
1390  std::string curfold = topFolderName_;
1391  folder_organizer.setSiStripFolderName(curfold);
1392  folder_organizer.setSiStripFolder();
1393 
1394  // std::cout << "curfold " << curfold << std::endl;
1395 
1396  createSimpleHitsMEs(ibooker);
1397 
1398  // loop over detectors and book MEs
1399  edm::LogInfo("SiStripTrackingRecHitsValid|SiStripTrackingRecHitsValid")
1400  << "nr. of activeDets: " << activeDets.size();
1401  const std::string &tec = "TEC", tid = "TID", tob = "TOB", tib = "TIB";
1402  for (std::vector<uint32_t>::iterator detid_iterator = activeDets.begin(), detid_end = activeDets.end();
1403  detid_iterator != detid_end;
1404  ++detid_iterator) {
1405  uint32_t detid = (*detid_iterator);
1406  // remove any eventual zero elements - there should be none, but just in case
1407  if (detid == 0) {
1408  activeDets.erase(detid_iterator);
1409  continue;
1410  }
1411 
1412  // Create Layer Level MEs
1413  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo, true);
1414  SiStripHistoId hidmanager;
1415  std::string label = hidmanager.getSubdetid(detid, tTopo, true);
1416  // std::cout << "label " << label << endl;
1417 
1418  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
1419  if (iLayerME == LayerMEsMap.end()) {
1420  // get detids for the layer
1421  // Keep in mind that when we are on the TID or TEC we deal with rings not wheel
1422  int32_t lnumber = det_layer_pair.second;
1423  const std::string &lname = det_layer_pair.first;
1424  std::vector<uint32_t> layerDetIds;
1425  if (lname == tec) {
1426  if (lnumber > 0) {
1427  SiStripSubStructure::getTECDetectors(activeDets, layerDetIds, tTopo, 2, 0, 0, 0, abs(lnumber), 0);
1428  } else if (lnumber < 0) {
1429  SiStripSubStructure::getTECDetectors(activeDets, layerDetIds, tTopo, 1, 0, 0, 0, abs(lnumber), 0);
1430  }
1431  } else if (lname == tid) {
1432  if (lnumber > 0) {
1433  SiStripSubStructure::getTIDDetectors(activeDets, layerDetIds, tTopo, 2, 0, abs(lnumber), 0);
1434  } else if (lnumber < 0) {
1435  SiStripSubStructure::getTIDDetectors(activeDets, layerDetIds, tTopo, 1, 0, abs(lnumber), 0);
1436  }
1437  } else if (lname == tob) {
1438  SiStripSubStructure::getTOBDetectors(activeDets, layerDetIds, tTopo, lnumber, 0, 0);
1439  } else if (lname == tib) {
1440  SiStripSubStructure::getTIBDetectors(activeDets, layerDetIds, tTopo, lnumber, 0, 0, 0);
1441  }
1442  LayerDetMap[label] = layerDetIds;
1443 
1444  // book Layer MEs
1445  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, true);
1446  // std::stringstream ss;
1447  // folder_organizer.getLayerFolderName(ss, detid, tTopo, true);
1448  // std::cout << "Folder Name " << ss.str().c_str() << std::endl;
1449  // folder_organizer.setLayerFolder(detid,det_layer_pair.second,true);
1450  createLayerMEs(ibooker, label);
1451  }
1452  //Create StereoAndMatchedMEs
1453  std::map<std::string, StereoAndMatchedMEs>::iterator iStereoAndMatchedME = StereoAndMatchedMEsMap.find(label);
1454  if (iStereoAndMatchedME == StereoAndMatchedMEsMap.end()) {
1455  // get detids for the stereo and matched layer. We are going to need a bool for these layers
1456  bool isStereo = false;
1457  // Keep in mind that when we are on the TID or TEC we deal with rings not wheel
1458  std::vector<uint32_t> stereoandmatchedDetIds;
1459  int32_t stereolnumber = det_layer_pair.second;
1460  const std::string &stereolname = det_layer_pair.first;
1461  if (stereolname == tec && (tTopo->tecIsStereo(detid))) {
1462  if (stereolnumber > 0) {
1464  activeDets, stereoandmatchedDetIds, tTopo, 2, 0, 0, 0, abs(stereolnumber), 1);
1465  isStereo = true;
1466  } else if (stereolnumber < 0) {
1468  activeDets, stereoandmatchedDetIds, tTopo, 1, 0, 0, 0, abs(stereolnumber), 1);
1469  isStereo = true;
1470  }
1471  } else if (stereolname == tid && (tTopo->tidIsStereo(detid))) {
1472  if (stereolnumber > 0) {
1473  SiStripSubStructure::getTIDDetectors(activeDets, stereoandmatchedDetIds, tTopo, 2, 0, abs(stereolnumber), 1);
1474  isStereo = true;
1475  } else if (stereolnumber < 0) {
1476  SiStripSubStructure::getTIDDetectors(activeDets, stereoandmatchedDetIds, tTopo, 1, 0, abs(stereolnumber), 1);
1477  isStereo = true;
1478  }
1479  } else if (stereolname == tob && (tTopo->tobIsStereo(detid))) {
1480  SiStripSubStructure::getTOBDetectors(activeDets, stereoandmatchedDetIds, tTopo, stereolnumber, 0, 0);
1481  isStereo = true;
1482  } else if (stereolname == tib && (tTopo->tibIsStereo(detid))) {
1483  SiStripSubStructure::getTIBDetectors(activeDets, stereoandmatchedDetIds, tTopo, stereolnumber, 0, 0, 0);
1484  isStereo = true;
1485  }
1486 
1487  StereoAndMatchedDetMap[label] = stereoandmatchedDetIds;
1488 
1489  // book StereoAndMatched MEs
1490  if (isStereo) {
1491  folder_organizer.setLayerFolder(detid, tTopo, det_layer_pair.second, true);
1492  // std::stringstream ss1;
1493  // folder_organizer.getLayerFolderName(ss1, detid, tTopo, true);
1494  // std::cout << "Folder Name stereo " << ss1.str().c_str() << std::endl;
1495  //Create the Monitor Elements only when we have a stereo module
1496  createStereoAndMatchedMEs(ibooker, label);
1497  }
1498  }
1499 
1500  } //end of loop over detectors
1501 }
1502 //------------------------------------------------------------------------------------------
1504  simplehitsMEs.meCategory = nullptr;
1505  simplehitsMEs.meTrackwidth = nullptr;
1506  simplehitsMEs.meExpectedwidth = nullptr;
1507  simplehitsMEs.meClusterwidth = nullptr;
1508  simplehitsMEs.meTrackanglealpha = nullptr;
1509  simplehitsMEs.meTrackanglebeta = nullptr;
1516 
1521 
1530  simplehitsMEs.meResolxLF = nullptr;
1531  simplehitsMEs.meResLF = nullptr;
1532  simplehitsMEs.mePullLF = nullptr;
1533  simplehitsMEs.meResolxMF = nullptr;
1534  simplehitsMEs.meResMF = nullptr;
1535  simplehitsMEs.mePullMF = nullptr;
1536 
1537  if (layerswitchResolx_LF) {
1539  bookME1D(ibooker, "TH1Resolx_LF", "TH1Resolx_LF", "RecHit resol(x) coord. (local frame)");
1540  simplehitsMEs.meResolxLF->setAxisTitle("resol(x) RecHit coord. (local frame)");
1541  }
1542  if (layerswitchResolx_MF) {
1544  bookME1D(ibooker, "TH1Resolx_MF", "TH1Resolx_MF", "RecHit resol(x) coord. (measurement frame)");
1545  simplehitsMEs.meResolxMF->setAxisTitle("resol(x) RecHit coord. (measurement frame)");
1546  }
1547  if (layerswitchRes_LF) {
1549  bookME1D(ibooker, "TH1Res_LF", "TH1Res_LF", "Residual of the hit x coordinate (local frame)");
1550  simplehitsMEs.meResLF->setAxisTitle("Hit Res(x) (local frame)");
1551  }
1552  if (layerswitchRes_MF) {
1554  bookME1D(ibooker, "TH1Res_MF", "TH1Res_MF", "Residual of the hit x coordinate (measurement frame)");
1555  simplehitsMEs.meResMF->setAxisTitle("Hit Res(x) (measurement frame)");
1556  }
1557  if (layerswitchPull_LF) {
1558  simplehitsMEs.mePullLF = bookME1D(ibooker, "TH1Pull_LF", "TH1Pull_LF", "Pull distribution (local frame)");
1559  simplehitsMEs.mePullLF->setAxisTitle("Pull distribution (local frame)");
1560  }
1561  if (layerswitchPull_MF) {
1562  simplehitsMEs.mePullMF = bookME1D(ibooker, "TH1Pull_MF", "TH1Pull_MF", "Pull distribution (measurement frame)");
1563  simplehitsMEs.mePullMF->setAxisTitle("Pull distribution (measurement frame)");
1564  }
1565  if (layerswitchCategory) {
1566  simplehitsMEs.meCategory = bookME1D(ibooker, "TH1Category", "TH1Category", "Category");
1567  simplehitsMEs.meCategory->setAxisTitle("Category");
1568  }
1569  if (layerswitchTrackwidth) {
1570  simplehitsMEs.meTrackwidth = bookME1D(ibooker, "TH1Trackwidth", "TH1Trackwidth", "Track width");
1571  simplehitsMEs.meTrackwidth->setAxisTitle("Track width");
1572  }
1574  simplehitsMEs.meExpectedwidth = bookME1D(ibooker, "TH1Expectedwidth", "TH1Expectedwidth", "Expected width");
1575  simplehitsMEs.meExpectedwidth->setAxisTitle("Expected width");
1576  }
1578  simplehitsMEs.meClusterwidth = bookME1D(ibooker, "TH1Clusterwidth", "TH1Clusterwidth", "Cluster width");
1579  simplehitsMEs.meClusterwidth->setAxisTitle("Cluster width");
1580  }
1583  bookME1D(ibooker, "TH1Trackanglealpha", "TH1Trackanglealpha", "Track angle alpha");
1584  simplehitsMEs.meTrackanglealpha->setAxisTitle("Track angle alpha");
1585  }
1587  simplehitsMEs.meTrackanglebeta = bookME1D(ibooker, "TH1Trackanglebeta", "TH1Trackanglebeta", "Track angle beta");
1588  simplehitsMEs.meTrackanglebeta->setAxisTitle("Track angle beta");
1589  }
1592  bookMEProfile(ibooker,
1593  "TProfResolxMFTrackwidthProfile_WClus1",
1594  "TProfResolxMFTrackwidthProfile_WClus1",
1595  "Profile of Resolution in MF vs track width for w=1");
1597  simplehitsMEs.meResolxMFTrackwidthProfileWClus1->setAxisTitle("Resolution (measurement frame) w=1", 2);
1598  }
1601  bookMEProfile(ibooker,
1602  "TProfResolxMFTrackwidthProfile_WClus2",
1603  "TProfResolxMFTrackwidthProfile_WClus2",
1604  "Profile of Resolution in MF vs track width for w=2");
1606  simplehitsMEs.meResolxMFTrackwidthProfileWClus2->setAxisTitle("Resolution (measurement frame) w=2", 2);
1607  }
1610  bookMEProfile(ibooker,
1611  "TProfResolxMFTrackwidthProfile_WClus3",
1612  "TProfResolxMFTrackwidthProfile_WClus3",
1613  "Profile of Resolution in MF vs track width for w=3");
1615  simplehitsMEs.meResolxMFTrackwidthProfileWClus3->setAxisTitle("Resolution (measurement frame) w=3", 2);
1616  }
1619  bookMEProfile(ibooker,
1620  "TProfResolxMFTrackwidthProfile_WClus4",
1621  "TProfResolxMFTrackwidthProfile_WClus4",
1622  "Profile of Resolution in MF vs track width for w=4");
1624  simplehitsMEs.meResolxMFTrackwidthProfileWClus4->setAxisTitle("Resolution (measurement frame) w=3", 2);
1625  }
1628  bookMEProfile(ibooker,
1629  "TProfResMFTrackwidthProfile_WClus1",
1630  "TProfResMFTrackwidthProfile_WClus1",
1631  "Profile of Residuals(x) in MF vs track width for w=1");
1633  simplehitsMEs.meResMFTrackwidthProfileWClus1->setAxisTitle("Residuals(x) (measurement frame) w=1", 2);
1634  }
1637  bookMEProfile(ibooker,
1638  "TProfResMFTrackwidthProfile_WClus2",
1639  "TProfResMFTrackwidthProfile_WClus2",
1640  "Profile of Residuals(x) in MF vs track width for w=2");
1642  simplehitsMEs.meResMFTrackwidthProfileWClus2->setAxisTitle("Residuals(x) (measurement frame) w=2", 2);
1643  }
1646  bookMEProfile(ibooker,
1647  "TProfResMFTrackwidthProfile_WClus21",
1648  "TProfResMFTrackwidthProfile_WClus21",
1649  "Profile of Residuals(x) in MF vs track width for w=2");
1651  simplehitsMEs.meResMFTrackwidthProfileWClus21->setAxisTitle("Residuals(x) (measurement frame) w=2", 2);
1652  }
1655  bookMEProfile(ibooker,
1656  "TProfResMFTrackwidthProfile_WClus22",
1657  "TProfResMFTrackwidthProfile_WClus22",
1658  "Profile of Residuals(x) in MF vs track width for w=2");
1660  simplehitsMEs.meResMFTrackwidthProfileWClus22->setAxisTitle("Residuals(x) (measurement frame) w=2", 2);
1661  }
1664  bookMEProfile(ibooker,
1665  "TProfResMFTrackwidthProfile_WClus23",
1666  "TProfResMFTrackwidthProfile_WClus23",
1667  "Profile of Residuals(x) in MF vs track width for w=2");
1669  simplehitsMEs.meResMFTrackwidthProfileWClus23->setAxisTitle("Residuals(x) (measurement frame) w=2", 2);
1670  }
1673  bookMEProfile(ibooker,
1674  "TProfResMFTrackwidthProfile_WClus3",
1675  "TProfResMFTrackwidthProfile_WClus3",
1676  "Profile of Residuals(x) in MF vs track width for w=3");
1678  simplehitsMEs.meResMFTrackwidthProfileWClus3->setAxisTitle("Residuals(x) (measurement frame) w=3", 2);
1679  }
1682  bookMEProfile(ibooker,
1683  "TProfResMFTrackwidthProfile_WClus4",
1684  "TProfResMFTrackwidthProfile_WClus4",
1685  "Profile of Residuals(x) in MF vs track width for w=4");
1687  simplehitsMEs.meResMFTrackwidthProfileWClus4->setAxisTitle("Residuals(x) (measurement frame) w=4", 2);
1688  }
1691  "TProfResolxMFTrackwidthProfile",
1692  "TProfResolxMFTrackwidthProfile",
1693  "Profile of Resolution in MF vs track width");
1695  simplehitsMEs.meResolxMFTrackwidthProfile->setAxisTitle("Resolution (measurement frame)", 2);
1696  }
1699  bookMEProfile(ibooker,
1700  "TProfResolxMFTrackwidthProfile_Category1",
1701  "TProfResolxMFTrackwidthProfile_Category1",
1702  "Profile of Resolution in MF vs track width (Category 1)");
1704  simplehitsMEs.meResolxMFTrackwidthProfileCategory1->setAxisTitle("Resolution (measurement frame) Category 1", 2);
1705  }
1708  bookMEProfile(ibooker,
1709  "TProfResolxMFTrackwidthProfile_Category2",
1710  "TProfResolxMFTrackwidthProfile_Category2",
1711  "Profile of Resolution in MF vs track width (Category 2)");
1713  simplehitsMEs.meResolxMFTrackwidthProfileCategory2->setAxisTitle("Resolution (measurement frame) Category 2", 2);
1714  }
1717  bookMEProfile(ibooker,
1718  "TProfResolxMFTrackwidthProfile_Category3",
1719  "TProfResolxMFTrackwidthProfile_Category3",
1720  "Profile of Resolution in MF vs track width (Category 3)");
1722  simplehitsMEs.meResolxMFTrackwidthProfileCategory3->setAxisTitle("Resolution (measurement frame) Category 3", 2);
1723  }
1726  bookMEProfile(ibooker,
1727  "TProfResolxMFTrackwidthProfile_Category4",
1728  "TProfResolxMFTrackwidthProfile_Category4",
1729  "Profile of Resolution in MF vs track width (Category 4)");
1731  simplehitsMEs.meResolxMFTrackwidthProfileCategory4->setAxisTitle("Resolution (measurement frame) Category 4", 2);
1732  }
1735  bookMEProfile(ibooker,
1736  "TProfResolxMFClusterwidthProfile_Category1",
1737  "TProfResolxMFClusterwidthProfile_Category1",
1738  "Profile of Resolution in MF vs cluster width (Category 1)");
1740  simplehitsMEs.meResolxMFClusterwidthProfileCategory1->setAxisTitle("Resolution (measurement frame) Category 1", 2);
1741  }
1744  "TProfResolxMFAngleProfile",
1745  "TProfResolxMFAngleProfile",
1746  "Profile of Resolution in MF vs Track angle alpha");
1747  simplehitsMEs.meResolxMFAngleProfile->setAxisTitle("Track angle alpha", 1);
1748  simplehitsMEs.meResolxMFAngleProfile->setAxisTitle("Resolution (measurement frame)", 2);
1749  }
1750 }
1751 //------------------------------------------------------------------------------------------
1753  SiStripHistoId hidmanager;
1754  LayerMEs layerMEs;
1755 
1756  layerMEs.meWclusRphi = nullptr;
1757  layerMEs.meAdcRphi = nullptr;
1758  layerMEs.meResolxLFRphi = nullptr;
1759  layerMEs.meResolxMFRphi = nullptr;
1760  layerMEs.meResolxMFRphiwclus1 = nullptr;
1761  layerMEs.meResolxMFRphiwclus2 = nullptr;
1762  layerMEs.meResolxMFRphiwclus3 = nullptr;
1763  layerMEs.meResolxMFRphiwclus4 = nullptr;
1764  layerMEs.meResLFRphi = nullptr;
1765  layerMEs.meResMFRphi = nullptr;
1766  layerMEs.meResMFRphiwclus1 = nullptr;
1767  layerMEs.meResMFRphiwclus2 = nullptr;
1768  layerMEs.meResMFRphiwclus3 = nullptr;
1769  layerMEs.meResMFRphiwclus4 = nullptr;
1770  layerMEs.mePullLFRphi = nullptr;
1771  layerMEs.mePullMFRphi = nullptr;
1772  layerMEs.mePullMFRphiwclus1 = nullptr;
1773  layerMEs.mePullMFRphiwclus2 = nullptr;
1774  layerMEs.mePullMFRphiwclus3 = nullptr;
1775  layerMEs.mePullMFRphiwclus4 = nullptr;
1776  layerMEs.meTrackangleRphi = nullptr;
1777  layerMEs.meTrackanglebetaRphi = nullptr;
1778  layerMEs.meTrackangle2Rphi = nullptr;
1779  layerMEs.mePullTrackangleProfileRphi = nullptr;
1780  layerMEs.mePullTrackangle2DRphi = nullptr;
1781  layerMEs.meTrackwidthRphi = nullptr;
1782  layerMEs.meExpectedwidthRphi = nullptr;
1783  layerMEs.meClusterwidthRphi = nullptr;
1784  layerMEs.meCategoryRphi = nullptr;
1785  layerMEs.mePullTrackwidthProfileRphi = nullptr;
1786  layerMEs.mePullTrackwidthProfileRphiwclus1 = nullptr;
1787  layerMEs.mePullTrackwidthProfileRphiwclus2 = nullptr;
1788  layerMEs.mePullTrackwidthProfileRphiwclus3 = nullptr;
1789  layerMEs.mePullTrackwidthProfileRphiwclus4 = nullptr;
1790  layerMEs.mePullTrackwidthProfileCategory1Rphi = nullptr;
1791  layerMEs.mePullTrackwidthProfileCategory2Rphi = nullptr;
1792  layerMEs.mePullTrackwidthProfileCategory3Rphi = nullptr;
1793  layerMEs.mePullTrackwidthProfileCategory4Rphi = nullptr;
1794  layerMEs.meResolxMFTrackwidthProfileRphi = nullptr;
1795 
1796  layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = nullptr;
1797  layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = nullptr;
1798  layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = nullptr;
1799  layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = nullptr;
1800  layerMEs.meResMFTrackwidthProfileWclus1Rphi = nullptr;
1801  layerMEs.meResMFTrackwidthProfileWclus2Rphi = nullptr;
1802  layerMEs.meResMFTrackwidthProfileWclus3Rphi = nullptr;
1803  layerMEs.meResMFTrackwidthProfileWclus4Rphi = nullptr;
1804 
1805  layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = nullptr;
1806  layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = nullptr;
1807  layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = nullptr;
1808  layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = nullptr;
1809  layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = nullptr;
1810  layerMEs.meResolxMFAngleProfileRphi = nullptr;
1811  layerMEs.merapidityResProfilewclus1 = nullptr;
1812  layerMEs.merapidityResProfilewclus2 = nullptr;
1813  layerMEs.merapidityResProfilewclus3 = nullptr;
1814  layerMEs.merapidityResProfilewclus4 = nullptr;
1815 
1816  //WclusRphi
1817  if (layerswitchWclusRphi) {
1818  layerMEs.meWclusRphi = bookME1D(ibooker,
1819  "TH1WclusRphi",
1820  hidmanager.createHistoLayer("Wclus_rphi", "layer", label, "").c_str(),
1821  "Cluster Width - Number of strips that belong to the RecHit cluster");
1822  layerMEs.meWclusRphi->setAxisTitle("Cluster Width [nr strips] in " + label);
1823  }
1824  //AdcRphi
1825  if (layerswitchAdcRphi) {
1826  layerMEs.meAdcRphi = bookME1D(ibooker,
1827  "TH1AdcRphi",
1828  hidmanager.createHistoLayer("Adc_rphi", "layer", label, "").c_str(),
1829  "RecHit Cluster Charge");
1830  layerMEs.meAdcRphi->setAxisTitle("cluster charge [ADC] in " + label);
1831  }
1832  //ResolxLFRphi
1834  layerMEs.meResolxLFRphi = bookME1D(ibooker,
1835  "TH1ResolxLFRphi",
1836  hidmanager.createHistoLayer("Resolx_LF_rphi", "layer", label, "").c_str(),
1837  "RecHit resol(x) coord."); //<resolor>~20micron
1838  layerMEs.meResolxLFRphi->setAxisTitle("resol(x) RecHit coord. (local frame) in " + label);
1839  }
1840  //ResolxMFRphi
1842  layerMEs.meResolxMFRphi = bookME1D(ibooker,
1843  "TH1ResolxMFRphi",
1844  hidmanager.createHistoLayer("Resolx_MF_rphi", "layer", label, "").c_str(),
1845  "RecHit resol(x) coord."); //<resolor>~20micron
1846  layerMEs.meResolxMFRphi->setAxisTitle("resol(x) RecHit coord. (measurement frame) in " + label);
1847  }
1848  //ResolxMFRphiwclus1
1850  layerMEs.meResolxMFRphiwclus1 =
1851  bookME1D(ibooker,
1852  "TH1ResolxMFRphiwclus1",
1853  hidmanager.createHistoLayer("Resolx_MF_wclus1_rphi", "layer", label, "").c_str(),
1854  "RecHit resol(x) coord. w=1 "); //<resolor>~20micron
1855  layerMEs.meResolxMFRphiwclus1->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=1 in " + label);
1856  }
1857  //ResolxMFRphiwclus2
1859  layerMEs.meResolxMFRphiwclus2 =
1860  bookME1D(ibooker,
1861  "TH1ResolxMFRphiwclus2",
1862  hidmanager.createHistoLayer("Resolx_MF_wclus2_rphi", "layer", label, "").c_str(),
1863  "RecHit resol(x) coord. w=2 "); //<resolor>~20micron
1864  layerMEs.meResolxMFRphiwclus2->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=2 in " + label);
1865  }
1866  //ResolxMFRphiwclus3
1868  layerMEs.meResolxMFRphiwclus3 =
1869  bookME1D(ibooker,
1870  "TH1ResolxMFRphiwclus3",
1871  hidmanager.createHistoLayer("Resolx_MF_wclus3_rphi", "layer", label, "").c_str(),
1872  "RecHit resol(x) coord. w=3 "); //<resolor>~20micron
1873  layerMEs.meResolxMFRphiwclus3->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=3 in " + label);
1874  }
1875  //ResolxMFRphiwclus4
1877  layerMEs.meResolxMFRphiwclus4 =
1878  bookME1D(ibooker,
1879  "TH1ResolxMFRphiwclus4",
1880  hidmanager.createHistoLayer("Resolx_MF_wclus4_rphi", "layer", label, "").c_str(),
1881  "RecHit resol(x) coord. w=4 "); //<resolor>~20micron
1882  layerMEs.meResolxMFRphiwclus4->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=4 in " + label);
1883  }
1884  //ResLFRphi
1885  if (layerswitchResLFRphi) {
1886  layerMEs.meResLFRphi = bookME1D(ibooker,
1887  "TH1ResLFRphi",
1888  hidmanager.createHistoLayer("Res_LF_rphi", "layer", label, "").c_str(),
1889  "Residual of the hit x coordinate");
1890  layerMEs.meResLFRphi->setAxisTitle("Hit Residuals(x) (local frame) in " + label);
1891  }
1892  //ResMFRphi
1893  if (layerswitchResMFRphi) {
1894  layerMEs.meResMFRphi = bookME1D(ibooker,
1895  "TH1ResMFRphi",
1896  hidmanager.createHistoLayer("Res_MF_Rphi", "layer", label, "").c_str(),
1897  "Residual of the hit x coordinate");
1898  layerMEs.meResMFRphi->setAxisTitle("Hit Residuals(x) (measurement frame) in " + label);
1899  }
1900  //ResMFRphiwclus1
1902  layerMEs.meResMFRphiwclus1 = bookME1D(ibooker,
1903  "TH1ResMFRphiwclus1",
1904  hidmanager.createHistoLayer("Res_MF_wclus1_Rphi", "layer", label, "").c_str(),
1905  "Residual of the hit x coordinate w=1");
1906  layerMEs.meResMFRphiwclus1->setAxisTitle("Hit Residuals(x) (measurement frame) for w=1 in " + label);
1907  }
1908  //ResMFRphiwclus2
1910  layerMEs.meResMFRphiwclus2 = bookME1D(ibooker,
1911  "TH1ResMFRphiwclus2",
1912  hidmanager.createHistoLayer("Res_MF_wclus2_Rphi", "layer", label, "").c_str(),
1913  "Residual of the hit x coordinate w=2");
1914  layerMEs.meResMFRphiwclus2->setAxisTitle("Hit Residuals(x) (measurement frame) for w=2 in " + label);
1915  }
1916  //ResMFRphiwclus3
1918  layerMEs.meResMFRphiwclus3 = bookME1D(ibooker,
1919  "TH1ResMFRphiwclus3",
1920  hidmanager.createHistoLayer("Res_MF_wclus3_Rphi", "layer", label, "").c_str(),
1921  "Residual of the hit x coordinate w=3");
1922  layerMEs.meResMFRphiwclus3->setAxisTitle("Hit Residuals(x) (measurement frame) for w=3 in " + label);
1923  }
1924  //ResMFRphiwclus4
1926  layerMEs.meResMFRphiwclus4 = bookME1D(ibooker,
1927  "TH1ResMFRphiwclus4",
1928  hidmanager.createHistoLayer("Res_MF_wclus4_Rphi", "layer", label, "").c_str(),
1929  "Residual of the hit x coordinate w=4");
1930  layerMEs.meResMFRphiwclus4->setAxisTitle("Hit Residuals(x) (measurement frame) for w=4 in " + label);
1931  }
1932  //PullLFRphi
1933  if (layerswitchPullLFRphi) {
1934  layerMEs.mePullLFRphi = bookME1D(ibooker,
1935  "TH1PullLFRphi",
1936  hidmanager.createHistoLayer("Pull_LF_rphi", "layer", label, "").c_str(),
1937  "Pull distribution");
1938  layerMEs.mePullLFRphi->setAxisTitle("Pull distribution (local frame) in " + label);
1939  }
1940  //PullMFRphi
1941  if (layerswitchPullMFRphi) {
1942  layerMEs.mePullMFRphi = bookME1D(ibooker,
1943  "TH1PullMFRphi",
1944  hidmanager.createHistoLayer("Pull_MF_rphi", "layer", label, "").c_str(),
1945  "Pull distribution");
1946  layerMEs.mePullMFRphi->setAxisTitle("Pull distribution (measurement frame) in " + label);
1947  }
1948  //PullMFRphiwclus1
1950  layerMEs.mePullMFRphiwclus1 =
1951  bookME1D(ibooker,
1952  "TH1PullMFRphiwclus1",
1953  hidmanager.createHistoLayer("Pull_MF_wclus1_rphi", "layer", label, "").c_str(),
1954  "Pull distribution w=1");
1955  layerMEs.mePullMFRphiwclus1->setAxisTitle("Pull distribution (measurement frame) for w=1 in " + label);
1956  }
1957  //PullMFRphiwclus2
1959  layerMEs.mePullMFRphiwclus2 =
1960  bookME1D(ibooker,
1961  "TH1PullMFRphiwclus2",
1962  hidmanager.createHistoLayer("Pull_MF_wclus2_rphi", "layer", label, "").c_str(),
1963  "Pull distribution w=2");
1964  layerMEs.mePullMFRphiwclus2->setAxisTitle("Pull distribution (measurement frame) for w=2 in " + label);
1965  }
1966  //PullMFRphiwclus3
1968  layerMEs.mePullMFRphiwclus3 =
1969  bookME1D(ibooker,
1970  "TH1PullMFRphiwclus3",
1971  hidmanager.createHistoLayer("Pull_MF_wclus3_rphi", "layer", label, "").c_str(),
1972  "Pull distribution w=3");
1973  layerMEs.mePullMFRphiwclus3->setAxisTitle("Pull distribution (measurement frame) for w=3 in " + label);
1974  }
1975  //PullMFRphiwclus4
1977  layerMEs.mePullMFRphiwclus4 =
1978  bookME1D(ibooker,
1979  "TH1PullMFRphiwclus4",
1980  hidmanager.createHistoLayer("Pull_MF_wclus4_rphi", "layer", label, "").c_str(),
1981  "Pull distribution w=4");
1982  layerMEs.mePullMFRphiwclus4->setAxisTitle("Pull distribution (measurement frame) for w=4 in " + label);
1983  }
1984 
1986  layerMEs.meTrackangleRphi = bookME1D(ibooker,
1987  "TH1TrackangleRphi",
1988  hidmanager.createHistoLayer("Track_angle_Rphi", "layer", label, "").c_str(),
1989  "Track angle alpha");
1990  layerMEs.meTrackangleRphi->setAxisTitle("Track angle in " + label);
1991  }
1993  layerMEs.meTrackanglebetaRphi =
1994  bookME1D(ibooker,
1995  "TH1TrackanglebetaRphi",
1996  hidmanager.createHistoLayer("Track_angle_beta_Rphi", "layer", label, "").c_str(),
1997  "Track angle beta");
1998  layerMEs.meTrackanglebetaRphi->setAxisTitle("" + label);
1999  }
2001  layerMEs.meTrackangle2Rphi = bookME1D(ibooker,
2002  "TH1Trackangle2Rphi",
2003  hidmanager.createHistoLayer("Track_angle2_Rphi", "layer", label, "").c_str(),
2004  "");
2005  layerMEs.meTrackangle2Rphi->setAxisTitle("" + label);
2006  }
2008  layerMEs.mePullTrackangleProfileRphi =
2009  bookMEProfile(ibooker,
2010  "TProfPullTrackangleProfileRphi",
2011  hidmanager.createHistoLayer("Pull_Trackangle_Profile_Rphi", "layer", label, "").c_str(),
2012  "Profile of Pull in MF vs track angle alpha");
2013  layerMEs.mePullTrackangleProfileRphi->setAxisTitle("Track angle alpha in " + label, 1);
2014  layerMEs.mePullTrackangleProfileRphi->setAxisTitle("Pull (MF) in " + label, 2);
2015  }
2017  layerMEs.mePullTrackangle2DRphi =
2018  bookME1D(ibooker,
2019  "TH1PullTrackangle2DRphi",
2020  hidmanager.createHistoLayer("Pull_Trackangle_2D_Rphi", "layer", label, "").c_str(),
2021  "");
2022  layerMEs.mePullTrackangle2DRphi->setAxisTitle("" + label);
2023  }
2025  layerMEs.meTrackwidthRphi = bookME1D(ibooker,
2026  "TH1TrackwidthRphi",
2027  hidmanager.createHistoLayer("Track_width_Rphi", "layer", label, "").c_str(),
2028  "Track width");
2029  layerMEs.meTrackwidthRphi->setAxisTitle("Track width in " + label);
2030  }
2032  layerMEs.meExpectedwidthRphi =
2033  bookME1D(ibooker,
2034  "TH1ExpectedwidthRphi",
2035  hidmanager.createHistoLayer("Expected_width_Rphi", "layer", label, "").c_str(),
2036  "Expected width");
2037  layerMEs.meExpectedwidthRphi->setAxisTitle("Expected width in " + label);
2038  }
2040  layerMEs.meClusterwidthRphi =
2041  bookME1D(ibooker,
2042  "TH1ClusterwidthRphi",
2043  hidmanager.createHistoLayer("Cluster_width_Rphi", "layer", label, "").c_str(),
2044  "Cluster width");
2045  layerMEs.meClusterwidthRphi->setAxisTitle("Cluster width in " + label);
2046  }
2048  layerMEs.meCategoryRphi = bookME1D(ibooker,
2049  "TH1CategoryRphi",
2050  hidmanager.createHistoLayer("Category_Rphi", "layer", label, "").c_str(),
2051  "Category");
2052  layerMEs.meCategoryRphi->setAxisTitle("Category in " + label);
2053  }
2055  layerMEs.mePullTrackwidthProfileRphi =
2056  bookMEProfile(ibooker,
2057  "TProfPullTrackwidthProfileRphi",
2058  hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi", "layer", label, "").c_str(),
2059  "Profile of Pull in MF vs track width");
2060  layerMEs.mePullTrackwidthProfileRphi->setAxisTitle("track width in " + label, 1);
2061  layerMEs.mePullTrackwidthProfileRphi->setAxisTitle("Pull (MF) in " + label, 2);
2062  }
2065  bookMEProfile(ibooker,
2066  "TProfPullTrackwidthProfileRphiwclus1",
2067  hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus1", "layer", label, "").c_str(),
2068  "Profile of Pull in MF vs track width for w=1");
2069  layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle("track width for w=1 in " + label, 1);
2070  layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle("Pull (MF) for w=1 in " + label, 2);
2071  }
2074  bookMEProfile(ibooker,
2075  "TProfPullTrackwidthProfileRphiwclus2",
2076  hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus2", "layer", label, "").c_str(),
2077  "Profile of Pull in MF vs track width for w=2");
2078  layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle("track width for w=2 in " + label, 1);
2079  layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle("Pull (MF) for w=2 in " + label, 2);
2080  }
2083  bookMEProfile(ibooker,
2084  "TProfPullTrackwidthProfileRphiwclus3",
2085  hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus3", "layer", label, "").c_str(),
2086  "Profile of Pull in MF vs track width for w=3");
2087  layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle("track width for w=3 in " + label, 1);
2088  layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle("Pull (MF) for w=3 in " + label, 2);
2089  }
2092  bookMEProfile(ibooker,
2093  "TProfPullTrackwidthProfileRphiwclus4",
2094  hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus4", "layer", label, "").c_str(),
2095  "Profile of Pull in MF vs track width for w=4");
2096  layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle("track width for w=4 in " + label, 1);
2097  layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle("Pull (MF) for w=4 in " + label, 2);
2098  }
2101  ibooker,
2102  "TProfPullTrackwidthProfileCategory1Rphi",
2103  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Rphi", "layer", label, "").c_str(),
2104  "Profile of Pull in MF vs track width for Category 1");
2105  layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle("track width for Category 1 in " + label, 1);
2106  layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle("Pull (MF) for Category 1 in " + label, 2);
2107  }
2110  ibooker,
2111  "TProfPullTrackwidthProfileCategory2Rphi",
2112  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Rphi", "layer", label, "").c_str(),
2113  "Profile of Pull in MF vs track width for Category 2");
2114  layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle("track width for Category 2 in " + label, 1);
2115  layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle("Pull (MF) for Category 2 in " + label, 2);
2116  }
2119  ibooker,
2120  "TProfPullTrackwidthProfileCategory3Rphi",
2121  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Rphi", "layer", label, "").c_str(),
2122  "Profile of Pull in MF vs track width for Category 3");
2123  layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle("track width for Category 3 in " + label, 1);
2124  layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle("Pull (MF) for Category 3 in " + label, 2);
2125  }
2128  ibooker,
2129  "TProfPullTrackwidthProfileCategory4Rphi",
2130  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Rphi", "layer", label, "").c_str(),
2131  "Profile of Pull in MF vs track width for Category 4");
2132  layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle("track width for Category 4 in " + label, 1);
2133  layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle("Pull (MF) for Category 4 in " + label, 2);
2134  }
2137  bookMEProfile(ibooker,
2138  "TProfResolxMFTrackwidthProfileRphi",
2139  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Rphi", "layer", label, "").c_str(),
2140  "Profile of Resolution in MF vs track width");
2141  layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle("track width in " + label, 1);
2142  layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle("Resolution in MF in " + label, 2);
2143  }
2144 
2147  ibooker,
2148  "TProfResolxMFTrackwidthProfileWclus1Rphi",
2149  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus1_Rphi", "layer", label, "").c_str(),
2150  "Profile of Resolution in MF vs track width for w=1");
2151  layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle("track width for w=1 in " + label, 1);
2152  layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle("Resolution in MF for w=1 in " + label, 2);
2153  }
2156  ibooker,
2157  "TProfResolxMFTrackwidthProfileWclus2Rphi",
2158  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus2_Rphi", "layer", label, "").c_str(),
2159  "Profile of Resolution in MF vs track width for w=2");
2160  layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle("track width for w=2 in " + label, 1);
2161  layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle("Resolution in MF for w=2 in " + label, 2);
2162  }
2165  ibooker,
2166  "TProfResolxMFTrackwidthProfileWclus3Rphi",
2167  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus3_Rphi", "layer", label, "").c_str(),
2168  "Profile of Resolution in MF vs track width for w=3");
2169  layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle("track width for w=3 in " + label, 1);
2170  layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle("Resolution in MF for w=3 in " + label, 2);
2171  }
2174  ibooker,
2175  "TProfResolxMFTrackwidthProfileWclus4Rphi",
2176  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus4_Rphi", "layer", label, "").c_str(),
2177  "Profile of Resolution in MF vs track width for w=4");
2178  layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle("track width for w=4 in " + label, 1);
2179  layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle("Resolution in MF for w=4 in " + label, 2);
2180  }
2183  bookMEProfile(ibooker,
2184  "TProfResMFTrackwidthProfileWclus1Rphi",
2185  hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus1_Rphi", "layer", label, "").c_str(),
2186  "Profile of Residuals(x) in MF vs track width for w=1");
2187  layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle("track width for w=1 in " + label, 1);
2188  layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle("Residuals(x) in MF for w=1 in " + label, 2);
2189  }
2192  bookMEProfile(ibooker,
2193  "TProfResMFTrackwidthProfileWclus2Rphi",
2194  hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus2_Rphi", "layer", label, "").c_str(),
2195  "Profile of Residuals(x) in MF vs track width for w=2");
2196  layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle("track width for w=2 in " + label, 1);
2197  layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle("Residuals(x) in MF for w=2 in " + label, 2);
2198  }
2201  bookMEProfile(ibooker,
2202  "TProfResMFTrackwidthProfileWclus3Rphi",
2203  hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus3_Rphi", "layer", label, "").c_str(),
2204  "Profile of Residuals(x) in MF vs track width for w=3");
2205  layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle("track width for w=3 in " + label, 1);
2206  layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle("Residuals(x) in MF for w=3 in " + label, 2);
2207  }
2210  bookMEProfile(ibooker,
2211  "TProfResMFTrackwidthProfileWclus4Rphi",
2212  hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus4_Rphi", "layer", label, "").c_str(),
2213  "Profile of Residuals(x) in MF vs track width for w=4");
2214  layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle("track width for w=4 in " + label, 1);
2215  layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle("Residuals(x) in MF for w=4 in " + label, 2);
2216  }
2217 
2220  ibooker,
2221  "TProfResolxMFTrackwidthProfileCategory1Rphi",
2222  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Rphi", "layer", label, "").c_str(),
2223  "Profile of Resolution in MF vs track width for Category 1");
2224  layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle("track width for Category 1 in " + label, 1);
2225  layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle("Resolution in MF for Category 1 in " + label, 2);
2226  }
2229  ibooker,
2230  "TProfResolxMFTrackwidthProfileCategory2Rphi",
2231  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Rphi", "layer", label, "").c_str(),
2232  "Profile of Resolution in MF vs track width for Category 2");
2233  layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle("track width for Category 2 in " + label, 1);
2234  layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle("Resolution in MF for Category 2 in " + label, 2);
2235  }
2238  ibooker,
2239  "TProfResolxMFTrackwidthProfileCategory3Rphi",
2240  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi", "layer", label, "").c_str(),
2241  "Profile of Resolution in MF vs track width for Category 3");
2242  layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle("track width for Category 3 in " + label, 1);
2243  layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle("Resolution in MF for Category 3 in " + label, 2);
2244  }
2247  ibooker,
2248  "TProfResolxMFTrackwidthProfileCategory4Rphi",
2249  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi", "layer", label, "").c_str(),
2250  "Profile of Resolution in MF vs track width for Category 4");
2251  layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle("track width for Category 4 in " + label, 1);
2252  layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle("Resolution in MF for Category 4 in " + label, 2);
2253  }
2256  ibooker,
2257  "TProfResolxMFClusterwidthProfileCategory1Rphi",
2258  hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Rphi", "layer", label, "").c_str(),
2259  "Profile of Resolution in MF vs cluster width for Category 1");
2260  layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle("cluster width for Category 1 in " + label, 1);
2261  layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle("Resolution in MF for Category 1 in " + label, 2);
2262  }
2264  layerMEs.meResolxMFAngleProfileRphi =
2265  bookMEProfile(ibooker,
2266  "TProfResolxMFAngleProfileRphi",
2267  hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Rphi", "layer", label, "").c_str(),
2268  "Profile of Resolution in MF vs track angle alpha");
2269  layerMEs.meResolxMFAngleProfileRphi->setAxisTitle("track angle alpha in " + label, 1);
2270  layerMEs.meResolxMFAngleProfileRphi->setAxisTitle("Resolution in MF in " + label, 2);
2271  }
2273  layerMEs.merapidityResProfilewclus1 =
2274  bookMEProfile(ibooker,
2275  "TProfrapidityResProfilewclus1",
2276  hidmanager.createHistoLayer("rapidity_Res_Profile_wclus1", "layer", label, "").c_str(),
2277  "Profile of rapidity vs Res for w=1");
2278  layerMEs.merapidityResProfilewclus1->setAxisTitle("Res for w=1 in " + label, 1);
2279  layerMEs.merapidityResProfilewclus1->setAxisTitle("rapidity for w=1 in " + label, 2);
2280  }
2282  layerMEs.merapidityResProfilewclus2 =
2283  bookMEProfile(ibooker,
2284  "TProfrapidityResProfilewclus2",
2285  hidmanager.createHistoLayer("rapidity_Res_Profile_wclus2", "layer", label, "").c_str(),
2286  "Profile of rapidity vs Res for w=2");
2287  layerMEs.merapidityResProfilewclus2->setAxisTitle("Res for w=2 in " + label, 1);
2288  layerMEs.merapidityResProfilewclus2->setAxisTitle("rapidity for w=2 in " + label, 2);
2289  }
2291  layerMEs.merapidityResProfilewclus3 =
2292  bookMEProfile(ibooker,
2293  "TProfrapidityResProfilewclus3",
2294  hidmanager.createHistoLayer("rapidity_Res_Profile_wclus3", "layer", label, "").c_str(),
2295  "Profile of rapidity vs Res for w=3");
2296  layerMEs.merapidityResProfilewclus3->setAxisTitle("Res for w=3 in " + label, 1);
2297  layerMEs.merapidityResProfilewclus3->setAxisTitle("rapidity for w=3 in " + label, 2);
2298  }
2300  layerMEs.merapidityResProfilewclus4 =
2301  bookMEProfile(ibooker,
2302  "TProfrapidityResProfilewclus4",
2303  hidmanager.createHistoLayer("rapidity_Res_Profile_wclus4", "layer", label, "").c_str(),
2304  "Profile of rapidity vs Res for w=4");
2305  layerMEs.merapidityResProfilewclus4->setAxisTitle("Res for w=4 in " + label, 1);
2306  layerMEs.merapidityResProfilewclus4->setAxisTitle("rapidity for w=4 in " + label, 2);
2307  }
2308 
2309  LayerMEsMap[label] = layerMEs;
2310 }
2311 //------------------------------------------------------------------------------------------
2313  SiStripHistoId hidmanager;
2314  StereoAndMatchedMEs stereoandmatchedMEs;
2315 
2316  stereoandmatchedMEs.meWclusSas = nullptr;
2317  stereoandmatchedMEs.meAdcSas = nullptr;
2318  stereoandmatchedMEs.meResolxLFSas = nullptr;
2319  stereoandmatchedMEs.meResolxMFSas = nullptr;
2320  stereoandmatchedMEs.meResLFSas = nullptr;
2321  stereoandmatchedMEs.meResMFSas = nullptr;
2322  stereoandmatchedMEs.mePullLFSas = nullptr;
2323  stereoandmatchedMEs.mePullMFSas = nullptr;
2324  stereoandmatchedMEs.meTrackangleSas = nullptr;
2325  stereoandmatchedMEs.meTrackanglebetaSas = nullptr;
2326  stereoandmatchedMEs.mePullTrackangleProfileSas = nullptr;
2327  stereoandmatchedMEs.meTrackwidthSas = nullptr;
2328  stereoandmatchedMEs.meExpectedwidthSas = nullptr;
2329  stereoandmatchedMEs.meClusterwidthSas = nullptr;
2330  stereoandmatchedMEs.meCategorySas = nullptr;
2331  stereoandmatchedMEs.mePullTrackwidthProfileSas = nullptr;
2332  stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = nullptr;
2333  stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = nullptr;
2334  stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = nullptr;
2335  stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = nullptr;
2336  stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = nullptr;
2337  stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = nullptr;
2338  stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = nullptr;
2339  stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = nullptr;
2340  stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = nullptr;
2341  stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = nullptr;
2342  stereoandmatchedMEs.meResolxMFAngleProfileSas = nullptr;
2343 
2344  stereoandmatchedMEs.mePosxMatched = nullptr;
2345  stereoandmatchedMEs.mePosyMatched = nullptr;
2346  stereoandmatchedMEs.meResolxMatched = nullptr;
2347  stereoandmatchedMEs.meResolyMatched = nullptr;
2348  stereoandmatchedMEs.meResxMatched = nullptr;
2349  stereoandmatchedMEs.meResyMatched = nullptr;
2350  stereoandmatchedMEs.mePullxMatched = nullptr;
2351  stereoandmatchedMEs.mePullyMatched = nullptr;
2352 
2353  //WclusSas
2354  if (layerswitchWclusSas) {
2355  stereoandmatchedMEs.meWclusSas = bookME1D(ibooker,
2356  "TH1WclusSas",
2357  hidmanager.createHistoLayer("Wclus_sas", "layer", label, "").c_str(),
2358  "Cluster Width - Number of strips that belong to the RecHit cluster");
2359  stereoandmatchedMEs.meWclusSas->setAxisTitle("Cluster Width [nr strips] (stereo) in " + label);
2360  }
2361  //AdcSas
2362  if (layerswitchAdcSas) {
2363  stereoandmatchedMEs.meAdcSas = bookME1D(ibooker,
2364  "TH1AdcSas",
2365  hidmanager.createHistoLayer("Adc_sas", "layer", label, "").c_str(),
2366  "RecHit Cluster Charge");
2367  stereoandmatchedMEs.meAdcSas->setAxisTitle("cluster charge [ADC] (stereo) in " + label);
2368  }
2369  //ResolxLFSas
2370  if (layerswitchResolxLFSas) {
2371  stereoandmatchedMEs.meResolxLFSas =
2372  bookME1D(ibooker,
2373  "TH1ResolxLFSas",
2374  hidmanager.createHistoLayer("Resolx_LF_sas", "layer", label, "").c_str(),
2375  "RecHit resol(x) coord.");
2376  stereoandmatchedMEs.meResolxLFSas->setAxisTitle("resol(x) RecHit coord. (local frame) (stereo) in " + label);
2377  }
2378  //ResolxMFSas
2379  if (layerswitchResolxMFSas) {
2380  stereoandmatchedMEs.meResolxMFSas =
2381  bookME1D(ibooker,
2382  "TH1ResolxMFSas",
2383  hidmanager.createHistoLayer("Resolx_MF_sas", "layer", label, "").c_str(),
2384  "RecHit resol(x) coord.");
2385  stereoandmatchedMEs.meResolxMFSas->setAxisTitle("resol(x) RecHit coord. (measurement frame) (stereo) in " + label);
2386  }
2387  //ResLFSas
2388  if (layerswitchResLFSas) {
2389  stereoandmatchedMEs.meResLFSas = bookME1D(ibooker,
2390  "TH1ResLFSas",
2391  hidmanager.createHistoLayer("Res_LF_sas", "layer", label, "").c_str(),
2392  "Residual of the hit x coordinate");
2393  stereoandmatchedMEs.meResLFSas->setAxisTitle("Hit Residuals(x) (local frame) (stereo) in " + label);
2394  }
2395  //ResMFSas
2396  if (layerswitchResMFSas) {
2397  stereoandmatchedMEs.meResMFSas = bookME1D(ibooker,
2398  "TH1ResMFSas",
2399  hidmanager.createHistoLayer("Res_MF_sas", "layer", label, "").c_str(),
2400  "Residual of the hit x coordinate");
2401  stereoandmatchedMEs.meResMFSas->setAxisTitle("Hit Residuals(x) (stereo) in " + label);
2402  }
2403  //PullLFSas
2404  if (layerswitchPullLFSas) {
2405  stereoandmatchedMEs.mePullLFSas = bookME1D(ibooker,
2406  "TH1PullLFSas",
2407  hidmanager.createHistoLayer("Pull_LF_sas", "layer", label, "").c_str(),
2408  "Pull distribution");
2409  stereoandmatchedMEs.mePullLFSas->setAxisTitle("Pull distribution (local frame) (stereo) in " + label);
2410  }
2411  //PullMFSas
2412  if (layerswitchPullMFSas) {
2413  stereoandmatchedMEs.mePullMFSas = bookME1D(ibooker,
2414  "TH1PullMFSas",
2415  hidmanager.createHistoLayer("Pull_MF_sas", "layer", label, "").c_str(),
2416  "Pull distribution");
2417  stereoandmatchedMEs.mePullMFSas->setAxisTitle("Pull distribution (measurement frame) (stereo) in " + label);
2418  }
2419 
2421  stereoandmatchedMEs.meTrackangleSas =
2422  bookME1D(ibooker,
2423  "TH1TrackangleSas",
2424  hidmanager.createHistoLayer("Track_angle_Sas", "layer", label, "").c_str(),
2425  "Track angle");
2426  stereoandmatchedMEs.meTrackangleSas->setAxisTitle("Track angle (stereo) in " + label);
2427  }
2429  stereoandmatchedMEs.meTrackanglebetaSas =
2430  bookME1D(ibooker,
2431  "TH1TrackanglebetaSas",
2432  hidmanager.createHistoLayer("Track_angle_beta_Sas", "layer", label, "").c_str(),
2433  "Track angle beta");
2434  stereoandmatchedMEs.meTrackanglebetaSas->setAxisTitle("Track angle beta (stereo) in " + label);
2435  }
2437  stereoandmatchedMEs.mePullTrackangleProfileSas =
2438  bookMEProfile(ibooker,
2439  "TProfPullTrackangleProfileSas",
2440  hidmanager.createHistoLayer("Pull_Track_angle_Profile_Sas", "layer", label, "").c_str(),
2441  "Profile of Pull in MF vs track angle (stereo)");
2442  stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle("track angle (stereo) in " + label, 1);
2443  stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle("Pull in MF (stereo) in " + label, 2);
2444  }
2446  stereoandmatchedMEs.meTrackwidthSas =
2447  bookME1D(ibooker,
2448  "TH1TrackwidthSas",
2449  hidmanager.createHistoLayer("Track_width_Sas", "layer", label, "").c_str(),
2450  "Track width");
2451  stereoandmatchedMEs.meTrackwidthSas->setAxisTitle("Track width (stereo) in " + label);
2452  }
2454  stereoandmatchedMEs.meExpectedwidthSas =
2455  bookME1D(ibooker,
2456  "TH1ExpectedwidthSas",
2457  hidmanager.createHistoLayer("Expected_width_Sas", "layer", label, "").c_str(),
2458  "Expected width");
2459  stereoandmatchedMEs.meExpectedwidthSas->setAxisTitle("Expected width (stereo) in " + label);
2460  }
2462  stereoandmatchedMEs.meClusterwidthSas =
2463  bookME1D(ibooker,
2464  "TH1ClusterwidthSas",
2465  hidmanager.createHistoLayer("Cluster_width_Sas", "layer", label, "").c_str(),
2466  "Cluster width");
2467  stereoandmatchedMEs.meClusterwidthSas->setAxisTitle("Cluster width (stereo) in " + label);
2468  }
2469  if (layerswitchCategorySas) {
2470  stereoandmatchedMEs.meCategorySas = bookME1D(
2471  ibooker, "TH1CategorySas", hidmanager.createHistoLayer("Category_Sas", "layer", label, "").c_str(), "Category");
2472  stereoandmatchedMEs.meCategorySas->setAxisTitle("Category (stereo) in " + label);
2473  }
2475  stereoandmatchedMEs.mePullTrackwidthProfileSas =
2476  bookMEProfile(ibooker,
2477  "TProfPullTrackwidthProfileSas",
2478  hidmanager.createHistoLayer("Pull_Track_width_Profile_Sas", "layer", label, "").c_str(),
2479  "Profile of Pull in MF vs track width (stereo)");
2480  stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle("track width (stereo) in " + label, 1);
2481  stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle("Pull in MF (stereo) in " + label, 2);
2482  }
2484  stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas =
2485  bookMEProfile(ibooker,
2486  "TProfPullTrackwidthProfileCategory1Sas",
2487  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Sas", "layer", label, "").c_str(),
2488  "Profile of Pull in MF vs track width (Category 1) (stereo)");
2490  "track width (Category 1) (stereo) in " + label, 1);
2492  "Pull in MF (Category 1) (stereo) in " + label, 2);
2493  }
2495  stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas =
2496  bookMEProfile(ibooker,
2497  "TProfPullTrackwidthProfileCategory2Sas",
2498  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Sas", "layer", label, "").c_str(),
2499  "Profile of Pull in MF vs track width (Category 2) (stereo)");
2501  "track width (Category 2) (stereo) in " + label, 1);
2503  "Pull in MF (Category 2) (stereo) in " + label, 2);
2504  }
2506  stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas =
2507  bookMEProfile(ibooker,
2508  "TProfPullTrackwidthProfileCategory3Sas",
2509  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Sas", "layer", label, "").c_str(),
2510  "Profile of Pull in MF vs track width (Category 3) (stereo)");
2512  "track width (Category 3) (stereo) in " + label, 1);
2514  "Pull in MF (Category 3) (stereo) in " + label, 2);
2515  }
2517  stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas =
2518  bookMEProfile(ibooker,
2519  "TProfPullTrackwidthProfileCategory4Sas",
2520  hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Sas", "layer", label, "").c_str(),
2521  "Profile of Pull in MF vs track width (Category 4) (stereo)");
2523  "track width (Category 4) (stereo) in " + label, 1);
2525  "Pull in MF (Category 4) (stereo) in " + label, 2);
2526  }
2528  stereoandmatchedMEs.meResolxMFTrackwidthProfileSas =
2529  bookMEProfile(ibooker,
2530  "TProfResolxMFTrackwidthProfileSas",
2531  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Sas", "layer", label, "").c_str(),
2532  "Profile of Resolution in MF vs track width (stereo)");
2533  stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle("track width (stereo) in " + label, 1);
2534  stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle("Resolution in MF (stereo) in " + label, 2);
2535  }
2538  ibooker,
2539  "TProfResolxMFTrackwidthProfileCategory1Sas",
2540  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Sas", "layer", label, "").c_str(),
2541  "Profile of Resolution in MF vs track width (Category 1) (stereo)");
2543  " track width (Category 1) (stereo) in " + label, 1);
2545  " Resolution in MF (Category 1) (stereo) in " + label, 2);
2546  }
2549  ibooker,
2550  "TProfResolxMFTrackwidthProfileCategory2Sas",
2551  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Sas", "layer", label, "").c_str(),
2552  "Profile of Resolution in MF vs track width (Category 2) (stereo)");
2554  " track width (Category 2) (stereo) in " + label, 1);
2556  " Resolution in MF (Category 2) (stereo) in " + label, 2);
2557  }
2560  ibooker,
2561  "TProfResolxMFTrackwidthProfileCategory3Sas",
2562  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Sas", "layer", label, "").c_str(),
2563  "Profile of Resolution in MF vs track width (Category 3) (stereo)");
2565  " track width (Category 3) (stereo) in " + label, 1);
2567  " Resolution in MF (Category 3) (stereo) in " + label, 2);
2568  }
2571  ibooker,
2572  "TProfResolxMFTrackwidthProfileCategory4Sas",
2573  hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category4_Sas", "layer", label, "").c_str(),
2574  "Profile of Resolution in MF vs track width (Category 4) (stereo)");
2576  " track width (Category 4) (stereo) in " + label, 1);
2578  " Resolution in MF (Category 4) (stereo) in " + label, 2);
2579  }
2582  ibooker,
2583  "TProfResolxMFClusterwidthProfileCategory1Sas",
2584  hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Sas", "layer", label, "").c_str(),
2585  "Profile of Resolution in MF vs cluster width (Category 1) (stereo)");
2587  "cluster width (Category 1) (stereo) in " + label, 1);
2589  " Resolution in MF (Category 1) (stereo) in " + label, 2);
2590  }
2592  stereoandmatchedMEs.meResolxMFAngleProfileSas =
2593  bookMEProfile(ibooker,
2594  "TProfResolxMFAngleProfileSas",
2595  hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Sas", "layer", label, "").c_str(),
2596  "Profile of Resolution in MF vs track angle (stereo)");
2597  stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle("track angle (stereo) in " + label, 1);
2598  stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle("Resolution in MF (stereo) in " + label, 2);
2599  }
2600  //PosxMatched
2601  if (layerswitchPosxMatched) {
2602  stereoandmatchedMEs.mePosxMatched =
2603  bookME1D(ibooker,
2604  "TH1PosxMatched",
2605  hidmanager.createHistoLayer("Posx_matched", "layer", label, "").c_str(),
2606  "RecHit x coord.");
2607  stereoandmatchedMEs.mePosxMatched->setAxisTitle("x coord. matched RecHit (local frame) in " + label);
2608  }
2609  //PosyMatched
2610  if (layerswitchPosyMatched) {
2611  stereoandmatchedMEs.mePosyMatched =
2612  bookME1D(ibooker,
2613  "TH1PosyMatched",
2614  hidmanager.createHistoLayer("Posy_matched", "layer", label, "").c_str(),
2615  "RecHit y coord.");
2616  stereoandmatchedMEs.mePosyMatched->setAxisTitle("y coord. matched RecHit (local frame) in " + label);
2617  }
2618  //ResolxMatched
2620  stereoandmatchedMEs.meResolxMatched =
2621  bookME1D(ibooker,
2622  "TH1ResolxMatched",
2623  hidmanager.createHistoLayer("Resolx_matched", "layer", label, "").c_str(),
2624  "RecHit resol(x) coord.");
2625  stereoandmatchedMEs.meResolxMatched->setAxisTitle("resol(x) coord. matched RecHit (local frame) in " + label);
2626  }
2627  //ResolyMatched
2629  stereoandmatchedMEs.meResolyMatched =
2630  bookME1D(ibooker,
2631  "TH1ResolyMatched",
2632  hidmanager.createHistoLayer("Resoly_matched", "layer", label, "").c_str(),
2633  "RecHit resol(y) coord.");
2634  stereoandmatchedMEs.meResolyMatched->setAxisTitle("resol(y) coord. matched RecHit (local frame) in " + label);
2635  }
2636  //ResxMatched
2637  if (layerswitchResxMatched) {
2638  stereoandmatchedMEs.meResxMatched =
2639  bookME1D(ibooker,
2640  "TH1ResxMatched",
2641  hidmanager.createHistoLayer("Resx_matched", "layer", label, "").c_str(),
2642  "Residual of the hit x coord.");
2643  stereoandmatchedMEs.meResxMatched->setAxisTitle("Residuals(x) in matched RecHit in " + label);
2644  }
2645  //ResyMatched
2646  if (layerswitchResyMatched) {
2647  stereoandmatchedMEs.meResyMatched =
2648  bookME1D(ibooker,
2649  "TH1ResyMatched",
2650  hidmanager.createHistoLayer("Resy_matched", "layer", label, "").c_str(),
2651  "Residual of the hit x coord.");
2652  stereoandmatchedMEs.meResyMatched->setAxisTitle("Res(y) in matched RecHit in " + label);
2653  }
2654 
2655  StereoAndMatchedMEsMap[label] = stereoandmatchedMEs;
2656 }
2657 //------------------------------------------------------------------------------------------
2659  const char *ParameterSetLabel,
2660  const char *HistoName,
2661  const char *HistoTitle) {
2662  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
2663  return ibooker.book1D(HistoName,
2664  HistoTitle,
2665  Parameters.getParameter<int32_t>("Nbinx"),
2666  Parameters.getParameter<double>("xmin"),
2667  Parameters.getParameter<double>("xmax"));
2668 }
2669 //------------------------------------------------------------------------------------------
2671  DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle) {
2672  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
2673  //The number of channels in Y is disregarded in a profile plot.
2674  return ibooker.bookProfile(HistoName,
2675  HistoTitle,
2676  Parameters.getParameter<int32_t>("Nbinx"),
2677  Parameters.getParameter<double>("xmin"),
2678  Parameters.getParameter<double>("xmax"),
2679  Parameters.getParameter<double>("ymin"),
2680  Parameters.getParameter<double>("ymax"),
2681  "");
2682 }
2683 
2684 // DEFINE_FWK_MODULE(SiStripTrackingRecHitsValid);
Log< level::Info, true > LogVerbatim
SiStripTrackingRecHitsValid(const edm::ParameterSet &conf)
float uu() const
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, const TrackerTopology *trackerTopology, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0)
SiStripRecHit2D stereoHit() const
void setSiStripFolderName(std::string name)
std::map< std::string, std::vector< uint32_t > > StereoAndMatchedDetMap
virtual float stripAngle(float strip) const =0
std::map< std::string, StereoAndMatchedMEs > StereoAndMatchedMEsMap
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
unsigned int stereo() const
stereo
T z() const
Definition: PV3DBase.h:61
void rechitanalysis(LocalVector ldir, const TrackingRecHit *rechit, const StripGeomDetUnit *stripdet, const StripClusterParameterEstimator *stripcpe, TrackerHitAssociator &associate, bool simplehit1or2D)
void fillME(MonitorElement *ME, float value1)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_topoToken
int closest(std::vector< int > const &vec, int value)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:36
void rechitanalysis_matched(LocalVector ldir, const TrackingRecHit *rechit, const GluedGeomDet *gluedDet, TrackerHitAssociator &associate, const StripClusterParameterEstimator *stripcpe, const MatchStatus matchedmonorstereo)
std::map< std::string, LayerMEs > LayerMEsMap
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, const TrackerTopology *trackerTopology, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0)
const edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > m_stripCPEToken
edm::ESWatcher< SiStripDetCablingRcd > watchSiStripDetCablingRcd_
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=false)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_topoTokenBR
void createLayerMEs(DQMStore::IBooker &ibooker, std::string label)
T x() const
Definition: PV2DBase.h:43
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, const TrackerTopology *trackerTopology, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0)
assert(be >=bs)
ClusterRef cluster() const
bool tibIsStereo(const DetId &id) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_geomToken
virtual float strip(const LocalPoint &) const =0
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
bool tobIsStereo(const DetId &id) const
virtual float thickness() const =0
void analyze(const edm::Event &e, const edm::EventSetup &c) override
char const * label
T x() const
Definition: PV3DBase.h:59
virtual float localPitch(const LocalPoint &) const =0
T y() const
Definition: PV3DBase.h:60
virtual LocalVector driftDirection(const StripGeomDetUnit *) const =0
void createSimpleHitsMEs(DQMStore::IBooker &ibooker)
vector< ParameterSet > Parameters
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const Topology & topology() const override
Returns a reference to the strip proxy topology.
Transition
Definition: Transition.h:12
edm::EDGetTokenT< std::vector< reco::Track > > tracksInputToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
void createMEs(DQMStore::IBooker &ibooker, const edm::EventSetup &es)
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Log< level::Info, false > LogInfo
LocalError localPositionError() const override
Definition: DetId.h:17
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
auto const & tracks
cannot be loose
DetId geographicalId() const
virtual LocalError localPositionError() const =0
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
void createStereoAndMatchedMEs(DQMStore::IBooker &ibooker, std::string label)
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
std::map< std::string, std::vector< uint32_t > > LayerDetMap
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > m_SiStripDetCablingToken
bool tecIsStereo(const DetId &id) const
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
std::string HistoName
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
bool tidIsStereo(const DetId &id) const
HLT enums.
LocalPoint localPosition() const override
static int position[264][3]
Definition: ReadPGInfo.cc:289
SiStripRecHit2D monoHit() const
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) override
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, const TrackerTopology *trackerTopology, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0)
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual LocalPoint localPosition() const =0
ClusterRef cluster() const
MonitorElement * bookMEProfile(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
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)
const Bounds & bounds() const
Definition: Surface.h:87