@@ -107,6 +107,7 @@ struct OnTheFlyTracker {
107107 Configurable<bool > enableSecondarySmearing{" enableSecondarySmearing" , false , " Enable smearing of weak decay daughters" };
108108 Configurable<bool > enableNucleiSmearing{" enableNucleiSmearing" , false , " Enable smearing of nuclei" };
109109 Configurable<bool > enablePrimaryVertexing{" enablePrimaryVertexing" , true , " Enable primary vertexing" };
110+ Configurable<std::string> primaryVertexOption{" primaryVertexOption" , " pvertexer.maxChi2TZDebris=10;pvertexer.acceptableScale2=9;pvertexer.minScale2=2;pvertexer.timeMarginVertexTime=1.3;;pvertexer.maxChi2TZDebris=40;pvertexer.maxChi2Mean=12;pvertexer.maxMultRatDebris=1.;pvertexer.addTimeSigma2Debris=1e-2;pvertexer.meanVertexExtraErrSelection=0.03;" , " Option for the primary vertexer" };
110111 Configurable<bool > interpolateLutEfficiencyVsNch{" interpolateLutEfficiencyVsNch" , true , " interpolate LUT efficiency as f(Nch)" };
111112
112113 Configurable<bool > populateTracksDCA{" populateTracksDCA" , true , " populate TracksDCA table" };
@@ -122,6 +123,9 @@ struct OnTheFlyTracker {
122123 struct : ConfigurableGroup {
123124 ConfigurableAxis axisMomentum{" axisMomentum" , {VARIABLE_WIDTH, 0 .0f , 0 .1f , 0 .2f , 0 .3f , 0 .4f , 0 .5f , 0 .6f , 0 .7f , 0 .8f , 0 .9f , 1 .0f , 1 .1f , 1 .2f , 1 .3f , 1 .4f , 1 .5f , 1 .6f , 1 .7f , 1 .8f , 1 .9f , 2 .0f , 2 .2f , 2 .4f , 2 .6f , 2 .8f , 3 .0f , 3 .2f , 3 .4f , 3 .6f , 3 .8f , 4 .0f , 4 .4f , 4 .8f , 5 .2f , 5 .6f , 6 .0f , 6 .5f , 7 .0f , 7 .5f , 8 .0f , 9 .0f , 10 .0f , 11 .0f , 12 .0f , 13 .0f , 14 .0f , 15 .0f , 17 .0f , 19 .0f , 21 .0f , 23 .0f , 25 .0f , 30 .0f , 35 .0f , 40 .0f , 50 .0f }, " #it{p} (GeV/#it{c})" };
124125 ConfigurableAxis axisNVertices{" axisNVertices" , {20 , -0.5 , 19.5 }, " N_{vertices}" };
126+ ConfigurableAxis axisDeltaVtxCoord{" axisDeltaVtxCoord" , {100 , -5 ., 5 }, " Delta Vtx coord (cm)" };
127+ ConfigurableAxis axisDeltaMultPVRecoGen{" axisDeltaMultPVRecoGen" , {51 , -25 , 25 }, " Delta Multiplicity_{PV} (cm)" };
128+ ConfigurableAxis axisVtxMult{" axisVtxMult" , {101 , 0 , 100 }, " Vertex Multiplicity" };
125129 ConfigurableAxis axisMultiplicity{" axisMultiplicity" , {100 , -0.5 , 99.5 }, " N_{contributors}" };
126130 ConfigurableAxis axisVertexZ{" axisVertexZ" , {40 , -20 , 20 }, " vertex Z (cm)" };
127131 ConfigurableAxis axisDCA{" axisDCA" , {400 , -200 , 200 }, " DCA (#mum)" };
@@ -372,24 +376,37 @@ struct OnTheFlyTracker {
372376 // smear un-reco'ed tracks if asked to do so
373377 mSmearer [icfg]->skipUnreconstructed (!processUnreconstructedTracks.value );
374378
375- insertHist (histPath + " hPtGenerated" , " hPtGenerated" , {kTH1D , {{axes.axisMomentum }}});
376- insertHist (histPath + " hPhiGenerated" , " hPhiGenerated" , {kTH1D , {{100 , 0 .0f , 2 * M_PI, " #phi (rad)" }}});
377-
378- insertHist (histPath + " hPtGeneratedEl" , " hPtGeneratedEl" , {kTH1D , {{axes.axisMomentum }}});
379- insertHist (histPath + " hPtGeneratedPi" , " hPtGeneratedPi" , {kTH1D , {{axes.axisMomentum }}});
380- insertHist (histPath + " hPtGeneratedKa" , " hPtGeneratedKa" , {kTH1D , {{axes.axisMomentum }}});
381- insertHist (histPath + " hPtGeneratedPr" , " hPtGeneratedPr" , {kTH1D , {{axes.axisMomentum }}});
382- insertHist (histPath + " hPtReconstructed" , " hPtReconstructed" , {kTH1D , {{axes.axisMomentum }}});
383- insertHist (histPath + " hPtReconstructedEl" , " hPtReconstructedEl" , {kTH1D , {{axes.axisMomentum }}});
384- insertHist (histPath + " hPtReconstructedPi" , " hPtReconstructedPi" , {kTH1D , {{axes.axisMomentum }}});
385- insertHist (histPath + " hPtReconstructedKa" , " hPtReconstructedKa" , {kTH1D , {{axes.axisMomentum }}});
386- insertHist (histPath + " hPtReconstructedPr" , " hPtReconstructedPr" , {kTH1D , {{axes.axisMomentum }}});
379+ insertHist (histPath + " hPtGenerated" , " hPtGenerated;#it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
380+ insertHist (histPath + " hPhiGenerated" , " hPhiGenerated;#phi (rad);Counts " , {kTH1D , {{100 , 0 .0f , 2 * M_PI, " #phi (rad)" }}});
381+
382+ insertHist (histPath + " hPtGeneratedEl" , " hPtGeneratedEl;Gen #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
383+ insertHist (histPath + " hPtGeneratedPi" , " hPtGeneratedPi;Gen #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
384+ insertHist (histPath + " hPtGeneratedKa" , " hPtGeneratedKa;Gen #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
385+ insertHist (histPath + " hPtGeneratedPr" , " hPtGeneratedPr;Gen #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
386+ insertHist (histPath + " hPtReconstructed" , " hPtReconstructed;Reco #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
387+ insertHist (histPath + " hPtReconstructedEl" , " hPtReconstructedEl;Reco #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
388+ insertHist (histPath + " hPtReconstructedPi" , " hPtReconstructedPi;Reco #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
389+ insertHist (histPath + " hPtReconstructedKa" , " hPtReconstructedKa;Reco #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
390+ insertHist (histPath + " hPtReconstructedPr" , " hPtReconstructedPr;Reco #it{p}_{T} (GeV/c);Counts " , {kTH1D , {{axes.axisMomentum }}});
387391 }
388392 // Collision QA
389- insertHist (histPath + " hPVz" , " hPVz" , {kTH1D , {{axes.axisVertexZ }}});
390- insertHist (histPath + " hLUTMultiplicity" , " hLUTMultiplicity" , {kTH1D , {{axes.axisMultiplicity }}});
391- insertHist (histPath + " hSimMultiplicity" , " hSimMultiplicity" , {kTH1D , {{axes.axisMultiplicity }}});
392- insertHist (histPath + " hRecoMultiplicity" , " hRecoMultiplicity" , {kTH1D , {{axes.axisMultiplicity }}});
393+ insertHist (histPath + " hPVz" , " hPVz;Primary Vertex Z (cm);Counts" , {kTH1D , {{axes.axisVertexZ }}});
394+ insertHist (histPath + " hLUTMultiplicity" , " hLUTMultiplicity;dN/d#eta;Counts" , {kTH1D , {{axes.axisMultiplicity }}});
395+ insertHist (histPath + " hSimMultiplicity" , " hSimMultiplicity;Gen. multiplicity;Counts" , {kTH1D , {{axes.axisMultiplicity }}});
396+ insertHist (histPath + " hRecoMultiplicity" , " hRecoMultiplicity;Reco Multiplicity;Counts" , {kTH1D , {{axes.axisMultiplicity }}});
397+
398+ if (enablePrimaryVertexing) {
399+ insertHist (histPath + " hDeltaXPVRecoGen" , " hDeltaXPVRecoGen;Delta X (reco - gen), cm" , {kTH1D , {{axes.axisDeltaVtxCoord }}});
400+ insertHist (histPath + " hDeltaYPVRecoGen" , " hDeltaYPVRecoGen;Delta Y (reco - gen), cm" , {kTH1D , {{axes.axisDeltaVtxCoord }}});
401+ insertHist (histPath + " hDeltaZPVRecoGen" , " hDeltaZPVRecoGen;Delta Z (reco - gen), cm" , {kTH1D , {{axes.axisDeltaVtxCoord }}});
402+ insertHist (histPath + " hDeltaMultPVRecoGen" , " hDeltaMultPVRecoGen;Delta Multiplicity (reco - gen)" , {kTH1D , {{axes.axisDeltaMultPVRecoGen }}});
403+ insertHist (histPath + " hVtxMultGen" , " hVtxMultGen;Generated Vertex Multiplicity" , {kTH1D , {{axes.axisVtxMult }}});
404+ insertHist (histPath + " hVtxMultReco" , " hVtxMultReco;Reconstructed Vertex Multiplicity" , {kTH1D , {{axes.axisVtxMult }}});
405+ insertHist (histPath + " hVtxTrials" , " hVtxTrials;Vertex Reconstruction Trials" , {kTH1D , {{2 , -0.5 , 1.5 }}});
406+ // Set the bin labels
407+ getHist (TH1, histPath + " hVtxTrials" )->GetXaxis ()->SetBinLabel (1 , " Tried" );
408+ getHist (TH1, histPath + " hVtxTrials" )->GetXaxis ()->SetBinLabel (2 , " Succeeded" );
409+ }
393410
394411 if (enableSecondarySmearing) {
395412 fastTracker.emplace_back (std::make_unique<o2::fastsim::FastTracker>());
@@ -430,8 +447,8 @@ struct OnTheFlyTracker {
430447 insertHist (histPath + " h2dDCAzCascadeNegative" , " h2dDCAzCascadeNegative" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
431448 insertHist (histPath + " h2dDCAzCascadePositive" , " h2dDCAzCascadePositive" , {kTH2F , {axes.axisMomentum , axes.axisDCA }});
432449
433- insertHist (histPath + " h2dDeltaPtVsPt" , " h2dDeltaPtVsPt" , {kTH2F , {axes.axisMomentum , axes.axisDeltaPt }});
434- insertHist (histPath + " h2dDeltaEtaVsPt" , " h2dDeltaEtaVsPt" , {kTH2F , {axes.axisMomentum , axes.axisDeltaEta }});
450+ insertHist (histPath + " h2dDeltaPtVsPt" , " h2dDeltaPtVsPt;Gen p_{T};#Delta p_{T} " , {kTH2F , {axes.axisMomentum , axes.axisDeltaPt }});
451+ insertHist (histPath + " h2dDeltaEtaVsPt" , " h2dDeltaEtaVsPt;Gen p_{T};#Delta #eta " , {kTH2F , {axes.axisMomentum , axes.axisDeltaEta }});
435452
436453 insertHist (histPath + " hFastTrackerHits" , " hFastTrackerHits" , {kTH2F , {axes.axisZ , axes.axisRadius }});
437454 insertHist (histPath + " hFastTrackerQA" , " hFastTrackerQA" , {kTH1F , {{8 , -0 .5f , 7 .5f }}});
@@ -447,9 +464,9 @@ struct OnTheFlyTracker {
447464 }
448465
449466 if (doExtraQA) {
450- insertHist (histPath + " h2dPtRes" , " h2dPtRes" , {kTH2D , {{axes.axisMomentum , axes.axisPtRes }}});
451- insertHist (histPath + " h2dDCAxy" , " h2dDCAxy" , {kTH2D , {{axes.axisMomentum , axes.axisDCA }}});
452- insertHist (histPath + " h2dDCAz" , " h2dDCAz" , {kTH2D , {{axes.axisMomentum , axes.axisDCA }}});
467+ insertHist (histPath + " h2dPtRes" , " h2dPtRes;Gen p_{T};#Delta p_{T} / Reco p_{T} " , {kTH2D , {{axes.axisMomentum , axes.axisPtRes }}});
468+ insertHist (histPath + " h2dDCAxy" , " h2dDCAxy;p_{T};DCA_{xy} " , {kTH2D , {{axes.axisMomentum , axes.axisDCA }}});
469+ insertHist (histPath + " h2dDCAz" , " h2dDCAz;p_{T};DCA_{z} " , {kTH2D , {{axes.axisMomentum , axes.axisDCA }}});
453470 }
454471
455472 } // end config loop
@@ -470,9 +487,9 @@ struct OnTheFlyTracker {
470487 hCovMatOK->GetXaxis ()->SetBinLabel (2 , " OK" );
471488
472489 if (doExtraQA) {
473- histos.add (" h2dVerticesVsContributors" , " h2dVerticesVsContributors" , kTH2F , {axes.axisMultiplicity , axes.axisNVertices });
474- histos.add (" h1dVerticesNotReco" , " h1dVerticesNotReco" , kTH1F , {axes.axisMultiplicity });
475- histos.add (" hRecoVsSimMultiplicity" , " hRecoVsSimMultiplicity" , kTH2F , {axes.axisMultiplicity , axes.axisMultiplicity });
490+ histos.add (" h2dVerticesVsContributors" , " h2dVerticesVsContributors;Multiplicity;N vertices " , kTH2F , {axes.axisMultiplicity , axes.axisNVertices });
491+ histos.add (" h1dVerticesNotReco" , " h1dVerticesNotReco;Multiplicity;Vertices Not Reco " , kTH1F , {axes.axisMultiplicity });
492+ histos.add (" hRecoVsSimMultiplicity" , " hRecoVsSimMultiplicity;Reco Mult.;Sim Mult. " , kTH2F , {axes.axisMultiplicity , axes.axisMultiplicity });
476493
477494 histos.add (" hSimTrackX" , " hSimTrackX" , kTH1F , {axes.axisX });
478495 histos.add (" hRecoTrackX" , " hRecoTrackX" , kTH1F , {axes.axisX });
@@ -687,7 +704,6 @@ struct OnTheFlyTracker {
687704 std::pair<float , float > vertexReconstructionEfficiencyCounters = {0 , 0 }; // {nVerticesWithMoreThan2Contributors, nVerticesReconstructed}
688705 void processWithLUTs (aod::McCollision const & mcCollision, aod::McParticles const & mcParticles, int const & icfg)
689706 {
690- LOG (debug) << " Processing event " << mcCollision.globalIndex () << " with LUTs for configuration " << icfg;
691707 vertexReconstructionEfficiencyCounters.first += 1 ;
692708 const int lastTrackIndex = tableStoredTracksCov.lastIndex () + 1 ; // bookkeep the last added track
693709 const std::string histPath = " Configuration_" + std::to_string (icfg) + " /" ;
@@ -1367,6 +1383,7 @@ struct OnTheFlyTracker {
13671383 o2::vertexing::PVertex primaryVertex;
13681384 if (enablePrimaryVertexing) {
13691385 LOG (debug) << " Starting primary vertexing with " << tracksAlice3.size () << " tracks." ;
1386+ fillHist (TH1, histPath + " hVtxMultGen" , tracksAlice3.size ());
13701387 std::vector<o2::MCCompLabel> lblTracks;
13711388 std::vector<o2::vertexing::PVertex> vertices;
13721389 std::vector<o2::vertexing::GIndex> vertexTrackIDs;
@@ -1381,6 +1398,8 @@ struct OnTheFlyTracker {
13811398 idxVec.emplace_back (i, o2::dataformats::GlobalTrackID::ITS); // let's say ITS
13821399 }
13831400
1401+ getHist (TH1, histPath + " hVtxTrials" )->Fill (0 ); // Tried vertexing
1402+
13841403 // Calculate vertices
13851404 const int n_vertices = vertexer.process (tracksAlice3, // track array
13861405 idxVec,
@@ -1400,6 +1419,7 @@ struct OnTheFlyTracker {
14001419 return ; // primary vertex not reconstructed
14011420 }
14021421 vertexReconstructionEfficiencyCounters.second += 1 ;
1422+ getHist (TH1, histPath + " hVtxTrials" )->Fill (1 ); // Succeeded vertexing
14031423 LOG (debug) << " Vertexing completed with " << n_vertices << " vertices found." ;
14041424
14051425 // Find largest vertex
@@ -1413,6 +1433,11 @@ struct OnTheFlyTracker {
14131433 if (doExtraQA) {
14141434 histos.fill (HIST (" h2dVerticesVsContributors" ), primaryVertex.getNContributors (), n_vertices);
14151435 }
1436+ fillHist (TH1, histPath + " hVtxMultReco" , primaryVertex.getNContributors ());
1437+ fillHist (TH1, histPath + " hDeltaMultPVRecoGen" , static_cast <int >(primaryVertex.getNContributors ()) - static_cast <int >(tracksAlice3.size ()));
1438+ fillHist (TH1, histPath + " hDeltaXPVRecoGen" , primaryVertex.getX () - mcCollision.posX ());
1439+ fillHist (TH1, histPath + " hDeltaYPVRecoGen" , primaryVertex.getY () - mcCollision.posY ());
1440+ fillHist (TH1, histPath + " hDeltaZPVRecoGen" , primaryVertex.getZ () - mcCollision.posZ ());
14161441 } else {
14171442 primaryVertex.setXYZ (mcCollision.posX (), mcCollision.posY (), mcCollision.posZ ());
14181443 }
0 commit comments