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>
19 #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");
192 addParam(
"isSimulation", m_isSimulation,
193 "set true if you want to evaluate efficiency on simulation",
bool(
true));
194 addParam(
"writeToRoot", m_writeToRoot,
195 "set true if you want to save the informations in a root file named by parameter 'rootFileName'",
bool(
true));
197 addParam(
"rootFileName", m_rootFileName,
198 "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
199 string(
"svdDataRedAnalysis"));
201 addParam(
"recoTrackListName", m_recoTrackListName,
202 "name of the input collection of RecoTracks", std::string(
""));
204 addParam(
"shapers", m_shapersName,
205 "name of the input collection of SVDShaperDigits", std::string(
""));
207 addParam(
"SVDInterceptListName", m_SVDInterceptListName,
208 "name of the list of interceptions", std::string(
""));
210 addParam(
"ROIListName", m_ROIListName,
211 "name of the list of ROIs", std::string(
""));
216 SVDROIFinderAnalysisModule::~SVDROIFinderAnalysisModule()
221 void SVDROIFinderAnalysisModule::initialize()
224 m_shapers.isRequired(m_shapersName);
225 m_trackList.isRequired(m_recoTrackListName);
226 m_ROIs.isRequired(m_ROIListName);
227 m_SVDIntercepts.isRequired(m_SVDInterceptListName);
228 m_mcParticles.isRequired();
238 n_tracksWithDigits = 0;
239 n_tracksWithDigitsInROI = 0;
246 for (
int i = 0; i < 6; i++) {
248 nsvdDigitInROI[i] = 0;
251 if (m_writeToRoot ==
true) {
252 m_rootFileName +=
".root";
253 m_rootFilePtr =
new TFile(m_rootFileName.c_str(),
"RECREATE");
255 m_rootFilePtr =
nullptr;
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);
315 m_h1RecoTracksPerParticle =
new TH1F(
"h1RecoTracksPerPart",
"Number of RecoTracks per Particle", 10, 0, 10);
319 Double_t lowBin[6 + 1];
320 for (
int i = 0; i < 6; i++)
321 lowBin[i] = pt[i] - ptErr[i];
322 lowBin[6] = pt[5] + ptErr[5];
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);
332 m_h1notINtrack5_phi =
new TH1F(
"h1NoInterTrack_phi",
"hNoInterTrack_phi", 100, -180, 180);
333 m_h1notINtrack5_lambda =
new TH1F(
"h1NoInterTrack_lambda",
"hNoInterTrack_lambda", 100, -180, 180);
334 m_h1notINtrack5_cosTheta =
new TH1F(
"h1NoInterTrack_cosTheta",
"hNoInterTrack_cosTheta", 100, -1, 1);
335 m_h1notINtrack5_pVal =
new TH1F(
"hNoInterTrack_pVal",
"track with no intercepts", 100, 0, 1);
336 m_h1notINtrack5_nSVDhits =
new TH1F(
"hNoInterTrack_nSVDhits",
"track with no intercepts", 50, 0, 50);
337 m_h1notINtrack5_nCDChits =
new TH1F(
"hNoInterTrack_nCDChits",
"track with no intercepts", 100, 0, 100);
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);
342 m_h1INtrack1_lambda =
new TH1F(
"h1INTrack_lambda",
"hINTrack_lambda", 100, -180, 180);
343 m_h1INtrack1_cosTheta =
new TH1F(
"h1INTrack_cosTheta",
"hINTrack_cosTheta", 100, -1, 1);
344 m_h1INtrack1_pVal =
new TH1F(
"h1INTrack_pVal",
"track with no intercepts", 100, 0, 1);
345 m_h1INtrack1_nSVDhits =
new TH1F(
"h1INTrack_nSVDhits",
"track with no intercepts", 50, 0, 50);
346 m_h1INtrack1_nCDChits =
new TH1F(
"h1INTrack_nCDChits",
"track with no intercepts", 100, 0, 100);
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);
352 m_h1Track_cosTheta =
new TH1F(
"h1Track_cosTheta",
"hTrack_cos theta", 100, -1, 1);
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);
370 void SVDROIFinderAnalysisModule::beginRun()
376 void SVDROIFinderAnalysisModule::event()
384 relDigitTrueHit(DataStore::relationName(DataStore::arrayName<SVDShaperDigit>(
""),
385 DataStore::arrayName<SVDTrueHit>(
"")));
387 recoTrackToSVDIntercept(DataStore::relationName(m_recoTrackListName, m_SVDInterceptListName));
389 double tmpGlobalTime;
395 B2DEBUG(1,
" ++++++++++++++ SVDROIFinderAnalysisModule");
402 for (
int i = 0; i < (int)m_ROIs.getEntries(); i++) {
404 m_h2ROIbottomLeft->Fill(m_ROIs[i]->getMinUid(), m_ROIs[i]->getMinVid());
405 m_h2ROItopRight->Fill(m_ROIs[i]->getMaxUid(), m_ROIs[i]->getMaxVid());
406 m_h2ROIuMinMax->Fill(m_ROIs[i]->getMinUid(), m_ROIs[i]->getMaxUid());
407 m_h2ROIvMinMax->Fill(m_ROIs[i]->getMinVid(), m_ROIs[i]->getMaxVid());
409 for (
int s = 0; s < m_shapers.getEntries(); s++) {
410 if (m_ROIs[i]->Contains(*(m_shapers[s]))) {
420 for (
int j = 0; j < (int)m_mcParticles.getEntries(); j++) {
428 for (
unsigned int iSVDShaperDigit = 0; iSVDShaperDigit < svdDigits_MCParticle.
size(); iSVDShaperDigit++)
429 if (m_ROIs[i]->Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
437 m_h1totROIs->Fill(m_ROIs.getEntries());
438 n_rois += m_ROIs.getEntries();
441 n_tracks += m_trackList.getEntries();
444 n_intercepts += m_SVDIntercepts.getEntries();
446 Int_t n_NoInterceptTracks = 0;
449 for (
int j = 0; j < (int)m_mcParticles.getEntries(); j++) {
457 m_h1DigitsPerParticle->Fill(svdDigits_MCParticle.
size());
458 if (svdDigits_MCParticle.
size() == 0)
467 B2DEBUG(1,
"Number of RecoTracks = " << recoTracks_MCParticle.size() <<
" and SVDShaperDigits = " << svdDigits_MCParticle.
size() <<
468 " related to this MCParticle");
474 m_phimc = (aMcParticle->
getMomentum()).Phi() * 180 / 3.1415;
475 m_thetamc = (aMcParticle->
getMomentum()).Theta() * 180 / 3.1415;
476 m_costhetamc = (aMcParticle->
getMomentum()).CosTheta();
477 m_lambdamc = 90 - m_thetamc;
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();
514 m_globalTime = tmpGlobalTime / tmpNGlobalTime;
515 m_idmc = svdDigits_MCParticle[iSVDShaperDigit]->getCellID();
516 m_vxdIDmc = svdDigits_MCParticle[iSVDShaperDigit]->getSensorID();
526 if (m_pTmc > 1) nsvdDigit[5]++;
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]++;
531 if (m_pTmc <= 0.1) nsvdDigit[0]++;
535 for (
int i = 0; i < (int)m_trackList.getEntries(); i++) {
538 SVDInterceptsFromRecoTracks SVDIntercepts = recoTrackToSVDIntercept.
getElementsFrom(m_trackList[i]);
540 SVDInterceptIteratorType theSVDInterceptIterator = SVDIntercepts.begin();
541 SVDInterceptIteratorType theSVDInterceptIteratorEnd = SVDIntercepts.end();
544 for (; theSVDInterceptIterator != theSVDInterceptIteratorEnd; theSVDInterceptIterator++) {
546 const SVDIntercept* theIntercept = theSVDInterceptIterator->to;
558 if (m_vxdID == m_vxdIDmc)
559 interceptRightVxdID =
true;
569 if (theROIid->
Contains(*(svdDigits_MCParticle[iSVDShaperDigit]))) {
572 nDigitsInRoiPerTrack++;
574 m_h1GlobalTime->Fill(m_globalTime);
577 m_h1PullU->Fill((m_coorU - m_coormc) / m_sigmaU);
578 m_h1ResidU->Fill(m_coorU - m_coormc);
579 m_h2sigmaUphi->Fill(m_phimc, m_sigmaU);
580 m_h1SigmaU->Fill(m_sigmaU);
582 m_h1PullV->Fill((m_coorV - m_coormc) / m_sigmaV);
583 m_h1ResidV->Fill(m_coorV - m_coormc);
584 m_h2sigmaVphi->Fill(m_phimc, m_sigmaV);
585 m_h1SigmaV->Fill(m_sigmaV);
588 hasOneDigitInROI =
true;
591 if (m_pTmc > 1) nsvdDigitInROI[5]++;
592 if (m_pTmc <= 1 && m_pTmc > 0.5) nsvdDigitInROI[4]++;
593 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nsvdDigitInROI[3]++;
594 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nsvdDigitInROI[2]++;
595 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nsvdDigitInROI[1]++;
596 if (m_pTmc <= 0.1) nsvdDigitInROI[0]++;
616 if (hasROI && hasIntercept && interceptRightVxdID) {
617 part_outsideROI =
true;
621 m_h1GlobalTime_out2->Fill(m_globalTime);
623 m_h1ResidU_out2->Fill(m_coorU - m_coormc);
624 m_h2sigmaUphi_out2->Fill(m_phimc, m_sigmaU);
625 m_h1SigmaU_out2->Fill(m_sigmaU);
627 m_h1ResidV_out2->Fill(m_coorV - m_coormc);
628 m_h2sigmaVphi_out2->Fill(m_phimc, m_sigmaV);
629 m_h1SigmaV_out2->Fill(m_sigmaV);
632 if (m_pTmc > 1) nnotINdigit2[5]++;
633 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit2[4]++;
634 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit2[3]++;
635 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit2[2]++;
636 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit2[1]++;
637 if (m_pTmc <= 0.1) nnotINdigit2[0]++;
639 }
else if (!hasROI && hasIntercept && interceptRightVxdID) {
644 m_h1GlobalTime_out3->Fill(m_globalTime);
646 m_h1ResidU_out3->Fill(m_coorU - m_coormc);
647 m_h2sigmaUphi_out3->Fill(m_phimc, m_sigmaU);
648 m_h1SigmaU_out3->Fill(m_sigmaU);
650 m_h1ResidV_out3->Fill(m_coorV - m_coormc);
651 m_h2sigmaVphi_out3->Fill(m_phimc, m_sigmaV);
652 m_h1SigmaV_out3->Fill(m_sigmaV);
655 if (m_pTmc > 1) nnotINdigit3[5]++;
656 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit3[4]++;
657 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit3[3]++;
658 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit3[2]++;
659 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit3[1]++;
660 if (m_pTmc <= 0.1) nnotINdigit3[0]++;
662 }
else if (hasIntercept && !interceptRightVxdID) {
663 part_wrongVxdID =
true;
667 m_h1GlobalTime_out4->Fill(m_globalTime);
669 m_h2sigmaUphi_out4->Fill(m_phimc, m_sigmaU);
670 m_h1SigmaU_out4->Fill(m_sigmaU);
672 m_h2sigmaVphi_out4->Fill(m_phimc, m_sigmaV);
673 m_h1SigmaV_out4->Fill(m_sigmaV);
676 if (m_pTmc > 1) nnotINdigit4[5]++;
677 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit4[4]++;
678 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit4[3]++;
679 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit4[2]++;
680 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit4[1]++;
681 if (m_pTmc <= 0.1) nnotINdigit4[0]++;
683 }
else if (!hasIntercept) {
688 m_h1GlobalTime_out5->Fill(m_globalTime);
690 if (m_pTmc > 1) nnotINdigit5[5]++;
691 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINdigit5[4]++;
692 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINdigit5[3]++;
693 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINdigit5[2]++;
694 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINdigit5[1]++;
695 if (m_pTmc <= 0.1) nnotINdigit5[0]++;
700 m_h1effPerTrack->Fill((
float) nDigitsInRoiPerTrack / nDigitsPerTrack);
701 m_h1Track_pt->Fill(m_pTmc);
702 m_h1Track_phi->Fill(m_phimc);
703 m_h1Track_lambda->Fill(m_lambdamc);
704 m_h1Track_cosTheta->Fill(m_costhetamc);
706 if (hasOneDigitInROI) {
708 if (m_pTmc > 1) TrackOneDigiIn[5]++;
709 if (m_pTmc <= 1 && m_pTmc > 0.5) TrackOneDigiIn[4]++;
710 if (m_pTmc <= 0.5 && m_pTmc > 0.3) TrackOneDigiIn[3]++;
711 if (m_pTmc <= 0.3 && m_pTmc > 0.2) TrackOneDigiIn[2]++;
712 if (m_pTmc <= 0.2 && m_pTmc > 0.1) TrackOneDigiIn[1]++;
713 if (m_pTmc <= 0.1) TrackOneDigiIn[0]++;
715 m_h1INtrack1_pt->Fill(m_pTmc);
716 m_h1INtrack1_phi->Fill(m_phimc);
717 m_h1INtrack1_lambda->Fill(m_lambdamc);
718 m_h1INtrack1_cosTheta->Fill(m_costhetamc);
719 }
else if (part_outsideROI) {
721 if (m_pTmc > 1) nnotINtrack2[5]++;
722 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack2[4]++;
723 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack2[3]++;
724 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack2[2]++;
725 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack2[1]++;
726 if (m_pTmc <= 0.1) nnotINtrack2[0]++;
727 }
else if (part_noROI) {
729 if (m_pTmc > 1) nnotINtrack3[5]++;
730 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack3[4]++;
731 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack3[3]++;
732 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack3[2]++;
733 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack3[1]++;
734 if (m_pTmc <= 0.1) nnotINtrack3[0]++;
735 }
else if (part_wrongVxdID) {
737 if (m_pTmc > 1) nnotINtrack4[5]++;
738 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack4[4]++;
739 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack4[3]++;
740 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack4[2]++;
741 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack4[1]++;
742 if (m_pTmc <= 0.1) nnotINtrack4[0]++;
743 }
else if (part_noInter) {
745 if (m_pTmc > 1) nnotINtrack5[5]++;
746 if (m_pTmc <= 1 && m_pTmc > 0.5) nnotINtrack5[4]++;
747 if (m_pTmc <= 0.5 && m_pTmc > 0.3) nnotINtrack5[3]++;
748 if (m_pTmc <= 0.3 && m_pTmc > 0.2) nnotINtrack5[2]++;
749 if (m_pTmc <= 0.2 && m_pTmc > 0.1) nnotINtrack5[1]++;
750 if (m_pTmc <= 0.1) nnotINtrack5[0]++;
752 n_NoInterceptTracks++;
753 m_h1notINtrack5_phi->Fill(m_phimc);
754 m_h1notINtrack5_lambda->Fill(m_lambdamc);
755 m_h1notINtrack5_cosTheta->Fill(m_costhetamc);
756 m_h1notINtrack5_pt->Fill(m_pTmc);
762 m_h1notINtrack5->Fill(n_NoInterceptTracks);
763 m_h1Track->Fill(Ntrack);
764 m_h1INtrack1->Fill(NtrackHit);
766 n_tracksWithDigits += Ntrack;
767 n_tracksWithDigitsInROI += NtrackHit;
770 if ((m_ROIs.getEntries() > 0) && m_isSimulation) {
771 B2RESULT(
" o SVDROIFinder ANALYSIS: tot ROIs = " << m_ROIs.getEntries() <<
", ok ROIs = " << nROIs);
772 B2RESULT(
" o : NtrackHit/Ntrack = " << NtrackHit <<
"/ " << Ntrack <<
" = " <<
773 (
double)NtrackHit / Ntrack);
774 for (
int i = 0; i < m_ROIs.getEntries(); i++) {
775 VxdID sensor = m_ROIs[i]->getSensorID();
776 B2RESULT(i <<
" ROI " << sensor.getLadderNumber() <<
"." << sensor.getLayerNumber() <<
"." << sensor.getSensorNumber() <<
777 ": " << m_ROIs[i]->getMinUid() <<
", " << m_ROIs[i]->getMinVid() <<
", " << m_ROIs[i]->getMaxUid() <<
", " <<
778 m_ROIs[i]->getMaxVid());
781 if (nROIs > m_ROIs.getEntries()) B2RESULT(
" HOUSTON WE HAVE A PROBLEM!");
783 m_h1okROIs->Fill(nROIs);
788 void SVDROIFinderAnalysisModule::endRun()
793 void SVDROIFinderAnalysisModule::terminate()
797 Double_t epsilonErr[6];
798 double epsilonTot = (double)n_svdDigitInROI / (
double) n_svdDigit;
799 Double_t epsilon2[6];
800 Double_t epsilon2Err[6];
801 double epsilon2Tot = (double)n_tracksWithDigitsInROI / (
double) n_tracksWithDigits;
803 for (
int i = 0; i < 6; i++) {
804 m_h1digiOut2->SetBinContent(i + 1, nnotINdigit2[i]);
805 m_h1digiOut3->SetBinContent(i + 1, nnotINdigit3[i]);
806 m_h1digiOut4->SetBinContent(i + 1, nnotINdigit4[i]);
807 m_h1digiOut5->SetBinContent(i + 1, nnotINdigit5[i]);
808 m_h1digiIn->SetBinContent(i + 1, nsvdDigitInROI[i]);
811 for (
int i = 0; i < 6; i++) {
812 m_h1nnotINtrack2->SetBinContent(i + 1, nnotINtrack2[i]);
813 m_h1nnotINtrack3->SetBinContent(i + 1, nnotINtrack3[i]);
814 m_h1nnotINtrack4->SetBinContent(i + 1, nnotINtrack4[i]);
815 m_h1nnotINtrack5->SetBinContent(i + 1, nnotINtrack5[i]);
816 m_h1TrackOneDigiIn->SetBinContent(i + 1, TrackOneDigiIn[i]);
819 B2RESULT(
" ROI Analysis Summary ");
820 B2RESULT(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
822 B2RESULT(
" number of tracks = " << n_tracks);
823 B2RESULT(
" number of Intercepts = " << n_intercepts);
824 B2RESULT(
" number of ROIs = " << n_rois);
826 B2RESULT(
" number of GOOD ROIs = " << n_OKrois);
828 B2RESULT(
" average number of ROIs = " << m_h1totROIs->GetMean());
829 if (m_isSimulation) {
830 B2RESULT(
" average number of ROIs w digits = " << m_h1okROIs->GetMean());
833 B2RESULT(
"tracks w digits: " << n_tracksWithDigits);
834 B2RESULT(
"tracks w digits in ROI: " << n_tracksWithDigitsInROI);
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;
846 for (
int j = 0; j < m_h1TrackOneDigiIn->GetNbinsX(); j++) {
847 totTrackOneDigiIn = totTrackOneDigiIn + m_h1TrackOneDigiIn->GetBinContent(j + 1);
848 totnnotINtrack2 = totnnotINtrack2 + m_h1nnotINtrack2->GetBinContent(j + 1);
849 totnnotINtrack3 = totnnotINtrack3 + m_h1nnotINtrack3->GetBinContent(j + 1);
850 totnnotINtrack4 = totnnotINtrack4 + m_h1nnotINtrack4->GetBinContent(j + 1);
851 totnnotINtrack5 = totnnotINtrack5 + m_h1nnotINtrack5->GetBinContent(j + 1);
853 totTrack[j] = m_h1nnotINtrack5->GetBinContent(j + 1) + m_h1nnotINtrack4->GetBinContent(j + 1) + m_h1nnotINtrack3->GetBinContent(
854 j + 1) + m_h1nnotINtrack2->GetBinContent(j + 1) + m_h1TrackOneDigiIn->GetBinContent(j + 1);
857 B2RESULT(
" out ROI = " << totnnotINtrack2);
858 B2RESULT(
" no ROI = " << totnnotINtrack3);
859 B2RESULT(
" wrongVxdID = " << totnnotINtrack4);
860 B2RESULT(
" no Inter = " << totnnotINtrack5);
863 B2RESULT(
" svdDigit : " << n_svdDigit);
864 B2RESULT(
" svdDigitIn : " << n_svdDigitInROI);
866 B2RESULT(
" eff DGT: " << epsilonTot <<
" +/- " << sqrt(epsilonTot * (1 - epsilonTot) / n_svdDigit));
867 B2RESULT(
" inefficiency (SVDShaperDigits): ");
868 B2RESULT(
" out ROI: " << n_notINdigit2);
869 B2RESULT(
" no ROI: " << n_notINdigit3);
870 B2RESULT(
" wrongVxdID: " << n_notINdigit4);
871 B2RESULT(
" noInter: " << n_notINdigit5);
875 B2RESULT(
" pT > 1 : " << pt[5]);
876 B2RESULT(
" out ROI: " << nnotINdigit2[5]);
877 B2RESULT(
" no ROI: " << nnotINdigit3[5]);
878 B2RESULT(
" wrongVxdID: " << nnotINdigit4[5]);
879 B2RESULT(
" noInter: " << nnotINdigit5[5]);
880 B2RESULT(
" svdDigit : " << nsvdDigit[5]);
881 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[5]);
882 if ((nsvdDigit[5] - nsvdDigitInROI[5]) != (nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] + nnotINdigit5[5]))
883 B2RESULT(
" svdDigitOut : " << nsvdDigit[5] - nsvdDigitInROI[5] <<
" != " << nnotINdigit2[5] + nnotINdigit3[5] + nnotINdigit4[5] +
885 epsilon[5] = (double)nsvdDigitInROI[5] / (
double) nsvdDigit[5];
886 epsilonErr[5] = sqrt(epsilon[5] * (1 - epsilon[5]) / nsvdDigit[5]);
887 B2RESULT(
" efficiency : " << epsilon[5] <<
" +/- " << epsilonErr[5]);
888 epsilon2[5] = (double)TrackOneDigiIn[5] / (
double) totTrack[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]);
894 B2RESULT(
" out ROI: " << nnotINdigit2[4]);
895 B2RESULT(
" no ROI: " << nnotINdigit3[4]);
896 B2RESULT(
" wrongVxdID: " << nnotINdigit4[4]);
897 B2RESULT(
" noInter: " << nnotINdigit5[4]);
898 B2RESULT(
" svdDigit : " << nsvdDigit[4]);
899 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[4]);
900 if ((nsvdDigit[4] - nsvdDigitInROI[4]) != (nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] + nnotINdigit5[4]))
901 B2RESULT(
" svdDigitOut : " << nsvdDigit[4] - nsvdDigitInROI[4] <<
" != " << nnotINdigit2[4] + nnotINdigit3[4] + nnotINdigit4[4] +
903 epsilon[4] = (double)nsvdDigitInROI[4] / (
double) nsvdDigit[4];
904 epsilonErr[4] = sqrt(epsilon[4] * (1 - epsilon[4]) / nsvdDigit[4]);
905 B2RESULT(
" efficiency : " << epsilon[4] <<
" +/- " << epsilonErr[4]);
906 epsilon2[4] = (double)TrackOneDigiIn[4] / (
double) totTrack[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]);
912 B2RESULT(
" out ROI: " << nnotINdigit2[3]);
913 B2RESULT(
" no ROI: " << nnotINdigit3[3]);
914 B2RESULT(
" wrongVxdID: " << nnotINdigit4[3]);
915 B2RESULT(
" noInter: " << nnotINdigit5[3]);
916 B2RESULT(
" svdDigit : " << nsvdDigit[3]);
917 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[3]);
918 if ((nsvdDigit[3] - nsvdDigitInROI[3]) != (nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] + nnotINdigit5[3]))
919 B2RESULT(
" svdDigitOut : " << nsvdDigit[3] - nsvdDigitInROI[3] <<
" != " << nnotINdigit2[3] + nnotINdigit3[3] + nnotINdigit4[3] +
921 epsilon[3] = (double)nsvdDigitInROI[3] / (
double) nsvdDigit[3];
922 epsilonErr[3] = sqrt(epsilon[3] * (1 - epsilon[3]) / nsvdDigit[3]);
923 B2RESULT(
" efficiency : " << epsilon[3] <<
" +/- " << epsilonErr[3]);
924 epsilon2[3] = (double)TrackOneDigiIn[3] / (
double) totTrack[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]);
930 B2RESULT(
" out ROI: " << nnotINdigit2[2]);
931 B2RESULT(
" no ROI: " << nnotINdigit3[2]);
932 B2RESULT(
" wrongVxdID: " << nnotINdigit4[2]);
933 B2RESULT(
" noInter: " << nnotINdigit5[2]);
934 B2RESULT(
" svdDigit : " << nsvdDigit[2]);
935 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[2]);
936 if ((nsvdDigit[2] - nsvdDigitInROI[2]) != (nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] + nnotINdigit5[2]))
937 B2RESULT(
" svdDigitOut : " << nsvdDigit[2] - nsvdDigitInROI[2] <<
" != " << nnotINdigit2[2] + nnotINdigit3[2] + nnotINdigit4[2] +
939 epsilon[2] = (double)nsvdDigitInROI[2] / (
double) nsvdDigit[2];
940 epsilonErr[2] = sqrt(epsilon[2] * (1 - epsilon[2]) / nsvdDigit[2]);
941 B2RESULT(
" efficiency : " << epsilon[2] <<
" +/- " << epsilonErr[2]);
942 epsilon2[2] = (double)TrackOneDigiIn[2] / (
double) totTrack[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]);
948 B2RESULT(
" out ROI: " << nnotINdigit2[1]);
949 B2RESULT(
" no ROI: " << nnotINdigit3[1]);
950 B2RESULT(
" wrongVxdID: " << nnotINdigit4[1]);
951 B2RESULT(
" noInter: " << nnotINdigit5[1]);
952 B2RESULT(
" svdDigit : " << nsvdDigit[1]);
953 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[1]);
954 if ((nsvdDigit[1] - nsvdDigitInROI[1]) != (nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] + nnotINdigit5[1]))
955 B2RESULT(
" svdDigitOut : " << nsvdDigit[1] - nsvdDigitInROI[1] <<
" ?=? " << nnotINdigit2[1] + nnotINdigit3[1] + nnotINdigit4[1] +
957 epsilon[1] = (double)nsvdDigitInROI[1] / (
double) nsvdDigit[1];
958 epsilonErr[1] = sqrt(epsilon[1] * (1 - epsilon[1]) / nsvdDigit[1]);
959 B2RESULT(
" efficiency : " << epsilon[1] <<
" +/- " << epsilonErr[1]);
960 epsilon2[1] = (double)TrackOneDigiIn[1] / (
double) totTrack[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]);
966 B2RESULT(
" out ROI: " << nnotINdigit2[0]);
967 B2RESULT(
" no ROI: " << nnotINdigit3[0]);
968 B2RESULT(
" wrongVxdID: " << nnotINdigit4[0]);
969 B2RESULT(
" noInter: " << nnotINdigit5[0]);
970 B2RESULT(
" svdDigit : " << nsvdDigit[0]);
971 B2RESULT(
" svdDigitIn : " << nsvdDigitInROI[0]);
972 if ((nsvdDigit[0] - nsvdDigitInROI[0]) != (nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] + nnotINdigit5[0]))
973 B2RESULT(
" svdDigitOut : " << nsvdDigit[0] - nsvdDigitInROI[0] <<
" ?=? " << nnotINdigit2[0] + nnotINdigit3[0] + nnotINdigit4[0] +
975 epsilon[0] = (double)nsvdDigitInROI[0] / (
double) nsvdDigit[0];
976 epsilonErr[0] = sqrt(epsilon[0] * (1 - epsilon[0]) / nsvdDigit[0]);
977 B2RESULT(
" efficiency : " << epsilon[0] <<
" +/- " << epsilonErr[0]);
978 epsilon2[0] = (double)TrackOneDigiIn[0] / (
double) totTrack[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);
991 B2RESULT(
" ROIs with digits = " << m_nGoodROIs);
992 B2RESULT(
" SVD INefficiency = " << 1 - (
float)m_nGoodROIs / n_rois);
994 m_gEff2 =
new TGraphErrors(6, pt, epsilon2, ptErr, epsilon2Err);
995 m_gEff2->SetName(
"g_eff2");
996 m_gEff2->SetTitle(
"Normalized to MCParticles with digits and related track");
997 m_gEff =
new TGraphErrors(6, pt, epsilon, ptErr, epsilonErr);
998 m_gEff->SetName(
"g_eff");
999 m_gEff->SetTitle(
"Normalized to digits of MCParticles with digits and related track");
1003 if (m_rootFilePtr !=
nullptr) {
1004 m_rootFilePtr->cd();
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");
1019 m_h1DigitsPerParticle->Write();
1020 m_h1RecoTracksPerParticle->Write();
1024 m_h1effPerTrack->Write();
1028 m_h1digiIn->Write();
1029 m_h1digiOut2->Write();
1030 m_h1digiOut3->Write();
1031 m_h1digiOut4->Write();
1032 m_h1digiOut5->Write();
1035 m_h1TrackOneDigiIn->Write();
1036 m_h1nnotINtrack2->Write();
1037 m_h1nnotINtrack3->Write();
1038 m_h1nnotINtrack4->Write();
1039 m_h1nnotINtrack5->Write();
1041 m_notINtrack5->cd();
1042 m_h1notINtrack5->Write();
1043 m_h1notINtrack5_pt->Write();
1044 m_h1notINtrack5_phi->Write();
1045 m_h1notINtrack5_lambda->Write();
1046 m_h1notINtrack5_cosTheta->Write();
1049 m_h1INtrack1->Write();
1050 m_h1INtrack1_pt->Write();
1051 m_h1INtrack1_phi->Write();
1052 m_h1INtrack1_lambda->Write();
1053 m_h1INtrack1_cosTheta->Write();
1057 m_h1Track_pt->Write();
1058 m_h1Track_phi->Write();
1059 m_h1Track_lambda->Write();
1060 m_h1Track_cosTheta->Write();
1063 m_h1GlobalTime->Write();
1066 m_h1ResidU->Write();
1067 m_h1ResidV->Write();
1068 m_h1SigmaU->Write();
1069 m_h1SigmaV->Write();
1070 m_h2sigmaUphi->Write();
1071 m_h2sigmaVphi->Write();
1074 m_h1GlobalTime_out2->Write();
1075 m_h1ResidU_out2->Write();
1076 m_h1ResidV_out2->Write();
1077 m_h1SigmaU_out2->Write();
1078 m_h1SigmaV_out2->Write();
1079 m_h2sigmaUphi_out2->Write();
1080 m_h2sigmaVphi_out2->Write();
1083 m_h1GlobalTime_out3->Write();
1084 m_h1ResidU_out3->Write();
1085 m_h1ResidV_out3->Write();
1086 m_h1SigmaU_out3->Write();
1087 m_h1SigmaV_out3->Write();
1088 m_h2sigmaUphi_out3->Write();
1089 m_h2sigmaVphi_out3->Write();
1092 m_h1GlobalTime_out4->Write();
1093 m_h1SigmaU_out4->Write();
1094 m_h1SigmaV_out4->Write();
1095 m_h2sigmaUphi_out4->Write();
1096 m_h2sigmaVphi_out4->Write();
1099 m_h1GlobalTime_out5->Write();
1102 m_h1totUstrips->Write();
1103 m_h1totVstrips->Write();
1104 m_h1okROIs->Write();
1105 m_h1totROIs->Write();
1108 m_h2ROIbottomLeft->Write();
1109 m_h2ROItopRight->Write();
1110 m_h2ROIuMinMax->Write();
1111 m_h2ROIvMinMax->Write();
1112 m_rootFilePtr->Close();
A Class to store the Monte Carlo particle information.
TVector3 getMomentum() const
Return momentum.
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 ...
This module performs the analysis of the SVD data reduction module performances
The SVD ShaperDigit class.
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.
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.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.