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

Determine succesfully fitted tracks #869

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

beomki-yeo
Copy link
Contributor

@beomki-yeo beomki-yeo commented Feb 14, 2025

Now depends on #881


This PR adds a boolean variable in fitting_result to determine whether the fitting was successful. This should be harmonized with #862 as well

Success conditions:

  1. NDF >0
  2. All non-hole track states should be smoothed (i.e. In case of two-filters smoother, forward and backward filter need to pass the same modules.)

The second condition will be much easier to be met once we implement the direct navigator.

Some plots about fitting efficiency will follow soon...


Here is the plot of fitting efficiency (Number of successfully fitted track / Total number of tracks) as a function of mask tolerance.

Fitting efficiency drops a lot for momentum < 10 GeV/c, which is expected due to the larger material effect + unstable navigation.

  • Firx overstep tolerance = default value (-300 um)
  • Fixed mask tolerance

Following is the script used:

Script
#!/bin/bash
n_ptc=2000
mom_array=(1 2 5 10 100)
tol_array=(0 1 2 3 4)

for mom in "${mom_array[@]}"
do

    command_simulate="
    ./bin/traccc_simulate \
    --detector-file=geometries/odd/odd-detray_geometry_detray.json \
    --material-file=geometries/odd/odd-detray_material_detray.json \
    --grid-file=geometries/odd/odd-detray_surface_grids_detray.json \
    --output-directory=odd/simplified_${n_ptc}muon_${mom}GeV/ \
    --gen-events=1 \
    --gen-nparticles=${n_ptc} \
    --gen-mom-gev=${mom}:${mom} \
    --gen-eta=-1:1 \
    --rk-tolerance=1e-8
    "

    ${command_simulate}

    for tol in "${tol_array[@]}"
    do

        echo "Mom setup: ${mom}, Tol setup: ${tol}"

        command_truth_fit="
        ./bin/traccc_truth_fitting_example \
        --detector-file=geometries/odd/odd-detray_geometry_detray.json \
        --material-file=geometries/odd/odd-detray_material_detray.json \
        --grid-file=geometries/odd/odd-detray_surface_grids_detray.json \
        --use-detray-detector=true \
        --use-acts-geom-source=false \
        --input-directory=odd/simplified_${n_ptc}muon_${mom}GeV/ \
        --input-events=1 \
        --min-mask-tolerance=${tol} \
        --max-mask-tolerance=${tol} \
        --check-performance 
        "

        ${command_truth_fit}

        mv performance_track_fitting.root performance_track_fitting_${mom}_${tol}.root
    done
done

@niermann999 advised that mask tolerances of the first figure should not be touched. I also think the mask tolerance won't be even an issue once we implement the direct navigator. However, the current default overstep tolerance of (-300 um) may be too small for small momentum particle. It would be nice to make it larger or adaptive for different values of momentum.

@beomki-yeo beomki-yeo marked this pull request as draft February 14, 2025 07:34
@beomki-yeo
Copy link
Contributor Author

@niermann999 I don't know how to set the min/max mask tolerance so I just set them to the same value. Let me know if it has to be changed.

@niermann999
Copy link
Contributor

The maximum mask tolerance should not be made smaller than it is currently, I believe (making it larger should be fine, as it determines the mask tolerance for surfaces that are far away from the track). The minimum mask tolerance is effectively what we require when the track is already on the surface. Not sure that should be much looser than it is (which corresponds to the propagation position error that was found in the ATLAS paper, if I remember correctly). The two tolerances should however not be set to the same value imo.
The scale factor, that sets the mask tolerances in between the min and max values depending on the distance to the track is probably what we should be looking at.

@beomki-yeo beomki-yeo force-pushed the check-all-smoothed branch 4 times, most recently from d51a9ba to 74ac140 Compare February 20, 2025 05:55
@beomki-yeo beomki-yeo marked this pull request as ready for review February 20, 2025 05:56
@beomki-yeo
Copy link
Contributor Author

beomki-yeo commented Feb 20, 2025

@stephenswat I made a new enum class of fitting_outcome which is recorded in the fitting_result. I wanted to rather record the unsuccessfully fitted tracks if it is not an error categorized in fitting_status.

Copy link
Member

@stephenswat stephenswat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we will need to fix the tests.

@beomki-yeo beomki-yeo merged commit 965c158 into acts-project:main Feb 22, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants