Skip to content

Commit

Permalink
ci(gx2f): add physmon truth tracking for the GX2F (#2966)
Browse files Browse the repository at this point in the history
This PR adds the GX2F to the physmon. It runs stable even though the ODD uses 3D-measurements for the inner pixels. So far the GX2F supports only 1-2D measurements.

blocked by:
- #2972
- #2981
  • Loading branch information
AJPfleger authored Feb 22, 2024
1 parent 15ace85 commit 6fb49f1
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 11 deletions.
48 changes: 48 additions & 0 deletions CI/physmon/gx2f.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
checks:
"*":
Chi2Test:
threshold: 0.01
KolmogorovTest:
threshold: 0.68
RatioCheck:
threshold: 3
ResidualCheck:
threshold: 3
IntegralCheck:
threshold: 3

"nStates_*":
KolmogorovTest: null
"nMeasurements_*":
KolmogorovTest: null

pullmean_phi_vs_eta:
IntegralCheck:
threshold: 4
pullmean_theta_vs_eta:
IntegralCheck: null
pullmean_z0_vs_eta:
IntegralCheck: null

pullwidth_phi_vs_eta:
IntegralCheck:
threshold: 4.3
reswidth_d0_vs_eta:
IntegralCheck:
threshold: 4
resmean_d0_vs_eta:
IntegralCheck:
threshold: 4

pullwidth_*:
Chi2Test: null
KolmogorovTest: null
pullmean_*:
Chi2Test: null
KolmogorovTest: null
reswidth_*:
Chi2Test: null
KolmogorovTest: null
resmean_*:
Chi2Test: null
KolmogorovTest: null
12 changes: 12 additions & 0 deletions CI/physmon/phys_perf_mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ fi
if [[ "$mode" == "all" || "$mode" == "gsf" ]]; then
run_physmon_gen "Truth Tracking GSF" "truth_tracking_gsf"
fi
if [[ "$mode" == "all" || "$mode" == "gx2f" ]]; then
run_physmon_gen "Truth Tracking GX2F" "truth_tracking_gx2f"
fi
if [[ "$mode" == "all" || "$mode" == "fullchains" ]]; then
run_physmon_gen "CKF Tracking" "ckf_tracking"
run_physmon_gen "Track finding ttbar" "track_finding_ttbar"
Expand Down Expand Up @@ -340,6 +343,15 @@ if [[ "$mode" == "all" || "$mode" == "kalman" ]]; then
-c CI/physmon/truth_tracking.yml
fi

if [[ "$mode" == "all" || "$mode" == "gx2f" ]]; then
run_histcmp \
$outdir/performance_gx2f.root \
$refdir/performance_gx2f.root \
"Truth tracking (GX2F)" \
gx2f \
-c CI/physmon/gx2f.yml
fi

if [[ "$mode" == "all" || "$mode" == "vertexing" ]]; then
Examples/Scripts/vertex_mu_scan.py \
$outdir/performance_vertexing_*mu*.root \
Expand Down
Binary file added CI/physmon/reference/performance_gx2f.root
Binary file not shown.
34 changes: 34 additions & 0 deletions CI/physmon/workflows/physmon_truth_tracking_gx2f.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python3
import tempfile
from pathlib import Path
import shutil

import acts
from truth_tracking_gx2f import runTruthTrackingGx2f

from physmon_common import makeSetup

setup = makeSetup()

with tempfile.TemporaryDirectory() as temp:
s = acts.examples.Sequencer(
events=10000,
numThreads=-1,
logLevel=acts.logging.INFO,
)

tp = Path(temp)
runTruthTrackingGx2f(
trackingGeometry=setup.trackingGeometry,
field=setup.field,
outputDir=tp,
digiConfigFile=setup.digiConfig,
s=s,
)

s.run()
del s

perf_file = tp / "performance_gx2f.root"
assert perf_file.exists(), "Performance file not found"
shutil.copy(perf_file, setup.outdir / "performance_gx2f.root")
22 changes: 11 additions & 11 deletions Examples/Scripts/Python/truth_tracking_gx2f.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def runTruthTrackingGx2f(
inputSimHits="simhits",
inputMeasurementParticlesMap="measurement_particles_map",
inputMeasurementSimHitsMap="measurement_simhits_map",
filePath=str(outputDir / "trackstates_fitter.root"),
filePath=str(outputDir / "trackstates_gx2f.root"),
)
)

Expand All @@ -118,7 +118,7 @@ def runTruthTrackingGx2f(
inputTracks="tracks",
inputParticles="truth_seeds_selected",
inputMeasurementParticlesMap="measurement_particles_map",
filePath=str(outputDir / "tracksummary_fitter.root"),
filePath=str(outputDir / "tracksummary_gx2f.root"),
writeGx2fSpecific=True,
)
)
Expand All @@ -134,15 +134,15 @@ def runTruthTrackingGx2f(
# )
# )
#
# s.addWriter(
# acts.examples.TrackFitterPerformanceWriter(
# level=acts.logging.INFO,
# inputTracks="tracks",
# inputParticles="truth_seeds_selected",
# inputMeasurementParticlesMap="measurement_particles_map",
# filePath=str(outputDir / "performance_track_fitter.root"),
# )
# )
s.addWriter(
acts.examples.TrackFitterPerformanceWriter(
level=acts.logging.INFO,
inputTracks="tracks",
inputParticles="truth_seeds_selected",
inputMeasurementParticlesMap="measurement_particles_map",
filePath=str(outputDir / "performance_gx2f.root"),
)
)

return s

Expand Down

0 comments on commit 6fb49f1

Please sign in to comment.