13 #include <alignment/modules/AlignmentDQM/AlignDQMModule.h>
15 #include <framework/datastore/StoreArray.h>
16 #include <framework/geometry/B2Vector3.h>
17 #include <mdst/dataobjects/Track.h>
18 #include <pxd/geometry/SensorInfo.h>
19 #include <svd/geometry/SensorInfo.h>
20 #include <tracking/dataobjects/RecoTrack.h>
21 #include <tracking/dataobjects/RecoHitInformation.h>
22 #include <vxd/geometry/GeoTools.h>
24 #include <TDirectory.h>
44 setDescription(
"DQM of Alignment for off line "
45 "residuals per sensor, layer, "
46 "keep also On-Line DQM from tracking: "
48 "Number of hits in tracks, "
52 addParam(
"TracksStoreArrayName", m_param_TracksStoreArrayName,
53 "StoreArray name where the merged Tracks are written.",
54 m_param_TracksStoreArrayName);
56 addParam(
"RecoTracksStoreArrayName", m_param_RecoTracksStoreArrayName,
57 "StoreArray name where the merged RecoTracks are written.",
58 m_param_RecoTracksStoreArrayName);
60 setPropertyFlags(c_ParallelProcessingCertified);
65 AlignDQMModule::~AlignDQMModule()
76 recoTracks.isOptional();
89 if (gTools->getNumberOfLayers() == 0) {
90 B2WARNING(
"Missing geometry for VXD.");
94 int nVXDLayers = gTools->getNumberOfLayers();
95 int nVXDSensors = gTools->getNumberOfSensors();
96 float ResidualRange = 400;
100 TDirectory* oldDir = gDirectory;
101 TDirectory* DirAlign = oldDir->mkdir(
"AlignmentDQM");
102 TDirectory* DirAlignSensors = oldDir->mkdir(
"AlignmentDQMSensors");
103 TDirectory* DirAlignSensResids = DirAlignSensors->mkdir(
"Residuals2D");
104 TDirectory* DirAlignSensResids1D = DirAlignSensors->mkdir(
"Residuals1D");
106 TDirectory* DirAlignSensResMeanUPosUV = DirAlignSensors->mkdir(
"ResidMeanUPositUV");
107 TDirectory* DirAlignSensResMeanVPosUV = DirAlignSensors->mkdir(
"ResidMeanVPositUV");
108 TDirectory* DirAlignSensResMeanUPosU = DirAlignSensors->mkdir(
"ResidMeanUPositU");
109 TDirectory* DirAlignSensResMeanVPosU = DirAlignSensors->mkdir(
"ResidMeanVPositU");
110 TDirectory* DirAlignSensResMeanUPosV = DirAlignSensors->mkdir(
"ResidMeanUPositV");
111 TDirectory* DirAlignSensResMeanVPosV = DirAlignSensors->mkdir(
"ResidMeanVPositV");
112 TDirectory* DirAlignSensResUPosU = DirAlignSensors->mkdir(
"ResidUPositU");
113 TDirectory* DirAlignSensResVPosU = DirAlignSensors->mkdir(
"ResidVPositU");
114 TDirectory* DirAlignSensResUPosV = DirAlignSensors->mkdir(
"ResidUPositV");
115 TDirectory* DirAlignSensResVPosV = DirAlignSensors->mkdir(
"ResidVPositV");
117 TDirectory* DirAlignLayers = oldDir->mkdir(
"AlignmentDQMLayers");
119 TDirectory* DirAlignLayerResMeanUPosUV = DirAlignLayers->mkdir(
"ResidLayerMeanUPositPhiTheta");
120 TDirectory* DirAlignLayerResMeanVPosUV = DirAlignLayers->mkdir(
"ResidLayerMeanVPositPhiTheta");
121 TDirectory* DirAlignLayerResMeanUPosU = DirAlignLayers->mkdir(
"ResidLayerMeanUPositPhi");
122 TDirectory* DirAlignLayerResMeanVPosU = DirAlignLayers->mkdir(
"ResidLayerMeanVPositPhi");
123 TDirectory* DirAlignLayerResMeanUPosV = DirAlignLayers->mkdir(
"ResidLayerMeanUPositTheta");
124 TDirectory* DirAlignLayerResMeanVPosV = DirAlignLayers->mkdir(
"ResidLayerMeanVPositTheta");
125 TDirectory* DirAlignLayerResUPosU = DirAlignLayers->mkdir(
"ResidLayerUPositPhi");
126 TDirectory* DirAlignLayerResVPosU = DirAlignLayers->mkdir(
"ResidLayerVPositPhi");
127 TDirectory* DirAlignLayerResUPosV = DirAlignLayers->mkdir(
"ResidLayerUPositTheta");
128 TDirectory* DirAlignLayerResVPosV = DirAlignLayers->mkdir(
"ResidLayerVPositTheta");
131 TDirectory* DirAlignHelixParameters = DirAlign->mkdir(
"HelixPars");
132 TDirectory* DirAlignHelixCorrelations = DirAlign->mkdir(
"HelixCorrelations");
135 TDirectory* DirAlignHalfShells = DirAlign->mkdir(
"HalfShells");
137 float fMomRange = 3.0;
139 float fZ0Range = 10.0;
140 float fD0Range = 1.0;
142 float fPhiRange = 180.0;
144 DirAlignHelixParameters->cd();
146 string name = str(format(
"Alig_Z0"));
147 string title = str(format(
"z0 - the z coordinate of the perigee (beam spot position)"));
148 m_Z0 =
new TH1F(name.c_str(), title.c_str(), 100, -fZ0Range, fZ0Range);
149 m_Z0->GetXaxis()->SetTitle(
"z0 [cm]");
150 m_Z0->GetYaxis()->SetTitle(
"Arb. Units");
151 name = str(format(
"Alig_D0"));
152 title = str(format(
"d0 - the signed distance to the IP in the r-phi plane"));
153 m_D0 =
new TH1F(name.c_str(), title.c_str(), 100, -fD0Range, fD0Range);
154 m_D0->GetXaxis()->SetTitle(
"d0 [cm]");
155 m_D0->GetYaxis()->SetTitle(
"Arb. Units");
156 name = str(format(
"Alig_Phi"));
157 title = str(format(
"Phi - angle of the transverse momentum in the r-phi plane, with CDF naming convention"));
158 m_Phi =
new TH1F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange);
159 m_Phi->GetXaxis()->SetTitle(
"#phi [deg]");
160 m_Phi->GetYaxis()->SetTitle(
"Arb. Units");
161 name = str(format(
"Alig_Omega"));
162 title = str(format(
"Omega - the curvature of the track. It's sign is defined by the charge of the particle"));
163 m_Omega =
new TH1F(name.c_str(), title.c_str(), 100, -0.1, 0.1);
164 m_Omega->GetXaxis()->SetTitle(
"Omega");
165 m_Omega->GetYaxis()->SetTitle(
"Arb. Units");
166 name = str(format(
"Alig_TanLambda"));
167 title = str(format(
"TanLambda - the slope of the track in the r-z plane"));
168 m_TanLambda =
new TH1F(name.c_str(), title.c_str(), 100, -4.0, 4.0);
169 m_TanLambda->GetXaxis()->SetTitle(
"Tan Lambda");
170 m_TanLambda->GetYaxis()->SetTitle(
"Arb. Units");
172 DirAlignHelixCorrelations->cd();
174 name = str(format(
"Alig_PhiD0"));
176 format(
"Phi - angle of the transverse momentum in the r-phi plane vs. d0 - signed distance to the IP in r-phi "));
177 m_PhiD0 =
new TH2F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange, 100, -fD0Range, fD0Range);
178 m_PhiD0->GetXaxis()->SetTitle(
"#phi [deg]");
179 m_PhiD0->GetYaxis()->SetTitle(
"d0 [cm]");
180 m_PhiD0->GetZaxis()->SetTitle(
"Arb. Units");
181 name = str(format(
"Alig_PhiZ0"));
183 format(
"Phi - angle of the transverse momentum in the r-phi plane vs. "
184 "z0 of the perigee (to see primary vertex shifts along R or z)"));
185 m_PhiZ0 =
new TH2F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange, 100, -fZ0Range, fZ0Range);
186 m_PhiZ0->GetXaxis()->SetTitle(
"#phi [deg]");
187 m_PhiZ0->GetYaxis()->SetTitle(
"z0 [cm]");
188 m_PhiZ0->GetZaxis()->SetTitle(
"Arb. Units");
189 name = str(format(
"Alig_PhiMomPt"));
191 format(
"Phi - angle of the transverse momentum in the r-phi plane vs. Track momentum Pt"));
192 m_PhiMomPt =
new TH2F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange, 2 * iMomRange, 0.0, fMomRange);
193 m_PhiMomPt->GetXaxis()->SetTitle(
"#phi [deg]");
194 m_PhiMomPt->GetYaxis()->SetTitle(
"Momentum");
195 m_PhiMomPt->GetZaxis()->SetTitle(
"Arb. Units");
196 name = str(format(
"Alig_PhiOmega"));
198 format(
"Phi - angle of the transverse momentum in the r-phi plane vs. Omega - the curvature of the track"));
199 m_PhiOmega =
new TH2F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange, 100, -0.1, 0.1);
200 m_PhiOmega->GetXaxis()->SetTitle(
"#phi [deg]");
201 m_PhiOmega->GetYaxis()->SetTitle(
"Omega");
202 m_PhiOmega->GetZaxis()->SetTitle(
"Arb. Units");
203 name = str(format(
"Alig_PhiTanLambda"));
205 format(
"dPhi - angle of the transverse momentum in the r-phi plane vs. "
206 "TanLambda - the slope of the track in the r-z plane"));
207 m_PhiTanLambda =
new TH2F(name.c_str(), title.c_str(), iPhiRange, -fPhiRange, fPhiRange, 100, -4.0, 4.0);
208 m_PhiTanLambda->GetXaxis()->SetTitle(
"#phi [deg]");
209 m_PhiTanLambda->GetYaxis()->SetTitle(
"Tan Lambda");
210 m_PhiTanLambda->GetZaxis()->SetTitle(
"Arb. Units");
211 name = str(format(
"Alig_D0Z0"));
213 format(
"d0 - signed distance to the IP in r-phi vs. z0 of the perigee (to see primary vertex shifts along R or z)"));
214 m_D0Z0 =
new TH2F(name.c_str(), title.c_str(), 100, -fD0Range, fD0Range, 100, -fZ0Range, fZ0Range);
215 m_D0Z0->GetXaxis()->SetTitle(
"d0 [cm]");
216 m_D0Z0->GetYaxis()->SetTitle(
"z0 [cm]");
217 m_D0Z0->GetZaxis()->SetTitle(
"Arb. Units");
218 name = str(format(
"Alig_D0MomPt"));
220 format(
"d0 - signed distance to the IP in r-phi vs. Track momentum Pt"));
221 m_D0MomPt =
new TH2F(name.c_str(), title.c_str(), 100, -fD0Range, fD0Range, 2 * iMomRange, 0.0, fMomRange);
222 m_D0MomPt->GetXaxis()->SetTitle(
"d0 [cm]");
223 m_D0MomPt->GetYaxis()->SetTitle(
"Momentum");
224 m_D0MomPt->GetZaxis()->SetTitle(
"Arb. Units");
225 name = str(format(
"Alig_D0Omega"));
227 format(
"d0 - signed distance to the IP in r-phi vs. Omega - the curvature of the track"));
228 m_D0Omega =
new TH2F(name.c_str(), title.c_str(), 100, -fD0Range, fD0Range, 100, -0.1, 0.1);
229 m_D0Omega->GetXaxis()->SetTitle(
"d0 [cm]");
230 m_D0Omega->GetYaxis()->SetTitle(
"Omega");
231 m_D0Omega->GetZaxis()->SetTitle(
"Arb. Units");
232 name = str(format(
"Alig_D0TanLambda"));
234 format(
"d0 - signed distance to the IP in r-phi vs. TanLambda - the slope of the track in the r-z plane"));
235 m_D0TanLambda =
new TH2F(name.c_str(), title.c_str(), 100, -fD0Range, fD0Range, 100, -4.0, 4.0);
236 m_D0TanLambda->GetXaxis()->SetTitle(
"d0 [cm]");
237 m_D0TanLambda->GetYaxis()->SetTitle(
"Tan Lambda");
238 m_D0TanLambda->GetZaxis()->SetTitle(
"Arb. Units");
239 name = str(format(
"Alig_Z0MomPt"));
241 format(
"z0 - the z0 coordinate of the perigee vs. Track momentum Pt"));
242 m_Z0MomPt =
new TH2F(name.c_str(), title.c_str(), 100, -fZ0Range, fZ0Range, 2 * iMomRange, 0.0, fMomRange);
243 m_Z0MomPt->GetXaxis()->SetTitle(
"z0 [cm]");
244 m_Z0MomPt->GetYaxis()->SetTitle(
"Momentum");
245 m_Z0MomPt->GetZaxis()->SetTitle(
"Arb. Units");
246 name = str(format(
"Alig_Z0Omega"));
248 format(
"z0 - the z0 coordinate of the perigee vs. Omega - the curvature of the track"));
249 m_Z0Omega =
new TH2F(name.c_str(), title.c_str(), 100, -fZ0Range, fZ0Range, 100, -0.1, 0.1);
250 m_Z0Omega->GetXaxis()->SetTitle(
"z0 [cm]");
251 m_Z0Omega->GetYaxis()->SetTitle(
"Omega");
252 m_Z0Omega->GetZaxis()->SetTitle(
"Arb. Units");
253 name = str(format(
"Alig_Z0TanLambda"));
255 format(
"z0 - the z0 coordinate of the perigee vs. TanLambda - the slope of the track in the r-z plane"));
256 m_Z0TanLambda =
new TH2F(name.c_str(), title.c_str(), 100, -fZ0Range, fZ0Range, 100, -4.0, 4.0);
257 m_Z0TanLambda->GetXaxis()->SetTitle(
"z0 [cm]");
258 m_Z0TanLambda->GetYaxis()->SetTitle(
"Tan Lambda");
259 m_Z0TanLambda->GetZaxis()->SetTitle(
"Arb. Units");
260 name = str(format(
"Alig_MomPtOmega"));
262 format(
"Track momentum Pt vs. Omega - the curvature of the track"));
263 m_MomPtOmega =
new TH2F(name.c_str(), title.c_str(), 2 * iMomRange, 0.0, fMomRange, 100, -0.1, 0.1);
264 m_MomPtOmega->GetXaxis()->SetTitle(
"Momentum");
265 m_MomPtOmega->GetYaxis()->SetTitle(
"Omega");
266 m_MomPtOmega->GetZaxis()->SetTitle(
"Arb. Units");
267 name = str(format(
"Alig_MomPtTanLambda"));
269 format(
"Track momentum Pt vs. TanLambda - the slope of the track in the r-z plane"));
270 m_MomPtTanLambda =
new TH2F(name.c_str(), title.c_str(), 2 * iMomRange, 0.0, fMomRange, 100, -4.0, 4.0);
271 m_MomPtTanLambda->GetXaxis()->SetTitle(
"Momentum");
272 m_MomPtTanLambda->GetYaxis()->SetTitle(
"Tan Lambda");
273 m_MomPtTanLambda->GetZaxis()->SetTitle(
"Arb. Units");
274 name = str(format(
"Alig_OmegaTanLambda"));
276 format(
"Omega - the curvature of the track vs. TanLambda - the slope of the track in the r-z plane"));
277 m_OmegaTanLambda =
new TH2F(name.c_str(), title.c_str(), 100, -0.1, 0.1, 100, -4.0, 4.0);
278 m_OmegaTanLambda->GetXaxis()->SetTitle(
"Omega");
279 m_OmegaTanLambda->GetYaxis()->SetTitle(
"Tan Lambda");
280 m_OmegaTanLambda->GetZaxis()->SetTitle(
"Arb. Units");
286 name = str(format(
"Alig_MomPhi"));
287 title = str(format(
"Momentum Phi of fit"));
288 m_MomPhi =
new TH1F(name.c_str(), title.c_str(), 180, -180, 180);
289 m_MomPhi->GetXaxis()->SetTitle(
"Mom Phi [deg]");
290 m_MomPhi->GetYaxis()->SetTitle(
"counts");
292 name = str(format(
"Alig_MomTheta"));
293 title = str(format(
"Momentum Theta of fit"));
294 m_MomTheta =
new TH1F(name.c_str(), title.c_str(), 90, 0, 180);
295 m_MomTheta->GetXaxis()->SetTitle(
"Mom Theta [deg]");
296 m_MomTheta->GetYaxis()->SetTitle(
"counts");
298 name = str(format(
"Alig_MomCosTheta"));
299 title = str(format(
"Cos of Momentum Theta of fit"));
300 m_MomCosTheta =
new TH1F(name.c_str(), title.c_str(), 100, -1, 1);
301 m_MomCosTheta->GetXaxis()->SetTitle(
"Mom CosTheta");
302 m_MomCosTheta->GetYaxis()->SetTitle(
"counts");
305 name = str(format(
"Alig_PValue"));
306 title = str(format(
"P value of fit"));
307 m_PValue =
new TH1F(name.c_str(), title.c_str(), 100, 0, 1);
308 m_PValue->GetXaxis()->SetTitle(
"p value");
309 m_PValue->GetYaxis()->SetTitle(
"counts");
311 name = str(format(
"Alig_Chi2"));
312 title = str(format(
"Chi2 of fit"));
313 m_Chi2 =
new TH1F(name.c_str(), title.c_str(), 200, 0, 150);
314 m_Chi2->GetXaxis()->SetTitle(
"Chi2");
315 m_Chi2->GetYaxis()->SetTitle(
"counts");
317 name = str(format(
"Alig_NDF"));
318 title = str(format(
"NDF of fit"));
319 m_NDF =
new TH1F(name.c_str(), title.c_str(), 200, 0, 200);
320 m_NDF->GetXaxis()->SetTitle(
"NDF");
321 m_NDF->GetYaxis()->SetTitle(
"counts");
323 name = str(format(
"Alig_Chi2NDF"));
324 title = str(format(
"Chi2 div NDF of fit"));
325 m_Chi2NDF =
new TH1F(name.c_str(), title.c_str(), 200, 0, 10);
326 m_Chi2NDF->GetXaxis()->SetTitle(
"Chi2NDF");
327 m_Chi2NDF->GetYaxis()->SetTitle(
"counts");
330 name = str(format(
"Alig_UBResidualsPXD"));
331 title = str(format(
"Unbiased residuals for PXD"));
332 m_UBResidualsPXD =
new TH2F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange, 200, -ResidualRange, ResidualRange);
333 m_UBResidualsPXD->GetXaxis()->SetTitle(
"u residual [#mum]");
334 m_UBResidualsPXD->GetYaxis()->SetTitle(
"v residual [#mum]");
335 m_UBResidualsPXD->GetZaxis()->SetTitle(
"counts");
337 name = str(format(
"Alig_UBResidualsSVD"));
338 title = str(format(
"Unbiased residuals for SVD"));
339 m_UBResidualsSVD =
new TH2F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange, 200, -ResidualRange, ResidualRange);
340 m_UBResidualsSVD->GetXaxis()->SetTitle(
"u residual [#mum]");
341 m_UBResidualsSVD->GetYaxis()->SetTitle(
"v residual [#mum]");
342 m_UBResidualsSVD->GetZaxis()->SetTitle(
"counts");
344 name = str(format(
"Alig_UBResidualsPXDU"));
345 title = str(format(
"Unbiased residuals in U for PXD"));
346 m_UBResidualsPXDU =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
347 m_UBResidualsPXDU->GetXaxis()->SetTitle(
"residual [#mum]");
348 m_UBResidualsPXDU->GetYaxis()->SetTitle(
"counts");
349 name = str(format(
"Alig_UBResidualsPXDV"));
350 title = str(format(
"Unbiased residuals in V for PXD"));
351 m_UBResidualsPXDV =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
352 m_UBResidualsPXDV->GetXaxis()->SetTitle(
"residual [#mum]");
353 m_UBResidualsPXDV->GetYaxis()->SetTitle(
"counts");
355 name = str(format(
"Alig_UBResidualsSVDU"));
356 title = str(format(
"Unbiased residuals in U for SVD"));
357 m_UBResidualsSVDU =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
358 m_UBResidualsSVDU->GetXaxis()->SetTitle(
"residual [#mum]");
359 m_UBResidualsSVDU->GetYaxis()->SetTitle(
"counts");
360 name = str(format(
"Alig_UBResidualsSVDV"));
361 title = str(format(
"Unbiased residuals in V for SVD"));
362 m_UBResidualsSVDV =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
363 m_UBResidualsSVDV->GetXaxis()->SetTitle(
"residual [#mum]");
364 m_UBResidualsSVDV->GetYaxis()->SetTitle(
"counts");
367 DirAlignHalfShells->cd();
370 name =
"Alig_UBResidualsPXDX_Ying";
371 title =
"Unbiased residuals in X for PXD for Ying";
372 m_UBResidualsPXDX_Ying =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
373 m_UBResidualsPXDX_Ying->GetXaxis()->SetTitle(
"residual [#mum]");
374 m_UBResidualsPXDX_Ying->GetYaxis()->SetTitle(
"counts");
377 name =
"Alig_UBResidualsPXDX_Yang";
378 title =
"Unbiased residuals in X for PXD for Yang";
379 m_UBResidualsPXDX_Yang =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
380 m_UBResidualsPXDX_Yang->GetXaxis()->SetTitle(
"residual [#mum]");
381 m_UBResidualsPXDX_Yang->GetYaxis()->SetTitle(
"counts");
384 name =
"Alig_UBResidualsSVDX_Pat";
385 title =
"Unbiased residuals in X for SVD for Pat";
386 m_UBResidualsSVDX_Pat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
387 m_UBResidualsSVDX_Pat->GetXaxis()->SetTitle(
"residual [#mum]");
388 m_UBResidualsSVDX_Pat->GetYaxis()->SetTitle(
"counts");
391 name =
"Alig_UBResidualsSVDX_Mat";
392 title =
"Unbiased residuals in X for SVD for Mat";
393 m_UBResidualsSVDX_Mat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
394 m_UBResidualsSVDX_Mat->GetXaxis()->SetTitle(
"residual [#mum]");
395 m_UBResidualsSVDX_Mat->GetYaxis()->SetTitle(
"counts");
399 name =
"Alig_UBResidualsPXDY_Ying";
400 title =
"Unbiased residuals in Y for PXD for Ying";
401 m_UBResidualsPXDY_Ying =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
402 m_UBResidualsPXDY_Ying->GetXaxis()->SetTitle(
"residual [#mum]");
403 m_UBResidualsPXDY_Ying->GetYaxis()->SetTitle(
"counts");
406 name =
"Alig_UBResidualsPXDY_Yang";
407 title =
"Unbiased residuals in Y for PXD for Yang";
408 m_UBResidualsPXDY_Yang =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
409 m_UBResidualsPXDY_Yang->GetXaxis()->SetTitle(
"residual [#mum]");
410 m_UBResidualsPXDY_Yang->GetYaxis()->SetTitle(
"counts");
413 name =
"Alig_UBResidualsSVDY_Pat";
414 title =
"Unbiased residuals in Y for SVD for Pat";
415 m_UBResidualsSVDY_Pat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
416 m_UBResidualsSVDY_Pat->GetXaxis()->SetTitle(
"residual [#mum]");
417 m_UBResidualsSVDY_Pat->GetYaxis()->SetTitle(
"counts");
420 name =
"Alig_UBResidualsSVDY_Mat";
421 title =
"Unbiased residuals in Y for SVD for Mat";
422 m_UBResidualsSVDY_Mat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
423 m_UBResidualsSVDY_Mat->GetXaxis()->SetTitle(
"residual [#mum]");
424 m_UBResidualsSVDY_Mat->GetYaxis()->SetTitle(
"counts");
428 name =
"Alig_UBResidualsPXDZ_Ying";
429 title =
"Unbiased residuals in Z for PXD for Ying";
430 m_UBResidualsPXDZ_Ying =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
431 m_UBResidualsPXDZ_Ying->GetXaxis()->SetTitle(
"residual [#mum]");
432 m_UBResidualsPXDZ_Ying->GetYaxis()->SetTitle(
"counts");
435 name =
"Alig_UBResidualsPXDZ_Yang";
436 title =
"Unbiased residuals in Z for PXD for Yang";
437 m_UBResidualsPXDZ_Yang =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
438 m_UBResidualsPXDZ_Yang->GetXaxis()->SetTitle(
"residual [#mum]");
439 m_UBResidualsPXDZ_Yang->GetYaxis()->SetTitle(
"counts");
442 name =
"Alig_UBResidualsSVDZ_Pat";
443 title =
"Unbiased residuals in Z for SVD for Pat";
444 m_UBResidualsSVDZ_Pat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
445 m_UBResidualsSVDZ_Pat->GetXaxis()->SetTitle(
"residual [#mum]");
446 m_UBResidualsSVDZ_Pat->GetYaxis()->SetTitle(
"counts");
449 name =
"Alig_UBResidualsSVDZ_Mat";
450 title =
"Unbiased residuals in Z for SVD for Mat";
451 m_UBResidualsSVDZ_Mat =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
452 m_UBResidualsSVDZ_Mat->GetXaxis()->SetTitle(
"residual [#mum]");
453 m_UBResidualsSVDZ_Mat->GetYaxis()->SetTitle(
"counts");
457 if (gTools->getNumberOfLayers() == 0) {
458 B2WARNING(
"Missing geometry for VXD, VXD-DQM related are skiped.");
462 m_TRClusterHitmap = (TH2F**)
new TH2F*[nVXDLayers];
463 m_TRClusterCorrelationsPhi = (TH2F**)
new TH2F*[nVXDLayers - 1];
464 m_TRClusterCorrelationsTheta = (TH2F**)
new TH2F*[nVXDLayers - 1];
465 m_UBResidualsSensor = (TH2F**)
new TH2F*[nVXDSensors];
466 m_UBResidualsSensorU = (TH1F**)
new TH2F*[nVXDSensors];
467 m_UBResidualsSensorV = (TH1F**)
new TH2F*[nVXDSensors];
470 int i = layer.getLayerNumber();
471 int index = gTools->getLayerIndex(layer.getLayerNumber());
473 name = str(format(
"Alig_TRClusterHitmapLayer%1%") % i);
474 title = str(format(
"Cluster Hitmap for layer %1%") % i);
475 m_TRClusterHitmap[index] =
new TH2F(name.c_str(), title.c_str(), 360, -180.0, 180.0, 180, 0.0, 180.0);
476 m_TRClusterHitmap[index]->GetXaxis()->SetTitle(
"Phi angle [deg]");
477 m_TRClusterHitmap[index]->GetYaxis()->SetTitle(
"Theta angle [deg]");
478 m_TRClusterHitmap[index]->GetZaxis()->SetTitle(
"counts");
481 int i = layer.getLayerNumber();
482 if (i == gTools->getLastLayer())
continue;
483 int index = gTools->getLayerIndex(layer.getLayerNumber());
485 name = str(format(
"Alig_CorrelationsPhiLayers_%1%_%2%") % i % (i + 1));
486 title = str(format(
"Correlations in Phi for Layers %1% %2%") % i % (i + 1));
487 m_TRClusterCorrelationsPhi[index] =
new TH2F(name.c_str(), title.c_str(), 360, -180.0, 180.0, 360, -180.0, 180.0);
488 title = str(format(
"angle layer %1% [deg]") % i);
489 m_TRClusterCorrelationsPhi[index]->GetXaxis()->SetTitle(title.c_str());
490 title = str(format(
"angle layer %1% [deg]") % (i + 1));
491 m_TRClusterCorrelationsPhi[index]->GetYaxis()->SetTitle(title.c_str());
492 m_TRClusterCorrelationsPhi[index]->GetZaxis()->SetTitle(
"counts");
494 name = str(format(
"Alig_CorrelationsThetaLayers_%1%_%2%") % i % (i + 1));
495 title = str(format(
"Correlations in Theta for Layers %1% %2%") % i % (i + 1));
496 m_TRClusterCorrelationsTheta[index] =
new TH2F(name.c_str(), title.c_str(), 180, 0.0, 180.0, 180, 0.0, 180.0);
497 title = str(format(
"angle layer %1% [deg]") % i);
498 m_TRClusterCorrelationsTheta[index]->GetXaxis()->SetTitle(title.c_str());
499 title = str(format(
"angle layer %1% [deg]") % (i + 1));
500 m_TRClusterCorrelationsTheta[index]->GetYaxis()->SetTitle(title.c_str());
501 m_TRClusterCorrelationsTheta[index]->GetZaxis()->SetTitle(
"counts");
514 m_TracksVXDCDC = NULL;
519 int iHitsInCDC = 200;
522 name = str(format(
"Alig_TrackMomentumX"));
523 title = str(format(
"Track Momentum X"));
524 m_MomX =
new TH1F(name.c_str(), title.c_str(), 2 * iMomRange, -fMomRange, fMomRange);
525 m_MomX->GetXaxis()->SetTitle(
"Momentum");
526 m_MomX->GetYaxis()->SetTitle(
"counts");
527 name = str(format(
"Alig_TrackMomentumY"));
528 title = str(format(
"Track Momentum Y"));
529 m_MomY =
new TH1F(name.c_str(), title.c_str(), 2 * iMomRange, -fMomRange, fMomRange);
530 m_MomY->GetXaxis()->SetTitle(
"Momentum");
531 m_MomY->GetYaxis()->SetTitle(
"counts");
532 name = str(format(
"Alig_TrackMomentumZ"));
533 title = str(format(
"Track Momentum Z"));
534 m_MomZ =
new TH1F(name.c_str(), title.c_str(), 2 * iMomRange, -fMomRange, fMomRange);
535 m_MomZ->GetXaxis()->SetTitle(
"Momentum");
536 m_MomZ->GetYaxis()->SetTitle(
"counts");
538 DirAlignHelixParameters->cd();
539 name = str(format(
"Alig_TrackMomentumPt"));
540 title = str(format(
"Track Momentum pT"));
541 m_MomPt =
new TH1F(name.c_str(), title.c_str(), 2 * iMomRange, 0.0, fMomRange);
542 m_MomPt->GetXaxis()->SetTitle(
"Momentum");
543 m_MomPt->GetYaxis()->SetTitle(
"counts");
546 name = str(format(
"Alig_TrackMomentumMag"));
547 title = str(format(
"Track Momentum Magnitude"));
548 m_Mom =
new TH1F(name.c_str(), title.c_str(), 2 * iMomRange, 0.0, fMomRange);
549 m_Mom->GetXaxis()->SetTitle(
"Momentum");
550 m_Mom->GetYaxis()->SetTitle(
"counts");
552 name = str(format(
"Alig_NoOfHitsInTrack_PXD"));
553 title = str(format(
"No Of Hits In Track - PXD"));
554 m_HitsPXD =
new TH1F(name.c_str(), title.c_str(), iHitsInPXD, 0, iHitsInPXD);
555 m_HitsPXD->GetXaxis()->SetTitle(
"# hits");
556 m_HitsPXD->GetYaxis()->SetTitle(
"counts");
557 name = str(format(
"Alig_NoOfHitsInTrack_SVD"));
558 title = str(format(
"No Of Hits In Track - SVD"));
559 m_HitsSVD =
new TH1F(name.c_str(), title.c_str(), iHitsInSVD, 0, iHitsInSVD);
560 m_HitsSVD->GetXaxis()->SetTitle(
"# hits");
561 m_HitsSVD->GetYaxis()->SetTitle(
"counts");
562 name = str(format(
"Alig_NoOfHitsInTrack_CDC"));
563 title = str(format(
"No Of Hits In Track - CDC"));
564 m_HitsCDC =
new TH1F(name.c_str(), title.c_str(), iHitsInCDC, 0, iHitsInCDC);
565 m_HitsCDC->GetXaxis()->SetTitle(
"# hits");
566 m_HitsCDC->GetYaxis()->SetTitle(
"counts");
567 name = str(format(
"Alig_NoOfHitsInTrack"));
568 title = str(format(
"No Of Hits In Track"));
569 m_Hits =
new TH1F(name.c_str(), title.c_str(), iHits, 0, iHits);
570 m_Hits->GetXaxis()->SetTitle(
"# hits");
571 m_Hits->GetYaxis()->SetTitle(
"counts");
573 name = str(format(
"Alig_NoOfTracksInVXDOnly"));
574 title = str(format(
"No Of Tracks Per Event, Only In VXD"));
575 m_TracksVXD =
new TH1F(name.c_str(), title.c_str(), iTracks, 0, iTracks);
576 m_TracksVXD->GetXaxis()->SetTitle(
"# tracks");
577 m_TracksVXD->GetYaxis()->SetTitle(
"counts");
578 name = str(format(
"Alig_NoOfTracksInCDCOnly"));
579 title = str(format(
"No Of Tracks Per Event, Only In CDC"));
580 m_TracksCDC =
new TH1F(name.c_str(), title.c_str(), iTracks, 0, iTracks);
581 m_TracksCDC->GetXaxis()->SetTitle(
"# tracks");
582 m_TracksCDC->GetYaxis()->SetTitle(
"counts");
583 name = str(format(
"Alig_NoOfTracksInVXDCDC"));
584 title = str(format(
"No Of Tracks Per Event, In VXD+CDC"));
585 m_TracksVXDCDC =
new TH1F(name.c_str(), title.c_str(), iTracks, 0, iTracks);
586 m_TracksVXDCDC->GetXaxis()->SetTitle(
"# tracks");
587 m_TracksVXDCDC->GetYaxis()->SetTitle(
"counts");
588 name = str(format(
"Alig_NoOfTracks"));
589 title = str(format(
"No Of All Tracks Per Event"));
590 m_Tracks =
new TH1F(name.c_str(), title.c_str(), iTracks, 0, iTracks);
591 m_Tracks->GetXaxis()->SetTitle(
"# tracks");
592 m_Tracks->GetYaxis()->SetTitle(
"counts");
594 DirAlignSensResids->cd();
595 for (
int i = 0; i < nVXDSensors; i++) {
596 VxdID id = gTools->getSensorIDFromIndex(i);
598 int iLadder =
id.getLadderNumber();
599 int iSensor =
id.getSensorNumber();
601 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
602 name = str(format(
"Alig_UBResiduals_%1%") % sensorDescr);
603 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
604 title = str(format(
"PXD Unbiased residuals for sensor %1%") % sensorDescr);
605 m_UBResidualsSensor[i] =
new TH2F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange, 200, -ResidualRange,
607 m_UBResidualsSensor[i]->GetXaxis()->SetTitle(
"residual U [#mum]");
608 m_UBResidualsSensor[i]->GetYaxis()->SetTitle(
"residual V [#mum]");
609 m_UBResidualsSensor[i]->GetZaxis()->SetTitle(
"counts");
611 DirAlignSensResids1D->cd();
612 for (
int i = 0; i < nVXDSensors; i++) {
613 VxdID id = gTools->getSensorIDFromIndex(i);
615 int iLadder =
id.getLadderNumber();
616 int iSensor =
id.getSensorNumber();
618 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
619 name = str(format(
"Alig_UBResidualsU_%1%") % sensorDescr);
620 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
621 title = str(format(
"PXD Unbiased U residuals for sensor %1%") % sensorDescr);
622 m_UBResidualsSensorU[i] =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
623 m_UBResidualsSensorU[i]->GetXaxis()->SetTitle(
"residual [#mum]");
624 m_UBResidualsSensorU[i]->GetYaxis()->SetTitle(
"counts");
625 sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
626 name = str(format(
"Alig_UBResidualsV_%1%") % sensorDescr);
627 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
628 title = str(format(
"PXD Unbiased V residuals for sensor %1%") % sensorDescr);
629 m_UBResidualsSensorV[i] =
new TH1F(name.c_str(), title.c_str(), 200, -ResidualRange, ResidualRange);
630 m_UBResidualsSensorV[i]->GetXaxis()->SetTitle(
"residual [#mum]");
631 m_UBResidualsSensorV[i]->GetYaxis()->SetTitle(
"counts");
634 m_ResMeanPosUVSensCounts = (TH2F**)
new TH2F*[nVXDSensors];
635 m_ResMeanUPosUVSens = (TH2F**)
new TH2F*[nVXDSensors];
636 m_ResMeanVPosUVSens = (TH2F**)
new TH2F*[nVXDSensors];
637 m_ResUPosUSens = (TH2F**)
new TH2F*[nVXDSensors];
638 m_ResUPosVSens = (TH2F**)
new TH2F*[nVXDSensors];
639 m_ResVPosUSens = (TH2F**)
new TH2F*[nVXDSensors];
640 m_ResVPosVSens = (TH2F**)
new TH2F*[nVXDSensors];
641 m_ResMeanUPosUSens = (TH1F**)
new TH1F*[nVXDSensors];
642 m_ResMeanUPosVSens = (TH1F**)
new TH1F*[nVXDSensors];
643 m_ResMeanVPosUSens = (TH1F**)
new TH1F*[nVXDSensors];
644 m_ResMeanVPosVSens = (TH1F**)
new TH1F*[nVXDSensors];
647 float fSizeMin = -50;
648 float fSizeMax = -fSizeMin;
649 DirAlignSensResMeanUPosUV->cd();
650 for (
int i = 0; i < nVXDSensors; i++) {
651 VxdID id = gTools->getSensorIDFromIndex(i);
653 int iLadder =
id.getLadderNumber();
654 int iSensor =
id.getSensorNumber();
655 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
656 name = str(format(
"ResMeanUPosUVSens_%1%") % sensorDescr);
657 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
658 title = str(format(
"Residual Mean U in Position UV, %1%") % sensorDescr);
659 m_ResMeanUPosUVSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, iSizeBins, fSizeMin, fSizeMax);
660 m_ResMeanUPosUVSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
661 m_ResMeanUPosUVSens[i]->GetYaxis()->SetTitle(
"position V [mm]");
662 m_ResMeanUPosUVSens[i]->GetZaxis()->SetTitle(
"residual U [#mum]");
664 for (
int i = 0; i < nVXDSensors; i++) {
665 VxdID id = gTools->getSensorIDFromIndex(i);
667 int iLadder =
id.getLadderNumber();
668 int iSensor =
id.getSensorNumber();
669 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
670 name = str(format(
"ResMeanPosUVCountsSens_%1%") % sensorDescr);
671 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
672 title = str(format(
"Residual Mean Counts in Position UV, %1%") % sensorDescr);
673 m_ResMeanPosUVSensCounts[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, iSizeBins, fSizeMin, fSizeMax);
674 m_ResMeanPosUVSensCounts[i]->GetXaxis()->SetTitle(
"position U [mm]");
675 m_ResMeanPosUVSensCounts[i]->GetYaxis()->SetTitle(
"position V [mm]");
676 m_ResMeanPosUVSensCounts[i]->GetZaxis()->SetTitle(
"counts");
679 DirAlignSensResMeanVPosUV->cd();
680 for (
int i = 0; i < nVXDSensors; i++) {
681 VxdID id = gTools->getSensorIDFromIndex(i);
683 int iLadder =
id.getLadderNumber();
684 int iSensor =
id.getSensorNumber();
685 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
686 name = str(format(
"ResMeanVPosUVSens_%1%") % sensorDescr);
687 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
688 title = str(format(
"Residual Mean V in Position UV, %1%") % sensorDescr);
689 m_ResMeanVPosUVSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, iSizeBins, fSizeMin, fSizeMax);
690 m_ResMeanVPosUVSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
691 m_ResMeanVPosUVSens[i]->GetYaxis()->SetTitle(
"position V [mm]");
692 m_ResMeanVPosUVSens[i]->GetZaxis()->SetTitle(
"residual V [#mum]");
695 DirAlignSensResMeanUPosU->cd();
696 for (
int i = 0; i < nVXDSensors; i++) {
697 VxdID id = gTools->getSensorIDFromIndex(i);
699 int iLadder =
id.getLadderNumber();
700 int iSensor =
id.getSensorNumber();
701 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
702 name = str(format(
"ResMeanUPosUSens_%1%") % sensorDescr);
703 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
704 title = str(format(
"Residual Mean U in Position U, %1%") % sensorDescr);
705 m_ResMeanUPosUSens[i] =
new TH1F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax);
706 m_ResMeanUPosUSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
707 m_ResMeanUPosUSens[i]->GetYaxis()->SetTitle(
"residual mean U [#mum]");
710 DirAlignSensResMeanVPosU->cd();
711 for (
int i = 0; i < nVXDSensors; i++) {
712 VxdID id = gTools->getSensorIDFromIndex(i);
714 int iLadder =
id.getLadderNumber();
715 int iSensor =
id.getSensorNumber();
716 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
717 name = str(format(
"ResMeanVPosUSens_%1%") % sensorDescr);
718 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
719 title = str(format(
"Residual Mean V in Position U, %1%") % sensorDescr);
720 m_ResMeanVPosUSens[i] =
new TH1F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax);
721 m_ResMeanVPosUSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
722 m_ResMeanVPosUSens[i]->GetYaxis()->SetTitle(
"residual mean V [#mum]");
725 DirAlignSensResMeanUPosV->cd();
726 for (
int i = 0; i < nVXDSensors; i++) {
727 VxdID id = gTools->getSensorIDFromIndex(i);
729 int iLadder =
id.getLadderNumber();
730 int iSensor =
id.getSensorNumber();
731 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
732 name = str(format(
"ResMeanUPosVSens_%1%") % sensorDescr);
733 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
734 title = str(format(
"Residual Mean U in Position V, %1%") % sensorDescr);
735 m_ResMeanUPosVSens[i] =
new TH1F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax);
736 m_ResMeanUPosVSens[i]->GetXaxis()->SetTitle(
"position V [mm]");
737 m_ResMeanUPosVSens[i]->GetYaxis()->SetTitle(
"residual mean U [#mum]");
740 DirAlignSensResMeanVPosV->cd();
741 for (
int i = 0; i < nVXDSensors; i++) {
742 VxdID id = gTools->getSensorIDFromIndex(i);
744 int iLadder =
id.getLadderNumber();
745 int iSensor =
id.getSensorNumber();
746 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
747 name = str(format(
"ResMeanVPosVSens_%1%") % sensorDescr);
748 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
749 title = str(format(
"Residual Mean V in Position V, %1%") % sensorDescr);
750 m_ResMeanVPosVSens[i] =
new TH1F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax);
751 m_ResMeanVPosVSens[i]->GetXaxis()->SetTitle(
"position V [mm]");
752 m_ResMeanVPosVSens[i]->GetYaxis()->SetTitle(
"residual mean V [#mum]");
755 DirAlignSensResUPosU->cd();
756 for (
int i = 0; i < nVXDSensors; i++) {
757 VxdID id = gTools->getSensorIDFromIndex(i);
759 int iLadder =
id.getLadderNumber();
760 int iSensor =
id.getSensorNumber();
761 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
762 name = str(format(
"ResUPosUSensor_%1%") % sensorDescr);
763 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
764 title = str(format(
"Residual U in Position U, %1%") % sensorDescr);
765 m_ResUPosUSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, 200, -ResidualRange, ResidualRange);
766 m_ResUPosUSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
767 m_ResUPosUSens[i]->GetYaxis()->SetTitle(
"residual U [#mum]");
768 m_ResUPosUSens[i]->GetZaxis()->SetTitle(
"counts");
771 DirAlignSensResVPosU->cd();
772 for (
int i = 0; i < nVXDSensors; i++) {
773 VxdID id = gTools->getSensorIDFromIndex(i);
775 int iLadder =
id.getLadderNumber();
776 int iSensor =
id.getSensorNumber();
777 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
778 name = str(format(
"ResVPosUSensor_%1%") % sensorDescr);
779 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
780 title = str(format(
"Residual V in Position U, %1%") % sensorDescr);
781 m_ResVPosUSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, 200, -ResidualRange, ResidualRange);
782 m_ResVPosUSens[i]->GetXaxis()->SetTitle(
"position U [mm]");
783 m_ResVPosUSens[i]->GetYaxis()->SetTitle(
"residual V [#mum]");
784 m_ResVPosUSens[i]->GetZaxis()->SetTitle(
"counts");
787 DirAlignSensResUPosV->cd();
788 for (
int i = 0; i < nVXDSensors; i++) {
789 VxdID id = gTools->getSensorIDFromIndex(i);
791 int iLadder =
id.getLadderNumber();
792 int iSensor =
id.getSensorNumber();
793 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
794 name = str(format(
"ResUPosVSensor_%1%") % sensorDescr);
795 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
796 title = str(format(
"Residual U in Position V, %1%") % sensorDescr);
797 m_ResUPosVSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, 200, -ResidualRange, ResidualRange);
798 m_ResUPosVSens[i]->GetXaxis()->SetTitle(
"position V [mm]");
799 m_ResUPosVSens[i]->GetYaxis()->SetTitle(
"residual U [#mum]");
800 m_ResUPosVSens[i]->GetZaxis()->SetTitle(
"counts");
803 DirAlignSensResVPosV->cd();
804 for (
int i = 0; i < nVXDSensors; i++) {
805 VxdID id = gTools->getSensorIDFromIndex(i);
807 int iLadder =
id.getLadderNumber();
808 int iSensor =
id.getSensorNumber();
809 string sensorDescr = str(format(
"%1%_%2%_%3%") % iLayer % iLadder % iSensor);
810 name = str(format(
"ResVPosVSensor_%1%") % sensorDescr);
811 sensorDescr = str(format(
"Layer %1% Ladder %2% Sensor %3%") % iLayer % iLadder % iSensor);
812 title = str(format(
"Residual V in Position V, %1%") % sensorDescr);
813 m_ResVPosVSens[i] =
new TH2F(name.c_str(), title.c_str(), iSizeBins, fSizeMin, fSizeMax, 200, -ResidualRange, ResidualRange);
814 m_ResVPosVSens[i]->GetXaxis()->SetTitle(
"position V [mm]");
815 m_ResVPosVSens[i]->GetYaxis()->SetTitle(
"residual V [#mum]");
816 m_ResVPosVSens[i]->GetZaxis()->SetTitle(
"counts");
819 m_ResMeanPhiThetaLayerCounts = (TH2F**)
new TH2F*[nVXDLayers];
820 m_ResMeanUPhiThetaLayer = (TH2F**)
new TH2F*[nVXDLayers];
821 m_ResMeanVPhiThetaLayer = (TH2F**)
new TH2F*[nVXDLayers];
822 m_ResUPhiLayer = (TH2F**)
new TH2F*[nVXDLayers];
823 m_ResVPhiLayer = (TH2F**)
new TH2F*[nVXDLayers];
824 m_ResUThetaLayer = (TH2F**)
new TH2F*[nVXDLayers];
825 m_ResVThetaLayer = (TH2F**)
new TH2F*[nVXDLayers];
826 m_ResMeanUPhiLayer = (TH1F**)
new TH1F*[nVXDLayers];
827 m_ResMeanVPhiLayer = (TH1F**)
new TH1F*[nVXDLayers];
828 m_ResMeanUThetaLayer = (TH1F**)
new TH1F*[nVXDLayers];
829 m_ResMeanVThetaLayer = (TH1F**)
new TH1F*[nVXDLayers];
832 int iThetGran = iPhiGran / 2;
835 DirAlignLayerResMeanUPosUV->cd();
837 int iLayer = layer.getLayerNumber();
838 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
839 name = str(format(
"ResMeanUPhiThetaLayer_%1%") % iLayer);
840 title = str(format(
"Residuals Mean U in Phi Theta, Layer %1%") % iLayer);
841 m_ResMeanUPhiThetaLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iPhiGran, -180, 180, iThetGran, 0, 180);
842 m_ResMeanUPhiThetaLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
843 m_ResMeanUPhiThetaLayer[iLay]->GetYaxis()->SetTitle(
"Theta [deg]");
844 m_ResMeanUPhiThetaLayer[iLay]->GetZaxis()->SetTitle(
"residual [#mum]");
847 int iLayer = layer.getLayerNumber();
848 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
849 name = str(format(
"ResCounterPhiThetaLayer_%1%") % iLayer);
850 title = str(format(
"Residuals counter in Phi Theta, Layer %1%") % iLayer);
851 m_ResMeanPhiThetaLayerCounts[iLay] =
new TH2F(name.c_str(), title.c_str(), iPhiGran, -180, 180, iThetGran, 0, 180);
852 m_ResMeanPhiThetaLayerCounts[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
853 m_ResMeanPhiThetaLayerCounts[iLay]->GetYaxis()->SetTitle(
"Theta [deg]");
854 m_ResMeanPhiThetaLayerCounts[iLay]->GetZaxis()->SetTitle(
"counts");
857 DirAlignLayerResMeanVPosUV->cd();
859 int iLayer = layer.getLayerNumber();
860 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
861 name = str(format(
"ResMeanVPhiThetaLayer_%1%") % iLayer);
862 title = str(format(
"Residuals Mean V in Phi Theta, Layer %1%") % iLayer);
863 m_ResMeanVPhiThetaLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iPhiGran, -180, 180, iThetGran, 0, 180);
864 m_ResMeanVPhiThetaLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
865 m_ResMeanVPhiThetaLayer[iLay]->GetYaxis()->SetTitle(
"Theta [deg]");
866 m_ResMeanVPhiThetaLayer[iLay]->GetZaxis()->SetTitle(
"residual [#mum]");
869 DirAlignLayerResMeanUPosU->cd();
871 int iLayer = layer.getLayerNumber();
872 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
873 name = str(format(
"ResMeanUPhiLayer_%1%") % iLayer);
874 title = str(format(
"Residuals Mean U in Phi, Layer %1%") % iLayer);
875 m_ResMeanUPhiLayer[iLay] =
new TH1F(name.c_str(), title.c_str(), iPhiGran, -180, 180);
876 m_ResMeanUPhiLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
877 m_ResMeanUPhiLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
880 DirAlignLayerResMeanVPosU->cd();
882 int iLayer = layer.getLayerNumber();
883 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
884 name = str(format(
"ResMeanVPhiLayer_%1%") % iLayer);
885 title = str(format(
"Residuals Mean V in Phi, Layer %1%") % iLayer);
886 m_ResMeanVPhiLayer[iLay] =
new TH1F(name.c_str(), title.c_str(), iPhiGran, -180, 180);
887 m_ResMeanVPhiLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
888 m_ResMeanVPhiLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
891 DirAlignLayerResMeanUPosV->cd();
893 int iLayer = layer.getLayerNumber();
894 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
895 name = str(format(
"ResMeanUThetaLayer_%1%") % iLayer);
896 title = str(format(
"Residuals Mean U in Theta, Layer %1%") % iLayer);
897 m_ResMeanUThetaLayer[iLay] =
new TH1F(name.c_str(), title.c_str(), iThetGran, 0, 180);
898 m_ResMeanUThetaLayer[iLay]->GetXaxis()->SetTitle(
"Theta [deg]");
899 m_ResMeanUThetaLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
902 DirAlignLayerResMeanVPosV->cd();
904 int iLayer = layer.getLayerNumber();
905 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
906 name = str(format(
"ResMeanVThetaLayer_%1%") % iLayer);
907 title = str(format(
"Residuals Mean V in Theta, Layer %1%") % iLayer);
908 m_ResMeanVThetaLayer[iLay] =
new TH1F(name.c_str(), title.c_str(), iThetGran, 0, 180);
909 m_ResMeanVThetaLayer[iLay]->GetXaxis()->SetTitle(
"Theta [deg]");
910 m_ResMeanVThetaLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
913 DirAlignLayerResUPosU->cd();
915 int iLayer = layer.getLayerNumber();
916 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
917 name = str(format(
"ResUPhiLayer_%1%") % iLayer);
918 title = str(format(
"Residuals U in Phi, Layer %1%") % iLayer);
919 m_ResUPhiLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iPhiGran, -180, 180, iYResGran, -ResidualRange, ResidualRange);
920 m_ResUPhiLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
921 m_ResUPhiLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
922 m_ResUPhiLayer[iLay]->GetZaxis()->SetTitle(
"counts");
925 DirAlignLayerResVPosU->cd();
927 int iLayer = layer.getLayerNumber();
928 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
929 name = str(format(
"ResVPhiLayer_%1%") % iLayer);
930 title = str(format(
"Residuals V in Phi, Layer %1%") % iLayer);
931 m_ResVPhiLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iPhiGran, -180, 180, iYResGran, -ResidualRange, ResidualRange);
932 m_ResVPhiLayer[iLay]->GetXaxis()->SetTitle(
"Phi [deg]");
933 m_ResVPhiLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
934 m_ResVPhiLayer[iLay]->GetZaxis()->SetTitle(
"counts");
937 DirAlignLayerResUPosV->cd();
939 int iLayer = layer.getLayerNumber();
940 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
941 name = str(format(
"ResUThetaLayer_%1%") % iLayer);
942 title = str(format(
"Residuals U in Theta, Layer %1%") % iLayer);
943 m_ResUThetaLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iThetGran, 0, 180, iYResGran, -ResidualRange, ResidualRange);
944 m_ResUThetaLayer[iLay]->GetXaxis()->SetTitle(
"Theta [deg]");
945 m_ResUThetaLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
946 m_ResUThetaLayer[iLay]->GetZaxis()->SetTitle(
"counts");
949 DirAlignLayerResVPosV->cd();
951 int iLayer = layer.getLayerNumber();
952 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
953 name = str(format(
"ResVThetaLayer_%1%") % iLayer);
954 title = str(format(
"Residuals V in Theta, Layer %1%") % iLayer);
955 m_ResVThetaLayer[iLay] =
new TH2F(name.c_str(), title.c_str(), iThetGran, 0, 180, iYResGran, -ResidualRange, ResidualRange);
956 m_ResVThetaLayer[iLay]->GetXaxis()->SetTitle(
"Theta [deg]");
957 m_ResVThetaLayer[iLay]->GetYaxis()->SetTitle(
"residual [#mum]");
958 m_ResVThetaLayer[iLay]->GetZaxis()->SetTitle(
"counts");
970 if (m_D0 != NULL) m_D0->Reset();
971 if (m_Z0 != NULL) m_Z0->Reset();
972 if (m_Phi != NULL) m_Phi->Reset();
973 if (m_MomPt != NULL) m_MomPt->Reset();
974 if (m_Omega != NULL) m_Omega->Reset();
975 if (m_TanLambda != NULL) m_TanLambda->Reset();
977 if (m_PhiD0 != NULL) m_PhiD0->Reset();
978 if (m_PhiZ0 != NULL) m_PhiZ0->Reset();
979 if (m_PhiMomPt != NULL) m_PhiMomPt->Reset();
980 if (m_PhiOmega != NULL) m_PhiOmega->Reset();
981 if (m_PhiTanLambda != NULL) m_PhiTanLambda->Reset();
983 if (m_D0Z0 != NULL) m_D0Z0->Reset();
984 if (m_D0MomPt != NULL) m_D0MomPt->Reset();
985 if (m_D0Omega != NULL) m_D0Omega->Reset();
986 if (m_D0TanLambda != NULL) m_D0TanLambda->Reset();
987 if (m_Z0MomPt != NULL) m_Z0MomPt->Reset();
988 if (m_Z0Omega != NULL) m_Z0Omega->Reset();
989 if (m_Z0TanLambda != NULL) m_Z0TanLambda->Reset();
990 if (m_MomPtOmega != NULL) m_MomPtOmega->Reset();
991 if (m_MomPtTanLambda != NULL) m_MomPtTanLambda->Reset();
992 if (m_OmegaTanLambda != NULL) m_OmegaTanLambda->Reset();
994 if (m_MomPhi != NULL) m_MomPhi->Reset();
995 if (m_MomTheta != NULL) m_MomTheta->Reset();
996 if (m_MomCosTheta != NULL) m_MomCosTheta->Reset();
997 if (m_PValue != NULL) m_PValue->Reset();
998 if (m_Chi2 != NULL) m_Chi2->Reset();
999 if (m_NDF != NULL) m_NDF->Reset();
1000 if (m_Chi2NDF != NULL) m_Chi2NDF->Reset();
1001 if (m_UBResidualsPXD != NULL) m_UBResidualsPXD->Reset();
1002 if (m_UBResidualsSVD != NULL) m_UBResidualsSVD->Reset();
1003 if (m_UBResidualsPXDU != NULL) m_UBResidualsPXDU->Reset();
1004 if (m_UBResidualsSVDU != NULL) m_UBResidualsSVDU->Reset();
1005 if (m_UBResidualsPXDV != NULL) m_UBResidualsPXDV->Reset();
1006 if (m_UBResidualsSVDV != NULL) m_UBResidualsSVDV->Reset();
1009 if (m_UBResidualsPXDX_Ying != NULL) m_UBResidualsPXDX_Ying->Reset();
1010 if (m_UBResidualsPXDX_Yang != NULL) m_UBResidualsPXDX_Yang->Reset();
1011 if (m_UBResidualsSVDX_Pat != NULL) m_UBResidualsSVDX_Pat->Reset();
1012 if (m_UBResidualsSVDX_Mat != NULL) m_UBResidualsSVDX_Mat->Reset();
1014 if (m_UBResidualsPXDY_Ying != NULL) m_UBResidualsPXDY_Ying->Reset();
1015 if (m_UBResidualsPXDY_Yang != NULL) m_UBResidualsPXDY_Yang->Reset();
1016 if (m_UBResidualsSVDY_Pat != NULL) m_UBResidualsSVDY_Pat->Reset();
1017 if (m_UBResidualsSVDY_Mat != NULL) m_UBResidualsSVDY_Mat->Reset();
1019 if (m_UBResidualsPXDZ_Ying != NULL) m_UBResidualsPXDZ_Ying->Reset();
1020 if (m_UBResidualsPXDZ_Yang != NULL) m_UBResidualsPXDZ_Yang->Reset();
1021 if (m_UBResidualsSVDZ_Pat != NULL) m_UBResidualsSVDZ_Pat->Reset();
1022 if (m_UBResidualsSVDZ_Mat != NULL) m_UBResidualsSVDZ_Mat->Reset();
1025 int i = gTools->getLayerIndex(layer.getLayerNumber());
1026 if (m_TRClusterHitmap[i] != NULL) m_TRClusterHitmap[i]->Reset();
1029 int i = layer.getLayerNumber();
1030 if (i == gTools->getLastLayer())
continue;
1031 i = gTools->getLayerIndex(i);
1032 if (m_TRClusterCorrelationsPhi[i] != NULL) m_TRClusterCorrelationsPhi[i]->Reset();
1033 if (m_TRClusterCorrelationsTheta[i] != NULL) m_TRClusterCorrelationsTheta[i]->Reset();
1035 for (
int i = 0; i < gTools->getNumberOfSensors(); i++) {
1036 if (m_UBResidualsSensor[i] != NULL) m_UBResidualsSensor[i]->Reset();
1037 if (m_UBResidualsSensorU[i] != NULL) m_UBResidualsSensorU[i]->Reset();
1038 if (m_UBResidualsSensorV[i] != NULL) m_UBResidualsSensorV[i]->Reset();
1040 if (m_MomX != NULL) m_MomX->Reset();
1041 if (m_MomY != NULL) m_MomY->Reset();
1042 if (m_MomZ != NULL) m_MomZ->Reset();
1043 if (m_Mom != NULL) m_Mom->Reset();
1044 if (m_HitsPXD != NULL) m_HitsPXD->Reset();
1045 if (m_HitsSVD != NULL) m_HitsSVD->Reset();
1046 if (m_HitsCDC != NULL) m_HitsCDC->Reset();
1047 if (m_Hits != NULL) m_Hits->Reset();
1048 if (m_TracksVXD != NULL) m_TracksVXD->Reset();
1049 if (m_TracksCDC != NULL) m_TracksCDC->Reset();
1050 if (m_TracksVXDCDC != NULL) m_TracksVXDCDC->Reset();
1051 if (m_Tracks != NULL) m_Tracks->Reset();
1063 int iTrackVXDCDC = 0;
1065 if (!tracks || !tracks.getEntries())
return;
1066 for (
const Track& track : tracks) {
1068 if (!theRC.
size())
continue;
1070 int nPXD = (int)pxdClustersTrack.
size();
1072 int nSVD = (int)svdClustersTrack.
size();
1074 int nCDC = (int)cdcHitTrack.
size();
1086 if (tfr ==
nullptr)
continue;
1087 TString message = Form(
"AlignDQM: track %3i, Mom: %f, %f, %f, Pt: %f, Mag: %f, Hits: PXD %i SVD %i CDC %i Suma %i\n",
1094 nPXD, nSVD, nCDC, nPXD + nSVD + nCDC
1096 B2DEBUG(230, message.Data());
1106 Theta = atan2(pxy, tfr->
getMomentum().Pz()) * TMath::RadToDeg();
1108 m_MomPhi->Fill(Phi);
1109 m_MomTheta->Fill(Theta);
1110 m_MomCosTheta->Fill(cos(Theta - 90.0));
1112 if (theRC[0]->wasFitSuccessful()) {
1113 if (!theRC[0]->getTrackFitStatus())
1116 float NDF = theRC[0]->getTrackFitStatus()->getNdf();
1119 m_Chi2->Fill(theRC[0]->getTrackFitStatus()->getChi2());
1121 float Chi2NDF = theRC[0]->getTrackFitStatus()->getChi2() / NDF;
1122 m_Chi2NDF->Fill(Chi2NDF);
1125 float pValue = theRC[0]->getTrackFitStatus()->getPVal();
1126 m_PValue->Fill(pValue);
1130 float ResidUPlaneRHUnBias = 0;
1131 float ResidVPlaneRHUnBias = 0;
1132 float fPosSPUPrev = 0;
1133 float fPosSPVPrev = 0;
1141 bool isNotFirstHit =
false;
1144 for (
auto recoHitInfo : theRC[0]->getRecoHitInformations(
true)) {
1146 B2DEBUG(200,
"No genfit::pxd recoHitInfo is missing.");
1149 if (!recoHitInfo->useInFit())
1151 if (!((recoHitInfo->getTrackingDetector() == RecoHitInformation::c_PXD) ||
1152 (recoHitInfo->getTrackingDetector() == RecoHitInformation::c_SVD)))
1155 bool biased =
false;
1156 if (!theRC[0]->getCreatedTrackPoint(recoHitInfo)->getFitterInfo())
continue;
1157 TVectorD resUnBias = theRC[0]->getCreatedTrackPoint(recoHitInfo)->getFitterInfo()->getResidual(0, biased).getState();
1159 if (recoHitInfo->getTrackingDetector() == RecoHitInformation::c_PXD) {
1160 posU = recoHitInfo->getRelatedTo<
PXDCluster>()->getU();
1161 posV = recoHitInfo->getRelatedTo<
PXDCluster>()->getV();
1163 VxdID sensorID = recoHitInfo->getRelatedTo<
PXDCluster>()->getSensorID();
1167 fPosSPU = ral.
Phi() / TMath::Pi() * 180;
1168 fPosSPV = ral.
Theta() / TMath::Pi() * 180;
1171 if (isNotFirstHit && ((iLayer - iLayerPrev) == 1)) {
1172 int index = gTools->getLayerIndex(sensorID.
getLayerNumber()) - gTools->getFirstLayer();
1173 m_TRClusterCorrelationsPhi[index]->Fill(fPosSPUPrev, fPosSPU);
1174 m_TRClusterCorrelationsTheta[index]->Fill(fPosSPVPrev, fPosSPV);
1176 isNotFirstHit =
true;
1177 iLayerPrev = iLayer;
1178 fPosSPUPrev = fPosSPU;
1179 fPosSPVPrev = fPosSPV;
1180 m_UBResidualsPXD->Fill(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias);
1181 m_UBResidualsPXDU->Fill(ResidUPlaneRHUnBias);
1182 m_UBResidualsPXDV->Fill(ResidVPlaneRHUnBias);
1185 int index = gTools->getSensorIndex(sensorID);
1186 int indexLayer = gTools->getLayerIndex(sensorID.
getLayerNumber());
1187 m_UBResidualsSensor[index]->Fill(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias);
1188 m_UBResidualsSensorU[index]->Fill(ResidUPlaneRHUnBias);
1189 m_UBResidualsSensorV[index]->Fill(ResidVPlaneRHUnBias);
1190 m_TRClusterHitmap[indexLayer]->Fill(fPosSPU, fPosSPV);
1193 TVector3 localResidual(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias, 0);
1194 auto globalResidual = info.vectorToGlobal(localResidual,
true);
1197 m_UBResidualsPXDX_Ying->Fill(globalResidual.x());
1198 m_UBResidualsPXDY_Ying->Fill(globalResidual.y());
1199 m_UBResidualsPXDZ_Ying->Fill(globalResidual.z());
1201 m_UBResidualsPXDX_Yang->Fill(globalResidual.x());
1202 m_UBResidualsPXDY_Yang->Fill(globalResidual.y());
1203 m_UBResidualsPXDZ_Yang->Fill(globalResidual.z());
1209 m_ResMeanPosUVSensCounts[index]->Fill(posU, posV);
1210 m_ResMeanUPosUVSens[index]->Fill(posU, posV, ResidUPlaneRHUnBias);
1211 m_ResMeanVPosUVSens[index]->Fill(posU, posV, ResidVPlaneRHUnBias);
1212 m_ResUPosUSens[index]->Fill(posU, ResidUPlaneRHUnBias);
1213 m_ResUPosVSens[index]->Fill(posV, ResidUPlaneRHUnBias);
1214 m_ResVPosUSens[index]->Fill(posU, ResidVPlaneRHUnBias);
1215 m_ResVPosVSens[index]->Fill(posV, ResidVPlaneRHUnBias);
1217 m_ResMeanPhiThetaLayerCounts[indexLayer]->Fill(fPosSPU, fPosSPV);
1218 m_ResMeanUPhiThetaLayer[indexLayer]->Fill(fPosSPU, fPosSPV, ResidUPlaneRHUnBias);
1219 m_ResMeanVPhiThetaLayer[indexLayer]->Fill(fPosSPU, fPosSPV, ResidVPlaneRHUnBias);
1220 m_ResUPhiLayer[indexLayer]->Fill(fPosSPU, ResidUPlaneRHUnBias);
1221 m_ResVPhiLayer[indexLayer]->Fill(fPosSPU, ResidVPlaneRHUnBias);
1222 m_ResUThetaLayer[indexLayer]->Fill(fPosSPV, ResidUPlaneRHUnBias);
1223 m_ResVThetaLayer[indexLayer]->Fill(fPosSPV, ResidVPlaneRHUnBias);
1226 if (recoHitInfo->getTrackingDetector() == RecoHitInformation::c_SVD) {
1227 IsSVDU = recoHitInfo->getRelatedTo<
SVDCluster>()->isUCluster();
1228 VxdID sensorID = recoHitInfo->getRelatedTo<
SVDCluster>()->getSensorID();
1235 fPosSPU = ral.
Phi() / TMath::Pi() * 180;
1237 if (sensorIDPrew != sensorID) {
1238 ResidVPlaneRHUnBias = 0;
1241 sensorIDPrew = sensorID;
1246 fPosSPV = ral.
Theta() / TMath::Pi() * 180;
1248 if (sensorIDPrew == sensorID) {
1249 if (isNotFirstHit && ((iLayer - iLayerPrev) == 1)) {
1250 int index = gTools->getLayerIndex(sensorID.
getLayerNumber()) - gTools->getFirstLayer();
1251 m_TRClusterCorrelationsPhi[index]->Fill(fPosSPUPrev, fPosSPU);
1252 m_TRClusterCorrelationsTheta[index]->Fill(fPosSPVPrev, fPosSPV);
1254 isNotFirstHit =
true;
1255 iLayerPrev = iLayer;
1256 fPosSPUPrev = fPosSPU;
1257 fPosSPVPrev = fPosSPV;
1258 m_UBResidualsSVD->Fill(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias);
1259 m_UBResidualsSVDU->Fill(ResidUPlaneRHUnBias);
1260 m_UBResidualsSVDV->Fill(ResidVPlaneRHUnBias);
1261 int index = gTools->getSensorIndex(sensorID);
1262 int indexLayer = gTools->getLayerIndex(sensorID.
getLayerNumber());
1263 m_UBResidualsSensor[index]->Fill(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias);
1264 m_UBResidualsSensorU[index]->Fill(ResidUPlaneRHUnBias);
1265 m_UBResidualsSensorV[index]->Fill(ResidVPlaneRHUnBias);
1266 m_TRClusterHitmap[indexLayer]->Fill(fPosSPU, fPosSPV);
1269 TVector3 localResidual(ResidUPlaneRHUnBias, ResidVPlaneRHUnBias, 0);
1270 auto globalResidual = info.vectorToGlobal(localResidual,
true);
1273 m_UBResidualsSVDX_Pat->Fill(globalResidual.x());
1274 m_UBResidualsSVDY_Pat->Fill(globalResidual.y());
1275 m_UBResidualsSVDZ_Pat->Fill(globalResidual.z());
1277 m_UBResidualsSVDX_Mat->Fill(globalResidual.x());
1278 m_UBResidualsSVDY_Mat->Fill(globalResidual.y());
1279 m_UBResidualsSVDZ_Mat->Fill(globalResidual.z());
1285 m_ResMeanPosUVSensCounts[index]->Fill(posU, posV);
1286 m_ResMeanUPosUVSens[index]->Fill(posU, posV, ResidUPlaneRHUnBias);
1287 m_ResMeanVPosUVSens[index]->Fill(posU, posV, ResidVPlaneRHUnBias);
1288 m_ResUPosUSens[index]->Fill(posU, ResidUPlaneRHUnBias);
1289 m_ResUPosVSens[index]->Fill(posV, ResidUPlaneRHUnBias);
1290 m_ResVPosUSens[index]->Fill(posU, ResidVPlaneRHUnBias);
1291 m_ResVPosVSens[index]->Fill(posV, ResidVPlaneRHUnBias);
1293 m_ResMeanPhiThetaLayerCounts[indexLayer]->Fill(fPosSPU, fPosSPV);
1294 m_ResMeanUPhiThetaLayer[indexLayer]->Fill(fPosSPU, fPosSPV, ResidUPlaneRHUnBias);
1295 m_ResMeanVPhiThetaLayer[indexLayer]->Fill(fPosSPU, fPosSPV, ResidVPlaneRHUnBias);
1296 m_ResUPhiLayer[indexLayer]->Fill(fPosSPU, ResidUPlaneRHUnBias);
1297 m_ResVPhiLayer[indexLayer]->Fill(fPosSPU, ResidVPlaneRHUnBias);
1298 m_ResUThetaLayer[indexLayer]->Fill(fPosSPV, ResidUPlaneRHUnBias);
1299 m_ResVThetaLayer[indexLayer]->Fill(fPosSPV, ResidVPlaneRHUnBias);
1302 if (sensorIDPrew != sensorID) {
1303 ResidUPlaneRHUnBias = 0;
1306 sensorIDPrew = sensorID;
1311 if (((nPXD > 0) || (nSVD > 0)) && (nCDC > 0)) iTrackVXDCDC++;
1312 if (((nPXD > 0) || (nSVD > 0)) && (nCDC == 0)) iTrackVXD++;
1313 if (((nPXD == 0) && (nSVD == 0)) && (nCDC > 0)) iTrackCDC++;
1314 if (m_MomX != NULL) m_MomX->Fill(tfr->
getMomentum().Px());
1315 if (m_MomY != NULL) m_MomY->Fill(tfr->
getMomentum().Py());
1316 if (m_MomZ != NULL) m_MomZ->Fill(tfr->
getMomentum().Pz());
1317 if (m_MomPt != NULL) m_MomPt->Fill(tfr->
getMomentum().Pt());
1318 if (m_Mom != NULL) m_Mom->Fill(tfr->
getMomentum().Mag());
1319 if (m_HitsPXD != NULL) m_HitsPXD->Fill(nPXD);
1320 if (m_HitsSVD != NULL) m_HitsSVD->Fill(nSVD);
1321 if (m_HitsCDC != NULL) m_HitsCDC->Fill(nCDC);
1322 if (m_Hits != NULL) m_Hits->Fill(nPXD + nSVD + nCDC);
1324 if (m_D0 != NULL) m_D0->Fill(tfr->
getD0());
1325 if (m_Z0 != NULL) m_Z0->Fill(tfr->
getZ0());
1327 if (m_Omega != NULL) m_Omega->Fill(tfr->
getOmega());
1328 if (m_TanLambda != NULL) m_TanLambda->Fill(tfr->
getTanLambda());
1334 if (m_PhiTanLambda != NULL)
1337 if (m_D0Z0 != NULL) m_D0Z0->Fill(tfr->
getD0(), tfr->
getZ0());
1338 if (m_D0MomPt != NULL) m_D0MomPt->Fill(tfr->
getD0(), tfr->
getMomentum().Pt());
1339 if (m_D0Omega != NULL) m_D0Omega->Fill(tfr->
getD0(), tfr->
getOmega());
1340 if (m_D0TanLambda != NULL) m_D0TanLambda->Fill(tfr->
getD0(), tfr->
getTanLambda());
1341 if (m_Z0MomPt != NULL) m_Z0MomPt->Fill(tfr->
getZ0(), tfr->
getMomentum().Pt());
1342 if (m_Z0Omega != NULL) m_Z0Omega->Fill(tfr->
getZ0(), tfr->
getOmega());
1343 if (m_Z0TanLambda != NULL) m_Z0TanLambda->Fill(tfr->
getZ0(), tfr->
getTanLambda());
1350 if (m_TracksVXD != NULL) m_TracksVXD->Fill(iTrackVXD);
1351 if (m_TracksCDC != NULL) m_TracksCDC->Fill(iTrackCDC);
1352 if (m_TracksVXDCDC != NULL) m_TracksVXDCDC->Fill(iTrackVXDCDC);
1353 if (m_Tracks != NULL) m_Tracks->Fill(iTrack);
1356 B2DEBUG(70,
"Some problem in Alignment DQM module!");
1362 switch (layerNumber) {
1364 return ladderNumber < 5 || ladderNumber > 8;
1366 return ladderNumber < 7 || ladderNumber > 12;
1374 switch (layerNumber) {
1376 return ladderNumber < 3 || ladderNumber > 5;
1378 return ladderNumber < 4 || ladderNumber > 8;
1380 return ladderNumber < 5 || ladderNumber > 10;
1382 return ladderNumber < 6 || ladderNumber > 13;
1393 int iLay = gTools->getLayerIndex(layer.getLayerNumber());
1394 m_ResMeanUPhiThetaLayer[iLay]->Divide(m_ResMeanPhiThetaLayerCounts[iLay]);
1395 m_ResMeanVPhiThetaLayer[iLay]->Divide(m_ResMeanPhiThetaLayerCounts[iLay]);
1396 for (
int i = 0; i < m_ResUPhiLayer[iLay]->GetNbinsX(); i++) {
1401 for (
int j = 0; j < m_ResUPhiLayer[iLay]->GetNbinsY(); j++) {
1402 SumResU += m_ResUPhiLayer[iLay]->GetBinContent(i + 1, j + 1) * m_ResUPhiLayer[iLay]->GetYaxis()->GetBinCenter(j + 1);
1403 SumResV += m_ResVPhiLayer[iLay]->GetBinContent(i + 1, j + 1) * m_ResVPhiLayer[iLay]->GetYaxis()->GetBinCenter(j + 1);
1404 CountsU += m_ResUPhiLayer[iLay]->GetBinContent(i + 1, j + 1);
1405 CountsV += m_ResVPhiLayer[iLay]->GetBinContent(i + 1, j + 1);
1410 valU = SumResU / CountsU;
1413 valV = SumResV / CountsV;
1415 m_ResMeanUPhiLayer[iLay]->SetBinContent(i + 1, valU);
1416 m_ResMeanVPhiLayer[iLay]->SetBinContent(i + 1, valV);
1419 for (
int i = 0; i < m_ResUThetaLayer[iLay]->GetNbinsX(); i++) {
1424 for (
int j = 0; j < m_ResUThetaLayer[iLay]->GetNbinsY(); j++) {
1425 SumResU += m_ResUThetaLayer[iLay]->GetBinContent(i + 1, j + 1) * m_ResUThetaLayer[iLay]->GetYaxis()->GetBinCenter(j + 1);
1426 SumResV += m_ResVThetaLayer[iLay]->GetBinContent(i + 1, j + 1) * m_ResVThetaLayer[iLay]->GetYaxis()->GetBinCenter(j + 1);
1427 CountsU += m_ResUThetaLayer[iLay]->GetBinContent(i + 1, j + 1);
1428 CountsV += m_ResVThetaLayer[iLay]->GetBinContent(i + 1, j + 1);
1433 valU = SumResU / CountsU;
1436 valV = SumResV / CountsV;
1438 m_ResMeanUThetaLayer[iLay]->SetBinContent(i + 1, valU);
1439 m_ResMeanVThetaLayer[iLay]->SetBinContent(i + 1, valV);
1443 for (
int iSen = 0; iSen < gTools->getNumberOfSensors(); iSen++) {
1444 m_ResMeanUPosUVSens[iSen]->Divide(m_ResMeanPosUVSensCounts[iSen]);
1445 m_ResMeanVPosUVSens[iSen]->Divide(m_ResMeanPosUVSensCounts[iSen]);
1446 for (
int i = 0; i < m_ResUPosUSens[iSen]->GetNbinsX(); i++) {
1451 for (
int j = 0; j < m_ResUPosUSens[iSen]->GetNbinsY(); j++) {
1452 SumResU += m_ResUPosUSens[iSen]->GetBinContent(i + 1, j + 1) * m_ResUPosUSens[iSen]->GetYaxis()->GetBinCenter(j + 1);
1453 SumResV += m_ResVPosUSens[iSen]->GetBinContent(i + 1, j + 1) * m_ResVPosUSens[iSen]->GetYaxis()->GetBinCenter(j + 1);
1454 CountsU += m_ResUPosUSens[iSen]->GetBinContent(i + 1, j + 1);
1455 CountsV += m_ResVPosUSens[iSen]->GetBinContent(i + 1, j + 1);
1460 valU = SumResU / CountsU;
1463 valV = SumResV / CountsV;
1465 m_ResMeanUPosUSens[iSen]->SetBinContent(i + 1, valU);
1466 m_ResMeanVPosUSens[iSen]->SetBinContent(i + 1, valV);
1469 for (
int i = 0; i < m_ResUPosVSens[iSen]->GetNbinsX(); i++) {
1474 for (
int j = 0; j < m_ResUPosVSens[iSen]->GetNbinsY(); j++) {
1475 SumResU += m_ResUPosVSens[iSen]->GetBinContent(i + 1, j + 1) * m_ResUPosVSens[iSen]->GetYaxis()->GetBinCenter(j + 1);
1476 SumResV += m_ResVPosVSens[iSen]->GetBinContent(i + 1, j + 1) * m_ResVPosVSens[iSen]->GetYaxis()->GetBinCenter(j + 1);
1477 CountsU += m_ResUPosVSens[iSen]->GetBinContent(i + 1, j + 1);
1478 CountsV += m_ResVPosVSens[iSen]->GetBinContent(i + 1, j + 1);
1483 valU = SumResU / CountsU;
1486 valV = SumResV / CountsV;
1488 m_ResMeanUPosVSens[iSen]->SetBinContent(i + 1, valU);
1489 m_ResMeanVPosVSens[iSen]->SetBinContent(i + 1, valV);