-
Notifications
You must be signed in to change notification settings - Fork 157
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: Add method to return measurement indices #2028
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2028 +/- ##
=======================================
Coverage 49.87% 49.87%
=======================================
Files 421 421
Lines 23898 23898
Branches 10843 10843
=======================================
Hits 11920 11920
Misses 4357 4357
Partials 7621 7621
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
📊 Physics performance monitoring for 96ca027Full report VertexingSeedingCKFAmbiguity resolutionTruth tracking (Kalman Filter)Truth tracking (GSF) |
Add a method to return the measurement indices. This is useful to implement measurement calibration because to do this you basically need to 1) expand measurement parameters 2) calibrate 3) project back to the original subspace and 4) create a new measurement object. But, to create that object, we need to have the same ordering of the indices and it's cumbersome to obtain it without such a method. For instance, this is the best I could do: ``` std::array<Acts::BoundIndices, kSize> indices; for (size_t i = 0; i < kSize; i++) { Eigen::Index _, c; double v = P.row(i).maxCoeff(&_, &c); // P is meas.projector() assert(v > 0 && "invalid indices"); indices[i] = static_cast<Acts::BoundIndices>(c); } ``` However, this probably needs a bit of discussion. For instance, currently the method will cast the subspace indices from uint8_t to the measurement indice type, and when the measurement is created they will just be cast back to uint8_t which seems wastefull. Not sure it's an issue but if we want to avoid this we could return the subspace itself and add a new constructor for Measurement. But that's more intrusive. Thoughts, @asalzburger @paulgessinger ?
Add a method to return the measurement indices. This is useful to implement measurement calibration because to do this you basically need to 1) expand measurement parameters 2) calibrate 3) project back to the original subspace and 4) create a new measurement object. But, to create that object, we need to have the same ordering of the indices and it's cumbersome to obtain it without such a method. For instance, this is the best I could do:
However, this probably needs a bit of discussion. For instance, currently the method will cast the subspace indices from uint8_t to the measurement indice type, and when the measurement is created they will just be cast back to uint8_t which seems wastefull. Not sure it's an issue but if we want to avoid this we could return the subspace itself and add a new constructor for Measurement. But that's more intrusive.
Thoughts, @asalzburger @paulgessinger ?