Skip to content

Commit

Permalink
Update track fit EDM (#58)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?
This introduces changes to the track fit and track state EDM objects to
better conform to a single container that can deliver all of the needs
of downstream reconstruction algorithms and (ultimately) physics
analysis.

1. Introduces a 6D covariance matrix object that is really the upper
triangle of a full 6x6 covariance, for storage purposes.
2. Moves some "track level" quantities out from `edm4eic::Trajectory`
and into `edm4eic::Track`
3. Revamps the `edm4eic::TrackParameters` object, which will need to
contain the complete covariance to swap between edm4eic and Acts::EDM.
Also adds a surface type as bound track parameters make no sense without
an associated surface.
4. Adds a full covariance, position, and PID hypothesis to
`edm4eic::Track`

The resulting track object contains the set of track parameters at the
vertex, some criteria to evaluate the track fit (e.g. those contained in
the one to one relation to `edm4eic::Trajectory`), and all track states
associated to the fit (also still in `edm4eic::Trajectory`).

The track parameters at the vertex do need to be stored separately (e.g.
not as another uniquely defined track state), for a technical reason.
They are going to (1) be most frequently used in global coordinates,
which the track parameters are not in and (2) are associated to a
`PerigeeSurface`, which is transient unlike the surfaces associated with
the actual geometry. Without knowledge of the surface, a set of
BoundTrackParameters do not have a well defined global definition.

Opening this PR now as it will likely have nontrivial downstream
consequences, so comments welcome.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [x] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
It introduces breaking changes to EICrecon. Currently there are 3
containers produced by the CKF in EICrecon - the aim of this PR is to
reduce this to a single container. This will in turn change other
downstream reconstruction algorithms that rely on the CKF output as they
will have to access this changed structure.

### Does this PR change default behavior?
No
  • Loading branch information
osbornjd authored Nov 2, 2023
1 parent f41acf1 commit 6904444
Showing 1 changed file with 40 additions and 30 deletions.
70 changes: 40 additions & 30 deletions edm4eic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ components:
}\n
"

edm4eic::Cov6f:
Members:
- std::array<float, 21> covariance // 6d triangular packed covariance matrix
ExtraCode:
declaration: "
Cov6f() : covariance{} {}\n
Cov6f(std::array<float, 21> vcov) : covariance{vcov}{}\n
float& operator()(unsigned i, unsigned j) {\n
if(i > j) {\n
std::swap(i, j);\n
}\n
return covariance[i + 1 + (j + 1) * (j) / 2 - 1];\n
}\n
"

## A point along a track
edm4eic::TrackPoint:
Members:
Expand Down Expand Up @@ -359,52 +374,47 @@ datatypes:
- uint32_t nMeasurements // Number of hits used
- uint32_t nOutliers // Number of hits not considered
- uint32_t nHoles // Number of missing hits
- float chi2 // Total chi2
- uint32_t ndf // Number of degrees of freedom
- uint32_t nSharedHits // Number of shared hits with other trajectories
VectorMembers:
- float measurementChi2 // Chi2 for each of the measurements
- float outlierChi2 // Chi2 for each of the outliers
OneToManyRelations:
- edm4eic::TrackParameters trackParameters // Associated track parameters, if any
- edm4eic::Measurement2D measurementHits // Measurement hits used in this trajectory
- edm4eic::Measurement2D outlierHits // Outlier hits not used in this trajectory

edm4eic::TrackParameters:
Description: "ACTS Bound Track parameters"
Author: "W. Armstrong, S. Joosten"
Author: "W. Armstrong, S. Joosten, J. Osborn"
Members:
- int32_t type // Type of track parameters (-1/seed, 0/head, ...)
- edm4hep::Vector2f loc // 2D location on surface
- edm4eic::Cov2f locError // Covariance on loc
- float theta // Track polar angle [rad]
- float phi // Track azimuthal angle [rad]
- float qOverP // [e/GeV]
- edm4eic::Cov3f momentumError // Covariance on theta, phi and qOverP
- float time // Track time [ns]
- float timeError // Error on the time
- float charge // Particle charge
OneToOneRelations:
- edm4eic::Trajectory trajectory // Trajectory associated with these track parameters
- int32_t type // Type of track parameters (-1/seed, 0/head, ...)
- uint64_t surface // Surface for bound parameters (geometryID)
- edm4hep::Vector2f loc // 2D location on surface
- float theta // Track polar angle [rad]
- float phi // Track azimuthal angle [rad]
- float qOverP // [e/GeV]
- float time // Track time [ns]
- int32_t pdg // pdg pid for these parameters
- edm4eic::Cov6f covariance // Full covariance in basis [l0,l1,theta,phi,q/p,t]


edm4eic::Track:
Description: "Track information at the vertex"
Author: "S. Joosten"
Author: "S. Joosten, J. Osborn"
Members:
- int32_t type // Flag that defines the type of track
- float chi2 // Total chi2 (sum) of the track fit
- int32_t ndf // Numbers of degrees of freedom of the track fit
- edm4hep::Vector3f momentum // Track 3-momentum at the vertex [GeV]
- edm4eic::Cov3f momentumError // Covariance matrix on the momentum
- float time // Track time at the vertex [ns]
- float timeError // Error on the track vertex time
- float charge // Particle charge
- int32_t type // Flag that defines the type of track
- edm4hep::Vector3f position // Track 3-position at the vertex
- edm4hep::Vector3f momentum // Track 3-momentum at the vertex [GeV]
- edm4eic::Cov6f positionMomentumCovariance // Covariance matrix in basis [x,y,z,px,py,pz]
- float time // Track time at the vertex [ns]
- float timeError // Error on the track vertex time
- float charge // Particle charge
- float chi2 // Total chi2
- uint32_t ndf // Number of degrees of freedom
- int32_t pdg // PDG particle ID hypothesis
OneToOneRelations:
- edm4eic::Trajectory trajectory // Trajectory of this track
- edm4eic::Vertex vertex // Track vertex of this track
- edm4eic::Trajectory trajectory // Trajectory of this track
OneToManyRelations:
- edm4eic::TrackerHit trackerHits // Hits that were used for this track
- edm4eic::Track tracks // Tracks (segments) that have been combined to create this track
- edm4eic::Measurement2D measurements // Measurements that were used for this track
- edm4eic::Track tracks // Tracks (segments) that have been combined to create this track

edm4eic::TrackSegment:
Description: "A track segment defined by one or more points along a track."
Expand Down

0 comments on commit 6904444

Please sign in to comment.