@@ -400,10 +400,52 @@ struct OnTheFlyTracker {
400400 fastTracker[icfg]->SetApplyMSCorrection (fastTrackerSettings.applyMSCorrection );
401401 fastTracker[icfg]->SetApplyElossCorrection (fastTrackerSettings.applyElossCorrection );
402402 fastTracker[icfg]->AddGenericDetector (mGeoContainer .getEntry (icfg), ccdb.operator ->());
403- // print fastTracker settings
404- fastTracker[icfg]->Print ();
405- if (cascadeDecaySettings.doXiQA )
406- insertHist (histPath + " hMassXi" , " hMassXi" , {kTH1D , {{axes.axisXiMass }}});
403+ fastTracker[icfg]->Print (); // print fastTracker settings
404+
405+ if (cascadeDecaySettings.doXiQA ) {
406+ insertHist (histPath + " hXiBuilding" , " hXiBuilding" , {kTH1F , {{10 , -0 .5f , 9 .5f }}});
407+
408+ insertHist (histPath + " hGenXi" , " hGenXi" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
409+ insertHist (histPath + " hRecoXi" , " hRecoXi" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
410+
411+ insertHist (histPath + " hGenPiFromXi" , " hGenPiFromXi" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
412+ insertHist (histPath + " hGenPiFromLa" , " hGenPiFromLa" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
413+ insertHist (histPath + " hGenPrFromLa" , " hGenPrFromLa" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
414+ insertHist (histPath + " hRecoPiFromXi" , " hRecoPiFromXi" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
415+ insertHist (histPath + " hRecoPiFromLa" , " hRecoPiFromLa" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
416+ insertHist (histPath + " hRecoPrFromLa" , " hRecoPrFromLa" , {kTH2F , {axes.axisDecayRadius , axes.axisMomentum }});
417+
418+ // basic mass histograms to see if we're in business
419+ insertHist (histPath + " hMassLambda" , " hMassLambda" , {kTH1F , {{axes.axisLambdaMass }}});
420+ insertHist (histPath + " hMassXi" , " hMassXi" , {kTH1F , {{axes.axisXiMass }}});
421+
422+ // OTF strangeness tracking QA
423+ insertHist (histPath + " hFoundVsFindable" , " hFoundVsFindable" , {kTH2F , {{10 , -0 .5f , 9 .5f }, {10 , -0 .5f , 9 .5f }}});
424+
425+ insertHist (histPath + " h2dDCAxyCascade" , " h2dDCAxyCascade" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
426+ insertHist (histPath + " h2dDCAxyCascadeBachelor" , " h2dDCAxyCascadeBachelor" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
427+ insertHist (histPath + " h2dDCAxyCascadeNegative" , " h2dDCAxyCascadeNegative" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
428+ insertHist (histPath + " h2dDCAxyCascadePositive" , " h2dDCAxyCascadePositive" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
429+
430+ insertHist (histPath + " h2dDCAzCascade" , " h2dDCAzCascade" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
431+ insertHist (histPath + " h2dDCAzCascadeBachelor" , " h2dDCAzCascadeBachelor" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
432+ insertHist (histPath + " h2dDCAzCascadeNegative" , " h2dDCAzCascadeNegative" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
433+ insertHist (histPath + " h2dDCAzCascadePositive" , " h2dDCAzCascadePositive" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
434+
435+ insertHist (histPath + " h2dDeltaPtVsPt" , " h2dDeltaPtVsPt" , {kTH2F , {axes.axisMomentum , axes.axisDeltaPt }});
436+ insertHist (histPath + " h2dDeltaEtaVsPt" , " h2dDeltaEtaVsPt" , {kTH2F , {axes.axisMomentum , axes.axisDeltaEta }});
437+
438+ insertHist (histPath + " hFastTrackerHits" , " hFastTrackerHits" , {kTH2F , {axes.axisZ , axes.axisRadius }});
439+ insertHist (histPath + " hFastTrackerQA" , " hFastTrackerQA" , {kTH1F , {{8 , -0 .5f , 7 .5f }}});
440+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (1 , " Negative eigenvalue" );
441+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (2 , " Failed sanity check" );
442+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (3 , " intercept original radius" );
443+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (4 , " propagate to original radius" );
444+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (5 , " problematic layer" );
445+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (6 , " multiple scattering" );
446+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (7 , " energy loss" );
447+ getHist (TH1, histPath + " hFastTrackerQA" )->GetXaxis ()->SetBinLabel (8 , " efficiency" );
448+ }
407449 }
408450
409451 if (doExtraQA) {
@@ -438,51 +480,6 @@ struct OnTheFlyTracker {
438480 histos.add (" hTrackXatDCA" , " hTrackXatDCA" , kTH1F , {axes.axisX });
439481 }
440482
441- if (cascadeDecaySettings.doXiQA ) {
442- histos.add (" hXiBuilding" , " hXiBuilding" , kTH1F , {{10 , -0 .5f , 9 .5f }});
443-
444- histos.add (" hGenXi" , " hGenXi" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
445- histos.add (" hRecoXi" , " hRecoXi" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
446-
447- histos.add (" hGenPiFromXi" , " hGenPiFromXi" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
448- histos.add (" hGenPiFromLa" , " hGenPiFromLa" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
449- histos.add (" hGenPrFromLa" , " hGenPrFromLa" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
450- histos.add (" hRecoPiFromXi" , " hRecoPiFromXi" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
451- histos.add (" hRecoPiFromLa" , " hRecoPiFromLa" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
452- histos.add (" hRecoPrFromLa" , " hRecoPrFromLa" , kTH2F , {axes.axisDecayRadius , axes.axisMomentum });
453-
454- // basic mass histograms to see if we're in business
455- histos.add (" hMassLambda" , " hMassLambda" , kTH1F , {axes.axisLambdaMass });
456- histos.add (" hMassXi" , " hMassXi" , kTH1F , {axes.axisXiMass });
457-
458- // OTF strangeness tracking QA
459- histos.add (" hFoundVsFindable" , " hFoundVsFindable" , kTH2F , {{10 , -0 .5f , 9 .5f }, {10 , -0 .5f , 9 .5f }});
460-
461- histos.add (" h2dDCAxyCascade" , " h2dDCAxyCascade" , kTH2F , {axes.axisMomentum , axes.axisDCA });
462- histos.add (" h2dDCAxyCascadeBachelor" , " h2dDCAxyCascadeBachelor" , kTH2F , {axes.axisMomentum , axes.axisDCA });
463- histos.add (" h2dDCAxyCascadeNegative" , " h2dDCAxyCascadeNegative" , kTH2F , {axes.axisMomentum , axes.axisDCA });
464- histos.add (" h2dDCAxyCascadePositive" , " h2dDCAxyCascadePositive" , kTH2F , {axes.axisMomentum , axes.axisDCA });
465-
466- histos.add (" h2dDCAzCascade" , " h2dDCAzCascade" , kTH2F , {axes.axisMomentum , axes.axisDCA });
467- histos.add (" h2dDCAzCascadeBachelor" , " h2dDCAzCascadeBachelor" , kTH2F , {axes.axisMomentum , axes.axisDCA });
468- histos.add (" h2dDCAzCascadeNegative" , " h2dDCAzCascadeNegative" , kTH2F , {axes.axisMomentum , axes.axisDCA });
469- histos.add (" h2dDCAzCascadePositive" , " h2dDCAzCascadePositive" , kTH2F , {axes.axisMomentum , axes.axisDCA });
470-
471- histos.add (" h2dDeltaPtVsPt" , " h2dDeltaPtVsPt" , kTH2F , {axes.axisMomentum , axes.axisDeltaPt });
472- histos.add (" h2dDeltaEtaVsPt" , " h2dDeltaEtaVsPt" , kTH2F , {axes.axisMomentum , axes.axisDeltaEta });
473-
474- histos.add (" hFastTrackerHits" , " hFastTrackerHits" , kTH2F , {axes.axisZ , axes.axisRadius });
475- auto h = histos.add <TH1>(" hFastTrackerQA" , " hFastTrackerQA" , kTH1D , {{8 , -0 .5f , 7 .5f }});
476- h->GetXaxis ()->SetBinLabel (1 , " Negative eigenvalue" );
477- h->GetXaxis ()->SetBinLabel (2 , " Failed sanity check" );
478- h->GetXaxis ()->SetBinLabel (3 , " intercept original radius" );
479- h->GetXaxis ()->SetBinLabel (4 , " propagate to original radius" );
480- h->GetXaxis ()->SetBinLabel (5 , " problematic layer" );
481- h->GetXaxis ()->SetBinLabel (6 , " multiple scattering" );
482- h->GetXaxis ()->SetBinLabel (7 , " energy loss" );
483- h->GetXaxis ()->SetBinLabel (8 , " efficiency" );
484- }
485-
486483 if (v0DecaySettings.doV0QA ) {
487484 for (int icfg = 0 ; icfg < nGeometries; icfg++) {
488485 std::string v0histPath = " V0Building_Configuration_" + std::to_string (icfg) + " /" ;
@@ -811,10 +808,10 @@ struct OnTheFlyTracker {
811808 }
812809 }
813810 if (cascadeDecaySettings.doXiQA && mcParticle.pdgCode () == kXiMinus ) {
814- histos. fill ( HIST ( " hGenXi" ), xiDecayRadius2D, mcParticle.pt ());
815- histos. fill ( HIST ( " hGenPiFromXi" ), xiDecayRadius2D, cascadeDecayProducts[0 ].Pt ());
816- histos. fill ( HIST ( " hGenPiFromLa" ), laDecayRadius2D, cascadeDecayProducts[1 ].Pt ());
817- histos. fill ( HIST ( " hGenPrFromLa" ), laDecayRadius2D, cascadeDecayProducts[2 ].Pt ());
811+ getHist (TH2, histPath + " hGenXi" )-> Fill ( xiDecayRadius2D, mcParticle.pt ());
812+ getHist (TH2, histPath + " hGenPiFromXi" )-> Fill ( xiDecayRadius2D, cascadeDecayProducts[0 ].Pt ());
813+ getHist (TH2, histPath + " hGenPiFromLa" )-> Fill ( laDecayRadius2D, cascadeDecayProducts[1 ].Pt ());
814+ getHist (TH2, histPath + " hGenPrFromLa" )-> Fill ( laDecayRadius2D, cascadeDecayProducts[2 ].Pt ());
818815 }
819816 if (v0DecaySettings.doV0QA && isV0) {
820817 for (size_t indexV0 = 0 ; indexV0 < v0PDGs.size (); indexV0++) {
@@ -852,7 +849,7 @@ struct OnTheFlyTracker {
852849 std::vector<int > nTPCHits (kCascProngs ); // TPC type
853850 if (cascadeDecaySettings.decayXi && mcParticle.pdgCode () == kXiMinus ) {
854851 if (cascadeDecaySettings.doXiQA ) {
855- histos. fill ( HIST ( " hXiBuilding" ), 0 .0f );
852+ getHist (TH1, histPath + " hXiBuilding" )-> Fill ( 0 .0f );
856853 }
857854
858855 o2::upgrade::convertTLorentzVectorToO2Track (kPiMinus , cascadeDecayProducts[0 ], xiDecayVertex, xiDaughterTrackParCovsPerfect[0 ], pdgDB);
@@ -870,7 +867,7 @@ struct OnTheFlyTracker {
870867 nTPCHits[i] = fastTracker[icfg]->GetNGasPoints ();
871868
872869 if (nHits[i] < 0 && cascadeDecaySettings.doXiQA ) { // QA
873- histos. fill ( HIST ( " hFastTrackerQA" ), o2::math_utils::abs (nHits[i]));
870+ getHist (TH1, histPath + " hFastTrackerQA" )-> Fill ( o2::math_utils::abs (nHits[i]));
874871 }
875872
876873 if (nSiliconHits[i] >= fastTrackerSettings.minSiliconHits || (nSiliconHits[i] >= fastTrackerSettings.minSiliconHitsIfTPCUsed && nTPCHits[i] >= fastTrackerSettings.minTPCClusters )) {
@@ -879,7 +876,7 @@ struct OnTheFlyTracker {
879876 continue ; // extra sure
880877 }
881878 for (uint32_t ih = 0 ; ih < fastTracker[icfg]->GetNHits () && cascadeDecaySettings.doXiQA ; ih++) {
882- histos. fill ( HIST ( " hFastTrackerHits" ), fastTracker[icfg]->GetHitZ (ih), std::hypot (fastTracker[icfg]->GetHitX (ih), fastTracker[icfg]->GetHitY (ih)));
879+ getHist (TH2, histPath + " hFastTrackerHits" )-> Fill ( fastTracker[icfg]->GetHitZ (ih), std::hypot (fastTracker[icfg]->GetHitX (ih), fastTracker[icfg]->GetHitY (ih)));
883880 }
884881 } else {
885882 isReco[i] = true ;
@@ -900,23 +897,24 @@ struct OnTheFlyTracker {
900897
901898 if (cascadeDecaySettings.doXiQA && mcParticle.pdgCode () == kXiMinus ) {
902899 if (isReco[0 ] && isReco[1 ] && isReco[2 ]) {
903- histos. fill ( HIST ( " hXiBuilding" ), 2 .0f );
904- histos. fill ( HIST ( " hRecoXi" ), xiDecayRadius2D, mcParticle.pt ());
900+ getHist (TH1, histPath + " hXiBuilding" )-> Fill ( 2 .0f );
901+ getHist (TH2, histPath + " hRecoXi" )-> Fill ( xiDecayRadius2D, mcParticle.pt ());
905902 }
906903 if (isReco[0 ])
907- histos. fill ( HIST ( " hRecoPiFromXi" ), xiDecayRadius2D, cascadeDecayProducts[0 ].Pt ());
904+ getHist (TH2, histPath + " hRecoPiFromXi" )-> Fill ( xiDecayRadius2D, cascadeDecayProducts[0 ].Pt ());
908905 if (isReco[1 ])
909- histos. fill ( HIST ( " hRecoPiFromLa" ), laDecayRadius2D, cascadeDecayProducts[1 ].Pt ());
906+ getHist (TH2, histPath + " hRecoPiFromLa" )-> Fill ( laDecayRadius2D, cascadeDecayProducts[1 ].Pt ());
910907 if (isReco[2 ])
911- histos. fill ( HIST ( " hRecoPrFromLa" ), laDecayRadius2D, cascadeDecayProducts[2 ].Pt ());
908+ getHist (TH2, histPath + " hRecoPrFromLa" )-> Fill ( laDecayRadius2D, cascadeDecayProducts[2 ].Pt ());
912909 }
913910
914911 // +-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+
915912 // combine particles into actual Xi candidate
916913 // cascade building starts here
917914 if (cascadeDecaySettings.findXi && mcParticle.pdgCode () == kXiMinus && isReco[0 ] && isReco[1 ] && isReco[2 ]) {
918- if (cascadeDecaySettings.doXiQA )
919- histos.fill (HIST (" hXiBuilding" ), 3 .0f );
915+ if (cascadeDecaySettings.doXiQA ) {
916+ getHist (TH1, histPath + " hXiBuilding" )->Fill (3 .0f );
917+ }
920918 // assign indices of the particles we've used
921919 // they should be the last ones to be filled, in order:
922920 // n-1: proton from lambda
@@ -940,8 +938,10 @@ struct OnTheFlyTracker {
940938 }
941939 // V0 found successfully
942940 if (dcaFitterOK_V0) {
943- if (cascadeDecaySettings.doXiQA )
944- histos.fill (HIST (" hXiBuilding" ), 4 .0f );
941+ if (cascadeDecaySettings.doXiQA ) {
942+ getHist (TH1, histPath + " hXiBuilding" )->Fill (4 .0f );
943+ }
944+
945945 std::array<float , 3 > pos;
946946 std::array<float , 3 > posCascade;
947947 std::array<float , 3 > posP;
@@ -997,10 +997,11 @@ struct OnTheFlyTracker {
997997
998998 // Cascade found successfully
999999 if (dcaFitterOK_Cascade) {
1000- if (cascadeDecaySettings.doXiQA )
1001- histos. fill ( HIST ( " hXiBuilding" ), 5 .0f );
1002- o2::track::TrackParCov bachelorTrackAtPCA = fitter. getTrack ( 1 );
1000+ if (cascadeDecaySettings.doXiQA ) {
1001+ getHist (TH1, histPath + " hXiBuilding" )-> Fill ( 5 .0f );
1002+ }
10031003
1004+ o2::track::TrackParCov bachelorTrackAtPCA = fitter.getTrack (1 );
10041005 const auto & vtxCascade = fitter.getPCACandidate ();
10051006 for (int i = 0 ; i < 3 ; i++) {
10061007 posCascade[i] = vtxCascade[i];
@@ -1092,14 +1093,13 @@ struct OnTheFlyTracker {
10921093 tracksAlice3.push_back (TrackAlice3{cascadeTrack, mcParticle.globalIndex (), time, timeResolutionUs, false , false , 1 , thisCascade.foundClusters });
10931094
10941095 if (cascadeDecaySettings.doXiQA ) {
1095- histos. fill ( HIST ( " hXiBuilding" ), 6 .0f );
1096- histos. fill ( HIST ( " h2dDeltaPtVsPt" ), trackParCov.getPt (), cascadeTrack.getPt () - trackParCov.getPt ());
1097- histos. fill ( HIST ( " h2dDeltaEtaVsPt" ), trackParCov.getPt (), cascadeTrack.getEta () - trackParCov.getEta ());
1096+ getHist (TH1, histPath + " hXiBuilding" )-> Fill ( 6 .0f );
1097+ getHist (TH2, histPath + " h2dDeltaPtVsPt" )-> Fill ( trackParCov.getPt (), cascadeTrack.getPt () - trackParCov.getPt ());
1098+ getHist (TH2, histPath + " h2dDeltaEtaVsPt" )-> Fill ( trackParCov.getPt (), cascadeTrack.getEta () - trackParCov.getEta ());
10981099
1099- histos.fill (HIST (" hMassLambda" ), thisCascade.mLambda );
1100- histos.fill (HIST (" hMassXi" ), thisCascade.mXi );
1101- histos.fill (HIST (" hFoundVsFindable" ), thisCascade.findableClusters , thisCascade.foundClusters );
1100+ getHist (TH1, histPath + " hMassLambda" )->Fill (thisCascade.mLambda );
11021101 getHist (TH1, histPath + " hMassXi" )->Fill (thisCascade.mXi );
1102+ getHist (TH2, histPath + " hFoundVsFindable" )->Fill (thisCascade.findableClusters , thisCascade.foundClusters );
11031103 }
11041104
11051105 // add this cascade to vector (will fill cursor later with collision ID)
@@ -1448,20 +1448,20 @@ struct OnTheFlyTracker {
14481448 }
14491449 if (cascadeDecaySettings.doXiQA ) {
14501450 if (trackParCov.isUsedInCascading == 1 ) {
1451- histos. fill ( HIST ( " h2dDCAxyCascade" ), trackParametrization.getPt (), dcaXY * 1e+4 ); // in microns, please
1452- histos. fill ( HIST ( " h2dDCAzCascade" ), trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1451+ getHist (TH2, histPath + " h2dDCAxyCascade" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1452+ getHist (TH2, histPath + " h2dDCAzCascade" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
14531453 }
14541454 if (trackParCov.isUsedInCascading == 2 ) {
1455- histos. fill ( HIST ( " h2dDCAxyCascadeBachelor" ), trackParametrization.getPt (), dcaXY * 1e+4 ); // in microns, please
1456- histos. fill ( HIST ( " h2dDCAzCascadeBachelor" ), trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1455+ getHist (TH2, histPath + " h2dDCAxyCascadeBachelor" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1456+ getHist (TH2, histPath + " h2dDCAzCascadeBachelor" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
14571457 }
14581458 if (trackParCov.isUsedInCascading == 3 ) {
1459- histos. fill ( HIST ( " h2dDCAxyCascadeNegative" ), trackParametrization.getPt (), dcaXY * 1e+4 ); // in microns, please
1460- histos. fill ( HIST ( " h2dDCAzCascadeNegative" ), trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1459+ getHist (TH2, histPath + " h2dDCAxyCascadeNegative" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1460+ getHist (TH2, histPath + " h2dDCAzCascadeNegative" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
14611461 }
14621462 if (trackParCov.isUsedInCascading == 4 ) {
1463- histos. fill ( HIST ( " h2dDCAxyCascadePositive" ), trackParametrization.getPt (), dcaXY * 1e+4 ); // in microns, please
1464- histos. fill ( HIST ( " h2dDCAzCascadePositive" ), trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1463+ getHist (TH2, histPath + " h2dDCAxyCascadePositive" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
1464+ getHist (TH2, histPath + " h2dDCAzCascadePositive" )-> Fill ( trackParametrization.getPt (), dcaZ * 1e+4 ); // in microns, please
14651465 }
14661466 }
14671467 tableTracksDCA (dcaXY, dcaZ);
0 commit comments