Skip to content

feat: Demonstrator for MillePede alignment of ACTS Kalman tracks#5256

Merged
andiwand merged 23 commits intoacts-project:mainfrom
goblirsc:MG_MillePede_demo
Apr 18, 2026
Merged

feat: Demonstrator for MillePede alignment of ACTS Kalman tracks#5256
andiwand merged 23 commits intoacts-project:mainfrom
goblirsc:MG_MillePede_demo

Conversation

@goblirsc
Copy link
Copy Markdown
Contributor

@goblirsc goblirsc commented Mar 18, 2026

Add a first demonstrator of MillePede alignment, using existing ACTS Kalman tracks.

--- END COMMIT MESSAGE ---

First step towards adding actual life to the MillePede ❤️ ACTS effort!

After making Mille available as a plugin in we use it to write ACTS-Kalman tracks out into binary files that can be fit with the MillePede package.

This path is simple (as we can re-use existing tracks), but computationally highly inefficient - we have to "undo" the track fit to bring the global covariance matrix of the Kalman tracks into the format expected by Millepede.
This should hence be seen as an initial proof of concept demonstrator.
For real-life usage, the GeneralBrokenLines track refit (planned for ACTS-integration in the near future) will likely be a better choice for the fitter component in the alignment. But the final implementation should be sufficiently modular to work with any fitter nonetheless.

In this MR, we add

  • (algebraic) machinery to translate the Kalman track alignment states to what Mille expects
  • Machinery to loosely emulate how Millepede reads the Mille binaries, allowing to populate ACTS TrackAlignmentStates from Mille binaries
  • an AlignedTelescopeDetector for a simple showcase setup
  • An example algorithm using the new machinery to write (existing) Kalman tracks out into MillePede fit inputs
  • A second example algorithm that will load back the Mille files and run an alignment fit with the ACTS solver. NB: This also fixes the problem of the existing alignment example solver only "seeing" one event at a time.
  • python bindings for the above
  • A unit test ensuring that Mille writing and reading back into ACTS results in consistent alignment problems
  • Steering to run a simple workflow with single muons on a misaligned telescope detector.

The alignment fit itself is performed outside ACTS using the MillePede package. Alternatively, it is possible to read the binaries back and solve using the ACTS tooling.

@goblirsc goblirsc changed the title Feat: Demonstrator for MillePede alignment of ACTS Kalman tracks feat: Demonstrator for MillePede alignment of ACTS Kalman tracks Mar 18, 2026
@goblirsc
Copy link
Copy Markdown
Contributor Author

Wow, the CI even checks the PR title?
I failed really early this time! 😭

@github-actions github-actions Bot added this to the next milestone Mar 18, 2026
@github-actions github-actions Bot added Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins labels Mar 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 18, 2026

📊: Physics performance monitoring for 28e9a4a

Full contents

physmon summary

@asalzburger
Copy link
Copy Markdown
Contributor

Amazing!

@goblirsc goblirsc marked this pull request as ready for review March 20, 2026 14:55
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
@goblirsc
Copy link
Copy Markdown
Contributor Author

Pausing updates for now to allow for review (sorry for the big PR - once the first bits were in place the extra features just kept coming by themselves 😇 )

@goblirsc goblirsc force-pushed the MG_MillePede_demo branch from ff4d2f2 to 38176e7 Compare March 30, 2026 09:59
@goblirsc
Copy link
Copy Markdown
Contributor Author

goblirsc commented Apr 1, 2026

Could someone please review this?
image

@paulgessinger
Copy link
Copy Markdown
Member

I can have a look next week. In the meantime, maybe @pbutti or @knutzk could have a look?

@andiwand
Copy link
Copy Markdown
Contributor

andiwand commented Apr 1, 2026

It is also on my list but I didn't get to it yet. Let me also ping the review channel on MM https://mattermost.web.cern.ch/acts/channels/code-review

Copy link
Copy Markdown
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.

couple of small comments and nitpicks but didn't go through completely yet

one major change I was not sure about yet is the telescope detector modifications. I thought the alignment of our detectors is already in place and general enough to support this. I think @asalzburger knows more about this

Comment thread Examples/Algorithms/AlignmentMillePede/src/ActsSolverFromMille.cpp
Comment thread Alignment/include/ActsAlignment/Kernel/Alignment.ipp Outdated
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
Comment thread Plugins/Mille/src/ActsToMille.cpp Outdated
Comment thread Plugins/Mille/src/Helpers.cpp Outdated
Comment thread Plugins/Mille/src/Helpers.cpp Outdated
Comment thread Examples/Algorithms/AlignmentMillePede/src/ActsSolverFromMille.cpp Outdated
Comment thread Examples/Algorithms/AlignmentMillePede/src/MillePedeAlignmentSandbox.cpp Outdated
Comment thread Examples/Algorithms/AlignmentMillePede/src/ActsSolverFromMille.cpp Outdated
Comment thread Examples/Algorithms/AlignmentMillePede/src/ActsSolverFromMille.cpp Outdated
Comment thread Plugins/Mille/include/ActsPlugins/Mille/ActsToMille.hpp Outdated
Comment thread Plugins/Mille/include/ActsPlugins/Mille/ActsToMille.hpp Outdated
Copy link
Copy Markdown
Contributor Author

@goblirsc goblirsc left a comment

Choose a reason for hiding this comment

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

Hi @andiwand @pbutti, thanks for the review - initial set should be implemented now. I think we just need to decide what we prefer to do with the TelescopeDetector vs AlignableTelescopeDetector and some naming subtleties :)

Comment thread Examples/Algorithms/AlignmentMillePede/src/ActsSolverFromMille.cpp Outdated
Comment thread Plugins/Mille/include/ActsPlugins/Mille/ActsToMille.hpp Outdated
Comment thread Plugins/Mille/src/Helpers.cpp Outdated
Comment thread Plugins/Mille/src/Helpers.cpp Outdated
@andiwand
Copy link
Copy Markdown
Contributor

Hi @andiwand @pbutti, thanks for the review - initial set should be implemented now. I think we just need to decide what we prefer to do with the TelescopeDetector vs AlignableTelescopeDetector and some naming subtleties :)

thanks @goblirsc ! I think we only need one of them. could you extract these changes into a separate PR which just makes the TelescopeDetector alignable using the code you already have for AlignableTelescopeDetector?

@goblirsc
Copy link
Copy Markdown
Contributor Author

Hi @andiwand @pbutti, thanks for the review - initial set should be implemented now. I think we just need to decide what we prefer to do with the TelescopeDetector vs AlignableTelescopeDetector and some naming subtleties :)

thanks @goblirsc ! I think we only need one of them. could you extract these changes into a separate PR which just makes the TelescopeDetector alignable using the code you already have for AlignableTelescopeDetector?

Hi, sure - will prepare a follow up PR which ports the alignment functionality to the base TelescopeDetector and removes the "
"aligned" flavour.

@sonarqubecloud
Copy link
Copy Markdown

@andiwand andiwand merged commit 458fbd8 into acts-project:main Apr 18, 2026
42 checks passed
@andiwand andiwand modified the milestones: next, v46.4.0, v46.3.0 Apr 18, 2026
paradajzblond pushed a commit to paradajzblond/acts that referenced this pull request Apr 20, 2026
…s-project#5256)

Add a first demonstrator of MillePede alignment, using existing ACTS
Kalman tracks.
@goblirsc
Copy link
Copy Markdown
Contributor Author

Hi @andiwand @pbutti, thanks for the review - initial set should be implemented now. I think we just need to decide what we prefer to do with the TelescopeDetector vs AlignableTelescopeDetector and some naming subtleties :)

thanks @goblirsc ! I think we only need one of them. could you extract these changes into a separate PR which just makes the TelescopeDetector alignable using the code you already have for AlignableTelescopeDetector?

Hi, sure - will prepare a follow up PR which ports the alignment functionality to the base TelescopeDetector and removes the " "aligned" flavour.

--> #5369

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 Component - Plugins Affects one or more Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants