4#include "Acts/Utilities/HashedString.hpp"
10 static const SG::AuxElement::ConstAccessor<ElementLink<TrackContainer> > acc(
"actsTrack");
11 static_assert(std::is_same<ElementLink<TrackContainer>::ElementConstReference,
12 std::optional<TrackContainer::ConstTrackProxy> >::value);
14 if (!acc.isAvailable(trkPart) || !acc(trkPart).
isValid()) {
17 return(*acc(trkPart));
20std::optional<ActsTrk::TrackContainer::ConstTrackStateProxy>
22 const bool skipOutlier) {
27 for (
const auto& state : actsTrk->trackStatesReversed()) {
28 if ((state.typeFlags().isOutlier() && skipOutlier) ||
29 !state.hasUncalibratedSourceLink()) {
37std::optional<ActsTrk::TrackContainer::ConstTrackStateProxy>
39 const bool skipOutlier) {
44 for (
const auto& state : actsTrk->trackStates()) {
45 if ((state.typeFlags().isOutlier() && skipOutlier) ||
46 !state.hasUncalibratedSourceLink()) {
54std::optional<Acts::BoundTrackParameters>
56 const bool skipOutlier) {
61 return getActsTrack(trkPart)->createParametersFromState(*lastTrkProxy);
64std::optional<Acts::BoundTrackParameters>
66 const bool skipOutlier) {
71 return getActsTrack(trkPart)->createParametersFromState(*firstTrkProxy);
78bool build (
const std::type_info* typeInfo,
const std::string& name, std::vector<Decoration>& decorations){
79 if (*typeInfo ==
typeid(T)) {
80 decorations.emplace_back(
90 const SG::IConstAuxStore* container,
91 const std::set<std::string>& staticVariables) {
92 std::vector<Decoration> decorations;
95 const std::type_info* typeInfo =
97 if (staticVariables.count(name) == 1) {
119 throw std::runtime_error(
"Can't restore decoration of " + name +
120 " because it is of an unsupported type");
bool isValid() const
Test to see if the link can be dereferenced.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
Hash functions to pack the source link into unordered_maps / unordered_sets.
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)
bool build(const std::type_info *typeInfo, const std::string &name, std::vector< Decoration > &decorations)
static Decoration decoration(std::string_view n, GetterType g, CopierType c, SetterType s=static_cast< SetterType >(nullptr))
std::vector< Decoration > restoreDecorations(const SG::IConstAuxStore *container, const std::set< std::string > &staticVariables)
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.
TrackParticle_v1 TrackParticle
Reference the current persistent version: