Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add tracking efficiency vs z0 #3764

Merged
merged 4 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified CI/physmon/reference/trackfitting_gsf/performance_trackfitting.root
Binary file not shown.
Binary file not shown.
Binary file modified CI/physmon/reference/trackfitting_kf/performance_trackfitting.root
Binary file not shown.
Binary file not shown.
Binary file not shown.
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);
}
2 changes: 1 addition & 1 deletion Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test_root_clusters_writer[kwargsConstructor]__clusters.root: e842df4fe04eefff3df
test_exatrkx[cpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc87943366f4af4440f7eea6887afb763871ac149b05
test_exatrkx[gpu-onnx]__performance_track_finding.root: 9090de10ffb1489d3f1993e2a3081a3038227e3e5c453e98a9a4f33ea3d6d817
test_exatrkx[gpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc87943366f4af4440f7eea6887afb763871ac149b05
test_ML_Ambiguity_Solver__performance_finding_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006
test_ML_Ambiguity_Solver__performance_finding_ambiML.root: 166dd8bb189097c4957b7b02c04c41267868d72d9a08c4bb892985b06849cb76
test_refitting[odd]__trackstates_gsf_refit.root: e297749dc1e7eda3b8dea13defa0499986c584740d93e723a901b498b8e90c71
test_refitting[odd]__tracksummary_gsf_refit.root: d5085882e45a0b699194dff9f40a36e9291227bf65f9aaaf9087f9242ef5ae22
test_refitting[generic]__trackstates_gsf_refit.root: 4424fdf2f27575db825c1a59f8e53a1595946211cbd5b2c8d3a2f71cdcc77ae9
Expand Down
Loading