4#ifndef ActsEvent_Decoration_h
5#define ActsEvent_Decoration_h
15#include "Acts/EventData/BoundTrackParameters.hpp"
39 std::is_same<T, float>::value or std::is_same<T, double>::value or
40 std::is_same<T, short>::value or std::is_same<T, int>::value or
41 std::is_same<T, std::uint8_t>::value or
42 std::is_same<T, std::uint16_t>::value or
43 std::is_same<T, std::uint32_t>::value or
44 std::is_same<T, std::uint64_t>::value or
45 std::is_same<T, std::int8_t>::value or
46 std::is_same<T, std::int16_t>::value or
47 std::is_same<T, std::int32_t>::value or
48 std::is_same<T, std::int64_t>::value;
56 const void* data = container->
getData(decorationId);
57 return &(
static_cast<const T*
>(data)[idx]);
64 const void* data = container->
getData(decorationId);
65 return &(
static_cast<T*
>(data)[idx]);
73 assert (idx < container->
size());
75 void* data = container->
getData(decorationId, container->size(), container->size());
76 return &(
static_cast<T*
>(data)[idx]);
81 SG::auxid_t decorationId,
const std::any& src_ptr) {
83 *std::any_cast<const T*>(src_ptr);
91 dec.
hash = Acts::hashStringDynamic(n);
94 throw std::runtime_error(
"ActsTrk::Decoration Aux ID for " + dec.
name +
95 " could not be found");
108 const SG::IConstAuxStore* container,
109 const std::set<std::string>& staticVariables);
123std::optional<ActsTrk::TrackContainer::ConstTrackStateProxy>
125 const bool skipOutlier =
true);
131std::optional<ActsTrk::TrackContainer::ConstTrackStateProxy>
133 const bool skipOutlier =
true);
139std::optional<Acts::BoundTrackParameters>
141 const bool skipOutlier =
true);
147std::optional<Acts::BoundTrackParameters>
149 const bool skipOutlier =
true);
Basic definitions for auxiliary types.
Interface for non-const operations on an auxiliary store.
Interface for const operations on an auxiliary store.
size_t size() const
Number of registered mappings.
SG::auxid_t getAuxID(const std::string &name, const std::string &clsname="", const Flags flags=Flags::None, const SG::auxid_t linkedVariable=SG::null_auxid)
Look up a name -> auxid_t mapping.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
AuxDataTraits< T >::reference_type getData(SG::auxid_t auxid, size_t ndx)
Return reference to an aux data item.
Interface for non-const operations on an auxiliary store.
void decorationCopier(SG::IAuxStore *dst, ActsTrk::IndexType dst_idx, SG::auxid_t decorationId, const std::any &src_ptr)
const std::any constDecorationGetter(const SG::IConstAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
const std::any decorationGetter(const SG::IAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
static Decoration decoration(std::string_view n, GetterType g, CopierType c, SetterType s=static_cast< SetterType >(nullptr))
std::function< std::any(SG::IAuxStore *, ActsTrk::IndexType, SG::auxid_t)> SetterType
std::function< void(SG::IAuxStore *, ActsTrk::IndexType, SG::auxid_t, const std::any &)> CopierType
std::function< const std::any( const SG::IConstAuxStore *, ActsTrk::IndexType, SG::auxid_t)> GetterType
std::vector< Decoration > restoreDecorations(const SG::IConstAuxStore *container, const std::set< std::string > &staticVariables)
std::any decorationSetter(SG::IAuxStore *container, ActsTrk::IndexType idx, SG::auxid_t decorationId)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::optional< ActsTrk::TrackContainer::ConstTrackStateProxy > firstMeasurementState(const xAOD::TrackParticle &trkPart, const bool skipOutlier=true)
Returns the track state proxy corresponding to the measurement that is closest to the defining track ...
std::optional< ActsTrk::TrackContainer::ConstTrackStateProxy > lastMeasurementState(const xAOD::TrackParticle &trkPart, const bool skipOutlier=true)
Returns the track state proxy corresponding to the last measurement on track.
std::optional< Acts::BoundTrackParameters > firstTrackParameters(const xAOD::TrackParticle &trkPart, const bool skipOutlier=true)
Returns the first MeasurementState in form of Acts::BoundTrackParameters.
std::optional< Acts::BoundTrackParameters > lastTrackParameters(const xAOD::TrackParticle &trkPart, const bool skipOutlier=true)
Returns the last MeasurementState in form of Acts::BoundTrackParameters.
std::optional< ActsTrk::TrackContainer::ConstTrackProxy > getActsTrack(const xAOD::TrackParticle &trkPart)
Return the proxy to the Acts track from which the track particle was made frome.
static const auxid_t null_auxid
To signal no aux data item.
size_t auxid_t
Identifier for a particular aux data item.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
static constexpr bool value