Belle II Software development
PXDROIFinderAnalysisModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/modules/roiFinding/pxd/PXDROIFinderAnalysisModule.h>
10#include <framework/datastore/RelationArray.h>
11#include <framework/datastore/RelationIndex.h>
12
13#include <mdst/dataobjects/MCParticle.h>
14#include <tracking/dataobjects/RecoTrack.h>
15#include <tracking/dataobjects/ROIid.h>
16#include <tracking/dataobjects/PXDIntercept.h>
17
18#include <svd/dataobjects/SVDCluster.h>
19#include <pxd/dataobjects/PXDDigit.h>
20#include <pxd/dataobjects/PXDTrueHit.h>
21#include <vxd/geometry/GeoCache.h>
22
23#include <TMath.h>
24#include <Math/Vector3D.h>
25
26using namespace Belle2;
27
28//-----------------------------------------------------------------
29// Register the Module
30//-----------------------------------------------------------------
31REG_MODULE(PXDROIFinderAnalysis);
32
33//-----------------------------------------------------------------
34// Implementation
35//-----------------------------------------------------------------
36
38 , m_writeToRoot(false)
39 , m_rootEvent(-1)
40 //pxd sensors
41 , m_nSensorsL1(0)
42 , m_nSensorsL2(0)
43
44 //variables
45 , m_globalTime(0.)
46 , m_coorU(0.)
47 , m_coorV(0.)
48 , m_sigmaU(0.)
49 , m_sigmaV(0.)
50 , m_vxdID(-1)
51
52 , m_coorUmc(0.)
53 , m_coorVmc(0.)
54 , m_Uidmc(-1)
55 , m_Vidmc(-1)
56 , m_vxdIDmc(-1)
57 , m_pTmc(0.)
58 , m_momXmc(0.)
59 , m_momYmc(0.)
60 , m_momZmc(0.)
61 , m_thetamc(0.)
62 , m_costhetamc(0.)
63 , m_phimc(0.)
64 , m_lambdamc(0.)
65
66 , Ntrack(0)
67 , NtrackHit(0)
68 , n_notINtrack2(0)
69 , n_notINtrack3(0)
70 , n_notINtrack4(0)
71 , n_notINtrack5(0)
72
73 , n_rois(0)
74 , n_intercepts(0)
75 , n_tracks(0)
76 , n_tracksWithDigits(0)
77 , n_tracksWithDigitsInROI(0)
78
79
80 , n_pxdDigit(0)
81 , n_pxdDigitInROI(0)
82 , n_notINdigit2(0)
83 , n_notINdigit3(0)
84 , n_notINdigit4(0)
85 , n_notINdigit5(0)
86
87 //vectors
88 , npxdDigit{0}
89 , npxdDigitInROI{0}
90 , nnotINdigit2{0}
91 , nnotINdigit3{0}
92 , nnotINdigit4{0}
93 , nnotINdigit5{0}
94 , TrackOneDigiIn{0}
95 , nnotINtrack2{0}
96 , nnotINtrack3{0}
97 , nnotINtrack4{0}
98 , nnotINtrack5{0}
99
100{
101 //Set module properties
102 setDescription("This module performs the analysis of the PXDROIFinder module output");
103
104 addParam("writeToRoot", m_writeToRoot,
105 "set true if you want to save the information in a root file named by parameter 'rootFileName'", bool(true));
106
107 addParam("rootFileName", m_rootFileName,
108 "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
109 std::string("pxdDataRedAnalysis"));
110
111 addParam("recoTrackListName", m_recoTrackListName,
112 "name of the input collection of RecoTracks", std::string(""));
113
114 addParam("PXDInterceptListName", m_PXDInterceptListName,
115 "name of the list of interceptions", std::string(""));
116
117 addParam("ROIListName", m_ROIListName,
118 "name of the list of ROIs", std::string(""));
119
120 m_rootEvent = 0;
121}
122
123
125{
127 m_ROIs.isRequired(m_ROIListName);
130
131 n_rois = 0;
132 n_intercepts = 0;
133 n_tracks = 0;
134 n_pxdDigit = 0;
135 n_pxdDigitInROI = 0;
136
139 NtrackHit = 0;
140 n_notINtrack2 = 0;
141 n_notINtrack3 = 0;
142 n_notINtrack4 = 0;
143 n_notINtrack5 = 0;
144
145 for (int i = 0; i < 6; i++) {
146 npxdDigit[i] = 0;
147 npxdDigitInROI[i] = 0;
148 }
149
150 if (m_writeToRoot == true) {
151 m_rootFileName += ".root";
152 m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
153 } else
154 m_rootFilePtr = nullptr;
155
156
157 m_h1GlobalTime = new TH1F("hGlobalTime", "global time for PXDDigits contained in ROI", 100, 0, 1);
158 m_h1PullU = new TH1F("hPullU", "U pulls for PXDDigits contained in ROI", 100, -6, 6);
159 m_h1PullV = new TH1F("hPullV", "V pulls for PXDDigits contained in ROI", 100, -6, 6);
160 m_h2sigmaUphi = new TH2F("hsigmaUvsPhi", "sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.35);
161 m_h2sigmaVphi = new TH2F("hsigmaVvsPhi", "sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.4);
162 m_h1ResidU = new TH1F("hResidU", "U resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
163 m_h1ResidV = new TH1F("hResidV", "V resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
164 m_h2ResidUV = new TH2F("hResidUV", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
165 m_h1SigmaU = new TH1F("hSigmaU", "sigmaU for PXDDigits contained in ROI", 100, 0, 0.35);
166 m_h1SigmaV = new TH1F("hSigmaV", "sigmaV for PXDDigits contained in ROI", 100, 0, 0.35);
167 m_h2Mapglob = new TH2F("h2Mapglob", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
168 m_h2MaplocL1 = new TH2F("h2MaplocL1", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
169 m_h2MaplocL2 = new TH2F("h2MaplocL2", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
170 m_h2MaplocL1->GetXaxis()->SetTitle("v ID");
171 m_h2MaplocL1->GetYaxis()->SetTitle("u ID");
172 m_h2MaplocL2->GetXaxis()->SetTitle("v ID");
173 m_h2MaplocL2->GetYaxis()->SetTitle("u ID");
174
175
176 m_h1GlobalTime_out2 = new TH1F("hGlobalTime_out2", "global time for PXDDigits not contained in ROI", 100, 0, 1);
177 m_h2sigmaUphi_out2 = new TH2F("hsigmaUvsPhi_out2", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
178 m_h2sigmaVphi_out2 = new TH2F("hsigmaVvsPhi_out2", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
179 m_h1ResidU_out2 = new TH1F("hResidU_out2", "U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
180 m_h1ResidV_out2 = new TH1F("hResidV_out2", "V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
181 m_h2ResidUV_out2 = new TH2F("hResidUV_out2", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
182 m_h1SigmaU_out2 = new TH1F("hSigmaU_out2", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
183 m_h1SigmaV_out2 = new TH1F("hSigmaV_out2", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
184 m_h2Mapglob_out2 = new TH2F("h2Mapglob_out2", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
185 m_h2MaplocL1_out2 = new TH2F("h2MaplocL1_out2", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
186 m_h2MaplocL2_out2 = new TH2F("h2MaplocL2_out2", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
187
188
189 m_h1GlobalTime_out3 = new TH1F("hGlobalTime_out3", "global time for PXDDigits not contained in ROI", 100, 0, 1);
190 m_h2sigmaUphi_out3 = new TH2F("hsigmaUvsPhi_out3", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
191 m_h2sigmaVphi_out3 = new TH2F("hsigmaVvsPhi_out3", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
192 m_h1ResidU_out3 = new TH1F("hResidU_out3", "U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
193 m_h1ResidV_out3 = new TH1F("hResidV_out3", "V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
194 m_h2ResidUV_out3 = new TH2F("hResidUV_out3", "U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
195 m_h1SigmaU_out3 = new TH1F("hSigmaU_out3", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
196 m_h1SigmaV_out3 = new TH1F("hSigmaV_out3", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
197
198 m_h2Mapglob_out3 = new TH2F("h2Mapglob_out3", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
199 m_h2MaplocL1_out3 = new TH2F("h2MaplocL1_out3", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
200 m_h2MaplocL2_out3 = new TH2F("h2MaplocL2_out3", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
201
202
203 m_h1GlobalTime_out4 = new TH1F("hGlobalTime_out4", "global time for PXDDigits not contained in ROI", 100, 0, 1);
204 m_h2sigmaUphi_out4 = new TH2F("hsigmaUvsPhi_out4", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
205 m_h2sigmaVphi_out4 = new TH2F("hsigmaVvsPhi_out4", "sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
206 m_h1SigmaU_out4 = new TH1F("hSigmaU_out4", "sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
207 m_h1SigmaV_out4 = new TH1F("hSigmaV_out4", "sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
208
209 m_h2Mapglob_out4 = new TH2F("h2Mapglob_out4", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
210 m_h2MaplocL1_out4 = new TH2F("h2MaplocL1_out4", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
211 m_h2MaplocL2_out4 = new TH2F("h2MaplocL2_out4", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
212
213
214 m_h1GlobalTime_out5 = new TH1F("hGlobalTime_out5", "global time for PXDDigits not contained in ROI", 100, 0, 1);
215
216 m_h2Mapglob_out5 = new TH2F("h2Mapglob_out5", "global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
217 m_h2MaplocL1_out5 = new TH2F("h2MaplocL1_out5", "L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
218 m_h2MaplocL2_out5 = new TH2F("h2MaplocL2_out5", "L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
219
220
221 m_h1redFactor = new TH1F("hRedFactor", "L1+L2reduction factor", 1000, 0, 1);
222 m_h1redFactor_L1 = new TH1F("hRedFactor_L1", "L1-only reduction factor", 1000, 0, 1);
223 m_h1redFactor_L2 = new TH1F("hRedFactor_L2", "L2-only reduction factor", 1000, 0, 1);
224
225 m_h1totROIs = new TH1F("h1TotNROIs", "number of all ROIs", 110, 0, 110);
226 m_h1okROIs = new TH1F("h1OkNROIs", "number of all ROIs containing a PXDDigit", 110, 0, 110);
227 m_h1okROIfrac = new TH1F("h1OkNROIfrac", "fraction of ROIs containing a PXDDigit", 100, 0, 1);
228
229 m_h1totArea = new TH1F("h1TotArea", "Area of all ROIs", 100, 0, 2500000);
230 m_h1okArea = new TH1F("h1OkArea", "Area of ROIs containing a PXDDigit", 100, 0, 75000);
231
232
233
234 m_h1effPerTrack = new TH1F("heffPerTrack", "fraction of digits in ROI per track", 100, -0.02, 1.02);
235
236
237
238 m_h2ROIbottomLeft = new TH2F("h2ROIbottomLeft", "u,v ID of the bottom left pixel", 650, -200, 450, 1300, -300, 1000);
239 m_h2ROItopRight = new TH2F("h2ROItopRight", "u,v ID of the top right pixel", 650, -200, 450, 1300, -300, 1000);
240
241 m_h2ROIuMinMax = new TH2F("h2ROIuMinMax", "u Min vs Max", 650, -200, 450, 650, -200, 450);
242 m_h2ROIvMinMax = new TH2F("h2ROIvMinMax", "v Min vs Max", 1300, -300, 1000, 1300, -300, 1000);
243
244
245 m_h1DigitsPerParticle = new TH1F("h1DigitsPerPart", "Number of PXDDigits per Particle", 50, 0, 50);
246 m_h1RecoTracksPerParticle = new TH1F("h1RecoTracksPerPart", "Number of RecoTracks per Particle", 10, 0, 10);
247
248
249 //analysis
250 Double_t lowBin[6 + 1];
251 for (int i = 0; i < 6; i++)
252 lowBin[i] = pt[i] - ptErr[i];
253 lowBin[6] = pt[5] + ptErr[5];
254
255 m_h1TrackOneDigiIn = new TH1F("hTracksDigiIn", "Tracks with at least one digit contained in a ROI", 6, lowBin);
256 m_h1nnotINtrack2 = new TH1F("h1outROITrack", "Tracks with ROI with correct VxdID but no digits inside ROI", 6, lowBin);
257 m_h1nnotINtrack3 = new TH1F("h1noROITrack", "Tracks with ROI with wrong VxdID but no digits inside ROI", 6, lowBin);
258 m_h1nnotINtrack4 = new TH1F("h1wrongVxdIDTrack", "Tracks with no ROI, Intercept with correct VxdID", 6, lowBin);
259 m_h1nnotINtrack5 = new TH1F("h1noInterTrack", "Tracks with no Intercept matching a VxdID of digits", 6, lowBin);
260
261 m_h1notINtrack5 = new TH1F("hNoInterTrack", "track with no intercepts", 20, 0, 20);
262 m_h1notINtrack5_pt = new TH1F("hNoInterTrack_pT", "track with no intercepts", 100, 0, 6);
263 m_h1notINtrack5_phi = new TH1F("h1NoInterTrack_phi", "hNoInterTrack_phi", 100, -180, 180);
264 m_h1notINtrack5_lambda = new TH1F("h1NoInterTrack_lambda", "hNoInterTrack_lambda", 100, -180, 180);
265 m_h1notINtrack5_cosTheta = new TH1F("h1NoInterTrack_cosTheta", "hNoInterTrack_cosTheta", 100, -1, 1);
266 m_h1notINtrack5_pVal = new TH1F("hNoInterTrack_pVal", "track with no intercepts", 100, 0, 1);
267 m_h1notINtrack5_nSVDhits = new TH1F("hNoInterTrack_nSVDhits", "track with no intercepts", 50, 0, 50);
268 m_h1notINtrack5_nCDChits = new TH1F("hNoInterTrack_nCDChits", "track with no intercepts", 100, 0, 100);
269
270 m_h1INtrack1 = new TH1F("hINTrack", "track with at least one digit inside ROI", 20, 0, 20);
271 m_h1INtrack1_pt = new TH1F("hINTrack_pT", "track with at least one digit inside ROI", 100, 0, 6);
272 m_h1INtrack1_phi = new TH1F("h1INTrack_phi", "hINTrack_phi", 100, -180, 180);
273 m_h1INtrack1_lambda = new TH1F("h1INTrack_lambda", "hINTrack_lambda", 100, -180, 180);
274 m_h1INtrack1_cosTheta = new TH1F("h1INTrack_cosTheta", "hINTrack_cosTheta", 100, -1, 1);
275 m_h1INtrack1_pVal = new TH1F("h1INTrack_pVal", "track with no intercepts", 100, 0, 1);
276 m_h1INtrack1_nSVDhits = new TH1F("h1INTrack_nSVDhits", "track with no intercepts", 50, 0, 50);
277 m_h1INtrack1_nCDChits = new TH1F("h1INTrack_nCDChits", "track with no intercepts", 100, 0, 100);
278
279 m_h1Track = new TH1F("hTrack", "all tracks", 20, 0, 20);
280 m_h1Track_pt = new TH1F("hTrack_pT", "all tracks with digits", 100, 0, 6);
281 m_h1Track_lambda = new TH1F("h1Track_lambda", "hTrack_lambda", 100, -180, 180);
282 m_h1Track_phi = new TH1F("h1Track_phi", "hTrack_phi", 100, -180, 180);
283 m_h1Track_cosTheta = new TH1F("h1Track_cosTheta", "hTrack_cos theta", 100, -1, 1);
284 m_h1Track_pVal = new TH1F("h1Track_pVal", "track with no intercepts", 100, 0, 1);
285 m_h1Track_nSVDhits = new TH1F("h1Track_nSVDhits", "track with no intercepts", 50, 0, 50);
286 m_h1Track_nCDChits = new TH1F("h1Track_nCDChits", "track with no intercepts", 100, 0, 100);
287
288 m_h1digiIn = new TH1F("hdigiIn", "digits inside ROI", 6, lowBin);
289 m_h1digiOut2 = new TH1F("hdigiOut2", "ROI exists with with correct VxdID but no digits inside ROI", 6, lowBin);
290 m_h1digiOut3 = new TH1F("hdigiOut3", "ROI exists with with wrong VxdID", 6, lowBin);
291 m_h1digiOut4 = new TH1F("hdigiOut4", "ROI does not exist, but intercept has correct VxdID", 6, lowBin);
292 m_h1digiOut5 = new TH1F("hdigiOut5", "no ROI, no Intercpets with correct VXDid", 6, lowBin);
293
294 // m_h2_VXDhitsPR_xy = new TH2F("hNoInteTrack_SVDhitsXY", "SVD Hits Missed by the VXDTF", 200, -15, 15, 200, -15, 15);
295
296 // m_h2_VXDhitsPR_rz = new TH2F("hNoInteTrack_SVDhitsRZ", "SVD Hits Missed by the VXDTF, r_{T} z", 200, -30, 40, 200, 0, 15);
297
298
299}
300
302{
303 m_rootEvent = 0;
304
306
307 std::set<Belle2::VxdID> pxdLayers = aGeometry.getLayers(VXD::SensorInfoBase::PXD);
308 std::set<Belle2::VxdID>::iterator itPxdLayers = pxdLayers.begin();
309
310 while ((itPxdLayers != pxdLayers.end()) && (itPxdLayers->getLayerNumber() != 7)) {
311
312 std::set<Belle2::VxdID> pxdLadders = aGeometry.getLadders(*itPxdLayers);
313 std::set<Belle2::VxdID>::iterator itPxdLadders = pxdLadders.begin();
314
315 while (itPxdLadders != pxdLadders.end()) {
316
317 std::set<Belle2::VxdID> pxdSensors = aGeometry.getSensors(*itPxdLadders);
318 std::set<Belle2::VxdID>::iterator itPxdSensors = pxdSensors.begin();
319
320 while (itPxdSensors != pxdSensors.end()) {
321
322 if (itPxdLadders->getLayerNumber() == 1)
323 m_nSensorsL1++;
324 if (itPxdLadders->getLayerNumber() == 2)
325 m_nSensorsL2++;
326
327 ++itPxdSensors;
328 }
329 ++itPxdLadders;
330 }
331 ++itPxdLayers;
332 }
333
334
335}
336
337
339{
340
341 typedef RelationIndex < RecoTrack, PXDIntercept>::range_from PXDInterceptsFromRecoTracks;
342 typedef RelationIndex < RecoTrack, PXDIntercept>::iterator_from PXDInterceptIteratorType;
343 typedef RelationIndex < PXDDigit, PXDTrueHit>::range_from PXDTrueHitFromPXDDigit;
344 typedef RelationIndex < PXDDigit, PXDTrueHit>::iterator_from PXDTrueHitIteratorType;
345 RelationIndex < PXDDigit, PXDTrueHit >
346 relDigitTrueHit(DataStore::relationName(DataStore::arrayName<PXDDigit>(""),
347 DataStore::arrayName<PXDTrueHit>("")));
348 RelationIndex < RecoTrack, PXDIntercept >
350
351 double tmpGlobalTime;
352 int tmpNGlobalTime;
353
354 NtrackHit = 0;
355 Ntrack = 0;
356
357 B2DEBUG(1, " ++++++++++++++ PXDROIFinderAnalysisModule");
358
359 int nROIs = 0;
360 int okArea_L1 = 0;
361 int okArea_L2 = 0;
362 int totArea_L1 = 0;
363 int totArea_L2 = 0;
364
365 //MCParticles
366 StoreArray<MCParticle> mcParticles;
367
368
369 //ROIs general
370 for (int i = 0; i < (int)m_ROIs.getEntries(); i++) { //loop on ROIlist
371
372 m_h2ROIbottomLeft->Fill(m_ROIs[i]->getMinUid(), m_ROIs[i]->getMinVid());
373 m_h2ROItopRight->Fill(m_ROIs[i]->getMaxUid(), m_ROIs[i]->getMaxVid());
374 m_h2ROIuMinMax->Fill(m_ROIs[i]->getMinUid(), m_ROIs[i]->getMaxUid());
375 m_h2ROIvMinMax->Fill(m_ROIs[i]->getMinVid(), m_ROIs[i]->getMaxVid());
376 int tmpArea = (m_ROIs[i]->getMaxUid() - m_ROIs[i]->getMinUid()) * (m_ROIs[i]->getMaxVid() - m_ROIs[i]->getMinVid());
377 if ((m_ROIs[i]->getSensorID()).getLayerNumber() == 1)
378 totArea_L1 += tmpArea;
379 else
380 totArea_L2 += tmpArea;
381
382 bool isOK = false;
383
384 for (int j = 0; j < (int)mcParticles.getEntries(); j++) {
385 MCParticle* aMcParticle = mcParticles[j];
386
387 // continue only if MCParticle has a related PXDDigit and RecoTrack
388 RelationVector<PXDDigit> pxdDigits_MCParticle = aMcParticle->getRelationsFrom<PXDDigit>();
389
390 if (!isOK)
391 //loop on PXDDigits
392 for (unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.size(); iPXDDigit++)
393 if (m_ROIs[i]->Contains(*(pxdDigits_MCParticle[iPXDDigit]))) {
394 nROIs++;
395 isOK = true;
396 break;
397 }
398 }
399 }
400
401 m_h1totArea->Fill(totArea_L1 + totArea_L2);
402 double redFactor_L1 = totArea_L1 / 768. / 250. / m_nSensorsL1; //16
403 double redFactor_L2 = totArea_L2 / 768. / 250. / m_nSensorsL2; //24
404 m_h1redFactor->Fill((double)(totArea_L1 + totArea_L2) / 768. / 250. / (m_nSensorsL1 + m_nSensorsL2));
405 m_h1redFactor_L1->Fill((double) redFactor_L1);
406 m_h1redFactor_L2->Fill((double) redFactor_L2);
407
408 m_h1totROIs->Fill(m_ROIs.getEntries());
409 n_rois += m_ROIs.getEntries();
410
411 //RecoTrack general
413
414 //PXDIntercepts general
415 n_intercepts += m_PXDIntercepts.getEntries();
416
417 Int_t n_NoInterceptTracks = 0;
418
419 // bool hasDigits = false;
420 // bool hasRecoTrack = false;
421
422 //loop on MCParticles
423 for (int j = 0; j < (int)mcParticles.getEntries(); j++) {
424
425 MCParticle* aMcParticle = mcParticles[j];
426
427 // continue only if MCParticle has a related PXDDigit and RecoTrack
428 RelationVector<PXDDigit> pxdDigits_MCParticle = aMcParticle->getRelationsFrom<PXDDigit>();
429 RelationVector<RecoTrack> recoTracks_MCParticle = aMcParticle->getRelationsWith<RecoTrack>();
430
431 m_h1DigitsPerParticle->Fill(pxdDigits_MCParticle.size());
432 if (pxdDigits_MCParticle.size() == 0)
433 continue;
434
435 // hasDigits = true;
436
437 m_h1RecoTracksPerParticle->Fill(recoTracks_MCParticle.size());
438 if (recoTracks_MCParticle.size() == 0)
439 continue;
440
441 // hasRecoTrack = true;
442
443 Ntrack++;
444
445 B2DEBUG(1, "Number of RecoTracks = " << recoTracks_MCParticle.size() << " and PXDDigits = " << pxdDigits_MCParticle.size() <<
446 " related to this MCParticle");
447
448 //retrieve general information about MCParticle
449 m_momXmc = (aMcParticle->getMomentum()).X();
450 m_momYmc = (aMcParticle->getMomentum()).Y();
451 m_momZmc = (aMcParticle->getMomentum()).Z();
452 m_phimc = (aMcParticle->getMomentum()).Phi() * TMath::RadToDeg();
453 m_thetamc = (aMcParticle->getMomentum()).Theta() * TMath::RadToDeg();
454 m_costhetamc = cos((aMcParticle->getMomentum()).Theta());
455 m_lambdamc = 90 - m_thetamc;
456 m_pTmc = (aMcParticle->getMomentum()).Rho();
457
458 //SVDhits
459 RelationVector<SVDCluster> svdRelations = aMcParticle->getRelationsFrom<SVDCluster>();
460
461 /* Int_t nMCPartSVDhits = 0;
462 Int_t nSVDhitLadder[4] = {0};
463 if((int)svdRelations.size() > 0){
464 nMCPartSVDhits = svdRelations.size();
465 for(int s=0; s<(int)svdRelations.size();s++)
466 nSVDhitLadder[ (svdRelations[s]->getSensorID()).getLayerNumber()-3 ]++;
467 }
468 */
469
470 bool part_outsideROI = false;
471 bool part_noROI = false;
472 bool part_wrongVxdID = false;
473 bool part_noInter = false;
474 bool hasOneDigitInROI = false;
475
476 double tmpArea = 0;
477
478 Int_t nDigitsInRoiPerTrack = 0;
479 Int_t nDigitsPerTrack = 0;
480
481 //loop on PXDDigits
482 for (unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.size(); iPXDDigit++) {
483
484 bool hasIntercept = false;
485 bool hasROI = false;
486 bool interceptRightVxdID = false;
487 bool MissingHit = true;
488
489 n_pxdDigit ++ ;
490 nDigitsPerTrack++;
491
492 PXDTrueHitFromPXDDigit PXDTrueHits = relDigitTrueHit.getElementsFrom(*pxdDigits_MCParticle[iPXDDigit]);
493 PXDTrueHitIteratorType thePXDTrueHitIterator = PXDTrueHits.begin();
494 PXDTrueHitIteratorType thePXDTrueHitIteratorEnd = PXDTrueHits.end();
495 tmpGlobalTime = 0;
496 tmpNGlobalTime = 0;
497
498 for (; thePXDTrueHitIterator != thePXDTrueHitIteratorEnd; thePXDTrueHitIterator++) {
499 tmpGlobalTime = tmpGlobalTime + thePXDTrueHitIterator->to->getGlobalTime();
500 tmpNGlobalTime++;
501 }
502 m_globalTime = tmpGlobalTime / tmpNGlobalTime;
503
504
505 m_Uidmc = pxdDigits_MCParticle[iPXDDigit]->getUCellID();
506 m_Vidmc = pxdDigits_MCParticle[iPXDDigit]->getVCellID();
507 m_vxdIDmc = pxdDigits_MCParticle[iPXDDigit]->getSensorID();
508
509 int u2 = -999;
510 int v2 = -999;
511 if (VxdID(m_vxdIDmc).getSensorNumber() == 2) { //BKW
512 u2 = m_Uidmc;
513 v2 = -(767 - m_Vidmc);
514 } else if (VxdID(m_vxdIDmc).getSensorNumber() == 1) { //FWD
515 u2 = m_Uidmc;
516 v2 = m_Vidmc;
517 }
518
520 const VXD::SensorInfoBase& aSensorInfo = aGeometry.getSensorInfo(m_vxdIDmc);
521
522 m_coorUmc = aSensorInfo.getUCellPosition(m_Uidmc); //pxdDigits_MCParticle[iPXDDigit]->getUCellPosition();
523 m_coorVmc = aSensorInfo.getVCellPosition(m_Vidmc); //pxdDigits_MCParticle[iPXDDigit]->getVCellPosition();
524
525 ROOT::Math::XYZVector local(m_coorUmc, m_coorVmc, 0);
526 ROOT::Math::XYZVector globalSensorPos = aSensorInfo.pointToGlobal(local, true);
527
528
529 if (m_pTmc > 1) npxdDigit[5]++;
530 if (m_pTmc <= 1 && m_pTmc > 0.5) npxdDigit[4]++;
531 if (m_pTmc <= 0.5 && m_pTmc > 0.3) npxdDigit[3]++;
532 if (m_pTmc <= 0.3 && m_pTmc > 0.2) npxdDigit[2]++;
533 if (m_pTmc <= 0.2 && m_pTmc > 0.1) npxdDigit[1]++;
534 if (m_pTmc <= 0.1) npxdDigit[0]++;
535
536
537 for (int i = 0; i < (int)recoTracks_MCParticle.size(); i++) { //loop on input RecoTracks
538
539 PXDInterceptsFromRecoTracks PXDIntercepts = recoTrackToPXDIntercept.getElementsFrom(recoTracks_MCParticle[i]);
540
541 PXDInterceptIteratorType thePXDInterceptIterator = PXDIntercepts.begin();
542 PXDInterceptIteratorType thePXDInterceptIteratorEnd = PXDIntercepts.end();
543
544
545 for (; thePXDInterceptIterator != thePXDInterceptIteratorEnd; thePXDInterceptIterator++) {
546
547 const PXDIntercept* theIntercept = thePXDInterceptIterator->to;
548
549 if (theIntercept) {
550
551 hasIntercept = true;
552
553 m_coorU = theIntercept->getCoorU();
554 m_coorV = theIntercept->getCoorV();
555 m_sigmaU = theIntercept->getSigmaU();
556 m_sigmaV = theIntercept->getSigmaV();
557 m_vxdID = theIntercept->getSensorID();
558
559 if (m_vxdID == m_vxdIDmc)
560 interceptRightVxdID = true;
561 else
562 continue;
563
564 const ROIid* theROIid = theIntercept->getRelatedTo<ROIid>(m_ROIListName);
565
566 if (theROIid) {
567
568 hasROI = true;
569
570 tmpArea = (theROIid->getMaxUid() - theROIid->getMinUid()) * (theROIid->getMaxVid() - theROIid->getMinVid());
571
572 if (theROIid->Contains(*(pxdDigits_MCParticle[iPXDDigit]))) { //CASO1
573
574 if (MissingHit) {
575 nDigitsInRoiPerTrack++;
576
578 m_h1PullU->Fill((m_coorU - m_coorUmc) / m_sigmaU);
579 m_h1PullV->Fill((m_coorV - m_coorVmc) / m_sigmaV);
585 m_h1SigmaU->Fill(m_sigmaU);
586 m_h1SigmaV->Fill(m_sigmaV);
587 m_h2Mapglob->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
588
589
590 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
591 m_h2MaplocL1->Fill(v2, u2);
592 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
593 m_h2MaplocL2->Fill(v2, u2);
594
595
596 m_h1okArea->Fill(tmpArea);
597 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
598 okArea_L1 = okArea_L1 + tmpArea;
599 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
600 okArea_L2 = okArea_L2 + tmpArea;
601
602
603 hasOneDigitInROI = true;
605
606 if (m_pTmc > 1) npxdDigitInROI[5]++;
607 if (m_pTmc <= 1 && m_pTmc > 0.5) npxdDigitInROI[4]++;
608 if (m_pTmc <= 0.5 && m_pTmc > 0.3) npxdDigitInROI[3]++;
609 if (m_pTmc <= 0.3 && m_pTmc > 0.2) npxdDigitInROI[2]++;
610 if (m_pTmc <= 0.2 && m_pTmc > 0.1) npxdDigitInROI[1]++;
611 if (m_pTmc <= 0.1) npxdDigitInROI[0]++;
612
613 MissingHit = false;
614 }
615
616
617 break; // To avoid double counting (intercepts)
618 } //if theROIid contains
619 } //if (theROIid)
620 } //if (theintercept)
621 } //(end loop on intercept list)
622
623 if (!MissingHit)
624 break;// To avoid double counting (recoTracks)
625
626 } //(end loop on recoTracks)
627
628
629 if (MissingHit) {
630
631 if (hasROI && hasIntercept && interceptRightVxdID) {
632 part_outsideROI = true;
633
634 n_notINdigit2 ++;
635
644 m_h2Mapglob_out2->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
645 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
646 m_h2MaplocL1_out2->Fill(v2, u2);
647 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
648 m_h2MaplocL2_out2->Fill(v2, u2);
649
650 if (m_pTmc > 1) nnotINdigit2[5]++;
651 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit2[4]++;
652 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit2[3]++;
653 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit2[2]++;
654 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit2[1]++;
655 if (m_pTmc <= 0.1) nnotINdigit2[0]++;
656
657 } else if (!hasROI && hasIntercept && interceptRightVxdID) {
658 part_noROI = true;
659
660 n_notINdigit3 ++;
661
670 m_h2Mapglob_out3->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
671 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
672 m_h2MaplocL1_out3->Fill(v2, u2);
673
674 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
675 m_h2MaplocL2_out3->Fill(v2, u2);
676
677
678 if (m_pTmc > 1) nnotINdigit3[5]++;
679 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit3[4]++;
680 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit3[3]++;
681 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit3[2]++;
682 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit3[1]++;
683 if (m_pTmc <= 0.1) nnotINdigit3[0]++;
684
685 } else if (hasIntercept && !interceptRightVxdID) {
686 part_wrongVxdID = true;
687
688 n_notINdigit4 ++;
689
695 m_h2Mapglob_out4->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
696 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
697 m_h2MaplocL1_out4->Fill(v2, u2);
698 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
699 m_h2MaplocL2_out4->Fill(v2, u2);
700
701 if (m_pTmc > 1) nnotINdigit4[5]++;
702 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit4[4]++;
703 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit4[3]++;
704 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit4[2]++;
705 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit4[1]++;
706 if (m_pTmc <= 0.1) nnotINdigit4[0]++;
707
708 } else if (!hasIntercept) {
709 part_noInter = true;
710
711 n_notINdigit5 ++;
712
714 m_h2Mapglob_out5->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
715 if (VxdID(m_vxdIDmc).getLayerNumber() == 1) //L1
716 m_h2MaplocL1_out5->Fill(v2, u2);
717 if (VxdID(m_vxdIDmc).getLayerNumber() == 2) //L2
718 m_h2MaplocL2_out5->Fill(v2, u2);
719
720 if (m_pTmc > 1) nnotINdigit5[5]++;
721 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit5[4]++;
722 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit5[3]++;
723 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit5[2]++;
724 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit5[1]++;
725 if (m_pTmc <= 0.1) nnotINdigit5[0]++;
726 }
727 }
728 } //end loop on digits
729
730 m_h1effPerTrack->Fill((float) nDigitsInRoiPerTrack / nDigitsPerTrack);
731 m_h1Track_pt->Fill(m_pTmc);
732 m_h1Track_phi->Fill(m_phimc);
735
736 if (hasOneDigitInROI) {
737 NtrackHit++;
738 if (m_pTmc > 1) TrackOneDigiIn[5]++;
739 if (m_pTmc <= 1 && m_pTmc > 0.5) TrackOneDigiIn[4]++;
740 if (m_pTmc <= 0.5 && m_pTmc > 0.3) TrackOneDigiIn[3]++;
741 if (m_pTmc <= 0.3 && m_pTmc > 0.2) TrackOneDigiIn[2]++;
742 if (m_pTmc <= 0.2 && m_pTmc > 0.1) TrackOneDigiIn[1]++;
743 if (m_pTmc <= 0.1) TrackOneDigiIn[0]++;
744
745 m_h1INtrack1_pt->Fill(m_pTmc);
749 } else if (part_outsideROI) { //CASO2
751 if (m_pTmc > 1) nnotINtrack2[5]++;
752 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack2[4]++;
753 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack2[3]++;
754 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack2[2]++;
755 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack2[1]++;
756 if (m_pTmc <= 0.1) nnotINtrack2[0]++;
757 } else if (part_noROI) { //CASO3
759 if (m_pTmc > 1) nnotINtrack3[5]++;
760 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack3[4]++;
761 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack3[3]++;
762 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack3[2]++;
763 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack3[1]++;
764 if (m_pTmc <= 0.1) nnotINtrack3[0]++;
765 } else if (part_wrongVxdID) { //CASO4
767 if (m_pTmc > 1) nnotINtrack4[5]++;
768 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack4[4]++;
769 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack4[3]++;
770 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack4[2]++;
771 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack4[1]++;
772 if (m_pTmc <= 0.1) nnotINtrack4[0]++;
773 } else if (part_noInter) { //CASO5
775 if (m_pTmc > 1) nnotINtrack5[5]++;
776 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack5[4]++;
777 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack5[3]++;
778 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack5[2]++;
779 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack5[1]++;
780 if (m_pTmc <= 0.1) nnotINtrack5[0]++;
781
782 n_NoInterceptTracks++;
787 }
788
789 } // close loop on MCParticlet
790
791
792 m_h1notINtrack5->Fill(n_NoInterceptTracks);
793 m_h1Track->Fill(Ntrack);
794 m_h1INtrack1->Fill(NtrackHit);
795
798
799 m_rootEvent++;
800 B2INFO(" o PXDROIFinder ANALYSIS: tot ROIs = " << m_ROIs.getEntries() << ", ok ROIs = " << nROIs);
801 B2INFO(" o : NtrackHit/Ntrack = " << NtrackHit << "/ " << Ntrack << " = " <<
802 (double)NtrackHit / Ntrack);
803 if (nROIs > m_ROIs.getEntries()) B2INFO(" HOUSTON WE HAVE A PROBLEM!");
804
805 m_h1okROIs->Fill(nROIs);
806 m_h1okROIfrac->Fill(1.*nROIs / m_ROIs.getEntries());
807
808}
809
810
812{
813
814 Double_t epsilon[6];
815 Double_t epsilonErr[6];
816 double epsilonTot = (double)n_pxdDigitInROI / (double) n_pxdDigit;
817 Double_t epsilon2[6];
818 Double_t epsilon2Err[6];
819 double epsilon2Tot = (double)n_tracksWithDigitsInROI / (double) n_tracksWithDigits;
820
821 for (int i = 0; i < 6; i++) {
822 m_h1digiOut2->SetBinContent(i + 1, nnotINdigit2[i]);
823 m_h1digiOut3->SetBinContent(i + 1, nnotINdigit3[i]);
824 m_h1digiOut4->SetBinContent(i + 1, nnotINdigit4[i]);
825 m_h1digiOut5->SetBinContent(i + 1, nnotINdigit5[i]);
826 m_h1digiIn->SetBinContent(i + 1, npxdDigitInROI[i]);
827 }
828
829 for (int i = 0; i < 6; i++) {
830 m_h1nnotINtrack2->SetBinContent(i + 1, nnotINtrack2[i]);
831 m_h1nnotINtrack3->SetBinContent(i + 1, nnotINtrack3[i]);
832 m_h1nnotINtrack4->SetBinContent(i + 1, nnotINtrack4[i]);
833 m_h1nnotINtrack5->SetBinContent(i + 1, nnotINtrack5[i]);
834 m_h1TrackOneDigiIn->SetBinContent(i + 1, TrackOneDigiIn[i]);
835 }
836
837 B2INFO(" ROI Analysis Summary ");
838 B2INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
839 B2INFO("");
840 B2INFO(" number of tracks = " << n_tracks);
841 B2INFO(" number of Intercepts = " << n_intercepts);
842 B2INFO(" number of ROIs = " << n_rois);
843 B2INFO("");
844 B2INFO(" average number of ROIs = " << m_h1totROIs->GetMean() << ", average area " << m_h1totArea->GetMean() <<
845 " (not excluding overlaps!)");
846 B2INFO(" average number of ROIs w digits = " << m_h1okROIs->GetMean() << ", average tot area " << m_h1okArea->GetMean());
847 B2INFO("");
848 B2INFO(" red Factor = " << m_h1redFactor->GetMean() << ", RMS = " << m_h1redFactor->GetRMS());
849 B2INFO("");
850 B2INFO("tracks w digits: " << n_tracksWithDigits);
851 B2INFO("tracks w digits in ROI: " << n_tracksWithDigitsInROI);
852 B2INFO("efficiency PTD : " << epsilon2Tot << " +/- " << sqrt(epsilon2Tot * (1 - epsilon2Tot) / n_tracksWithDigits));
853
854 Int_t totTrackOneDigiIn = 0; //not used for the moment, added to double check
855 Int_t totnnotINtrack2 = 0;
856 Int_t totnnotINtrack3 = 0;
857 Int_t totnnotINtrack4 = 0;
858 Int_t totnnotINtrack5 = 0;
859
860 Int_t totTrack[6];
861
862 for (int j = 0; j < m_h1TrackOneDigiIn->GetNbinsX(); j++) {
863 totTrackOneDigiIn = totTrackOneDigiIn + m_h1TrackOneDigiIn->GetBinContent(j + 1);
864 totnnotINtrack2 = totnnotINtrack2 + m_h1nnotINtrack2->GetBinContent(j + 1);
865 totnnotINtrack3 = totnnotINtrack3 + m_h1nnotINtrack3->GetBinContent(j + 1);
866 totnnotINtrack4 = totnnotINtrack4 + m_h1nnotINtrack4->GetBinContent(j + 1);
867 totnnotINtrack5 = totnnotINtrack5 + m_h1nnotINtrack5->GetBinContent(j + 1);
868
869 totTrack[j] = m_h1nnotINtrack5->GetBinContent(j + 1) + m_h1nnotINtrack4->GetBinContent(j + 1) + m_h1nnotINtrack3->GetBinContent(
870 j + 1) + m_h1nnotINtrack2->GetBinContent(j + 1) + m_h1TrackOneDigiIn->GetBinContent(j + 1);
871 }
872
873 B2INFO(" out ROI = " << totnnotINtrack2);
874 B2INFO(" no ROI = " << totnnotINtrack3);
875 B2INFO(" wrongVxdID = " << totnnotINtrack4);
876 B2INFO(" no Inter = " << totnnotINtrack5);
877 B2INFO("");
878
879 B2INFO(" pxdDigit : " << n_pxdDigit);
880 B2INFO(" pxdDigitIn : " << n_pxdDigitInROI);
881
882 B2INFO(" eff DGT: " << epsilonTot << " +/- " << sqrt(epsilonTot * (1 - epsilonTot) / n_pxdDigit));
883 B2INFO(" inefficiency (PXDDigits): ");
884 B2INFO(" out ROI: " << n_notINdigit2);
885 B2INFO(" no ROI: " << n_notINdigit3);
886 B2INFO(" wrongVxdID: " << n_notINdigit4);
887 B2INFO(" noInter: " << n_notINdigit5);
888 B2INFO("");
889
890
891 B2INFO(" pT > 1 : " << pt[5]);
892 B2INFO(" out ROI: " << nnotINdigit2[5]);
893 B2INFO(" no ROI: " << nnotINdigit3[5]);
894 B2INFO(" wrongVxdID: " << nnotINdigit4[5]);
895 B2INFO(" noInter: " << nnotINdigit5[5]);
896 B2INFO(" pxdDigit : " << npxdDigit[5]);
897 B2INFO(" pxdDigitIn : " << npxdDigitInROI[5]);
898 if ((npxdDigit[5] - npxdDigitInROI[5]) != (nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] + nnotINdigit5[5]))
899 B2INFO(" pxdDigitOut : " << npxdDigit[5] - npxdDigitInROI[5] << " != " << nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] +
900 nnotINdigit5[5]);
901 epsilon[5] = (double)npxdDigitInROI[5] / (double) npxdDigit[5];
902 epsilonErr[5] = sqrt(epsilon[5] * (1 - epsilon[5]) / npxdDigit[5]);
903 B2INFO(" efficiency : " << epsilon[5] << " +/- " << epsilonErr[5]);
904 epsilon2[5] = (double)TrackOneDigiIn[5] / (double) totTrack[5] ;
905 epsilon2Err[5] = sqrt(epsilon2[5] * (1 - epsilon2[5]) / totTrack[5]);
906 B2INFO(" efficiency2 : " << epsilon2[5] << " +/- " << epsilon2Err[5]);
907 B2INFO("");
908
909 B2INFO(" 0.5 < pT < 1 : " << pt[4]);
910 B2INFO(" out ROI: " << nnotINdigit2[4]);
911 B2INFO(" no ROI: " << nnotINdigit3[4]);
912 B2INFO(" wrongVxdID: " << nnotINdigit4[4]);
913 B2INFO(" noInter: " << nnotINdigit5[4]);
914 B2INFO(" pxdDigit : " << npxdDigit[4]);
915 B2INFO(" pxdDigitIn : " << npxdDigitInROI[4]);
916 if ((npxdDigit[4] - npxdDigitInROI[4]) != (nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] + nnotINdigit5[4]))
917 B2INFO(" pxdDigitOut : " << npxdDigit[4] - npxdDigitInROI[4] << " != " << nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] +
918 nnotINdigit5[4]);
919 epsilon[4] = (double)npxdDigitInROI[4] / (double) npxdDigit[4];
920 epsilonErr[4] = sqrt(epsilon[4] * (1 - epsilon[4]) / npxdDigit[4]);
921 B2INFO(" efficiency : " << epsilon[4] << " +/- " << epsilonErr[4]);
922 epsilon2[4] = (double)TrackOneDigiIn[4] / (double) totTrack[4] ;
923 epsilon2Err[4] = sqrt(epsilon2[4] * (1 - epsilon2[4]) / totTrack[4]);
924 B2INFO(" efficiency2 : " << epsilon2[4] << " +/- " << epsilon2Err[4]);
925
926 B2INFO("");
927 B2INFO(" 0.3 < pT < 0.5 : " << pt[3]);
928 B2INFO(" out ROI: " << nnotINdigit2[3]);
929 B2INFO(" no ROI: " << nnotINdigit3[3]);
930 B2INFO(" wrongVxdID: " << nnotINdigit4[3]);
931 B2INFO(" noInter: " << nnotINdigit5[3]);
932 B2INFO(" pxdDigit : " << npxdDigit[3]);
933 B2INFO(" pxdDigitIn : " << npxdDigitInROI[3]);
934 if ((npxdDigit[3] - npxdDigitInROI[3]) != (nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] + nnotINdigit5[3]))
935 B2INFO(" pxdDigitOut : " << npxdDigit[3] - npxdDigitInROI[3] << " != " << nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] +
936 nnotINdigit5[3]);
937 epsilon[3] = (double)npxdDigitInROI[3] / (double) npxdDigit[3];
938 epsilonErr[3] = sqrt(epsilon[3] * (1 - epsilon[3]) / npxdDigit[3]);
939 B2INFO(" efficiency : " << epsilon[3] << " +/- " << epsilonErr[3]);
940 epsilon2[3] = (double)TrackOneDigiIn[3] / (double) totTrack[3];
941 epsilon2Err[3] = sqrt(epsilon2[3] * (1 - epsilon2[3]) / totTrack[3]);
942 B2INFO(" efficiency2 : " << epsilon2[3] << " +/- " << epsilon2Err[3]);
943
944 B2INFO("");
945 B2INFO(" 0.2 < pT < 0.3 : " << pt[2]);
946 B2INFO(" out ROI: " << nnotINdigit2[2]);
947 B2INFO(" no ROI: " << nnotINdigit3[2]);
948 B2INFO(" wrongVxdID: " << nnotINdigit4[2]);
949 B2INFO(" noInter: " << nnotINdigit5[2]);
950 B2INFO(" pxdDigit : " << npxdDigit[2]);
951 B2INFO(" pxdDigitIn : " << npxdDigitInROI[2]);
952 if ((npxdDigit[2] - npxdDigitInROI[2]) != (nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] + nnotINdigit5[2]))
953 B2INFO(" pxdDigitOut : " << npxdDigit[2] - npxdDigitInROI[2] << " != " << nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] +
954 nnotINdigit5[2]);
955 epsilon[2] = (double)npxdDigitInROI[2] / (double) npxdDigit[2];
956 epsilonErr[2] = sqrt(epsilon[2] * (1 - epsilon[2]) / npxdDigit[2]);
957 B2INFO(" efficiency : " << epsilon[2] << " +/- " << epsilonErr[2]);
958 epsilon2[2] = (double)TrackOneDigiIn[2] / (double) totTrack[2] ;
959 epsilon2Err[2] = sqrt(epsilon2[2] * (1 - epsilon2[2]) / totTrack[2]);
960 B2INFO(" efficiency2 : " << epsilon2[2] << " +/- " << epsilon2Err[2]);
961
962 B2INFO("");
963 B2INFO(" 0.1 < pT < 0.2 : " << pt[1]);
964 B2INFO(" out ROI: " << nnotINdigit2[1]);
965 B2INFO(" no ROI: " << nnotINdigit3[1]);
966 B2INFO(" wrongVxdID: " << nnotINdigit4[1]);
967 B2INFO(" noInter: " << nnotINdigit5[1]);
968 B2INFO(" pxdDigit : " << npxdDigit[1]);
969 B2INFO(" pxdDigitIn : " << npxdDigitInROI[1]);
970 if ((npxdDigit[1] - npxdDigitInROI[1]) != (nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] + nnotINdigit5[1]))
971 B2INFO(" pxdDigitOut : " << npxdDigit[1] - npxdDigitInROI[1] << " ?=? " << nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] +
972 nnotINdigit5[1]);
973 epsilon[1] = (double)npxdDigitInROI[1] / (double) npxdDigit[1];
974 epsilonErr[1] = sqrt(epsilon[1] * (1 - epsilon[1]) / npxdDigit[1]);
975 B2INFO(" efficiency : " << epsilon[1] << " +/- " << epsilonErr[1]);
976 epsilon2[1] = (double)TrackOneDigiIn[1] / (double) totTrack[1] ;
977 epsilon2Err[1] = sqrt(epsilon2[1] * (1 - epsilon2[1]) / totTrack[1]);
978 B2INFO(" efficiency2 : " << epsilon2[1] << " +/- " << epsilon2Err[1]);
979
980 B2INFO("");
981 B2INFO(" pT < 0.1 : " << pt[0]);
982 B2INFO(" out ROI: " << nnotINdigit2[0]);
983 B2INFO(" no ROI: " << nnotINdigit3[0]);
984 B2INFO(" wrongVxdID: " << nnotINdigit4[0]);
985 B2INFO(" noInter: " << nnotINdigit5[0]);
986 B2INFO(" pxdDigit : " << npxdDigit[0]);
987 B2INFO(" pxdDigitIn : " << npxdDigitInROI[0]);
988 if ((npxdDigit[0] - npxdDigitInROI[0]) != (nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] + nnotINdigit5[0]))
989 B2INFO(" pxdDigitOut : " << npxdDigit[0] - npxdDigitInROI[0] << " ?=? " << nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] +
990 nnotINdigit5[0]);
991 epsilon[0] = (double)npxdDigitInROI[0] / (double) npxdDigit[0];
992 epsilonErr[0] = sqrt(epsilon[0] * (1 - epsilon[0]) / npxdDigit[0]);
993 B2INFO(" efficiency : " << epsilon[0] << " +/- " << epsilonErr[0]);
994 epsilon2[0] = (double)TrackOneDigiIn[0] / (double) totTrack[0] ;
995 epsilon2Err[0] = sqrt(epsilon2[0] * (1 - epsilon2[0]) / totTrack[0]);
996 B2INFO(" efficiency2 : " << epsilon2[0] << " +/- " << epsilon2Err[0]);
997
998 B2INFO("legend:");
999 B2INFO(" CASO2: if (ROI exists but no PXDDigit inside)");
1000 B2INFO(" CASO3: if (ROI does not exist, intercept with correct VxdID)");
1001 B2INFO(" CASO4: if (intercept with wrong VxdID)");
1002 B2INFO(" CASO5: if (intercept does not exist)");
1003
1004
1005 m_gEff2 = new TGraphErrors(6, pt, epsilon2, ptErr, epsilon2Err);
1006 m_gEff2->SetName("g_eff2");
1007 m_gEff2->SetTitle("Normalized to MCParticles with digits and related track");
1008 m_gEff = new TGraphErrors(6, pt, epsilon, ptErr, epsilonErr);
1009 m_gEff->SetName("g_eff");
1010 m_gEff->SetTitle("Normalized to digits of MCParticles with digits and related track");
1011
1012
1013
1014 if (m_rootFilePtr != nullptr) {
1015 m_rootFilePtr->cd(); //important! without this the famework root I/O (SimpleOutput etc) could mix with the root I/O of this module
1016
1017 TDirectory* oldDir = gDirectory;
1018 TDirectory* m_digiDir = oldDir->mkdir("digits");
1019 TDirectory* m_tracksDir = oldDir->mkdir("tracks");
1020 TDirectory* m_notINtrack5 = oldDir->mkdir("notINtrack5");
1021 TDirectory* m_INtrack1 = oldDir->mkdir("INtrack1");
1022 TDirectory* m_alltracks = oldDir->mkdir("alltracks");
1023 TDirectory* m_in = oldDir->mkdir("digi_in");
1024 TDirectory* m_out2 = oldDir->mkdir("digi_out2");
1025 TDirectory* m_out3 = oldDir->mkdir("digi_out3");
1026 TDirectory* m_out4 = oldDir->mkdir("digi_out4");
1027 TDirectory* m_out5 = oldDir->mkdir("digi_out5");
1028 TDirectory* m_ROIDir = oldDir->mkdir("roi");
1029
1030 m_h1DigitsPerParticle->Write();
1032
1033 m_gEff->Write();
1034 m_gEff2->Write();
1035 m_h1effPerTrack->Write();
1036
1037
1038 m_digiDir->cd();
1039 m_h1digiIn->Write();
1040 m_h1digiOut2->Write();
1041 m_h1digiOut3->Write();
1042 m_h1digiOut4->Write();
1043 m_h1digiOut5->Write();
1044
1045 m_tracksDir->cd();
1046 m_h1TrackOneDigiIn->Write();
1047 m_h1nnotINtrack2->Write();
1048 m_h1nnotINtrack3->Write();
1049 m_h1nnotINtrack4->Write();
1050 m_h1nnotINtrack5->Write();
1051
1052 m_notINtrack5->cd();
1053 m_h1notINtrack5->Write();
1054 m_h1notINtrack5_pt->Write();
1055 m_h1notINtrack5_phi->Write();
1056 m_h1notINtrack5_lambda->Write();
1057 m_h1notINtrack5_cosTheta->Write();
1058
1059 m_INtrack1->cd();
1060 m_h1INtrack1->Write();
1061 m_h1INtrack1_pt->Write();
1062 m_h1INtrack1_phi->Write();
1063 m_h1INtrack1_lambda->Write();
1064 m_h1INtrack1_cosTheta->Write();
1065
1066 m_alltracks->cd();
1067 m_h1Track->Write();
1068 m_h1Track_pt->Write();
1069 m_h1Track_phi->Write();
1070 m_h1Track_lambda->Write();
1071 m_h1Track_cosTheta->Write();
1072
1073 m_in->cd();
1074 m_h1GlobalTime->Write();
1075 m_h1PullU->Write();
1076 m_h1PullV->Write();
1077 m_h1ResidU->Write();
1078 m_h1ResidV->Write();
1079 m_h2ResidUV->Write();
1080 m_h1SigmaU->Write();
1081 m_h1SigmaV->Write();
1082 m_h2sigmaUphi->Write();
1083 m_h2sigmaVphi->Write();
1084 m_h2Mapglob->Write();
1085 m_h2MaplocL1->Write();
1086 m_h2MaplocL2->Write();
1087
1088 m_out2->cd();
1089 m_h1GlobalTime_out2->Write();
1090 m_h1ResidU_out2->Write();
1091 m_h1ResidV_out2->Write();
1092 m_h2ResidUV_out2->Write();
1093 m_h1SigmaU_out2->Write();
1094 m_h1SigmaV_out2->Write();
1095 m_h2sigmaUphi_out2->Write();
1096 m_h2sigmaVphi_out2->Write();
1097 m_h2Mapglob_out2->Write();
1098 m_h2MaplocL1_out2->Write();
1099 m_h2MaplocL2_out2->Write();
1100
1101 m_out3->cd();
1102 m_h1GlobalTime_out3->Write();
1103 m_h1ResidU_out3->Write();
1104 m_h1ResidV_out3->Write();
1105 m_h2ResidUV_out3->Write();
1106 m_h1SigmaU_out3->Write();
1107 m_h1SigmaV_out3->Write();
1108 m_h2sigmaUphi_out3->Write();
1109 m_h2sigmaVphi_out3->Write();
1110 m_h2Mapglob_out3->Write();
1111 m_h2MaplocL1_out3->Write();
1112 m_h2MaplocL2_out3->Write();
1113
1114 m_out4->cd();
1115 m_h1GlobalTime_out4->Write();
1116 m_h1SigmaU_out4->Write();
1117 m_h1SigmaV_out4->Write();
1118 m_h2sigmaUphi_out4->Write();
1119 m_h2sigmaVphi_out4->Write();
1120 m_h2Mapglob_out4->Write();
1121 m_h2MaplocL1_out4->Write();
1122 m_h2MaplocL2_out4->Write();
1123
1124 m_out5->cd();
1125 m_h1GlobalTime_out5->Write();
1126 m_h2Mapglob_out5->Write();
1127 m_h2MaplocL1_out5->Write();
1128 m_h2MaplocL2_out5->Write();
1129
1130 m_ROIDir->cd();
1131 m_h1totArea->Write();
1132 m_h1okArea->Write();
1133 m_h1okROIs->Write();
1134 m_h1okROIfrac->Write();
1135 m_h1totROIs->Write();
1136 m_h1redFactor->Write();
1137 m_h1redFactor_L1->Write();
1138 m_h1redFactor_L2->Write();
1139
1140
1141 m_h2ROIbottomLeft->Write();
1142 m_h2ROItopRight->Write();
1143 m_h2ROIuMinMax->Write();
1144 m_h2ROIvMinMax->Write();
1145 m_rootFilePtr->Close();
1146
1147 }
1148
1149}
1150
static std::string relationName(const std::string &fromName, const std::string &toName, std::string const &namedRelation="")
Return storage name for a relation between two arrays of the given names.
Definition: DataStore.h:180
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
ROOT::Math::XYZVector getMomentum() const
Return momentum.
Definition: MCParticle.h:198
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
The PXD digit class.
Definition: PXDDigit.h:27
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
Definition: PXDIntercept.h:22
unsigned int n_pxdDigit
number of pxd digits
unsigned int nnotINtrack3[6]
number of tracks in bins of pt: no hit, wrong vxdID
TH1F * m_h1SigmaU_out4
distribution of sigmaU for PXDDigits not contained in a ROI
TGraphErrors * m_gEff
efficiency graph
TH1F * m_h1GlobalTime_out3
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1GlobalTime_out4
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_nCDChits
denominator track pVal
TH1F * m_h1ResidU_out2
distribution of U resid for PXDDigits not contained in a ROI
void initialize() override final
Initializes the Module.
TH1F * m_h1INtrack1
track with no intercept
Int_t m_nSensorsL2
number of sensors on L2
unsigned int n_pxdDigitInROI
number of pxd digits in ROIs
TH1F * m_h1nnotINtrack2
tracks with lost digit: ROI exist with right vxdID
TH2F * m_h2sigmaVphi_out2
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1SigmaV_out4
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1redFactor_L1
distribution of number of ROIsreduction factor
TH2F * m_h2ResidUV_out3
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1ResidV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1nnotINtrack3
lost digit: ROI exist with wrong vxdID
TH1F * m_h1nnotINtrack5
lost digit: ROI does not exist, intercept with wrong vxdID
Int_t m_nSensorsL1
number of sensors on L1
TH1F * m_h1nnotINtrack4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int n_notINdigit2
number of lost digits: no hit, correct vxdID
Double_t ptErr[6]
bin widths (transverse momentum)
unsigned int n_notINtrack4
number of tracks with no ROI (intercept with correct vxdID)
double m_coorUmc
true intercept U coordinate
unsigned int n_intercepts
number of PXDIntercepts
TH1F * m_h1redFactor_L2
distribution of number of ROIsreduction factor
TH1F * m_h1INtrack1_nCDChits
denominator track pVal
std::string m_recoTrackListName
RecoTrack list name.
TH1F * m_h1INtrack1_pt
track with no intercept pT
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
TH1F * m_h1INtrack1_lambda
track with no intercept lambda
TH1F * m_h1SigmaV_out3
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1redFactor
distribution of number of ROIsreduction factor
unsigned int nnotINtrack2[6]
number of tracks in bins of pt: no hit, correct vxdID
TH1F * m_h1INtrack1_phi
track with no intercept phi
TH1F * m_h1PullV
distribution of V pulls for PDXDigits contained in a ROI
TH1F * m_h1ResidV_out2
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1Track_pVal
denominator track pVal
TH1F * m_h1PullU
distribution of U pulls for PDXDigits contained in a ROI
TH1F * m_h1okROIs
distribution of number of ROIs containing a PXDDigit
TH1F * m_h1Track_cosTheta
denominator track cosTheta
TH1F * m_h1INtrack1_nSVDhits
denominator track pVal
std::string m_PXDInterceptListName
Intercept list name.
unsigned int nnotINdigit3[6]
number of lost digits in bins of pt: no hit, wrong vxdID
unsigned int nnotINtrack4[6]
number of tracks in bins of pt: no ROI, intercepts with correct vxdID
unsigned int n_notINtrack2
number of tracks with no digits in ROI (correct vxdID)
TH1F * m_h1notINtrack5_phi
track with no intercept phi
unsigned int n_notINdigit3
number of lost digits: no hit, wrong vxdID
TH1F * m_h1Track_nCDChits
denominator track pVal
TH1F * m_h1digiOut5
lost digit: ROI does not exist, intercept with wrong vxdID
TH2F * m_h2ResidUV_out2
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1Track_lambda
denominator track lambda
unsigned int nnotINdigit4[6]
number of lost digits in bins of pt: no ROI, intercepts with correct vxdID
unsigned int nnotINdigit2[6]
number of lost digits in bins of pt: no hit, correct vxdID
TH1F * m_h1notINtrack5_lambda
track with no intercept lambda
unsigned int npxdDigit[6]
number of pxd digits in bins of pt
TGraphErrors * m_gEff2
efficiency graph
TH1F * m_h1totROIs
distribution of number of all ROIs
TH1F * m_h1TrackOneDigiIn
tracks with at least digit contained in ROI
TH2F * m_h2sigmaUphi_out2
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1ResidU_out3
distribution of U resid for PXDDigits not contained in a ROI
TH1F * m_h1okROIfrac
distribution of number of ROIsreduction factor
TH1F * m_h1digiOut4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int nnotINtrack5[6]
number of tracks in bins of pt: no ROI, intercepts with wrong vxdID
unsigned int n_notINdigit5
number of lost digits: no ROI, intercepts with wrong vxdID
TH1F * m_h1GlobalTime
distribution of global time for PDXDigits contained in a ROI
TH2F * m_h2ROItopRight
u,v coordinates of the top right pixel
unsigned int NtrackHit
number of tracks with hits
TH1F * m_h1SigmaU_out2
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1notINtrack5_pVal
denominator track pVal
TH1F * m_h1effPerTrack
fraction of digits in ROI per track
void terminate() override final
Termination action.
TH1F * m_h1SigmaV
distribution of sigmaV for PXDDigits contained in a ROI
TH1F * m_h1digiOut2
lost digit: ROI exist with right vxdID
TH1F * m_h1GlobalTime_out2
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1INtrack1_cosTheta
track with no intercept costheta
unsigned int n_tracksWithDigitsInROI
number of tracks with digits in ROI
TH2F * m_h2sigmaUphi_out4
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1RecoTracksPerParticle
number of RecoTracks per particle
TH1F * m_h1SigmaU
distribution of sigmaU for PXDDigits contained in a ROI
void event() override final
This method is called for each event.
TH1F * m_h1GlobalTime_out5
distribution of global time for PDXDigits not contained in a ROI
unsigned int Ntrack
number of tracks with pxd digits
unsigned int n_notINtrack5
number of tracks with no ROI (intercept with wrong vxdID)
TH1F * m_h1ResidV_out3
distribution of V resid for PXDDigits not contained in a ROI
unsigned int nnotINdigit5[6]
number of lost digits in bins of pt: no ROI, intercepts with wrong vxdID
unsigned int n_tracksWithDigits
number of tracks with digits
TH1F * m_h1Track_nSVDhits
denominator track pVal
unsigned int n_notINdigit4
number of lost digits: no ROI, intercepts with correct vxdID
TH1F * m_h1ResidU
distribution of U resid for PXDDigits contained in a ROI
TH2F * m_h2ResidUV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1notINtrack5_nSVDhits
denominator track pVal
double m_lambdamc
true lambda = pi/2 - theta
TH1F * m_h1INtrack1_pVal
denominator track pVal
TH2F * m_h2sigmaVphi_out3
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_pt
track with no intercept pT
TH2F * m_h2sigmaVphi_out4
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
double m_coorVmc
true intercept V coordinate
Double_t pt[6]
bin edges (in pt = transverse momentum)
TH1F * m_h1okArea
distribution of Area of ROIs containing a PXDDigit
unsigned int npxdDigitInROI[6]
number of pxd digits inside ROI in bins of pt
TH1F * m_h1notINtrack5
track with no intercept
StoreArray< PXDIntercept > m_PXDIntercepts
PXDIntercept StoreArray.
TH2F * m_h2sigmaUphi
distribution of sigmaU VS phi for PDXDigits contained in a ROI
TH2F * m_h2ROIbottomLeft
u,v coordinates of the bottom left pixel
TH1F * m_h1digiIn
digits contained in ROI histogram
TH2F * m_h2ROIvMinMax
v-coordinate Min vs Max
TH1F * m_h1SigmaV_out2
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1DigitsPerParticle
number of digits per particle
StoreArray< RecoTrack > m_recoTracks
RecoTrack StoreArray.
void beginRun() override final
Called when entering a new run.
TH1F * m_h1totArea
distribution of Area of all ROIs
TH2F * m_h2sigmaVphi
distribution of sigmaV VS phi for PDXDigits contained in a ROI
TH2F * m_h2sigmaUphi_out3
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TFile * m_rootFilePtr
pointer at root file used for storing infos for debugging and validating purposes
unsigned int TrackOneDigiIn[6]
number of tracks with one digit inside ROI in bins of pt
TH2F * m_h2ROIuMinMax
u-coordinate Min vs Max
StoreArray< MCParticle > m_MCParticles
MCParticle StoreArray.
unsigned int n_notINtrack3
number of tracks with no digits in ROI (wrong vxdID)
PXDROIFinderAnalysisModule()
Constructor of the module.
TH1F * m_h1SigmaU_out3
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1digiOut3
lost digit: ROI exist with wrong vxdID
StoreArray< ROIid > m_ROIs
ROIid StoreArray.
TH1F * m_h1notINtrack5_cosTheta
track with no intercept costheta
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:25
bool Contains(const PXDRawHit &thePXDRawHit) const
true if the ROI contains the thePXDRawHit
Definition: ROIid.cc:25
int getMaxVid() const
return the maximum V id of the ROI
Definition: ROIid.h:47
int getMinVid() const
return the minimum V id of the ROI
Definition: ROIid.h:46
int getMinUid() const
return the minimum U id of the ROI
Definition: ROIid.h:44
int getMaxUid() const
return the maximum U id of the ROI
Definition: ROIid.h:45
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
index_from::const_iterator iterator_from
Element iterator of the from side index.
Definition: RelationIndex.h:95
range_from getElementsFrom(const FROM *from) const
Return a range of all elements pointing from the given object.
boost::iterator_range< iterator_from > range_from
Iterator range [first,second) of the from side.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
double getSigmaV() const
return the statistical error on the V coordinate of the intercept
Definition: VXDIntercept.h:62
double getCoorV() const
return the V coordinate of the intercept
Definition: VXDIntercept.h:60
double getSigmaU() const
return the statistical error on the U coordinate of the intercept
Definition: VXDIntercept.h:61
VxdID::baseType getSensorID() const
return the sensor ID
Definition: VXDIntercept.h:68
double getCoorU() const
return the U coordinate of the intercept
Definition: VXDIntercept.h:59
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
Definition: GeoCache.cc:176
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
Definition: GeoCache.cc:204
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Definition: GeoCache.cc:193
Base class to provide Sensor Information for PXD and SVD.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:100
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.