ATLAS Offline Software
Seed.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRKEVENT_SEED_H
6 #define ACTSTRKEVENT_SEED_H 1
7 
9 #include <boost/container/small_vector.hpp>
10 
11 namespace ActsTrk {
12 
13 // Acts::Seed (renamed to ActsSeed) definition copied from Acts/EventData/Seed.hpp
14 // modified to allow variable number of SPs.
15 // Otherwise minimise API changes for N=3.
16 
17 template <typename external_spacepoint_t, std::size_t N = 3ul>
18 class ActsSeed {
19  // static_assert(N >= 3ul);
20 
21  public:
22  using value_type = external_spacepoint_t;
23  using container_type = boost::container::small_vector<const external_spacepoint_t*, N>;
24  static constexpr std::size_t DIM = N;
25 
26  template <typename... args_t>
27  requires(sizeof...(args_t) == N) &&
28  (std::same_as<external_spacepoint_t, args_t> && ...)
29  explicit ActsSeed(const args_t&... points);
30 
31  template <typename arg_t>
32  requires(N != 1)
33  explicit ActsSeed(arg_t&& points);
34 
35  void setVertexZ(float vertex);
36  void setQuality(float seedQuality);
37 
39  float z() const;
40  float seedQuality() const;
41 
42  private:
44  float m_vertexZ{0.f};
45  float m_seedQuality{-std::numeric_limits<float>::infinity()};
46 };
47 
48 template <typename external_spacepoint_t, std::size_t N>
49 template <typename... args_t>
50  requires(sizeof...(args_t) == N) &&
51  (std::same_as<external_spacepoint_t, args_t> && ...)
53  : m_spacepoints({&points...}) {}
54 
55 template <typename external_spacepoint_t, std::size_t N>
56 template <typename arg_t>
57  requires(N != 1)
58 ActsSeed<external_spacepoint_t, N>::ActsSeed(arg_t&& points)
59  : m_spacepoints(points.begin(), points.end()) {}
60 
61 template <typename external_spacepoint_t, std::size_t N>
63  m_vertexZ = vertex;
64 }
65 
66 template <typename external_spacepoint_t, std::size_t N>
68  m_seedQuality = seedQuality;
69 }
70 
71 template <typename external_spacepoint_t, std::size_t N>
74  return m_spacepoints;
75 }
76 
77 template <typename external_spacepoint_t, std::size_t N>
79  return m_vertexZ;
80 }
81 
82 template <typename external_spacepoint_t, std::size_t N>
84  return m_seedQuality;
85 }
86 
88 
89 }
90 
91 // Set up a CLID for the type:
92 #include "AthenaKernel/CLASS_DEF.h"
93 CLASS_DEF(ActsTrk::Seed, 207128231, 1)
94 
95 #endif
ActsTrk::ActsSeed::requires
requires(sizeof...(args_t)==N) &&(std requires(N !=1) explicit ActsSeed(arg_t &&points)
ActsTrk::ActsSeed::sp
const container_type & sp() const
Definition: Seed.h:73
Seed
#define Seed
Definition: SeedingTool.h:25
ActsTrk::ActsSeed::setVertexZ
void setVertexZ(float vertex)
Definition: Seed.h:62
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
requires
requires requires()
This specialization is used for classes deriving from DataObject.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:68
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
ActsTrk::ActsSeed::seedQuality
float seedQuality() const
Definition: Seed.h:83
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ActsTrk::ActsSeed::DIM
static constexpr std::size_t DIM
Definition: Seed.h:24
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
ActsTrk::ActsSeed::m_seedQuality
float m_seedQuality
Definition: Seed.h:45
ActsTrk::ActsSeed::m_vertexZ
float m_vertexZ
Definition: Seed.h:44
ActsTrk::ActsSeed::container_type
boost::container::small_vector< const external_spacepoint_t *, N > container_type
Definition: Seed.h:23
z
#define z
SpacePoint.h
ActsTrk::ActsSeed::z
float z() const
Definition: Seed.h:78
ActsTrk::ActsSeed::m_spacepoints
container_type m_spacepoints
Definition: Seed.h:43
ActsTrk::ActsSeed
Definition: Seed.h:18
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
private
#define private
Definition: xAODTruthCnvAlg.h:20
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
ActsTrk::ActsSeed::setQuality
void setQuality(float seedQuality)
Definition: Seed.h:67
ActsTrk::requires
requires(sizeof...(args_t)==N) &&(std
Definition: Seed.h:50
value_type
Definition: EDM_MasterSearch.h:11
CLASS_DEF.h
macros to associate a CLID to a type
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97