9 #include <tracking/modules/pxdDataReduction/PXDROIFinderAnalysisModule.h>
10 #include <framework/datastore/RelationArray.h>
11 #include <framework/datastore/RelationIndex.h>
13 #include <svd/dataobjects/SVDCluster.h>
14 #include <pxd/dataobjects/PXDDigit.h>
15 #include <pxd/dataobjects/PXDTrueHit.h>
16 #include <Math/Vector3D.h>
18 #include <vxd/geometry/GeoCache.h>
35 , m_writeToRoot(false)
73 , n_tracksWithDigits(0)
74 , n_tracksWithDigitsInROI(0)
99 setDescription(
"This module performs the analysis of the PXDROIFinder module output");
102 "set true if you want to save the informations in a root file named by parameter 'rootFileName'",
bool(
true));
105 "fileName used for . Will be ignored if parameter 'writeToRoot' is false (standard)",
106 std::string(
"pxdDataRedAnalysis"));
109 "name of the input collection of RecoTracks", std::string(
""));
112 "name of the list of interceptions", std::string(
""));
115 "name of the list of ROIs", std::string(
""));
142 for (
int i = 0; i < 6; i++) {
154 m_h1GlobalTime =
new TH1F(
"hGlobalTime",
"global time for PXDDigits contained in ROI", 100, 0, 1);
155 m_h1PullU =
new TH1F(
"hPullU",
"U pulls for PXDDigits contained in ROI", 100, -6, 6);
156 m_h1PullV =
new TH1F(
"hPullV",
"V pulls for PXDDigits contained in ROI", 100, -6, 6);
157 m_h2sigmaUphi =
new TH2F(
"hsigmaUvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.35);
158 m_h2sigmaVphi =
new TH2F(
"hsigmaVvsPhi",
"sigmaU vs phi digits in ROI", 100, -180, 180, 100, 0, 0.4);
159 m_h1ResidU =
new TH1F(
"hResidU",
"U resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
160 m_h1ResidV =
new TH1F(
"hResidV",
"V resid for PXDDigits contained in ROI", 100, -0.5, 0.5);
161 m_h2ResidUV =
new TH2F(
"hResidUV",
"U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
162 m_h1SigmaU =
new TH1F(
"hSigmaU",
"sigmaU for PXDDigits contained in ROI", 100, 0, 0.35);
163 m_h1SigmaV =
new TH1F(
"hSigmaV",
"sigmaV for PXDDigits contained in ROI", 100, 0, 0.35);
164 m_h2Mapglob =
new TH2F(
"h2Mapglob",
"global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
165 m_h2MaplocL1 =
new TH2F(
"h2MaplocL1",
"L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
166 m_h2MaplocL2 =
new TH2F(
"h2MaplocL2",
"L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
173 m_h1GlobalTime_out2 =
new TH1F(
"hGlobalTime_out2",
"global time for PXDDigits not contained in ROI", 100, 0, 1);
174 m_h2sigmaUphi_out2 =
new TH2F(
"hsigmaUvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
175 m_h2sigmaVphi_out2 =
new TH2F(
"hsigmaVvsPhi_out2",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
176 m_h1ResidU_out2 =
new TH1F(
"hResidU_out2",
"U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
177 m_h1ResidV_out2 =
new TH1F(
"hResidV_out2",
"V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
178 m_h2ResidUV_out2 =
new TH2F(
"hResidUV_out2",
"U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
179 m_h1SigmaU_out2 =
new TH1F(
"hSigmaU_out2",
"sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
180 m_h1SigmaV_out2 =
new TH1F(
"hSigmaV_out2",
"sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
181 m_h2Mapglob_out2 =
new TH2F(
"h2Mapglob_out2",
"global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
182 m_h2MaplocL1_out2 =
new TH2F(
"h2MaplocL1_out2",
"L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
183 m_h2MaplocL2_out2 =
new TH2F(
"h2MaplocL2_out2",
"L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
186 m_h1GlobalTime_out3 =
new TH1F(
"hGlobalTime_out3",
"global time for PXDDigits not contained in ROI", 100, 0, 1);
187 m_h2sigmaUphi_out3 =
new TH2F(
"hsigmaUvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
188 m_h2sigmaVphi_out3 =
new TH2F(
"hsigmaVvsPhi_out3",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
189 m_h1ResidU_out3 =
new TH1F(
"hResidU_out3",
"U resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
190 m_h1ResidV_out3 =
new TH1F(
"hResidV_out3",
"V resid for PXDDigits not contained in ROI", 100, -2.5, 2.5);
191 m_h2ResidUV_out3 =
new TH2F(
"hResidUV_out3",
"U,V resid for PXDDigits contained in ROI", 100, -0.5, 0.5, 100, -0.5, 0.5);
192 m_h1SigmaU_out3 =
new TH1F(
"hSigmaU_out3",
"sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
193 m_h1SigmaV_out3 =
new TH1F(
"hSigmaV_out3",
"sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
195 m_h2Mapglob_out3 =
new TH2F(
"h2Mapglob_out3",
"global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
196 m_h2MaplocL1_out3 =
new TH2F(
"h2MaplocL1_out3",
"L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
197 m_h2MaplocL2_out3 =
new TH2F(
"h2MaplocL2_out3",
"L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
200 m_h1GlobalTime_out4 =
new TH1F(
"hGlobalTime_out4",
"global time for PXDDigits not contained in ROI", 100, 0, 1);
201 m_h2sigmaUphi_out4 =
new TH2F(
"hsigmaUvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.35);
202 m_h2sigmaVphi_out4 =
new TH2F(
"hsigmaVvsPhi_out4",
"sigmaU vs phi digits not contained in ROI", 100, -180, 180, 100, 0, 0.4);
203 m_h1SigmaU_out4 =
new TH1F(
"hSigmaU_out4",
"sigmaU for PXDDigits not contained in ROI", 100, 0, 0.35);
204 m_h1SigmaV_out4 =
new TH1F(
"hSigmaV_out4",
"sigmaV for PXDDigits not contained in ROI", 100, 0, 0.35);
206 m_h2Mapglob_out4 =
new TH2F(
"h2Mapglob_out4",
"global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
207 m_h2MaplocL1_out4 =
new TH2F(
"h2MaplocL1_out4",
"L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
208 m_h2MaplocL2_out4 =
new TH2F(
"h2MaplocL2_out4",
"L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
211 m_h1GlobalTime_out5 =
new TH1F(
"hGlobalTime_out5",
"global time for PXDDigits not contained in ROI", 100, 0, 1);
213 m_h2Mapglob_out5 =
new TH2F(
"h2Mapglob_out5",
"global position, perp - phi", 500, 1.2, 2.6, 100, -TMath::Pi(), TMath::Pi());
214 m_h2MaplocL1_out5 =
new TH2F(
"h2MaplocL1_out5",
"L1 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
215 m_h2MaplocL2_out5 =
new TH2F(
"h2MaplocL2_out5",
"L2 local u v ID", 1535, -767.5, 767.5, 250, -0.5, 249.5);
218 m_h1redFactor =
new TH1F(
"hRedFactor",
"L1+L2reduction factor", 1000, 0, 1);
219 m_h1redFactor_L1 =
new TH1F(
"hRedFactor_L1",
"L1-only reduction factor", 1000, 0, 1);
220 m_h1redFactor_L2 =
new TH1F(
"hRedFactor_L2",
"L2-only reduction factor", 1000, 0, 1);
222 m_h1totROIs =
new TH1F(
"h1TotNROIs",
"number of all ROIs", 110, 0, 110);
223 m_h1okROIs =
new TH1F(
"h1OkNROIs",
"number of all ROIs containing a PXDDigit", 110, 0, 110);
224 m_h1okROIfrac =
new TH1F(
"h1OkNROIfrac",
"fraction of ROIs containing a PXDDigit", 100, 0, 1);
226 m_h1totArea =
new TH1F(
"h1TotArea",
"Area of all ROIs", 100, 0, 2500000);
227 m_h1okArea =
new TH1F(
"h1OkArea",
"Area of ROIs containing a PXDDigit", 100, 0, 75000);
231 m_h1effPerTrack =
new TH1F(
"heffPerTrack",
"fraction of digits in ROI per track", 100, -0.02, 1.02);
235 m_h2ROIbottomLeft =
new TH2F(
"h2ROIbottomLeft",
"u,v ID of the bottom left pixel", 650, -200, 450, 1300, -300, 1000);
236 m_h2ROItopRight =
new TH2F(
"h2ROItopRight",
"u,v ID of the top right pixel", 650, -200, 450, 1300, -300, 1000);
238 m_h2ROIuMinMax =
new TH2F(
"h2ROIuMinMax",
"u Min vs Max", 650, -200, 450, 650, -200, 450);
239 m_h2ROIvMinMax =
new TH2F(
"h2ROIvMinMax",
"v Min vs Max", 1300, -300, 1000, 1300, -300, 1000);
247 Double_t lowBin[6 + 1];
248 for (
int i = 0; i < 6; i++)
252 m_h1TrackOneDigiIn =
new TH1F(
"hTracksDigiIn",
"Tracks with at least one digit contained in a ROI", 6, lowBin);
253 m_h1nnotINtrack2 =
new TH1F(
"h1outROITrack",
"Tracks with ROI with correct VxdID but no digits inside ROI", 6, lowBin);
254 m_h1nnotINtrack3 =
new TH1F(
"h1noROITrack",
"Tracks with ROI with wrong VxdID but no digits inside ROI", 6, lowBin);
255 m_h1nnotINtrack4 =
new TH1F(
"h1wrongVxdIDTrack",
"Tracks with no ROI, Intercept with correct VxdID", 6, lowBin);
256 m_h1nnotINtrack5 =
new TH1F(
"h1noInterTrack",
"Tracks with no Intercept matching a VxdID of digits", 6, lowBin);
258 m_h1notINtrack5 =
new TH1F(
"hNoInterTrack",
"track with no intercepts", 20, 0, 20);
259 m_h1notINtrack5_pt =
new TH1F(
"hNoInterTrack_pT",
"track with no intercepts", 100, 0, 6);
267 m_h1INtrack1 =
new TH1F(
"hINTrack",
"track with at least one digit inside ROI", 20, 0, 20);
268 m_h1INtrack1_pt =
new TH1F(
"hINTrack_pT",
"track with at least one digit inside ROI", 100, 0, 6);
269 m_h1INtrack1_phi =
new TH1F(
"h1INTrack_phi",
"hINTrack_phi", 100, -180, 180);
272 m_h1INtrack1_pVal =
new TH1F(
"h1INTrack_pVal",
"track with no intercepts", 100, 0, 1);
276 m_h1Track =
new TH1F(
"hTrack",
"all tracks", 20, 0, 20);
277 m_h1Track_pt =
new TH1F(
"hTrack_pT",
"all tracks with digits", 100, 0, 6);
278 m_h1Track_lambda =
new TH1F(
"h1Track_lambda",
"hTrack_lambda", 100, -180, 180);
279 m_h1Track_phi =
new TH1F(
"h1Track_phi",
"hTrack_phi", 100, -180, 180);
281 m_h1Track_pVal =
new TH1F(
"h1Track_pVal",
"track with no intercepts", 100, 0, 1);
282 m_h1Track_nSVDhits =
new TH1F(
"h1Track_nSVDhits",
"track with no intercepts", 50, 0, 50);
283 m_h1Track_nCDChits =
new TH1F(
"h1Track_nCDChits",
"track with no intercepts", 100, 0, 100);
285 m_h1digiIn =
new TH1F(
"hdigiIn",
"digits inside ROI", 6, lowBin);
286 m_h1digiOut2 =
new TH1F(
"hdigiOut2",
"ROI exists with with correct VxdID but no digits inside ROI", 6, lowBin);
287 m_h1digiOut3 =
new TH1F(
"hdigiOut3",
"ROI exists with with wrong VxdID", 6, lowBin);
288 m_h1digiOut4 =
new TH1F(
"hdigiOut4",
"ROI does not exist, but intercept has correct VxdID", 6, lowBin);
289 m_h1digiOut5 =
new TH1F(
"hdigiOut5",
"no ROI, no Intercpets with correct VXDid", 6, lowBin);
305 std::set<Belle2::VxdID>::iterator itPxdLayers = pxdLayers.begin();
307 while ((itPxdLayers != pxdLayers.end()) && (itPxdLayers->getLayerNumber() != 7)) {
309 std::set<Belle2::VxdID> pxdLadders = aGeometry.
getLadders(*itPxdLayers);
310 std::set<Belle2::VxdID>::iterator itPxdLadders = pxdLadders.begin();
312 while (itPxdLadders != pxdLadders.end()) {
314 std::set<Belle2::VxdID> pxdSensors = aGeometry.
getSensors(*itPxdLadders);
315 std::set<Belle2::VxdID>::iterator itPxdSensors = pxdSensors.begin();
317 while (itPxdSensors != pxdSensors.end()) {
319 if (itPxdLadders->getLayerNumber() == 1)
321 if (itPxdLadders->getLayerNumber() == 2)
344 DataStore::arrayName<PXDTrueHit>(
"")));
348 double tmpGlobalTime;
354 B2DEBUG(1,
" ++++++++++++++ PXDROIFinderAnalysisModule");
367 for (
int i = 0; i < (int)
m_ROIs.getEntries(); i++) {
373 int tmpArea = (
m_ROIs[i]->getMaxUid() -
m_ROIs[i]->getMinUid()) * (
m_ROIs[i]->getMaxVid() -
m_ROIs[i]->getMinVid());
374 if ((
m_ROIs[i]->getSensorID()).getLayerNumber() == 1)
375 totArea_L1 += tmpArea;
377 totArea_L2 += tmpArea;
381 for (
int j = 0; j < (int)mcParticles.
getEntries(); j++) {
389 for (
unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.
size(); iPXDDigit++)
390 if (
m_ROIs[i]->Contains(*(pxdDigits_MCParticle[iPXDDigit]))) {
399 double redFactor_L1 = totArea_L1 / 768. / 250. /
m_nSensorsL1;
400 double redFactor_L2 = totArea_L2 / 768. / 250. /
m_nSensorsL2;
414 Int_t n_NoInterceptTracks = 0;
420 for (
int j = 0; j < (int)mcParticles.
getEntries(); j++) {
429 if (pxdDigits_MCParticle.
size() == 0)
435 if (recoTracks_MCParticle.size() == 0)
442 B2DEBUG(1,
"Number of RecoTracks = " << recoTracks_MCParticle.size() <<
" and PXDDigits = " << pxdDigits_MCParticle.
size() <<
443 " related to this MCParticle");
467 bool part_outsideROI =
false;
468 bool part_noROI =
false;
469 bool part_wrongVxdID =
false;
470 bool part_noInter =
false;
471 bool hasOneDigitInROI =
false;
475 Int_t nDigitsInRoiPerTrack = 0;
476 Int_t nDigitsPerTrack = 0;
479 for (
unsigned int iPXDDigit = 0; iPXDDigit < pxdDigits_MCParticle.
size(); iPXDDigit++) {
481 bool hasIntercept =
false;
483 bool interceptRightVxdID =
false;
484 bool MissingHit =
true;
489 PXDTrueHitFromPXDDigit PXDTrueHits = relDigitTrueHit.
getElementsFrom(*pxdDigits_MCParticle[iPXDDigit]);
490 PXDTrueHitIteratorType thePXDTrueHitIterator = PXDTrueHits.begin();
491 PXDTrueHitIteratorType thePXDTrueHitIteratorEnd = PXDTrueHits.end();
495 for (; thePXDTrueHitIterator != thePXDTrueHitIteratorEnd; thePXDTrueHitIterator++) {
496 tmpGlobalTime = tmpGlobalTime + thePXDTrueHitIterator->to->getGlobalTime();
502 m_Uidmc = pxdDigits_MCParticle[iPXDDigit]->getUCellID();
503 m_Vidmc = pxdDigits_MCParticle[iPXDDigit]->getVCellID();
504 m_vxdIDmc = pxdDigits_MCParticle[iPXDDigit]->getSensorID();
523 ROOT::Math::XYZVector globalSensorPos = aSensorInfo.
pointToGlobal(local,
true);
527 if (m_pTmc <= 1 && m_pTmc > 0.5)
npxdDigit[4]++;
528 if (m_pTmc <= 0.5 && m_pTmc > 0.3)
npxdDigit[3]++;
529 if (m_pTmc <= 0.3 && m_pTmc > 0.2)
npxdDigit[2]++;
530 if (m_pTmc <= 0.2 && m_pTmc > 0.1)
npxdDigit[1]++;
534 for (
int i = 0; i < (int)recoTracks_MCParticle.size(); i++) {
536 PXDInterceptsFromRecoTracks PXDIntercepts = recoTrackToPXDIntercept.
getElementsFrom(recoTracks_MCParticle[i]);
538 PXDInterceptIteratorType thePXDInterceptIterator = PXDIntercepts.begin();
539 PXDInterceptIteratorType thePXDInterceptIteratorEnd = PXDIntercepts.end();
542 for (; thePXDInterceptIterator != thePXDInterceptIteratorEnd; thePXDInterceptIterator++) {
544 const PXDIntercept* theIntercept = thePXDInterceptIterator->to;
557 interceptRightVxdID =
true;
569 if (theROIid->
Contains(*(pxdDigits_MCParticle[iPXDDigit]))) {
572 nDigitsInRoiPerTrack++;
584 m_h2Mapglob->Fill(globalSensorPos.Rho(), globalSensorPos.Phi());
595 okArea_L1 = okArea_L1 + tmpArea;
597 okArea_L2 = okArea_L2 + tmpArea;
600 hasOneDigitInROI =
true;
628 if (hasROI && hasIntercept && interceptRightVxdID) {
629 part_outsideROI =
true;
654 }
else if (!hasROI && hasIntercept && interceptRightVxdID) {
682 }
else if (hasIntercept && !interceptRightVxdID) {
683 part_wrongVxdID =
true;
705 }
else if (!hasIntercept) {
733 if (hasOneDigitInROI) {
746 }
else if (part_outsideROI) {
754 }
else if (part_noROI) {
762 }
else if (part_wrongVxdID) {
770 }
else if (part_noInter) {
779 n_NoInterceptTracks++;
797 B2INFO(
" o PXDROIFinder ANALYSIS: tot ROIs = " <<
m_ROIs.getEntries() <<
", ok ROIs = " << nROIs);
798 B2INFO(
" o : NtrackHit/Ntrack = " <<
NtrackHit <<
"/ " <<
Ntrack <<
" = " <<
800 if (nROIs >
m_ROIs.getEntries()) B2INFO(
" HOUSTON WE HAVE A PROBLEM!");
804 std::cout <<
"" << std::endl;
814 Double_t epsilonErr[6];
816 Double_t epsilon2[6];
817 Double_t epsilon2Err[6];
820 for (
int i = 0; i < 6; i++) {
828 for (
int i = 0; i < 6; i++) {
836 B2INFO(
" ROI Analysis Summary ");
837 B2INFO(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
839 B2INFO(
" number of tracks = " <<
n_tracks);
841 B2INFO(
" number of ROIs = " <<
n_rois);
843 B2INFO(
" average number of ROIs = " <<
m_h1totROIs->GetMean() <<
", average area " <<
m_h1totArea->GetMean() <<
844 " (not excluding overlaps!)");
845 B2INFO(
" average number of ROIs w digits = " <<
m_h1okROIs->GetMean() <<
", average tot area " <<
m_h1okArea->GetMean());
851 B2INFO(
"efficiency PTD : " << epsilon2Tot <<
" +/- " <<
sqrt(epsilon2Tot * (1 - epsilon2Tot) /
n_tracksWithDigits));
853 Int_t totTrackOneDigiIn = 0;
854 Int_t totnnotINtrack2 = 0;
855 Int_t totnnotINtrack3 = 0;
856 Int_t totnnotINtrack4 = 0;
857 Int_t totnnotINtrack5 = 0;
872 B2INFO(
" out ROI = " << totnnotINtrack2);
873 B2INFO(
" no ROI = " << totnnotINtrack3);
874 B2INFO(
" wrongVxdID = " << totnnotINtrack4);
875 B2INFO(
" no Inter = " << totnnotINtrack5);
881 B2INFO(
" eff DGT: " << epsilonTot <<
" +/- " <<
sqrt(epsilonTot * (1 - epsilonTot) /
n_pxdDigit));
882 B2INFO(
" inefficiency (PXDDigits): ");
890 B2INFO(
" pT > 1 : " <<
pt[5]);
901 epsilonErr[5] =
sqrt(epsilon[5] * (1 - epsilon[5]) /
npxdDigit[5]);
902 B2INFO(
" efficiency : " << epsilon[5] <<
" +/- " << epsilonErr[5]);
904 epsilon2Err[5] =
sqrt(epsilon2[5] * (1 - epsilon2[5]) / totTrack[5]);
905 B2INFO(
" efficiency2 : " << epsilon2[5] <<
" +/- " << epsilon2Err[5]);
908 B2INFO(
" 0.5 < pT < 1 : " <<
pt[4]);
919 epsilonErr[4] =
sqrt(epsilon[4] * (1 - epsilon[4]) /
npxdDigit[4]);
920 B2INFO(
" efficiency : " << epsilon[4] <<
" +/- " << epsilonErr[4]);
922 epsilon2Err[4] =
sqrt(epsilon2[4] * (1 - epsilon2[4]) / totTrack[4]);
923 B2INFO(
" efficiency2 : " << epsilon2[4] <<
" +/- " << epsilon2Err[4]);
926 B2INFO(
" 0.3 < pT < 0.5 : " <<
pt[3]);
937 epsilonErr[3] =
sqrt(epsilon[3] * (1 - epsilon[3]) /
npxdDigit[3]);
938 B2INFO(
" efficiency : " << epsilon[3] <<
" +/- " << epsilonErr[3]);
940 epsilon2Err[3] =
sqrt(epsilon2[3] * (1 - epsilon2[3]) / totTrack[3]);
941 B2INFO(
" efficiency2 : " << epsilon2[3] <<
" +/- " << epsilon2Err[3]);
944 B2INFO(
" 0.2 < pT < 0.3 : " <<
pt[2]);
955 epsilonErr[2] =
sqrt(epsilon[2] * (1 - epsilon[2]) /
npxdDigit[2]);
956 B2INFO(
" efficiency : " << epsilon[2] <<
" +/- " << epsilonErr[2]);
958 epsilon2Err[2] =
sqrt(epsilon2[2] * (1 - epsilon2[2]) / totTrack[2]);
959 B2INFO(
" efficiency2 : " << epsilon2[2] <<
" +/- " << epsilon2Err[2]);
962 B2INFO(
" 0.1 < pT < 0.2 : " <<
pt[1]);
973 epsilonErr[1] =
sqrt(epsilon[1] * (1 - epsilon[1]) /
npxdDigit[1]);
974 B2INFO(
" efficiency : " << epsilon[1] <<
" +/- " << epsilonErr[1]);
976 epsilon2Err[1] =
sqrt(epsilon2[1] * (1 - epsilon2[1]) / totTrack[1]);
977 B2INFO(
" efficiency2 : " << epsilon2[1] <<
" +/- " << epsilon2Err[1]);
980 B2INFO(
" pT < 0.1 : " <<
pt[0]);
991 epsilonErr[0] =
sqrt(epsilon[0] * (1 - epsilon[0]) /
npxdDigit[0]);
992 B2INFO(
" efficiency : " << epsilon[0] <<
" +/- " << epsilonErr[0]);
994 epsilon2Err[0] =
sqrt(epsilon2[0] * (1 - epsilon2[0]) / totTrack[0]);
995 B2INFO(
" efficiency2 : " << epsilon2[0] <<
" +/- " << epsilon2Err[0]);
998 B2INFO(
" CASO2: if (ROI exists but no PXDDigit inside)");
999 B2INFO(
" CASO3: if (ROI does not exist, intercept with correct VxdID)");
1000 B2INFO(
" CASO4: if (intercept with wrong VxdID)");
1001 B2INFO(
" CASO5: if (intercept does not exist)");
1006 m_gEff2->SetTitle(
"Normalized to MCParticles with digits and related track");
1007 m_gEff =
new TGraphErrors(6,
pt, epsilon,
ptErr, epsilonErr);
1008 m_gEff->SetName(
"g_eff");
1009 m_gEff->SetTitle(
"Normalized to digits of MCParticles with digits and related track");
1016 TDirectory* oldDir = gDirectory;
1017 TDirectory* m_digiDir = oldDir->mkdir(
"digits");
1018 TDirectory* m_tracksDir = oldDir->mkdir(
"tracks");
1019 TDirectory* m_notINtrack5 = oldDir->mkdir(
"notINtrack5");
1020 TDirectory* m_INtrack1 = oldDir->mkdir(
"INtrack1");
1021 TDirectory* m_alltracks = oldDir->mkdir(
"alltracks");
1022 TDirectory* m_in = oldDir->mkdir(
"digi_in");
1023 TDirectory* m_out2 = oldDir->mkdir(
"digi_out2");
1024 TDirectory* m_out3 = oldDir->mkdir(
"digi_out3");
1025 TDirectory* m_out4 = oldDir->mkdir(
"digi_out4");
1026 TDirectory* m_out5 = oldDir->mkdir(
"digi_out5");
1027 TDirectory* m_ROIDir = oldDir->mkdir(
"roi");
1051 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.
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
unsigned int n_pxdDigit
number of pxd digits
double m_costhetamc
true cos theta
std::string m_rootFileName
root file name
double m_momYmc
true p along Y
unsigned int nnotINtrack3[6]
number of tracks in bins of pt: no hit, wrong vxdID
double m_momXmc
true p along X
TH1F * m_h1SigmaU_out4
distribution of sigmaU for PXDDigits not contained in a ROI
TH2F * m_h2MaplocL2
L2 ladder u,v.
TGraphErrors * m_gEff
efficiency graph
TH1F * m_h1GlobalTime_out3
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1GlobalTime_out4
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_nCDChits
denominator track pVal
TH1F * m_h1ResidU_out2
distribution of U resid for PXDDigits not contained in a ROI
int m_vxdIDmc
true intercept VXD id
void initialize() override final
Initializes the Module.
TH1F * m_h1INtrack1
track with no intercept
Int_t m_nSensorsL2
number of sensors on L2
unsigned int n_pxdDigitInROI
number of pxd digits in ROIs
TH1F * m_h1nnotINtrack2
tracks with lost digit: ROI exist with right vxdID
TH2F * m_h2sigmaVphi_out2
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1SigmaV_out4
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1redFactor_L1
distribution of number of ROIsreduction factor
TH2F * m_h2ResidUV_out3
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1ResidV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1nnotINtrack3
lost digit: ROI exist with wrong vxdID
std::string m_ROIListName
ROI list name.
TH1F * m_h1nnotINtrack5
lost digit: ROI does not exist, intercept with wrong vxdID
Int_t m_nSensorsL1
number of sensors on L1
TH1F * m_h1nnotINtrack4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int n_notINdigit2
number of lost digits: no hit, correct vxdID
Double_t ptErr[6]
bin widths (transverse momentum)
unsigned int n_notINtrack4
number of tracks with no ROI (intercept with correct vxdID)
double m_coorUmc
true intercept U coordinate
unsigned int n_intercepts
number of PXDIntercepts
TH1F * m_h1redFactor_L2
distribution of number of ROIsreduction factor
TH1F * m_h1INtrack1_nCDChits
denominator track pVal
std::string m_recoTrackListName
RecoTrack list name.
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 PXDDigits not contained in a ROI
TH1F * m_h1redFactor
distribution of number of ROIsreduction factor
unsigned int nnotINtrack2[6]
number of tracks in bins of pt: no hit, correct vxdID
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
TH2F * m_h2MaplocL1_out4
L1 ladder u,v.
TH1F * m_h1Track_pt
denominator track pT
TH1F * m_h1ResidV_out2
distribution of V resid for PXDDigits not contained in a ROI
int m_Vidmc
true intercept V id
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 PXDDigit
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
std::string m_PXDInterceptListName
Intercept list name.
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]
number of tracks in bins of pt: no ROI, intercepts with correct vxdID
unsigned int n_notINtrack2
number of tracks with no digits in ROI (correct vxdID)
TH1F * m_h1notINtrack5_phi
track with no intercept phi
unsigned int n_notINdigit3
number of lost digits: no hit, wrong vxdID
TH1F * m_h1Track_nCDChits
denominator track pVal
TH2F * m_h2Mapglob_out3
sensor perp,phi
TH1F * m_h1digiOut5
lost digit: ROI does not exist, intercept with wrong vxdID
TH2F * m_h2ResidUV_out2
distribution of V resid for PXDDigits not contained in a ROI
TH1F * m_h1Track_lambda
denominator track lambda
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
TH2F * m_h2Mapglob_out5
sensor perp,phi
TH1F * m_h1notINtrack5_lambda
track with no intercept lambda
TH1F * m_h1Track
denominator track
unsigned int npxdDigit[6]
number of pxd digits in bins of pt
TGraphErrors * m_gEff2
efficiency graph
TH1F * m_h1totROIs
distribution of number of all ROIs
TH1F * m_h1TrackOneDigiIn
tracks with at least digit contained in ROI
TH2F * m_h2sigmaUphi_out2
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1ResidU_out3
distribution of U resid for PXDDigits not contained in a ROI
TH2F * m_h2MaplocL1_out3
L1 ladder u,v.
TH1F * m_h1okROIfrac
distribution of number of ROIsreduction factor
TH1F * m_h1digiOut4
lost digit: ROI does not exist, intercept with right vxdID
unsigned int nnotINtrack5[6]
number of tracks in bins of pt: no ROI, intercepts with wrong vxdID
unsigned int n_notINdigit5
number of lost digits: no ROI, intercepts with wrong vxdID
TH1F * m_h1GlobalTime
distribution of global time for PDXDigits contained in a ROI
TH2F * m_h2ROItopRight
u,v coordinates of the top right pixel
unsigned int NtrackHit
number of tracks with hits
TH1F * m_h1SigmaU_out2
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1notINtrack5_pVal
denominator track pVal
TH1F * m_h1effPerTrack
fraction of digits in ROI per track
void terminate() override final
Termination action.
TH1F * m_h1SigmaV
distribution of sigmaV for PXDDigits contained in a ROI
TH1F * m_h1digiOut2
lost digit: ROI exist with right vxdID
TH1F * m_h1GlobalTime_out2
distribution of global time for PDXDigits not contained in a ROI
TH1F * m_h1INtrack1_cosTheta
track with no intercept costheta
unsigned int n_tracksWithDigitsInROI
number of tracks with digits in ROI
TH2F * m_h2sigmaUphi_out4
distribution of sigmaU VS phi for PDXDigits not contained in a ROI
TH1F * m_h1RecoTracksPerParticle
number of RecoTracks per particle
TH1F * m_h1SigmaU
distribution of sigmaU for PXDDigits contained in a ROI
double m_coorV
intercept V coordinate
TH2F * m_h2MaplocL2_out2
L2 ladder u,v.
void event() override final
This method is called for each event.
TH1F * m_h1GlobalTime_out5
distribution of global time for PDXDigits not contained in a ROI
double m_thetamc
true theta
unsigned int Ntrack
number of tracks with pxd digits
unsigned int n_notINtrack5
number of tracks with no ROI (intercept with wrong vxdID)
TH1F * m_h1ResidV_out3
distribution of V resid for PXDDigits not contained in a ROI
int m_Uidmc
true intercept U id
TH2F * m_h2Mapglob_out2
sensor perp,phi
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 PXDDigits contained in a ROI
TH2F * m_h2ResidUV
distribution of V resid for PXDDigits contained in a ROI
TH1F * m_h1notINtrack5_nSVDhits
denominator track pVal
double m_lambdamc
true lambda = pi/2 - theta
TH1F * m_h1INtrack1_pVal
denominator track pVal
TH2F * m_h2MaplocL2_out4
L2 ladder u,v.
TH2F * m_h2sigmaVphi_out3
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
TH1F * m_h1notINtrack5_pt
track with no intercept pT
TH2F * m_h2sigmaVphi_out4
distribution of sigmaV VS phi for PDXDigits not contained in a ROI
double m_coorVmc
true intercept V coordinate
Double_t pt[6]
bin edges (in pt = transverse momentum)
TH2F * m_h2MaplocL2_out3
L2 ladder u,v.
TH1F * m_h1okArea
distribution of Area of ROIs containing a PXDDigit
unsigned int n_rois
number of ROIs
unsigned int npxdDigitInROI[6]
number of pxd digits inside ROI in bins of pt
TH1F * m_h1notINtrack5
track with no intercept
StoreArray< PXDIntercept > m_PXDIntercepts
PXDIntercept StoreArray.
TH2F * m_h2sigmaUphi
distribution of sigmaU VS phi for PDXDigits contained in a ROI
TH2F * m_h2ROIbottomLeft
u,v coordinates of the bottom left pixel
TH1F * m_h1digiIn
digits contained in ROI histogram
TH2F * m_h2ROIvMinMax
v-coordinate Min vs Max
TH1F * m_h1SigmaV_out2
distribution of sigmaV for PXDDigits not contained in a ROI
TH1F * m_h1DigitsPerParticle
number of digits per particle
StoreArray< RecoTrack > m_recoTracks
RecoTrack StoreArray.
TH2F * m_h2MaplocL1
L1 ladder u,v.
void beginRun() override final
Called when entering a new run.
TH1F * m_h1totArea
distribution of Area of all ROIs
TH2F * m_h2MaplocL1_out2
L1 ladder u,v.
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
TH2F * m_h2MaplocL2_out5
L2 ladder u,v.
TFile * m_rootFilePtr
pointer at root file used for storing infos for debugging and validating purposes
TH2F * m_h2Mapglob
sensor perp,phi
unsigned int TrackOneDigiIn[6]
number of tracks with one digit inside ROI in bins of pt
TH2F * m_h2ROIuMinMax
u-coordinate Min vs Max
StoreArray< MCParticle > m_MCParticles
MCParticle StoreArray.
TH2F * m_h2MaplocL1_out5
L1 ladder u,v.
unsigned int n_notINtrack3
number of tracks with no digits in ROI (wrong vxdID)
PXDROIFinderAnalysisModule()
Constructor of the module.
TH2F * m_h2Mapglob_out4
sensor perp,phi
TH1F * m_h1SigmaU_out3
distribution of sigmaU for PXDDigits not contained in a ROI
TH1F * m_h1digiOut3
lost digit: ROI exist with wrong vxdID
StoreArray< ROIid > m_ROIs
ROIid StoreArray.
TH1F * m_h1notINtrack5_cosTheta
track with no intercept costheta
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
bool Contains(const Belle2::PXDRawHit &thePXDRawHit) const
true if the ROI contains the thePXDRawHit
int getMaxVid() const
return the maximum V id of the ROI
int getMinVid() const
return the minimum V id of the ROI
int getMinUid() const
return the minimum U id of the ROI
int getMaxUid() const
return the maximum U id of the ROI
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.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
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 std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
static GeoCache & getInstance()
Return a reference to the singleton instance.
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Base class to provide Sensor Information for PXD and SVD.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLayerNumber() const
Get the layer id.
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.