Skip to content

Commit

Permalink
feat: Add seeding efficiency vs z0
Browse files Browse the repository at this point in the history
  • Loading branch information
ntadej committed Oct 22, 2024
1 parent d738c82 commit c38cafe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EffPlotTool {
{"Eta", PlotHelpers::Binning("#eta", 40, -4, 4)},
{"Phi", PlotHelpers::Binning("#phi", 100, -3.15, 3.15)},
{"Pt", PlotHelpers::Binning("pT [GeV/c]", 40, 0, 100)},
{"Z0", PlotHelpers::Binning("z_0 [mm]", 50, -200, 200)},
{"DeltaR", PlotHelpers::Binning("#Delta R", 100, 0, 0.3)}};
};

Expand All @@ -42,6 +43,7 @@ class EffPlotTool {
TEfficiency* trackEff_vs_pT{nullptr}; ///< Tracking efficiency vs pT
TEfficiency* trackEff_vs_eta{nullptr}; ///< Tracking efficiency vs eta
TEfficiency* trackEff_vs_phi{nullptr}; ///< Tracking efficiency vs phi
TEfficiency* trackEff_vs_z0{nullptr}; ///< Tracking efficiency vs z0
TEfficiency* trackEff_vs_DeltaR{
nullptr}; ///< Tracking efficiency vs distance to the closest truth
///< particle
Expand Down
8 changes: 8 additions & 0 deletions Examples/Framework/src/Validation/EffPlotTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ void ActsExamples::EffPlotTool::book(
PlotHelpers::Binning bEta = m_cfg.varBinning.at("Eta");
PlotHelpers::Binning bPt = m_cfg.varBinning.at("Pt");
PlotHelpers::Binning bDeltaR = m_cfg.varBinning.at("DeltaR");
PlotHelpers::Binning bZ0 = m_cfg.varBinning.at("Z0");
ACTS_DEBUG("Initialize the histograms for efficiency plots");
// efficiency vs pT
effPlotCache.trackEff_vs_pT = PlotHelpers::bookEff(
Expand All @@ -37,6 +38,9 @@ void ActsExamples::EffPlotTool::book(
// efficiency vs phi
effPlotCache.trackEff_vs_phi = PlotHelpers::bookEff(
"trackeff_vs_phi", "Tracking efficiency;Truth #phi;Efficiency", bPhi);
// efficiency vs z0
effPlotCache.trackEff_vs_z0 = PlotHelpers::bookEff(
"trackeff_vs_z0", "Tracking efficiency;Truth z_0 [mm];Efficiency", bZ0);
// efficiancy vs distance to the closest truth particle
effPlotCache.trackEff_vs_DeltaR = PlotHelpers::bookEff(
"trackeff_vs_DeltaR",
Expand All @@ -47,6 +51,7 @@ void ActsExamples::EffPlotTool::clear(EffPlotCache& effPlotCache) const {
delete effPlotCache.trackEff_vs_pT;
delete effPlotCache.trackEff_vs_eta;
delete effPlotCache.trackEff_vs_phi;
delete effPlotCache.trackEff_vs_z0;
delete effPlotCache.trackEff_vs_DeltaR;
}

Expand All @@ -56,6 +61,7 @@ void ActsExamples::EffPlotTool::write(
effPlotCache.trackEff_vs_pT->Write();
effPlotCache.trackEff_vs_eta->Write();
effPlotCache.trackEff_vs_phi->Write();
effPlotCache.trackEff_vs_z0->Write();
effPlotCache.trackEff_vs_DeltaR->Write();
}

Expand All @@ -65,10 +71,12 @@ void ActsExamples::EffPlotTool::fill(EffPlotTool::EffPlotCache& effPlotCache,
const auto t_phi = phi(truthParticle.direction());
const auto t_eta = eta(truthParticle.direction());
const auto t_pT = truthParticle.transverseMomentum();
const auto t_z0 = truthParticle.position().z();
const auto t_deltaR = deltaR;

PlotHelpers::fillEff(effPlotCache.trackEff_vs_pT, t_pT, status);
PlotHelpers::fillEff(effPlotCache.trackEff_vs_eta, t_eta, status);
PlotHelpers::fillEff(effPlotCache.trackEff_vs_phi, t_phi, status);
PlotHelpers::fillEff(effPlotCache.trackEff_vs_z0, t_z0, status);
PlotHelpers::fillEff(effPlotCache.trackEff_vs_DeltaR, t_deltaR, status);
}

0 comments on commit c38cafe

Please sign in to comment.