ATLAS Offline Software
SpacePoint_v1.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 XAODINDETMEASUREMENT_VERSION_SPACEPOINT_V1_H
6 #define XAODINDETMEASUREMENT_VERSION_SPACEPOINT_V1_H
7 
9 #include "Identifier/Identifier.h"
13 
14 #include <array>
15 
16 namespace xAOD {
23  struct ArrayFloat3 {
24  float* data() { return &values[0]; }
25  const float* data() const { return &values[0]; }
26  float values[3];
27  };
28 
29  class SpacePoint_v1 : public SG::AuxElement {
30  public:
31  using ConstVectorMap = Eigen::Map<const Eigen::Matrix<float, 3, 1>>;
32  using VectorMap = Eigen::Map<Eigen::Matrix<float, 3, 1>>;
33 
36 
38  const std::vector<DetectorIDHashType>& elementIdList() const;
39 
43 
44  // radius
45  float radius() const;
46 
48  float varianceR() const;
49  float varianceZ() const;
50 
52  const std::vector< const xAOD::UncalibratedMeasurement* >& measurements() const;
53 
55  float topHalfStripLength() const;
56  float bottomHalfStripLength() const;
57 
62 
67 
68  float x() const;
69  float y() const;
70  float z() const;
71 
72  // Needed for compliance with the external spacepoint contract
73  // See https://github.com/acts-project/acts/pull/2829
74  std::optional<float> t() const { return std::nullopt; }
75 
77 
80 
82  void setElementIdList(const std::vector<DetectorIDHashType>& idHash);
83 
85  void setRadius(float);
86 
88  void setVarianceR(float);
89  void setVarianceZ(float);
90 
92  void setMeasurements(const std::vector< const xAOD::UncalibratedMeasurement* >&);
93 
94  void setTopHalfStripLength(float);
96 
98 
100  const Eigen::Matrix<float,3,1>& globPos,
101  float cov_r, float cov_z,
102  const std::vector< const xAOD::UncalibratedMeasurement* >& measurementIndexes);
103 
104  void setSpacePoint(const std::vector<DetectorIDHashType>& idHashes,
105  const Eigen::Matrix<float,3,1>& globPos,
106  float cov_r, float cov_z,
107  const std::vector< const xAOD::UncalibratedMeasurement* >& measurementIndexes,
108  float topHalfStripLength,
109  float bottomHalfStripLength,
110  const Eigen::Matrix<float,3,1>& topStripDirection,
111  const Eigen::Matrix<float,3,1>& bottomStripDirection,
112  const Eigen::Matrix<float,3,1>& stripCenterDistance,
113  const Eigen::Matrix<float,3,1>& topStripCenter);
114  };
115 
116 }
117 
118 #endif
xAOD::SpacePoint_v1::bottomHalfStripLength
float bottomHalfStripLength() const
xAOD::SpacePoint_v1::stripCenterDistance
ConstVectorMap stripCenterDistance() const
Definition: SpacePoint_v1.cxx:73
xAOD::SpacePoint_v1::setBottomHalfStripLength
void setBottomHalfStripLength(float)
xAOD::SpacePoint_v1::setTopHalfStripLength
void setTopHalfStripLength(float)
xAOD::ArrayFloat3::data
const float * data() const
Definition: SpacePoint_v1.h:25
xAOD::SpacePoint_v1::topStripDirection
ConstVectorMap topStripDirection() const
Definition: SpacePoint_v1.cxx:63
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::SpacePoint_v1::topHalfStripLength
float topHalfStripLength() const
Return details.
xAOD::SpacePoint_v1::ConstVectorMap
Eigen::Map< const Eigen::Matrix< float, 3, 1 > > ConstVectorMap
Definition: SpacePoint_v1.h:31
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::ArrayFloat3::data
float * data()
Definition: SpacePoint_v1.h:24
xAOD::ArrayFloat3::values
float values[3]
Definition: SpacePoint_v1.h:26
xAOD::SpacePoint_v1::z
float z() const
xAOD::SpacePoint_v1::globalPosition
ConstVectorMap globalPosition() const
Returns the global position of the pixel cluster.
xAOD::SpacePoint_v1::bottomStripDirection
ConstVectorMap bottomStripDirection() const
Definition: SpacePoint_v1.cxx:68
xAOD::SpacePoint_v1::setMeasurements
void setMeasurements(const std::vector< const xAOD::UncalibratedMeasurement * > &)
Sets the index of the measurements.
xAOD::SpacePoint_v1::elementIdList
const std::vector< DetectorIDHashType > & elementIdList() const
Returns the IdentifierHash of the spacepoint (corresponds to the detector element IdentifierHash)
xAOD::SpacePoint_v1::VectorMap
Eigen::Map< Eigen::Matrix< float, 3, 1 > > VectorMap
Definition: SpacePoint_v1.h:32
xAOD::SpacePoint_v1::varianceZ
float varianceZ() const
xAOD::ArrayFloat3
A struct mimicking std::array<float ,3> this structure is a temporary solution for our dynamic variab...
Definition: SpacePoint_v1.h:23
UncalibratedMeasurementContainer.h
xAOD::SpacePoint_v1::varianceR
float varianceR() const
Returns the variances.
xAOD::SpacePoint_v1::setVarianceZ
void setVarianceZ(float)
xAOD::SpacePoint_v1::radius
float radius() const
xAOD::SpacePoint_v1::setSpacePoint
void setSpacePoint(DetectorIDHashType idHash, const Eigen::Matrix< float, 3, 1 > &globPos, float cov_r, float cov_z, const std::vector< const xAOD::UncalibratedMeasurement * > &measurementIndexes)
Definition: SpacePoint_v1.cxx:103
xAOD::SpacePoint_v1::measurements
const std::vector< const xAOD::UncalibratedMeasurement * > & measurements() const
Returns the index of the measurements.
MeasurementDefs.h
EventPrimitives.h
xAOD::DetectorIDHashType
unsigned int DetectorIDHashType
@ detector ID element hash
Definition: MeasurementDefs.h:42
xAOD::SpacePoint_v1::y
float y() const
xAOD::SpacePoint_v1::setRadius
void setRadius(float)
Set the radius.
xAOD::SpacePoint_v1::t
std::optional< float > t() const
Definition: SpacePoint_v1.h:74
xAOD::SpacePoint_v1::x
float x() const
xAOD::SpacePoint_v1::topStripCenter
ConstVectorMap topStripCenter() const
Definition: SpacePoint_v1.cxx:78
xAOD::SpacePoint_v1::setVarianceR
void setVarianceR(float)
Sets the variances.
xAOD::SpacePoint_v1::setElementIdList
void setElementIdList(const std::vector< DetectorIDHashType > &idHash)
Sets the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
AuxElement.h
Base class for elements of a container that can have aux data.