Skip to content

chore!: remove legacy material mapping#5236

Merged
asalzburger merged 14 commits into
acts-project:mainfrom
asalzburger:chore-remove-legacy-material-mapping
Mar 24, 2026
Merged

chore!: remove legacy material mapping#5236
asalzburger merged 14 commits into
acts-project:mainfrom
asalzburger:chore-remove-legacy-material-mapping

Conversation

@asalzburger

@asalzburger asalzburger commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

We are supporting still two type of material mapping approaches:
a - one using the propagator / navigator
b - a robust one using only line intersections

This PR removes the first option and only keeps the second, for the moment volume mapping is (for a short time) not supported, it will be integrated into b.

What changed

Removed legacy algorithm path

  • Deleted Examples/Algorithms/MaterialMapping/include/ActsExamples/MaterialMapping/CoreMaterialMapping.hpp
  • Deleted Examples/Algorithms/MaterialMapping/src/CoreMaterialMapping.cpp
  • Replaced legacy MaterialMapping implementation with former core-based implementation:
  • Updated Examples/Algorithms/MaterialMapping/include/ActsExamples/MaterialMapping/MaterialMapping.hpp
  • Updated Examples/Algorithms/MaterialMapping/src/MaterialMapping.cpp

MaterialMapping now uses Acts::MaterialMapper and outputs mapped/unmapped tracks.

Removed old core mapper infrastructure from Core/Material:

  • Deleted Core/include/Acts/Material/SurfaceMaterialMapper.hpp
  • Deleted Core/include/Acts/Material/VolumeMaterialMapper.hpp
  • Deleted Core/src/Material/SurfaceMaterialMapper.cpp
  • Deleted Core/src/Material/VolumeMaterialMapper.cpp

Removed associated unit tests:

  • Deleted Tests/UnitTests/Core/Material/SurfaceMaterialMapperTests.cpp
  • Deleted Tests/UnitTests/Core/Material/VolumeMaterialMapperTests.cpp

Updated build wiring:

  • Examples/Algorithms/MaterialMapping/CMakeLists.txt
  • Core/src/Material/CMakeLists.txt
  • Tests/UnitTests/Core/Material/CMakeLists.txt

--- END COMMIT MESSAGE ---

With a simple sequence of 3 commands one can now re-create the ODD material maps:

python material_recording.py -n1000 -t1000 -o odd_material_geant4
python material_mapping.py -n 1000000 -i odd_material_geant4.root  -o odd_material
python material_validation.py -n 1000 -t 1000 -m odd_material_map.root -o odd_material_validated -p

Output is as follows:

overlay_profile_ratio_v_eta_t_X0

Any further description goes here, @-mentions are ok here!

  • Use a conventional commits prefix: quick summary
    • We mostly use feat, fix, refactor, docs, chore and build types.
  • A milestone will be assigned by one of the maintainers

@github-actions github-actions Bot added Component - Core Affects the Core module Component - Examples Affects the Examples module labels Mar 12, 2026
@github-actions github-actions Bot added this to the next milestone Mar 12, 2026
@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for 46c9ce5

Full contents

physmon summary

@github-actions github-actions Bot added the Component - Documentation Affects the documentation label Mar 17, 2026
@asalzburger asalzburger force-pushed the chore-remove-legacy-material-mapping branch from c296cad to 91e95f3 Compare March 17, 2026 12:09
@asalzburger asalzburger force-pushed the chore-remove-legacy-material-mapping branch from e0feaf9 to 9e662d5 Compare March 20, 2026 14:02
@asalzburger asalzburger requested a review from noemina March 24, 2026 10:08
@sonarqubecloud

Copy link
Copy Markdown

@noemina noemina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A nice clean-up! Thanks
It seems reasonable to me.

@asalzburger asalzburger merged commit c3d922a into acts-project:main Mar 24, 2026
42 checks passed
@asalzburger

Copy link
Copy Markdown
Contributor Author

Oh - this was of course breaking, not sure if we need to unroll this ? @andiwand

@paulgessinger

Copy link
Copy Markdown
Member

I think we should if it's breaking

@andiwand

Copy link
Copy Markdown
Contributor

yes I fear we have to revert this and wait for the next major release. in the meantime we can already deprecate this API and remove the code from Athena

asalzburger added a commit to asalzburger/acts that referenced this pull request Mar 25, 2026
We are supporting still two type of material mapping approaches: 
a - one using the propagator / navigator
b - a robust one using only line intersections

This PR removes the first option and only keeps the second, for the
moment volume mapping is (for a short time) not supported, it will be
integrated into b.

## What changed

### Removed legacy algorithm path 
- Deleted
Examples/Algorithms/MaterialMapping/include/ActsExamples/MaterialMapping/CoreMaterialMapping.hpp
- Deleted
Examples/Algorithms/MaterialMapping/src/CoreMaterialMapping.cpp
- Replaced legacy MaterialMapping implementation with former core-based
implementation:
- Updated
Examples/Algorithms/MaterialMapping/include/ActsExamples/MaterialMapping/MaterialMapping.hpp
- Updated Examples/Algorithms/MaterialMapping/src/MaterialMapping.cpp

### MaterialMapping now uses Acts::MaterialMapper and outputs
mapped/unmapped tracks.

### Removed old core mapper infrastructure from Core/Material:
- Deleted Core/include/Acts/Material/SurfaceMaterialMapper.hpp
- Deleted Core/include/Acts/Material/VolumeMaterialMapper.hpp
- Deleted Core/src/Material/SurfaceMaterialMapper.cpp
- Deleted Core/src/Material/VolumeMaterialMapper.cpp

### Removed associated unit tests:
- Deleted Tests/UnitTests/Core/Material/SurfaceMaterialMapperTests.cpp
- Deleted Tests/UnitTests/Core/Material/VolumeMaterialMapperTests.cpp

### Updated build wiring:
- Examples/Algorithms/MaterialMapping/CMakeLists.txt
- Core/src/Material/CMakeLists.txt
- Tests/UnitTests/Core/Material/CMakeLists.txt


--- END COMMIT MESSAGE ---

With a simple sequence of 3 commands one can now re-create the ODD
material maps:
```sh
python material_recording.py -n1000 -t1000 -o odd_material_geant4
python material_mapping.py -n 1000000 -i odd_material_geant4.root  -o odd_material
python material_validation.py -n 1000 -t 1000 -m odd_material_map.root -o odd_material_validated -p
```

Output is as follows:

<img width="793" height="631" alt="overlay_profile_ratio_v_eta_t_X0"
src="https://github.com/user-attachments/assets/976b6005-0c57-416e-9ad1-26c1e919fcda"
/>


Any further description goes here, @-mentions are ok here!

- Use a *conventional commits* prefix: [quick
summary](https://www.conventionalcommits.org/en/v1.0.0/#summary)
- We mostly use `feat`, `fix`, `refactor`, `docs`, `chore` and `build`
types.
- A milestone will be assigned by one of the maintainers
kodiakhq Bot pushed a commit that referenced this pull request Mar 31, 2026
This is a non-breaking first step of #5236 leaving the legacy modules still available.

It changes constantly to the naming `material_tracks` instead of the hyphenated version in order to be more inline with the rest of the examples.
@andiwand andiwand modified the milestones: next, v46.1.0 Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes Performance Component - Core Affects the Core module Component - Documentation Affects the documentation Component - Examples Affects the Examples module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants