9 #include <tracking/modules/svdROIFinder/SVDROIFinderAnalysisModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <framework/datastore/RelationIndex.h>
12 #include <framework/logging/Logger.h>
14 #include <svd/dataobjects/SVDShaperDigit.h>
15 #include <svd/dataobjects/SVDTrueHit.h>
18 #include <vxd/geometry/GeoCache.h>
35 , m_recoTrackListName()
36 , m_SVDInterceptListName()
38 , m_rootFilePtr(nullptr)
40 , m_writeToRoot(false)
45 , m_h1DigitsPerParticle(nullptr)
46 , m_h1RecoTracksPerParticle(nullptr)
48 , m_h1digiOut2(nullptr)
49 , m_h1digiOut3(nullptr)
50 , m_h1digiOut4(nullptr)
51 , m_h1digiOut5(nullptr)
53 , m_h1TrackOneDigiIn(nullptr)
54 , m_h1nnotINtrack2(nullptr)
55 , m_h1nnotINtrack3(nullptr)
56 , m_h1nnotINtrack4(nullptr)
57 , m_h1nnotINtrack5(nullptr)
60 , m_h1Track_pt(nullptr)
61 , m_h1Track_phi(nullptr)
62 , m_h1Track_lambda(nullptr)
63 , m_h1Track_cosTheta(nullptr)
64 , m_h1Track_pVal(nullptr)
65 , m_h1Track_nSVDhits(nullptr)
66 , m_h1Track_nCDChits(nullptr)
68 , m_h1INtrack1(nullptr)
69 , m_h1INtrack1_pt(nullptr)
70 , m_h1INtrack1_phi(nullptr)
71 , m_h1INtrack1_lambda(nullptr)
72 , m_h1INtrack1_cosTheta(nullptr)
73 , m_h1INtrack1_pVal(nullptr)
74 , m_h1INtrack1_nSVDhits(nullptr)
75 , m_h1INtrack1_nCDChits(nullptr)
77 , m_h1notINtrack5(nullptr)
78 , m_h1notINtrack5_pt(nullptr)
79 , m_h1notINtrack5_phi(nullptr)
80 , m_h1notINtrack5_lambda(nullptr)
81 , m_h1notINtrack5_cosTheta(nullptr)
82 , m_h1notINtrack5_pVal(nullptr)
83 , m_h1notINtrack5_nSVDhits(nullptr)
84 , m_h1notINtrack5_nCDChits(nullptr)
88 , m_h2sigmaUphi(nullptr)
89 , m_h2sigmaVphi(nullptr)
94 , m_h1GlobalTime(nullptr)
96 , m_h2sigmaUphi_out2(nullptr)
97 , m_h2sigmaVphi_out2(nullptr)
98 , m_h1ResidU_out2(nullptr)
99 , m_h1ResidV_out2(nullptr)
100 , m_h1SigmaU_out2(nullptr)
101 , m_h1SigmaV_out2(nullptr)
102 , m_h1GlobalTime_out2(nullptr)
104 , m_h2sigmaUphi_out3(nullptr)
105 , m_h2sigmaVphi_out3(nullptr)
106 , m_h1ResidU_out3(nullptr)
107 , m_h1ResidV_out3(nullptr)
108 , m_h1SigmaU_out3(nullptr)
109 , m_h1SigmaV_out3(nullptr)
110 , m_h1GlobalTime_out3(nullptr)
112 , m_h2sigmaUphi_out4(nullptr)
113 , m_h2sigmaVphi_out4(nullptr)
114 , m_h1SigmaU_out4(nullptr)
115 , m_h1SigmaV_out4(nullptr)
116 , m_h1GlobalTime_out4(nullptr)
118 , m_h1GlobalTime_out5(nullptr)
121 , m_h2ROIbottomLeft(nullptr)
122 , m_h2ROItopRight(nullptr)
123 , m_h2ROIuMinMax(nullptr)
124 , m_h2ROIvMinMax(nullptr)
125 , m_h1totROIs(nullptr)
126 , m_h1okROIs(nullptr)
127 , m_h1totUstrips(nullptr)
128 , m_h1totVstrips(nullptr)
130 , m_h1effPerTrack(nullptr)
164 , n_tracksWithDigits(0)
165 , n_tracksWithDigitsInROI(0)
190 setDescription(
"This module performs the analysis of the SVDROIFinder module output");
193 "set true if you want to evaluate efficiency on simulation",
bool(
true));
195 "set true if you want to save the informations in a root file named by parameter 'rootFileName'",
bool(
true));
198 "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
199 std::string(
"svdDataRedAnalysis"));
202 "name of the input collection of RecoTracks", std::string(
""));
205 "name of the input collection of SVDShaperDigits", std::string(
""));
208 "name of the list of interceptions", std::string(
""));
211 "name of the list of ROIs", std::string(
""));
246 for (
int i = 0; i < 6; i++) {
258 m_h1GlobalTime =
new TH1F(
"hGlobalTime",
"global time for SVDShaperDigits contained in ROI", 200, -100, 100);
259 m_h1PullU =
new TH1F(
"hPullU",
"U pulls for SVDShaperDigits contained in ROI", 100, -6, 6);
260 m_h1PullV =
new TH1F(
"hPullV",
"V pulls for SVDShaperDigits contained in ROI", 100, -6, 6);
261 m_h2sigmaUphi =
new TH2F(
"hsigmaUvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.35);
262 m_h2sigmaVphi =
new TH2F(
"hsigmaVvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.4);
263 m_h1ResidU =
new TH1F(
"hResidU",
"U resid for SVDShaperDigits contained in ROI", 100, -0.5, 0.5);
264 m_h1ResidV =
new TH1F(
"hResidV",
"V resid for SVDShaperDigits contained in ROI", 100, -0.5, 0.5);
265 m_h1SigmaU =
new TH1F(
"hSigmaU",
"sigmaU for SVDShaperDigits contained in ROI", 100, 0, 0.35);
266 m_h1SigmaV =
new TH1F(
"hSigmaV",
"sigmaV for SVDShaperDigits contained in ROI", 100, 0, 0.35);
269 m_h1GlobalTime_out2 =
new TH1F(
"hGlobalTime_out2",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
270 m_h2sigmaUphi_out2 =
new TH2F(
"hsigmaUvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
271 m_h2sigmaVphi_out2 =
new TH2F(
"hsigmaVvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
272 m_h1ResidU_out2 =
new TH1F(
"hResidU_out2",
"U resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
273 m_h1ResidV_out2 =
new TH1F(
"hResidV_out2",
"V resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
274 m_h1SigmaU_out2 =
new TH1F(
"hSigmaU_out2",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
275 m_h1SigmaV_out2 =
new TH1F(
"hSigmaV_out2",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
277 m_h1GlobalTime_out3 =
new TH1F(
"hGlobalTime_out3",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
278 m_h2sigmaUphi_out3 =
new TH2F(
"hsigmaUvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
279 m_h2sigmaVphi_out3 =
new TH2F(
"hsigmaVvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
280 m_h1ResidU_out3 =
new TH1F(
"hResidU_out3",
"U resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
281 m_h1ResidV_out3 =
new TH1F(
"hResidV_out3",
"V resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
282 m_h1SigmaU_out3 =
new TH1F(
"hSigmaU_out3",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
283 m_h1SigmaV_out3 =
new TH1F(
"hSigmaV_out3",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
286 m_h1GlobalTime_out4 =
new TH1F(
"hGlobalTime_out4",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
287 m_h2sigmaUphi_out4 =
new TH2F(
"hsigmaUvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
288 m_h2sigmaVphi_out4 =
new TH2F(
"hsigmaVvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
289 m_h1SigmaU_out4 =
new TH1F(
"hSigmaU_out4",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
290 m_h1SigmaV_out4 =
new TH1F(
"hSigmaV_out4",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
293 m_h1GlobalTime_out5 =
new TH1F(
"hGlobalTime_out5",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
297 m_h1totROIs =
new TH1F(
"h1TotNROIs",
"number of all ROIs", 110, 0, 110);
298 m_h1okROIs =
new TH1F(
"h1OkNROIs",
"number of all ROIs containing a SVDShaperDigit", 110, 0, 110);
300 m_h1totUstrips =
new TH1F(
"h1TotUstrips",
"number of U strips in ROIs", 100, 0, 250000);
301 m_h1totVstrips =
new TH1F(
"h1TotVstrips",
"number of V strips in ROIs", 100, 0, 250000);
303 m_h1effPerTrack =
new TH1F(
"heffPerTrack",
"fraction of digits in ROI per track", 100, -0.02, 1.02);
307 m_h2ROIbottomLeft =
new TH2F(
"h2ROIbottomLeft",
"u,v ID of the bottom left pixel", 650, -200, 450, 1300, -300, 1000);
308 m_h2ROItopRight =
new TH2F(
"h2ROItopRight",
"u,v ID of the top right pixel", 650, -200, 450, 1300, -300, 1000);
310 m_h2ROIuMinMax =
new TH2F(
"h2ROIuMinMax",
"u Min vs Max", 650, -200, 450, 650, -200, 450);
311 m_h2ROIvMinMax =
new TH2F(
"h2ROIvMinMax",
"v Min vs Max", 1300, -300, 1000, 1300, -300, 1000);
314 m_h1DigitsPerParticle =
new TH1F(
"h1DigitsPerPart",
"Number of SVDShaperDigits per Particle", 50, 0, 50);
319 Double_t lowBin[6 + 1];
320 for (
int i = 0; i < 6; i++)
324 m_h1TrackOneDigiIn =
new TH1F(
"hTracksDigiIn",
"Tracks with at least one digit contained in a ROI", 6, lowBin);
325 m_h1nnotINtrack2 =
new TH1F(
"h1outROITrack",
"Tracks with ROI with correct VxdID but no digits inside ROI", 6, lowBin);
326 m_h1nnotINtrack3 =
new TH1F(
"h1noROITrack",
"Tracks with ROI with wrong VxdID but no digits inside ROI", 6, lowBin);
327 m_h1nnotINtrack4 =
new TH1F(
"h1wrongVxdIDTrack",
"Tracks with no ROI, Intercept with correct VxdID", 6, lowBin);
328 m_h1nnotINtrack5 =
new TH1F(
"h1noInterTrack",
"Tracks with no Intercept matching a VxdID of digits", 6, lowBin);
330 m_h1notINtrack5 =
new TH1F(
"hNoInterTrack",
"track with no intercepts", 20, 0, 20);
331 m_h1notINtrack5_pt =
new TH1F(
"hNoInterTrack_pT",
"track with no intercepts", 100, 0, 6);
339 m_h1INtrack1 =
new TH1F(
"hINTrack",
"track with at least one digit inside ROI", 20, 0, 20);
340 m_h1INtrack1_pt =
new TH1F(
"hINTrack_pT",
"track with at least one digit inside ROI", 100, 0, 6);
341 m_h1INtrack1_phi =
new TH1F(
"h1INTrack_phi",
"hINTrack_phi", 100, -180, 180);
344 m_h1INtrack1_pVal =
new TH1F(
"h1INTrack_pVal",
"track with no intercepts", 100, 0, 1);
348 m_h1Track =
new TH1F(
"hTrack",
"all tracks", 20, 0, 20);
349 m_h1Track_pt =
new TH1F(
"hTrack_pT",
"all tracks with digits", 100, 0, 6);
350 m_h1Track_lambda =
new TH1F(
"h1Track_lambda",
"hTrack_lambda", 100, -180, 180);
351 m_h1Track_phi =
new TH1F(
"h1Track_phi",
"hTrack_phi", 100, -180, 180);
353 m_h1Track_pVal =
new TH1F(
"h1Track_pVal",
"track with no intercepts", 100, 0, 1);
354 m_h1Track_nSVDhits =
new TH1F(
"h1Track_nSVDhits",
"track with no intercepts", 50, 0, 50);
355 m_h1Track_nCDChits =
new TH1F(
"h1Track_nCDChits",
"track with no intercepts", 100, 0, 100);
357 m_h1digiIn =
new TH1F(
"hdigiIn",
"digits inside ROI", 6, lowBin);
358 m_h1digiOut2 =
new TH1F(
"hdigiOut2",
"ROI exists with with correct VxdID but no digits inside ROI", 6, lowBin);
359 m_h1digiOut3 =
new TH1F(
"hdigiOut3",
"ROI exists with with wrong VxdID", 6, lowBin);
360 m_h1digiOut4 =
new TH1F(
"hdigiOut4",
"ROI does not exist, but intercept has correct VxdID", 6, lowBin);
361 m_h1digiOut5 =
new TH1F(
"hdigiOut5",
"no ROI, no Intercpets with correct VXDid", 6, lowBin);
385 DataStore::arrayName<SVDTrueHit>(
"")));
389 double tmpGlobalTime;
395 B2DEBUG(21,
" ++++++++++++++ SVDROIFinderAnalysisModule");
402 for (
int i = 0; i < (int)
m_ROIs.getEntries(); i++) {
409 for (
int s = 0; s <
m_shapers.getEntries(); s++) {
428 for (
unsigned int iSVDShaperDigit = 0; iSVDShaperDigit < svdDigits_MCParticle.
size(); iSVDShaperDigit++)
429 if (
m_ROIs[i]->Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
446 Int_t n_NoInterceptTracks = 0;
458 if (svdDigits_MCParticle.
size() == 0)
467 B2DEBUG(21,
"Number of RecoTracks = " << recoTracks_MCParticle.size() <<
" and SVDShaperDigits = " << svdDigits_MCParticle.
size() <<
468 " related to this MCParticle");
481 bool part_outsideROI =
false;
482 bool part_noROI =
false;
483 bool part_wrongVxdID =
false;
484 bool part_noInter =
false;
485 bool hasOneDigitInROI =
false;
487 Int_t nDigitsInRoiPerTrack = 0;
488 Int_t nDigitsPerTrack = 0;
491 for (
unsigned int iSVDShaperDigit = 0; iSVDShaperDigit < svdDigits_MCParticle.
size(); iSVDShaperDigit++) {
493 bool isU = svdDigits_MCParticle[iSVDShaperDigit]->isUStrip();
495 bool hasIntercept =
false;
497 bool interceptRightVxdID =
false;
498 bool MissingHit =
true;
503 SVDTrueHitFromSVDShaperDigit SVDTrueHits = relDigitTrueHit.
getElementsFrom(*svdDigits_MCParticle[iSVDShaperDigit]);
504 SVDTrueHitIteratorType theSVDTrueHitIterator = SVDTrueHits.begin();
505 SVDTrueHitIteratorType theSVDTrueHitIteratorEnd = SVDTrueHits.end();
509 for (; theSVDTrueHitIterator != theSVDTrueHitIteratorEnd; theSVDTrueHitIterator++) {
510 tmpGlobalTime = tmpGlobalTime + theSVDTrueHitIterator->to->getGlobalTime();
515 m_idmc = svdDigits_MCParticle[iSVDShaperDigit]->getCellID();
516 m_vxdIDmc = svdDigits_MCParticle[iSVDShaperDigit]->getSensorID();
527 if (m_pTmc <= 1 && m_pTmc > 0.5)
nsvdDigit[4]++;
528 if (m_pTmc <= 0.5 && m_pTmc > 0.3)
nsvdDigit[3]++;
529 if (m_pTmc <= 0.3 && m_pTmc > 0.2)
nsvdDigit[2]++;
530 if (m_pTmc <= 0.2 && m_pTmc > 0.1)
nsvdDigit[1]++;
540 SVDInterceptIteratorType theSVDInterceptIterator = SVDIntercepts.begin();
541 SVDInterceptIteratorType theSVDInterceptIteratorEnd = SVDIntercepts.end();
544 for (; theSVDInterceptIterator != theSVDInterceptIteratorEnd; theSVDInterceptIterator++) {
546 const SVDIntercept* theIntercept = theSVDInterceptIterator->to;
559 interceptRightVxdID =
true;
569 if (theROIid->
Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
572 nDigitsInRoiPerTrack++;
588 hasOneDigitInROI =
true;
616 if (hasROI && hasIntercept && interceptRightVxdID) {
617 part_outsideROI =
true;
639 }
else if (!hasROI && hasIntercept && interceptRightVxdID) {
662 }
else if (hasIntercept && !interceptRightVxdID) {
663 part_wrongVxdID =
true;
683 }
else if (!hasIntercept) {
706 if (hasOneDigitInROI) {
719 }
else if (part_outsideROI) {
727 }
else if (part_noROI) {
735 }
else if (part_wrongVxdID) {
743 }
else if (part_noInter) {
752 n_NoInterceptTracks++;
771 B2RESULT(
" o SVDROIFinder ANALYSIS: tot ROIs = " <<
m_ROIs.getEntries() <<
", ok ROIs = " << nROIs);
772 B2RESULT(
" o : NtrackHit/Ntrack = " <<
NtrackHit <<
"/ " <<
Ntrack <<
" = " <<
774 for (
int i = 0; i <
m_ROIs.getEntries(); i++) {
776 B2RESULT(i <<
" ROI " << sensor.getLadderNumber() <<
"." << sensor.getLayerNumber() <<
"." << sensor.getSensorNumber() <<
777 ": " <<
m_ROIs[i]->getMinUid() <<
", " <<
m_ROIs[i]->getMinVid() <<
", " <<
m_ROIs[i]->getMaxUid() <<
", " <<
781 if (nROIs >
m_ROIs.getEntries()) B2RESULT(
" HOUSTON WE HAVE A PROBLEM!");
797 Double_t epsilonErr[6];
799 Double_t epsilon2[6];
800 Double_t epsilon2Err[6];
803 for (
int i = 0; i < 6; i++) {
811 for (
int i = 0; i < 6; i++) {
819 B2RESULT(
" ROI Analysis Summary ");
820 B2RESULT(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
822 B2RESULT(
" number of tracks = " <<
n_tracks);
824 B2RESULT(
" number of ROIs = " <<
n_rois);
826 B2RESULT(
" number of GOOD ROIs = " <<
n_OKrois);
828 B2RESULT(
" average number of ROIs = " <<
m_h1totROIs->GetMean());
830 B2RESULT(
" average number of ROIs w digits = " <<
m_h1okROIs->GetMean());
836 B2RESULT(
"efficiency PTD : " << epsilon2Tot <<
" +/- " <<
sqrt(epsilon2Tot * (1 - epsilon2Tot) /
n_tracksWithDigits));
838 Int_t totTrackOneDigiIn = 0;
839 Int_t totnnotINtrack2 = 0;
840 Int_t totnnotINtrack3 = 0;
841 Int_t totnnotINtrack4 = 0;
842 Int_t totnnotINtrack5 = 0;
857 B2RESULT(
" out ROI = " << totnnotINtrack2);
858 B2RESULT(
" no ROI = " << totnnotINtrack3);
859 B2RESULT(
" wrongVxdID = " << totnnotINtrack4);
860 B2RESULT(
" no Inter = " << totnnotINtrack5);
866 B2RESULT(
" eff DGT: " << epsilonTot <<
" +/- " <<
sqrt(epsilonTot * (1 - epsilonTot) /
n_svdDigit));
867 B2RESULT(
" inefficiency (SVDShaperDigits): ");
875 B2RESULT(
" pT > 1 : " <<
pt[5]);
880 B2RESULT(
" svdDigit : " <<
nsvdDigit[5]);
886 epsilonErr[5] =
sqrt(epsilon[5] * (1 - epsilon[5]) /
nsvdDigit[5]);
887 B2RESULT(
" efficiency : " << epsilon[5] <<
" +/- " << epsilonErr[5]);
889 epsilon2Err[5] =
sqrt(epsilon2[5] * (1 - epsilon2[5]) / totTrack[5]);
890 B2RESULT(
" efficiency2 : " << epsilon2[5] <<
" +/- " << epsilon2Err[5]);
893 B2RESULT(
" 0.5 < pT < 1 : " <<
pt[4]);
898 B2RESULT(
" svdDigit : " <<
nsvdDigit[4]);
904 epsilonErr[4] =
sqrt(epsilon[4] * (1 - epsilon[4]) /
nsvdDigit[4]);
905 B2RESULT(
" efficiency : " << epsilon[4] <<
" +/- " << epsilonErr[4]);
907 epsilon2Err[4] =
sqrt(epsilon2[4] * (1 - epsilon2[4]) / totTrack[4]);
908 B2RESULT(
" efficiency2 : " << epsilon2[4] <<
" +/- " << epsilon2Err[4]);
911 B2RESULT(
" 0.3 < pT < 0.5 : " <<
pt[3]);
916 B2RESULT(
" svdDigit : " <<
nsvdDigit[3]);
922 epsilonErr[3] =
sqrt(epsilon[3] * (1 - epsilon[3]) /
nsvdDigit[3]);
923 B2RESULT(
" efficiency : " << epsilon[3] <<
" +/- " << epsilonErr[3]);
925 epsilon2Err[3] =
sqrt(epsilon2[3] * (1 - epsilon2[3]) / totTrack[3]);
926 B2RESULT(
" efficiency2 : " << epsilon2[3] <<
" +/- " << epsilon2Err[3]);
929 B2RESULT(
" 0.2 < pT < 0.3 : " <<
pt[2]);
934 B2RESULT(
" svdDigit : " <<
nsvdDigit[2]);
940 epsilonErr[2] =
sqrt(epsilon[2] * (1 - epsilon[2]) /
nsvdDigit[2]);
941 B2RESULT(
" efficiency : " << epsilon[2] <<
" +/- " << epsilonErr[2]);
943 epsilon2Err[2] =
sqrt(epsilon2[2] * (1 - epsilon2[2]) / totTrack[2]);
944 B2RESULT(
" efficiency2 : " << epsilon2[2] <<
" +/- " << epsilon2Err[2]);
947 B2RESULT(
" 0.1 < pT < 0.2 : " <<
pt[1]);
952 B2RESULT(
" svdDigit : " <<
nsvdDigit[1]);
958 epsilonErr[1] =
sqrt(epsilon[1] * (1 - epsilon[1]) /
nsvdDigit[1]);
959 B2RESULT(
" efficiency : " << epsilon[1] <<
" +/- " << epsilonErr[1]);
961 epsilon2Err[1] =
sqrt(epsilon2[1] * (1 - epsilon2[1]) / totTrack[1]);
962 B2RESULT(
" efficiency2 : " << epsilon2[1] <<
" +/- " << epsilon2Err[1]);
965 B2RESULT(
" pT < 0.1 : " <<
pt[0]);
970 B2RESULT(
" svdDigit : " <<
nsvdDigit[0]);
976 epsilonErr[0] =
sqrt(epsilon[0] * (1 - epsilon[0]) /
nsvdDigit[0]);
977 B2RESULT(
" efficiency : " << epsilon[0] <<
" +/- " << epsilonErr[0]);
979 epsilon2Err[0] =
sqrt(epsilon2[0] * (1 - epsilon2[0]) / totTrack[0]);
980 B2RESULT(
" efficiency2 : " << epsilon2[0] <<
" +/- " << epsilon2Err[0]);
983 B2RESULT(
" CASO2: if (ROI exists but no SVDShaperDigit inside)");
984 B2RESULT(
" CASO3: if (ROI does not exist, intercept with correct VxdID)");
985 B2RESULT(
" CASO4: if (intercept with wrong VxdID)");
986 B2RESULT(
" CASO5: if (intercept does not exist)");
988 B2RESULT(
"==========================");
990 B2RESULT(
" tot ROIs = " <<
n_rois);
996 m_gEff2->SetTitle(
"Normalized to MCParticles with digits and related track");
997 m_gEff =
new TGraphErrors(6,
pt, epsilon,
ptErr, epsilonErr);
999 m_gEff->SetTitle(
"Normalized to digits of MCParticles with digits and related track");
1006 TDirectory* oldDir = gDirectory;
1007 TDirectory* m_digiDir = oldDir->mkdir(
"digits");
1008 TDirectory* m_tracksDir = oldDir->mkdir(
"tracks");
1009 TDirectory* m_notINtrack5 = oldDir->mkdir(
"notINtrack5");
1010 TDirectory* m_INtrack1 = oldDir->mkdir(
"INtrack1");
1011 TDirectory* m_alltracks = oldDir->mkdir(
"alltracks");
1012 TDirectory* m_in = oldDir->mkdir(
"digi_in");
1013 TDirectory* m_out2 = oldDir->mkdir(
"digi_out2");
1014 TDirectory* m_out3 = oldDir->mkdir(
"digi_out3");
1015 TDirectory* m_out4 = oldDir->mkdir(
"digi_out4");
1016 TDirectory* m_out5 = oldDir->mkdir(
"digi_out5");
1017 TDirectory* m_ROIDir = oldDir->mkdir(
"roi");
1041 m_notINtrack5->cd();
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.
A Class to store the Monte Carlo particle information.
ROOT::Math::XYZVector getMomentum() const
Return momentum.
void setDescription(const std::string &description)
Sets the description of the module.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
bool Contains(const Belle2::PXDRawHit &thePXDRawHit) const
true if the ROI contains the thePXDRawHit
This is the Reconstruction Event-Data Model Track.
Provides access to fast ( O(log n) ) bi-directional lookups on a specified relation.
index_from::const_iterator iterator_from
Element iterator of the from side index.
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.
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.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
SVDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an SVD ...
double m_costhetamc
true cos theta
std::string m_rootFileName
root file name
double m_momYmc
true p along Y
unsigned int nnotINtrack3[6]
tracks, inefficiency #3, in pT bins
double m_momXmc
true p along X
TH1F * m_h1SigmaU_out4
distribution of sigmaU for SVDShaperDigits 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
unsigned int nsvdDigit[6]
number of svd digits in bins of pt
TH1F * m_h1ResidU_out2
distribution of U resid for SVDShaperDigits not contained in a ROI
int m_vxdIDmc
true intercept VXD id
TH1F * m_h1INtrack1
track with no intercept
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 SVDShaperDigits not contained in a ROI
TH1F * m_h1ResidV
distribution of V resid for SVDShaperDigits contained in a ROI
TH1F * m_h1nnotINtrack3
lost digit: ROI exist with wrong vxdID
std::string m_ROIListName
ROI list name.
TH1F * m_h1nnotINtrack5
lost digit: ROI does not exist, intercept with wrong vxdID
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
nuner of tracks with no ROI (intercept with correct vxdID)
unsigned int n_intercepts
number of intercepts
TH1F * m_h1INtrack1_nCDChits
denominator track pVal
std::string m_recoTrackListName
Track list name.
double m_momZmc
true p along Z
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 SVDShaperDigits not contained in a ROI
unsigned int nnotINtrack2[6]
tracks, inefficiency #2, in pT bins
unsigned int n_tracks
number of tracks
TH1F * m_h1INtrack1_phi
track with no intercept phi
TH1F * m_h1PullV
distribution of V pulls for PDXDigits contained in a ROI
StoreArray< SVDIntercept > m_SVDIntercepts
svd intercept store array
TH1F * m_h1Track_pt
denominator track pT
void initialize() override
Initializes the Module.
TH1F * m_h1ResidV_out2
distribution of V resid for SVDShaperDigits not contained in a ROI
int m_rootEvent
event number
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 containin a SVDShaperDigit
double m_coorU
intercept U coordinate
TH1F * m_h1Track_cosTheta
denominator track cosTheta
TH1F * m_h1INtrack1_nSVDhits
denominator track pVal
double m_pTmc
transverse momentum
unsigned int nnotINdigit3[6]
number of lost digits in bins of pt: no hit, wrong vxdID
double m_sigmaU
intercept U stat error
unsigned int nnotINtrack4[6]
tracks, inefficiency #4, in pT bins
StoreArray< SVDShaperDigit > m_shapers
shaper digits sotre array
unsigned int n_notINtrack2
nuner 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
void event() override
Event loop.
TH1F * m_h1Track_nCDChits
denominator track pVal
TH1F * m_h1digiOut5
lost digit: ROI does not exist, intercept with wrong vxdID
TH1F * m_h1Track_lambda
denominator track lambda
double m_globalTime
global hit time
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
StoreArray< RecoTrack > m_trackList
reco track store array
TH1F * m_h1notINtrack5_lambda
track with no intercept lambda
std::string m_SVDInterceptListName
Intercept list name.
TH1F * m_h1Track
denominator track
TGraphErrors * m_gEff2
efficiency graph
void endRun() override
Executed at the end of the run.
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
void terminate() override
Termination action.
TH1F * m_h1ResidU_out3
distribution of U resid for SVDShaperDigits not contained in a ROI
unsigned int n_svdDigit
number of svd digits
unsigned int m_nGoodROIs
good rois (data)
TH1F * m_h1digiOut4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int nnotINtrack5[6]
tracks, inefficiency #5, in pT bins
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
top right corner coordinates
SVDROIFinderAnalysisModule()
Constructor of the module.
unsigned int nsvdDigitInROI[6]
number of svd digits inside ROI in bins of pt
unsigned int NtrackHit
nuner of tracks with hits
TH1F * m_h1SigmaU_out2
distribution of sigmaU for SVDShaperDigits not contained in a ROI
TH1F * m_h1notINtrack5_pVal
denominator track pVal
TH1F * m_h1effPerTrack
efficiency per track
TH1F * m_h1SigmaV
distribution of sigmaV for SVDShaperDigits 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
~SVDROIFinderAnalysisModule()
Destructor of the module.
TH2F * m_h2sigmaUphi_out4
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1RecoTracksPerParticle
number of reco tracks per particle
TH1F * m_h1SigmaU
distribution of sigmaU for SVDShaperDigits contained in a ROI
double m_coorV
intercept V coordinate
TH1F * m_h1GlobalTime_out5
distribution of global time for PDXDigits not contained in a ROI
double m_thetamc
true theta
unsigned int Ntrack
nuner of tracks with svd digits
unsigned int n_notINtrack5
nuner of tracks with no ROI (intercept with wrong vxdID)
TH1F * m_h1ResidV_out3
distribution of V resid for SVDShaperDigits 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
double m_sigmaV
intercept V stat error
TH1F * m_h1ResidU
distribution of U resid for SVDShaperDigits contained in a ROI
void beginRun() override
Initializations at the begin of the run.
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
unsigned int n_OKrois
good rois (simulation)
Double_t pt[6]
bin edges (in pt = transverse momentum)
unsigned int n_svdDigitInROI
number of svd digits in ROIs
bool m_isSimulation
true if the module is run on simulated events
unsigned int n_rois
numner of rois
TH1F * m_h1notINtrack5
track with no intercept
TH2F * m_h2sigmaUphi
distribution of sigmaU VS phi for PDXDigits contained in a ROI
TH2F * m_h2ROIbottomLeft
bottom left corner coordinates
TH1F * m_h1digiIn
digits contained in ROI histogram
TH2F * m_h2ROIvMinMax
min VS max of the V coordinate
TH1F * m_h1totUstrips
distribution of number of u strips of all ROIs
TH1F * m_h1SigmaV_out2
distribution of sigmaV for SVDShaperDigits not contained in a ROI
TH1F * m_h1DigitsPerParticle
number of digits per particle
std::string m_shapersName
SVDShaperDigits name.
StoreArray< MCParticle > m_mcParticles
mc particle store array
TH1F * m_h1totVstrips
distribution of number of v strips of all ROIs
TH2F * m_h2sigmaVphi
distribution of sigmaV VS phi for PDXDigits contained in a ROI
TH1F * m_h1Track_phi
denominator track phi
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]
tracks with one digit in, in pT bins
TH2F * m_h2ROIuMinMax
min VS max of the U coordinate
double m_coormc
true intercept coordinate
unsigned int n_notINtrack3
nuner of tracks with no digits in ROI (wrong vxdID)
int m_idmc
true intercept U id
TH1F * m_h1SigmaU_out3
distribution of sigmaU for SVDShaperDigits not contained in a ROI
TH1F * m_h1digiOut3
lost digit: ROI exist with wrong vxdID
StoreArray< ROIid > m_ROIs
rois store array
TH1F * m_h1notINtrack5_cosTheta
track with no intercept costheta
The SVD ShaperDigit class.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
double getSigmaV() const
return the statistical error on the V coordinate of the intercept
double getCoorV() const
return the V coordinate of the intercept
double getSigmaU() const
return the statistical error on the U coordinate of the intercept
VxdID::baseType getSensorID() const
return the sensor ID
double getCoorU() const
return the U coordinate of the intercept
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
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.
Class to uniquely identify a any structure of the PXD and SVD.
REG_MODULE(arichBtest)
Register the Module.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.