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