4#ifndef ActsEvent_MultiTrajectory_h
5#define ActsEvent_MultiTrajectory_h
11#include "Acts/EventData/MultiTrajectory.hpp"
12#include "Acts/EventData/SourceLink.hpp"
13#include "Acts/EventData/TrackStatePropMask.hpp"
14#include "Acts/EventData/VectorMultiTrajectory.hpp"
15#include "Acts/Utilities/HashedString.hpp"
16#include "Acts/Geometry/TrackingGeometry.hpp"
18#include "Acts/Surfaces/Surface.hpp"
30#define INSPECTCALL(_INFO) {std::cout << __FILE__ <<":"<<__LINE__<<" "<<__PRETTY_FUNCTION__<<" "<<_INFO<<std::endl; }
32#define INSPECTCALL(_INFO)
37class MutableMultiTrajectory;
39class MutableTrackContainerHandlesHelper;
66using StoredSurface = std::variant<const Acts::Surface*, std::shared_ptr<const Acts::Surface>>;
78 :
public Acts::MultiTrajectory<ActsTrk::MutableMultiTrajectory> {
111 Acts::TrackStatePropMask mask);
150 template <
typename T>
170 Acts::TrackStatePropMask shareSource,
171 Acts::TrackStatePropMask shareTarget);
245 template <std::
size_t measdim>
246 inline typename ConstTrackStateProxy::template Calibrated<measdim>
249 return typename ConstTrackStateProxy::template Calibrated<measdim>{
m_trackMeasurementsAux->meas[measIdx].data()};
252 template <std::
size_t measdim,
bool Enable = true>
253 std::enable_if_t<Enable,
254 typename TrackStateProxy::template Calibrated<measdim>>
257 return typename TrackStateProxy::template Calibrated<measdim>{
m_trackMeasurementsAux->meas[measIdx].data()};
267 template <std::
size_t measdim>
268 inline typename ConstTrackStateProxy::template CalibratedCovariance<measdim>
271 return ConstTrackStateProxy::template CalibratedCovariance<measdim>{
m_trackMeasurementsAux->covMatrix[measIdx].data()};
273 template <std::
size_t measdim,
bool Enable = true>
275 Enable,
typename TrackStateProxy::template CalibratedCovariance<measdim>>
278 return TrackStateProxy::template CalibratedCovariance<measdim>{
m_trackMeasurementsAux->covMatrix[measIdx].data()};
306 template <
typename val_t,
typename cov_t>
308 const Eigen::DenseBase<val_t>& val,
309 const Eigen::DenseBase<cov_t>& cov)
310 requires(Eigen::PlainObjectBase<val_t>::RowsAtCompileTime > 0 &&
311 Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <= Acts::eBoundSize &&
312 Eigen::PlainObjectBase<val_t>::RowsAtCompileTime ==
313 Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime &&
314 Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime ==
315 Eigen::PlainObjectBase<cov_t>::ColsAtCompileTime);
326 const Acts::SourceLink& sourceLink);
335 std::shared_ptr<const Acts::Surface>);
346 Acts::HashedString key,
347 const std::any& src_ptr);
422 :
public Acts::MultiTrajectory<MultiTrajectory> {
456 template <std::
size_t measdim>
457 inline typename ConstTrackStateProxy::template Calibrated<measdim>
460 return typename ConstTrackStateProxy::template Calibrated<measdim>{
m_trackMeasurementsAux->meas[measIdx].data()};
463 template <std::
size_t measdim>
464 inline typename ConstTrackStateProxy::template CalibratedCovariance<measdim>
467 return typename ConstTrackStateProxy::template CalibratedCovariance<measdim>{
m_trackMeasurementsAux->covMatrix[measIdx].data()};
515template<
typename IFACE,
typename AUX>
517 auto interface = std::make_unique<IFACE>();
518 for (
size_t i = 0,
sz =
aux->size(); i <
sz; ++i) {
519 interface->emplace_back( new std::remove_pointer_t<typename IFACE::value_type>() );
521 interface->setStore(
aux);
536#include "Acts/EventData/VectorTrackContainer.hpp"
537CLASS_DEF(Acts::ConstVectorTrackContainer, 1074811884, 1)
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Read only version of MTJ The implementation is separate as the details are significantly different an...
ConstTrackStateProxy::Covariance jacobian_impl(ActsTrk::IndexType istate) const
std::vector< std::optional< Acts::SourceLink > > m_uncalibratedSourceLinks
Acts::TrackIndexType size_impl() const
bool has_impl(Acts::HashedString key, ActsTrk::IndexType istate) const
const DataLink< xAOD::TrackParametersAuxContainer > m_trackParametersAux
Acts::SourceLink getUncalibratedSourceLink_impl(ActsTrk::IndexType istate) const
ConstTrackStateProxy::template CalibratedCovariance< measdim > calibratedCovariance_impl(IndexType index) const
const DataLink< xAOD::TrackMeasurementAuxContainer > m_trackMeasurementsAux
std::vector< ActsTrk::detail::Decoration > m_decorations
xAOD::TrackStateContainer m_trackStatesIface
const DataLink< xAOD::TrackStateAuxContainer > m_trackStatesAux
std::vector< Acts::HashedString > dynamicKeys_impl() const
std::vector< std::optional< Acts::SourceLink > > m_calibratedSourceLinks
std::vector< StoredSurface > m_surfaces
ActsTrk::IndexType calibratedSize_impl(ActsTrk::IndexType istate) const
std::any component_impl(Acts::HashedString key, ActsTrk::IndexType istate) const
void moveSurfaces(const ActsTrk::MutableMultiTrajectory *mtj)
reuse surfaces from MutableMultiTrajectory
const Acts::Surface * referenceSurface_impl(IndexType) const
const DataLink< xAOD::TrackSurfaceAuxContainer > m_trackSurfacesAux
const DataLink< xAOD::TrackJacobianAuxContainer > m_trackJacobiansAux
ConstTrackStateProxy::Covariance covariance_impl(ActsTrk::IndexType index) const
MultiTrajectory(DataLink< xAOD::TrackStateAuxContainer > trackStates, DataLink< xAOD::TrackParametersAuxContainer > trackParameters, DataLink< xAOD::TrackJacobianAuxContainer > trackJacobians, DataLink< xAOD::TrackMeasurementAuxContainer > trackMeasurements, DataLink< xAOD::TrackSurfaceAuxContainer > trackSurfaces)
ConstTrackStateProxy::template Calibrated< measdim > calibrated_impl(IndexType istate) const
void fillSurfaces(const Acts::TrackingGeometry *geo)
Fill surfaces either from persistency or from geometry If the surfaces are already there it means tha...
ConstTrackStateProxy::Parameters parameters_impl(ActsTrk::IndexType index) const
void moveLinks(const ActsTrk::MutableMultiTrajectory *mtj)
bool hasColumn_impl(Acts::HashedString key) const
Athena implementation of ACTS::MultiTrajectory (ReadWrite version) The data is stored in 4 external b...
ConstTrackStateProxy::Parameters parameters_impl(ActsTrk::IndexType index) const
obtains proxy to the track state under given index
TrackStateProxy::Covariance trackMeasurementsCov(ActsTrk::IndexType index)
std::vector< StoredSurface > m_surfaces
static const std::set< std::string > s_staticVariables
MutableMultiTrajectory(ActsTrk::MutableMultiTrajectory &&other)=default
ConstTrackStateProxy::Covariance covariance_impl(ActsTrk::IndexType index) const
obtain covariances for a state at given index
ConstTrackStateProxy::Covariance trackMeasurementsCov(ActsTrk::IndexType index) const
obtain measurement covariances for a state at given index
GeometryContext m_geoContext
std::vector< std::optional< Acts::SourceLink > > m_calibratedSourceLinks
xAOD::TrackJacobianAuxContainer * trackJacobiansAux()
size_t m_trackMeasurementsSize
bool has_impl(Acts::HashedString key, ActsTrk::IndexType istate) const
checks if given state has requested component
constexpr bool hasColumn_impl(Acts::HashedString key) const
checks if MTJ has requested column (irrespectively of the state)
TrackStateProxy::Covariance jacobian_impl(ActsTrk::IndexType istate)
std::vector< ActsTrk::detail::Decoration > m_decorations
Acts::SourceLink getUncalibratedSourceLink_impl(ActsTrk::IndexType istate) const
Implementation of uncalibrated link fetch.
void setReferenceSurface_impl(IndexType, std::shared_ptr< const Acts::Surface >)
std::unique_ptr< xAOD::TrackParametersAuxContainer > m_trackParametersAux
const xAOD::TrackParametersAuxContainer * trackParametersAux() const
ActsTrk::IndexType addTrackState_impl(Acts::TrackStatePropMask mask, ActsTrk::IndexType iprevious)
Add state with stograge for data that depends on the mask.
typename Acts::MultiTrajectory< ActsTrk::MutableMultiTrajectory >::TrackStateProxy TrackStateProxy
MutableMultiTrajectory & operator=(const ActsTrk::MutableMultiTrajectory &other)=delete
void unset_impl(Acts::TrackStatePropMask target, ActsTrk::IndexType istate)
unsets a given state
typename Acts::MultiTrajectory< ActsTrk::MutableMultiTrajectory >::ConstTrackStateProxy ConstTrackStateProxy
std::any component_impl(Acts::HashedString key, ActsTrk::IndexType istate) const
Access component by key.
MutableMultiTrajectory()
Construct a new Multi Trajectory object owning backends.
size_t m_trackParametersSize
xAOD::TrackStateContainer m_trackStatesIface
std::vector< Acts::HashedString > dynamicKeys_impl() const
returns the keys of all the dynamic columns
std::unique_ptr< xAOD::TrackStateAuxContainer > m_trackStatesAux
std::enable_if_t< Enable, typename TrackStateProxy::template Calibrated< measdim > > calibrated_impl(ActsTrk::IndexType index)
ConstTrackStateProxy::template CalibratedCovariance< measdim > calibratedCovariance_impl(ActsTrk::IndexType index) const
obtain measurements covariance for a state at given index
std::unique_ptr< xAOD::TrackSurfaceAuxContainer > m_surfacesBackendAux
const Acts::Surface * referenceSurface_impl(IndexType) const
std::vector< std::optional< Acts::SourceLink > > m_uncalibratedSourceLinks
Acts::TrackIndexType size_impl() const
size of the MTJ
xAOD::TrackSurfaceContainer * trackSurfaces()
std::unique_ptr< xAOD::TrackMeasurementAuxContainer > m_trackMeasurementsAux
void addTrackStateComponents_impl(ActsTrk::IndexType istate, Acts::TrackStatePropMask mask)
Add state components for the given mask.
void copyDynamicFrom_impl(ActsTrk::IndexType istate, Acts::HashedString key, const std::any &src_ptr)
copy dynamic data from another MTJ
xAOD::TrackMeasurementAuxContainer * trackMeasurementsAux()
TrackStateProxy::Covariance covariance_impl(ActsTrk::IndexType index)
ConstTrackStateProxy::template Calibrated< measdim > calibrated_impl(ActsTrk::IndexType index) const
obtain calibrated measurements for a state at given index
const xAOD::TrackSurfaceContainer * trackSurfaces() const
std::unique_ptr< xAOD::TrackSurfaceContainer > m_surfacesBackend
ConstTrackStateProxy::Covariance jacobian_impl(ActsTrk::IndexType istate) const
obtain jacobian for a state at given index
TrackStateProxy::Parameters parameters_impl(ActsTrk::IndexType index)
bool has_backends() const
checks if the backends are connected (i.e.
void shareFrom_impl(ActsTrk::IndexType iself, ActsTrk::IndexType iother, Acts::TrackStatePropMask shareSource, Acts::TrackStatePropMask shareTarget)
shares from a given state
ActsTrk::IndexType calibratedSize_impl(ActsTrk::IndexType istate) const
Implementation of calibrated size.
std::enable_if_t< Enable, typename TrackStateProxy::template CalibratedCovariance< measdim > > calibratedCovariance_impl(ActsTrk::IndexType index)
void allocateCalibrated_impl(IndexType istate, const Eigen::DenseBase< val_t > &val, const Eigen::DenseBase< cov_t > &cov)
Implementation of allocation of calibrated measurements.
xAOD::TrackParametersAuxContainer * trackParametersAux()
void addColumn_impl(std::string_view key)
enables particular decoration, type & name need to be specified
xAOD::TrackStateAuxContainer * trackStatesAux()
size_t m_trackJacobiansSize
xAOD::TrackSurfaceAuxContainer * trackSurfacesAux()
std::unique_ptr< xAOD::TrackJacobianAuxContainer > m_trackJacobiansAux
void setUncalibratedSourceLink_impl(ActsTrk::IndexType istate, const Acts::SourceLink &sourceLink)
Implementation of uncalibrated link insertion.
void clear_impl()
clears backends decoration columns are still declared
Object reference supporting deferred reading from StoreGate.
A couple standard-library related concepts.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::variant< const Acts::Surface *, std::shared_ptr< const Acts::Surface > > StoredSurface
std::unique_ptr< IFACE > makeInterfaceContainer(const AUX *aux)
helper to construct interface container for already filled Aux container TODO maybe should be moved t...
TrackStateContainer_v1 TrackStateContainer
TrackSurfaceAuxContainer_v1 TrackSurfaceAuxContainer
TrackSurfaceContainer_v1 TrackSurfaceContainer
TrackStateAuxContainer_v1 TrackStateAuxContainer
TrackParametersAuxContainer_v1 TrackParametersAuxContainer
TrackJacobianAuxContainer_v1 TrackJacobianAuxContainer
uint32_t TrackStateIndexType
TrackMeasurementAuxContainer_v1 TrackMeasurementAuxContainer