Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add method to return measurement indices (#2028)
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 ?
- Loading branch information