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: full_chain_itk.py uses eta-dependent cuts #2934

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

timadye
Copy link
Contributor

@timadye timadye commented Feb 6, 2024

  • addCKFTracks can now specify a trackSelectorConfig = list(TrackSelectorConfig) for eta-dependent cuts, with binning specified in absEta[1]. addCKFTracks() can be called with any of:
    1. trackSelectorConfig = (TrackSelectorConfig(), TrackSelectorConfig(), ...). See full_chain_itk.py for an example.
    2. trackSelectorConfig = TrackSelectorConfig(). Can also be specified as TrackSelectorConfig() as an non-kwarg. See full_chain_odd.py for an example.
    3. trackSelectorConfig = None (default)
  • TrackSelectorConfig includes new cuts maxHoles, maxOutliers, maxSharedHits, and maxChi2.
  • full_chain_itk.py now uses Athena's ITk track selections.

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Feb 6, 2024
@timadye
Copy link
Contributor Author

timadye commented Feb 6, 2024

I can't get it to create a TrackSelector with EtaBinnedConfig, rather than the usual Config.

Traceback (most recent call last):
  File "/home/adye/acts/build-v32/python/acts/_adapter.py", line 32, in wrapped
    setattr(cfg, k, v)
TypeError: (): incompatible function arguments. The following argument types are supported:
    1. (self: acts.ActsPythonBindings._examples.TrackFindingAlgorithm.Config, arg0: Optional[acts.ActsPythonBindings.TrackSelector.Config]) -> None

Invoked with: <acts.ActsPythonBindings._examples.TrackFindingAlgorithm.Config object at 0x7f40249455f0>, <acts.ActsPythonBindings.TrackSelector.EtaBinnedConfig object at 0x7f40259be070>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/adye/acts/run-v32/./src/Examples/Scripts/Python/full_chain_itk.py", line 109, in <module>
    addCKFTracks(
  File "/home/adye/acts/build-v32/python/acts/examples/__init__.py", line 185, in NamedTypeArgsWrapper
    return func(*newargs, **kwargs)
  File "/home/adye/acts/build-v32/python/acts/examples/reconstruction.py", line 1213, in addCKFTracks
    trackFinder = acts.examples.TrackFindingAlgorithm(
  File "/home/adye/acts/build-v32/python/acts/_adapter.py", line 34, in wrapped
    raise RuntimeError(
RuntimeError: <class 'acts.ActsPythonBindings._examples.TrackFindingAlgorithm.Config'>: Failed to set trackSelectorCfg=<acts.ActsPythonBindings.TrackSelector.EtaBinnedConfig object at 0x7f40259be070>

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e9da852) 48.96% compared to head (2706e6e) 48.96%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2934   +/-   ##
=======================================
  Coverage   48.96%   48.96%           
=======================================
  Files         495      495           
  Lines       28918    28918           
  Branches    13702    13702           
=======================================
  Hits        14161    14161           
  Misses       4881     4881           
  Partials     9876     9876           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timadye
Copy link
Contributor Author

timadye commented Feb 7, 2024

I can't get it to create a TrackSelector with EtaBinnedConfig, rather than the usual Config.

This was because TrackFindingAlgorithm::Config only stored a Acts::TrackSelector::Config. The last commit changed it to a std::variant<Acts::TrackSelector::Config, Acts::TrackSelector::EtaBinnedConfig>, so either can be specified.

Now it works. addCKFTracks() can be called with any of:

  1. trackSelectorConfig = (TrackSelectorConfig(), TrackSelectorConfig(), ...). See full_chain_itk.py for an example.
  2. trackSelectorConfig = TrackSelectorConfig(). Can also be specified as TrackSelectorConfig() as an non-kwarg. See full_chain_odd.py for an example.
  3. trackSelectorConfig = None (default)

@timadye timadye marked this pull request as ready for review February 7, 2024 19:28
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

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

lgtm!

@andiwand andiwand added this to the next milestone Feb 8, 2024
@kodiakhq kodiakhq bot merged commit 4e25aa2 into acts-project:main Feb 8, 2024
52 checks passed
@github-actions github-actions bot removed the automerge label Feb 8, 2024
@timadye
Copy link
Contributor Author

timadye commented Feb 9, 2024

Using the Athena ITk track selections now in full_chain_itk.py gives much better tracking efficiency for ttbar + PU200:
trksel_eff
at the expense of some extra duplicates:
trksel_dup
The job took ~25% longer, but I had some problems with the machine at the time, so it may have been unrelated.

LaraCalic pushed a commit to LaraCalic/acts that referenced this pull request Feb 10, 2024
* `addCKFTracks` can now specify a `trackSelectorConfig = list(TrackSelectorConfig)` for eta-dependent cuts, with binning specified in `absEta[1]`. `addCKFTracks()` can be called with any of:
  1. `trackSelectorConfig = (TrackSelectorConfig(), TrackSelectorConfig(), ...)`. See `full_chain_itk.py` for an example.
  2. `trackSelectorConfig = TrackSelectorConfig()`. Can also be specified as `TrackSelectorConfig()` as an non-kwarg. See `full_chain_odd.py` for an example.
  3. `trackSelectorConfig = None` (default)
* `TrackSelectorConfig` includes new cuts `maxHoles`, `maxOutliers`, `maxSharedHits`, and `maxChi2`.
* `full_chain_itk.py` now uses Athena's ITk track selections.
@paulgessinger paulgessinger modified the milestones: next, v33.0.0 Mar 6, 2024
EleniXoch pushed a commit to EleniXoch/acts that referenced this pull request May 6, 2024
* `addCKFTracks` can now specify a `trackSelectorConfig = list(TrackSelectorConfig)` for eta-dependent cuts, with binning specified in `absEta[1]`. `addCKFTracks()` can be called with any of:
  1. `trackSelectorConfig = (TrackSelectorConfig(), TrackSelectorConfig(), ...)`. See `full_chain_itk.py` for an example.
  2. `trackSelectorConfig = TrackSelectorConfig()`. Can also be specified as `TrackSelectorConfig()` as an non-kwarg. See `full_chain_odd.py` for an example.
  3. `trackSelectorConfig = None` (default)
* `TrackSelectorConfig` includes new cuts `maxHoles`, `maxOutliers`, `maxSharedHits`, and `maxChi2`.
* `full_chain_itk.py` now uses Athena's ITk track selections.
asalzburger pushed a commit to asalzburger/acts that referenced this pull request May 21, 2024
* `addCKFTracks` can now specify a `trackSelectorConfig = list(TrackSelectorConfig)` for eta-dependent cuts, with binning specified in `absEta[1]`. `addCKFTracks()` can be called with any of:
  1. `trackSelectorConfig = (TrackSelectorConfig(), TrackSelectorConfig(), ...)`. See `full_chain_itk.py` for an example.
  2. `trackSelectorConfig = TrackSelectorConfig()`. Can also be specified as `TrackSelectorConfig()` as an non-kwarg. See `full_chain_odd.py` for an example.
  3. `trackSelectorConfig = None` (default)
* `TrackSelectorConfig` includes new cuts `maxHoles`, `maxOutliers`, `maxSharedHits`, and `maxChi2`.
* `full_chain_itk.py` now uses Athena's ITk track selections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module Track Finding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants