ATLAS Offline Software
Loading...
Searching...
No Matches
Acts/ActsEvent/ActsEvent/CaloExtension.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ACTSEVENT_CALOEXTENSION_H
5#define ACTSEVENT_CALOEXTENSION_H
6
12
13#include "Acts/EventData/BoundTrackParameters.hpp"
14#include "Acts/Utilities/TransformRange.hpp"
15
18
19#include <span>
20
21
22namespace ActsTrk{
23 class CaloExtension;
28
29
33 public:
37 /*** @brief Returns the associated ID track particle */
38 const xAOD::TrackParticle* track() const;
40 std::size_t size() const;
42 bool empty() const;
44 const Acts::BoundTrackParameters& parameters(const std::size_t parIdx) const;
48 using namespace ActsTrk::detail::GeoVolIds;
49 constexpr std::array caloIds{s_caloEnvelopeID, s_caloBarrelId,
51 return std::ranges::filter_view(m_parameters,
52 [&](const Acts::BoundTrackParameters& pars){
53 const Acts::GeometryIdentifier id = pars.referenceSurface().geometryId();
54 return id.layer() == static_cast<std::size_t>(s) &&
55 Acts::rangeContainsValue(caloIds, id.volume());
56 });
57 }
58
59 using ClusterVec_t = std::vector<const xAOD::CaloCluster*>;
61 using ParamVec_t = std::vector<Acts::BoundTrackParameters>;
63 void appendParameters(Acts::BoundTrackParameters&& pars);
66 void associateCluster(const xAOD::CaloCluster* clust);
68 std::optional<Acts::BoundTrackParameters> lastParameters() const;
70 const ParamVec_t& parameters() const;
72 const ClusterVec_t& associatedClusters() const;
75 std::optional<Acts::BoundTrackParameters> lastTrackParameters() const;
76 private:
83
84 };
86
87}
89
90#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
The CaloExtension holds the ID extrapolation states through the calorimeter and the associated CaloCl...
const ClusterVec_t & associatedClusters() const
Returns the view on the asociated clusters.
std::size_t size() const
Number of extensions stored in the instance.
const xAOD::TrackParticle * m_idTrack
Pointer to the associated ID track particle.
CaloExtension(const xAOD::TrackParticle *track)
Constructor taking the pointer to the ID track used for the extrapolations.
ParamVec_t m_parameters
Define the list of bound track parameters.
void appendParameters(Acts::BoundTrackParameters &&pars)
Append a list of recorded hit parameters.
const ParamVec_t & parameters() const
Returns the view onto the cached BoundTackParameters.
ClusterVec_t m_clusters
The list of assoicated clusters.
const xAOD::TrackParticle * track() const
std::vector< const xAOD::CaloCluster * > ClusterVec_t
Abrivation of the calo cluster vector.
std::vector< Acts::BoundTrackParameters > ParamVec_t
Abrivation of the Bound track parameter vector.
void associateCluster(const xAOD::CaloCluster *clust)
Associates a calorimeter cluster with the calo extension.
auto caloParameters(const CaloSampling::CaloSample s) const
Returns the set of parameters that are associated with a given calo sampling.
std::optional< Acts::BoundTrackParameters > lastTrackParameters() const
Returns the track parameters asssociated with the last measurement state of the ID track.
std::optional< Acts::BoundTrackParameters > lastParameters() const
Returns the outermost parameters known to the extension.
const Acts::BoundTrackParameters & parameters(const std::size_t parIdx) const
Returns the extension parameters associated with the n-th extension.
Derived DataVector<T>.
Definition DataVector.h:818
Define the volume parts of the GeometryIdentifier for each ATLAS subsystem centrally.
constexpr std::size_t s_caloEndcapAId
constexpr std::size_t s_caloEnvelopeID
Volume Ids ofthe Calorimeter.
constexpr std::size_t s_caloBarrelId
constexpr std::size_t s_caloEndcapCId
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
const CaloExtension * getCaloExtension(const xAOD::TrackParticle &track)
Retrieve a pointer to the CaloExtension linked with the passed TrackParticle.
DataVector< CaloExtension > CaloExtensionContainer
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version: