-
Notifications
You must be signed in to change notification settings - Fork 173
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: Conversion and chain code in traccc #3656
base: main
Are you sure you want to change the base?
Conversation
A little weekend gift for @asalzburger |
cebf42a
to
ba45053
Compare
cd6a697
to
ea15a01
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Examples/Python/src/Traccc.cpp
Outdated
|
||
auto traccc = mex.def_submodule("traccc"); | ||
auto [_, mex] = ctx.get("main", "examples"); | ||
auto m = mex.def_submodule("_traccc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this run the code that adds a submodule multiple times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We anyway need to streamline a bit the python bindings and make it somewhat consistent.
ea15a01
to
a0c9c25
Compare
a0c9c25
to
53d156e
Compare
@asalzburger this is now ready for review. |
53d156e
to
b81993e
Compare
e8cf174
to
5db1acd
Compare
This PR adds conversion code as well as the code to run simple host-side chain algorithms using traccc. Co-authored-by: Stephen Nicholas Swatman <[email protected]>
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Omg coderabbit 🥺👉👈 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first quick round
|
||
namespace ActsExamples::Traccc::Common::Conversion { | ||
|
||
std::map<Acts::GeometryIdentifier, std::vector<traccc::cell>> tracccCellsMap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually bind the namespace explicitly to the definition to avoid late linker errors in case the signature changes
|
||
#include "traccc/edm/cell.hpp" | ||
|
||
namespace ActsExamples::Traccc::Common::Conversion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks quite deeply nested. I think we usually try to keep things flap. But nothing critical.
template <typename detector_t, std::forward_iterator iterator_t> | ||
inline MeasurementContainer convertTracccToActsMeasurements( | ||
const detector_t& detector, iterator_t measurements_begin, | ||
iterator_t measurements_end) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: could be a range instead of begin
and end
|
||
namespace ActsExamples::Traccc::Common::Conversion { | ||
|
||
namespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it intentional that everything lives in an anonymous namespace here?
|
||
namespace ActsExamples::Traccc::Common { | ||
|
||
struct TracccChainConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: usually we put the config inline with the algorithm
ids=["smeared", "geometric"], | ||
ids=["smeared", "geometric", "odd-smeared", "odd-geometric"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a replacement?
# def create_gen1_tracking_geometry(): | ||
# return getOpenDataDetector() | ||
|
||
# def create_gen2_tracking_geometry(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code?
This PR adds conversion code as well as the code to run simple host-side chain algorithms using traccc.
This code is highly experimental and perhaps not yet of the highest possible quality; I intend to iterate on this later, but I'd like to get the skeleton in to somewhat stabilize this plugin.
Closes #3281, #3320, #3363, #3505.