9#include <tracking/modules/roiFinding/svd/SVDROIFinderAnalysisModule.h>
10#include <framework/datastore/StoreArray.h>
11#include <framework/datastore/RelationIndex.h>
12#include <framework/logging/Logger.h>
14#include <mdst/dataobjects/MCParticle.h>
15#include <tracking/dataobjects/RecoTrack.h>
16#include <tracking/dataobjects/ROIid.h>
17#include <tracking/dataobjects/SVDIntercept.h>
18#include <svd/dataobjects/SVDShaperDigit.h>
19#include <svd/dataobjects/SVDTrueHit.h>
20#include <vxd/geometry/GeoCache.h>
39 , m_recoTrackListName()
40 , m_SVDInterceptListName()
42 , m_rootFilePtr(nullptr)
44 , m_writeToRoot(false)
49 , m_h1DigitsPerParticle(nullptr)
50 , m_h1RecoTracksPerParticle(nullptr)
52 , m_h1digiOut2(nullptr)
53 , m_h1digiOut3(nullptr)
54 , m_h1digiOut4(nullptr)
55 , m_h1digiOut5(nullptr)
57 , m_h1TrackOneDigiIn(nullptr)
58 , m_h1nnotINtrack2(nullptr)
59 , m_h1nnotINtrack3(nullptr)
60 , m_h1nnotINtrack4(nullptr)
61 , m_h1nnotINtrack5(nullptr)
64 , m_h1Track_pt(nullptr)
65 , m_h1Track_phi(nullptr)
66 , m_h1Track_lambda(nullptr)
67 , m_h1Track_cosTheta(nullptr)
68 , m_h1Track_pVal(nullptr)
69 , m_h1Track_nSVDhits(nullptr)
70 , m_h1Track_nCDChits(nullptr)
72 , m_h1INtrack1(nullptr)
73 , m_h1INtrack1_pt(nullptr)
74 , m_h1INtrack1_phi(nullptr)
75 , m_h1INtrack1_lambda(nullptr)
76 , m_h1INtrack1_cosTheta(nullptr)
77 , m_h1INtrack1_pVal(nullptr)
78 , m_h1INtrack1_nSVDhits(nullptr)
79 , m_h1INtrack1_nCDChits(nullptr)
81 , m_h1notINtrack5(nullptr)
82 , m_h1notINtrack5_pt(nullptr)
83 , m_h1notINtrack5_phi(nullptr)
84 , m_h1notINtrack5_lambda(nullptr)
85 , m_h1notINtrack5_cosTheta(nullptr)
86 , m_h1notINtrack5_pVal(nullptr)
87 , m_h1notINtrack5_nSVDhits(nullptr)
88 , m_h1notINtrack5_nCDChits(nullptr)
92 , m_h2sigmaUphi(nullptr)
93 , m_h2sigmaVphi(nullptr)
98 , m_h1GlobalTime(nullptr)
100 , m_h2sigmaUphi_out2(nullptr)
101 , m_h2sigmaVphi_out2(nullptr)
102 , m_h1ResidU_out2(nullptr)
103 , m_h1ResidV_out2(nullptr)
104 , m_h1SigmaU_out2(nullptr)
105 , m_h1SigmaV_out2(nullptr)
106 , m_h1GlobalTime_out2(nullptr)
108 , m_h2sigmaUphi_out3(nullptr)
109 , m_h2sigmaVphi_out3(nullptr)
110 , m_h1ResidU_out3(nullptr)
111 , m_h1ResidV_out3(nullptr)
112 , m_h1SigmaU_out3(nullptr)
113 , m_h1SigmaV_out3(nullptr)
114 , m_h1GlobalTime_out3(nullptr)
116 , m_h2sigmaUphi_out4(nullptr)
117 , m_h2sigmaVphi_out4(nullptr)
118 , m_h1SigmaU_out4(nullptr)
119 , m_h1SigmaV_out4(nullptr)
120 , m_h1GlobalTime_out4(nullptr)
122 , m_h1GlobalTime_out5(nullptr)
125 , m_h2ROIbottomLeft(nullptr)
126 , m_h2ROItopRight(nullptr)
127 , m_h2ROIuMinMax(nullptr)
128 , m_h2ROIvMinMax(nullptr)
129 , m_h1totROIs(nullptr)
130 , m_h1okROIs(nullptr)
131 , m_h1totUstrips(nullptr)
132 , m_h1totVstrips(nullptr)
134 , m_h1effPerTrack(nullptr)
168 , n_tracksWithDigits(0)
169 , n_tracksWithDigitsInROI(0)
194 setDescription(
"This module performs the analysis of the SVDROIFinder module output");
197 "set true if you want to evaluate efficiency on simulation",
bool(
true));
199 "set true if you want to save the information in a root file named by parameter 'rootFileName'",
bool(
true));
202 "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
203 std::string(
"svdDataRedAnalysis"));
206 "name of the input collection of RecoTracks", std::string(
""));
209 "name of the input collection of SVDShaperDigits", std::string(
""));
212 "name of the list of interceptions", std::string(
""));
215 "name of the list of ROIs", std::string(
""));
250 for (
int i = 0; i < 6; i++) {
262 m_h1GlobalTime =
new TH1F(
"hGlobalTime",
"global time for SVDShaperDigits contained in ROI", 200, -100, 100);
263 m_h1PullU =
new TH1F(
"hPullU",
"U pulls for SVDShaperDigits contained in ROI", 100, -6, 6);
264 m_h1PullV =
new TH1F(
"hPullV",
"V pulls for SVDShaperDigits contained in ROI", 100, -6, 6);
265 m_h2sigmaUphi =
new TH2F(
"hsigmaUvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.35);
266 m_h2sigmaVphi =
new TH2F(
"hsigmaVvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.4);
267 m_h1ResidU =
new TH1F(
"hResidU",
"U resid for SVDShaperDigits contained in ROI", 100, -0.5, 0.5);
268 m_h1ResidV =
new TH1F(
"hResidV",
"V resid for SVDShaperDigits contained in ROI", 100, -0.5, 0.5);
269 m_h1SigmaU =
new TH1F(
"hSigmaU",
"sigmaU for SVDShaperDigits contained in ROI", 100, 0, 0.35);
270 m_h1SigmaV =
new TH1F(
"hSigmaV",
"sigmaV for SVDShaperDigits contained in ROI", 100, 0, 0.35);
273 m_h1GlobalTime_out2 =
new TH1F(
"hGlobalTime_out2",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
274 m_h2sigmaUphi_out2 =
new TH2F(
"hsigmaUvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
275 m_h2sigmaVphi_out2 =
new TH2F(
"hsigmaVvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
276 m_h1ResidU_out2 =
new TH1F(
"hResidU_out2",
"U resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
277 m_h1ResidV_out2 =
new TH1F(
"hResidV_out2",
"V resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
278 m_h1SigmaU_out2 =
new TH1F(
"hSigmaU_out2",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
279 m_h1SigmaV_out2 =
new TH1F(
"hSigmaV_out2",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
281 m_h1GlobalTime_out3 =
new TH1F(
"hGlobalTime_out3",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
282 m_h2sigmaUphi_out3 =
new TH2F(
"hsigmaUvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
283 m_h2sigmaVphi_out3 =
new TH2F(
"hsigmaVvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
284 m_h1ResidU_out3 =
new TH1F(
"hResidU_out3",
"U resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
285 m_h1ResidV_out3 =
new TH1F(
"hResidV_out3",
"V resid for SVDShaperDigits not contained in ROI", 100, -2.5, 2.5);
286 m_h1SigmaU_out3 =
new TH1F(
"hSigmaU_out3",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
287 m_h1SigmaV_out3 =
new TH1F(
"hSigmaV_out3",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
290 m_h1GlobalTime_out4 =
new TH1F(
"hGlobalTime_out4",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
291 m_h2sigmaUphi_out4 =
new TH2F(
"hsigmaUvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
292 m_h2sigmaVphi_out4 =
new TH2F(
"hsigmaVvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
293 m_h1SigmaU_out4 =
new TH1F(
"hSigmaU_out4",
"sigmaU for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
294 m_h1SigmaV_out4 =
new TH1F(
"hSigmaV_out4",
"sigmaV for SVDShaperDigits not contained in ROI", 100, 0, 0.35);
297 m_h1GlobalTime_out5 =
new TH1F(
"hGlobalTime_out5",
"global time for SVDShaperDigits not contained in ROI", 200, -100, 100);
301 m_h1totROIs =
new TH1F(
"h1TotNROIs",
"number of all ROIs", 110, 0, 110);
302 m_h1okROIs =
new TH1F(
"h1OkNROIs",
"number of all ROIs containing a SVDShaperDigit", 110, 0, 110);
304 m_h1totUstrips =
new TH1F(
"h1TotUstrips",
"number of U strips in ROIs", 100, 0, 250000);
305 m_h1totVstrips =
new TH1F(
"h1TotVstrips",
"number of V strips in ROIs", 100, 0, 250000);
307 m_h1effPerTrack =
new TH1F(
"heffPerTrack",
"fraction of digits in ROI per track", 100, -0.02, 1.02);
311 m_h2ROIbottomLeft =
new TH2F(
"h2ROIbottomLeft",
"u,v ID of the bottom left pixel", 650, -200, 450, 1300, -300, 1000);
312 m_h2ROItopRight =
new TH2F(
"h2ROItopRight",
"u,v ID of the top right pixel", 650, -200, 450, 1300, -300, 1000);
314 m_h2ROIuMinMax =
new TH2F(
"h2ROIuMinMax",
"u Min vs Max", 650, -200, 450, 650, -200, 450);
315 m_h2ROIvMinMax =
new TH2F(
"h2ROIvMinMax",
"v Min vs Max", 1300, -300, 1000, 1300, -300, 1000);
318 m_h1DigitsPerParticle =
new TH1F(
"h1DigitsPerPart",
"Number of SVDShaperDigits per Particle", 50, 0, 50);
323 Double_t lowBin[6 + 1];
324 for (
int i = 0; i < 6; i++)
328 m_h1TrackOneDigiIn =
new TH1F(
"hTracksDigiIn",
"Tracks with at least one digit contained in a ROI", 6, lowBin);
329 m_h1nnotINtrack2 =
new TH1F(
"h1outROITrack",
"Tracks with ROI with correct VxdID but no digits inside ROI", 6, lowBin);
330 m_h1nnotINtrack3 =
new TH1F(
"h1noROITrack",
"Tracks with ROI with wrong VxdID but no digits inside ROI", 6, lowBin);
331 m_h1nnotINtrack4 =
new TH1F(
"h1wrongVxdIDTrack",
"Tracks with no ROI, Intercept with correct VxdID", 6, lowBin);
332 m_h1nnotINtrack5 =
new TH1F(
"h1noInterTrack",
"Tracks with no Intercept matching a VxdID of digits", 6, lowBin);
334 m_h1notINtrack5 =
new TH1F(
"hNoInterTrack",
"track with no intercepts", 20, 0, 20);
335 m_h1notINtrack5_pt =
new TH1F(
"hNoInterTrack_pT",
"track with no intercepts", 100, 0, 6);
343 m_h1INtrack1 =
new TH1F(
"hINTrack",
"track with at least one digit inside ROI", 20, 0, 20);
344 m_h1INtrack1_pt =
new TH1F(
"hINTrack_pT",
"track with at least one digit inside ROI", 100, 0, 6);
345 m_h1INtrack1_phi =
new TH1F(
"h1INTrack_phi",
"hINTrack_phi", 100, -180, 180);
348 m_h1INtrack1_pVal =
new TH1F(
"h1INTrack_pVal",
"track with no intercepts", 100, 0, 1);
352 m_h1Track =
new TH1F(
"hTrack",
"all tracks", 20, 0, 20);
353 m_h1Track_pt =
new TH1F(
"hTrack_pT",
"all tracks with digits", 100, 0, 6);
354 m_h1Track_lambda =
new TH1F(
"h1Track_lambda",
"hTrack_lambda", 100, -180, 180);
355 m_h1Track_phi =
new TH1F(
"h1Track_phi",
"hTrack_phi", 100, -180, 180);
357 m_h1Track_pVal =
new TH1F(
"h1Track_pVal",
"track with no intercepts", 100, 0, 1);
358 m_h1Track_nSVDhits =
new TH1F(
"h1Track_nSVDhits",
"track with no intercepts", 50, 0, 50);
359 m_h1Track_nCDChits =
new TH1F(
"h1Track_nCDChits",
"track with no intercepts", 100, 0, 100);
361 m_h1digiIn =
new TH1F(
"hdigiIn",
"digits inside ROI", 6, lowBin);
362 m_h1digiOut2 =
new TH1F(
"hdigiOut2",
"ROI exists with with correct VxdID but no digits inside ROI", 6, lowBin);
363 m_h1digiOut3 =
new TH1F(
"hdigiOut3",
"ROI exists with with wrong VxdID", 6, lowBin);
364 m_h1digiOut4 =
new TH1F(
"hdigiOut4",
"ROI does not exist, but intercept has correct VxdID", 6, lowBin);
365 m_h1digiOut5 =
new TH1F(
"hdigiOut5",
"no ROI, no Intercpets with correct VXDid", 6, lowBin);
387 RelationIndex < SVDShaperDigit, SVDTrueHit >
389 DataStore::arrayName<SVDTrueHit>(
"")));
390 RelationIndex < RecoTrack, SVDIntercept >
393 double tmpGlobalTime;
399 B2DEBUG(21,
" ++++++++++++++ SVDROIFinderAnalysisModule");
406 for (
int i = 0; i < (int)
m_ROIs.getEntries(); i++) {
413 for (
int s = 0; s <
m_shapers.getEntries(); s++) {
432 for (
unsigned int iSVDShaperDigit = 0; iSVDShaperDigit < svdDigits_MCParticle.
size(); iSVDShaperDigit++)
433 if (
m_ROIs[i]->Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
450 Int_t n_NoInterceptTracks = 0;
462 if (svdDigits_MCParticle.
size() == 0)
471 B2DEBUG(21,
"Number of RecoTracks = " << recoTracks_MCParticle.size() <<
" and SVDShaperDigits = " << svdDigits_MCParticle.
size() <<
472 " related to this MCParticle");
485 bool part_outsideROI =
false;
486 bool part_noROI =
false;
487 bool part_wrongVxdID =
false;
488 bool part_noInter =
false;
489 bool hasOneDigitInROI =
false;
491 Int_t nDigitsInRoiPerTrack = 0;
492 Int_t nDigitsPerTrack = 0;
495 for (
unsigned int iSVDShaperDigit = 0; iSVDShaperDigit < svdDigits_MCParticle.
size(); iSVDShaperDigit++) {
497 bool isU = svdDigits_MCParticle[iSVDShaperDigit]->isUStrip();
499 bool hasIntercept =
false;
501 bool interceptRightVxdID =
false;
502 bool MissingHit =
true;
507 SVDTrueHitFromSVDShaperDigit SVDTrueHits = relDigitTrueHit.
getElementsFrom(*svdDigits_MCParticle[iSVDShaperDigit]);
508 SVDTrueHitIteratorType theSVDTrueHitIterator = SVDTrueHits.begin();
509 SVDTrueHitIteratorType theSVDTrueHitIteratorEnd = SVDTrueHits.end();
513 for (; theSVDTrueHitIterator != theSVDTrueHitIteratorEnd; theSVDTrueHitIterator++) {
514 tmpGlobalTime = tmpGlobalTime + theSVDTrueHitIterator->to->getGlobalTime();
519 m_idmc = svdDigits_MCParticle[iSVDShaperDigit]->getCellID();
520 m_vxdIDmc = svdDigits_MCParticle[iSVDShaperDigit]->getSensorID();
531 if (m_pTmc <= 1 && m_pTmc > 0.5)
nsvdDigit[4]++;
532 if (m_pTmc <= 0.5 && m_pTmc > 0.3)
nsvdDigit[3]++;
533 if (m_pTmc <= 0.3 && m_pTmc > 0.2)
nsvdDigit[2]++;
534 if (m_pTmc <= 0.2 && m_pTmc > 0.1)
nsvdDigit[1]++;
544 SVDInterceptIteratorType theSVDInterceptIterator = SVDIntercepts.begin();
545 SVDInterceptIteratorType theSVDInterceptIteratorEnd = SVDIntercepts.end();
548 for (; theSVDInterceptIterator != theSVDInterceptIteratorEnd; theSVDInterceptIterator++) {
550 const SVDIntercept* theIntercept = theSVDInterceptIterator->to;
563 interceptRightVxdID =
true;
573 if (theROIid->
Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
576 nDigitsInRoiPerTrack++;
592 hasOneDigitInROI =
true;
620 if (hasROI && hasIntercept && interceptRightVxdID) {
621 part_outsideROI =
true;
643 }
else if (!hasROI && hasIntercept && interceptRightVxdID) {
666 }
else if (hasIntercept && !interceptRightVxdID) {
667 part_wrongVxdID =
true;
687 }
else if (!hasIntercept) {
710 if (hasOneDigitInROI) {
723 }
else if (part_outsideROI) {
731 }
else if (part_noROI) {
739 }
else if (part_wrongVxdID) {
747 }
else if (part_noInter) {
756 n_NoInterceptTracks++;
775 B2RESULT(
" o SVDROIFinder ANALYSIS: tot ROIs = " <<
m_ROIs.getEntries() <<
", ok ROIs = " << nROIs);
776 B2RESULT(
" o : NtrackHit/Ntrack = " <<
NtrackHit <<
"/ " <<
Ntrack <<
" = " <<
778 for (
int i = 0; i <
m_ROIs.getEntries(); i++) {
780 B2RESULT(i <<
" ROI " << sensor.getLadderNumber() <<
"." << sensor.getLayerNumber() <<
"." << sensor.getSensorNumber() <<
781 ": " <<
m_ROIs[i]->getMinUid() <<
", " <<
m_ROIs[i]->getMinVid() <<
", " <<
m_ROIs[i]->getMaxUid() <<
", " <<
785 if (nROIs >
m_ROIs.getEntries()) B2RESULT(
" HOUSTON WE HAVE A PROBLEM!");
801 Double_t epsilonErr[6];
803 Double_t epsilon2[6];
804 Double_t epsilon2Err[6];
807 for (
int i = 0; i < 6; i++) {
815 for (
int i = 0; i < 6; i++) {
823 B2RESULT(
" ROI Analysis Summary ");
824 B2RESULT(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
826 B2RESULT(
" number of tracks = " <<
n_tracks);
828 B2RESULT(
" number of ROIs = " <<
n_rois);
830 B2RESULT(
" number of GOOD ROIs = " <<
n_OKrois);
832 B2RESULT(
" average number of ROIs = " <<
m_h1totROIs->GetMean());
834 B2RESULT(
" average number of ROIs w digits = " <<
m_h1okROIs->GetMean());
840 B2RESULT(
"efficiency PTD : " << epsilon2Tot <<
" +/- " <<
sqrt(epsilon2Tot * (1 - epsilon2Tot) /
n_tracksWithDigits));
842 Int_t totTrackOneDigiIn = 0;
843 Int_t totnnotINtrack2 = 0;
844 Int_t totnnotINtrack3 = 0;
845 Int_t totnnotINtrack4 = 0;
846 Int_t totnnotINtrack5 = 0;
861 B2RESULT(
" out ROI = " << totnnotINtrack2);
862 B2RESULT(
" no ROI = " << totnnotINtrack3);
863 B2RESULT(
" wrongVxdID = " << totnnotINtrack4);
864 B2RESULT(
" no Inter = " << totnnotINtrack5);
870 B2RESULT(
" eff DGT: " << epsilonTot <<
" +/- " <<
sqrt(epsilonTot * (1 - epsilonTot) /
n_svdDigit));
871 B2RESULT(
" inefficiency (SVDShaperDigits): ");
879 B2RESULT(
" pT > 1 : " <<
pt[5]);
884 B2RESULT(
" svdDigit : " <<
nsvdDigit[5]);
890 epsilonErr[5] =
sqrt(epsilon[5] * (1 - epsilon[5]) /
nsvdDigit[5]);
891 B2RESULT(
" efficiency : " << epsilon[5] <<
" +/- " << epsilonErr[5]);
893 epsilon2Err[5] =
sqrt(epsilon2[5] * (1 - epsilon2[5]) / totTrack[5]);
894 B2RESULT(
" efficiency2 : " << epsilon2[5] <<
" +/- " << epsilon2Err[5]);
897 B2RESULT(
" 0.5 < pT < 1 : " <<
pt[4]);
902 B2RESULT(
" svdDigit : " <<
nsvdDigit[4]);
908 epsilonErr[4] =
sqrt(epsilon[4] * (1 - epsilon[4]) /
nsvdDigit[4]);
909 B2RESULT(
" efficiency : " << epsilon[4] <<
" +/- " << epsilonErr[4]);
911 epsilon2Err[4] =
sqrt(epsilon2[4] * (1 - epsilon2[4]) / totTrack[4]);
912 B2RESULT(
" efficiency2 : " << epsilon2[4] <<
" +/- " << epsilon2Err[4]);
915 B2RESULT(
" 0.3 < pT < 0.5 : " <<
pt[3]);
920 B2RESULT(
" svdDigit : " <<
nsvdDigit[3]);
926 epsilonErr[3] =
sqrt(epsilon[3] * (1 - epsilon[3]) /
nsvdDigit[3]);
927 B2RESULT(
" efficiency : " << epsilon[3] <<
" +/- " << epsilonErr[3]);
929 epsilon2Err[3] =
sqrt(epsilon2[3] * (1 - epsilon2[3]) / totTrack[3]);
930 B2RESULT(
" efficiency2 : " << epsilon2[3] <<
" +/- " << epsilon2Err[3]);
933 B2RESULT(
" 0.2 < pT < 0.3 : " <<
pt[2]);
938 B2RESULT(
" svdDigit : " <<
nsvdDigit[2]);
944 epsilonErr[2] =
sqrt(epsilon[2] * (1 - epsilon[2]) /
nsvdDigit[2]);
945 B2RESULT(
" efficiency : " << epsilon[2] <<
" +/- " << epsilonErr[2]);
947 epsilon2Err[2] =
sqrt(epsilon2[2] * (1 - epsilon2[2]) / totTrack[2]);
948 B2RESULT(
" efficiency2 : " << epsilon2[2] <<
" +/- " << epsilon2Err[2]);
951 B2RESULT(
" 0.1 < pT < 0.2 : " <<
pt[1]);
956 B2RESULT(
" svdDigit : " <<
nsvdDigit[1]);
962 epsilonErr[1] =
sqrt(epsilon[1] * (1 - epsilon[1]) /
nsvdDigit[1]);
963 B2RESULT(
" efficiency : " << epsilon[1] <<
" +/- " << epsilonErr[1]);
965 epsilon2Err[1] =
sqrt(epsilon2[1] * (1 - epsilon2[1]) / totTrack[1]);
966 B2RESULT(
" efficiency2 : " << epsilon2[1] <<
" +/- " << epsilon2Err[1]);
969 B2RESULT(
" pT < 0.1 : " <<
pt[0]);
974 B2RESULT(
" svdDigit : " <<
nsvdDigit[0]);
980 epsilonErr[0] =
sqrt(epsilon[0] * (1 - epsilon[0]) /
nsvdDigit[0]);
981 B2RESULT(
" efficiency : " << epsilon[0] <<
" +/- " << epsilonErr[0]);
983 epsilon2Err[0] =
sqrt(epsilon2[0] * (1 - epsilon2[0]) / totTrack[0]);
984 B2RESULT(
" efficiency2 : " << epsilon2[0] <<
" +/- " << epsilon2Err[0]);
987 B2RESULT(
" CASO2: if (ROI exists but no SVDShaperDigit inside)");
988 B2RESULT(
" CASO3: if (ROI does not exist, intercept with correct VxdID)");
989 B2RESULT(
" CASO4: if (intercept with wrong VxdID)");
990 B2RESULT(
" CASO5: if (intercept does not exist)");
992 B2RESULT(
"==========================");
994 B2RESULT(
" tot ROIs = " <<
n_rois);
1000 m_gEff2->SetTitle(
"Normalized to MCParticles with digits and related track");
1001 m_gEff =
new TGraphErrors(6,
pt, epsilon,
ptErr, epsilonErr);
1002 m_gEff->SetName(
"g_eff");
1003 m_gEff->SetTitle(
"Normalized to digits of MCParticles with digits and related track");
1010 TDirectory* oldDir = gDirectory;
1011 TDirectory* m_digiDir = oldDir->mkdir(
"digits");
1012 TDirectory* m_tracksDir = oldDir->mkdir(
"tracks");
1013 TDirectory* m_notINtrack5 = oldDir->mkdir(
"notINtrack5");
1014 TDirectory* m_INtrack1 = oldDir->mkdir(
"INtrack1");
1015 TDirectory* m_alltracks = oldDir->mkdir(
"alltracks");
1016 TDirectory* m_in = oldDir->mkdir(
"digi_in");
1017 TDirectory* m_out2 = oldDir->mkdir(
"digi_out2");
1018 TDirectory* m_out3 = oldDir->mkdir(
"digi_out3");
1019 TDirectory* m_out4 = oldDir->mkdir(
"digi_out4");
1020 TDirectory* m_out5 = oldDir->mkdir(
"digi_out5");
1021 TDirectory* m_ROIDir = oldDir->mkdir(
"roi");
1045 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 PXDRawHit &thePXDRawHit) const
true if the ROI contains the thePXDRawHit
This is the Reconstruction Event-Data Model Track.
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.
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.
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
number 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 containing 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 store array
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
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
number 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
number of tracks with svd digits
unsigned int n_notINtrack5
number 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
number 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
number 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.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.