File indexing completed on 2025-01-18 09:11:46
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/Common.hpp"
0013 #include "Acts/EventData/SourceLink.hpp"
0014 #include "ActsExamples/EventData/Index.hpp"
0015 #include "ActsExamples/EventData/IndexSourceLink.hpp"
0016
0017 #include <cmath>
0018 #include <vector>
0019
0020 #include <boost/container/static_vector.hpp>
0021
0022 namespace ActsExamples {
0023
0024
0025 class DriftCircle {
0026 public:
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 DriftCircle(const Acts::Vector3&& tubePos, float driftRadius,
0039 float driftRadiusError, int stationName, int stationEta,
0040 int stationPhi, int multilayer, int tubeLayer, int tube)
0041 : m_x(tubePos[Acts::ePos0]),
0042 m_y(tubePos[Acts::ePos1]),
0043 m_z(tubePos[Acts::ePos2]),
0044 m_rho(driftRadius),
0045 m_sigmaRho(driftRadiusError),
0046 m_stationName(stationName),
0047 m_stationEta(stationEta),
0048 m_stationPhi(stationPhi),
0049 m_multilayer(multilayer),
0050 m_tubeLayer(tubeLayer),
0051 m_tube(tube) {}
0052
0053 constexpr double x() const { return m_x; }
0054 constexpr double y() const { return m_y; }
0055 constexpr double z() const { return m_z; }
0056 constexpr double rDrift() const { return m_rho; }
0057 constexpr double rDriftError() const { return m_sigmaRho; }
0058 constexpr int stationName() const { return m_stationName; }
0059 constexpr int stationEta() const { return m_stationEta; }
0060 constexpr int stationPhi() const { return m_stationPhi; }
0061 constexpr int multilayer() const { return m_multilayer; }
0062 constexpr int tubeLayer() const { return m_tubeLayer; }
0063 constexpr int tube() const { return m_tube; }
0064
0065 private:
0066
0067 double m_x = 0.;
0068 double m_y = 0.;
0069 double m_z = 0.;
0070 double m_rho = 0.;
0071 double m_sigmaRho = 0.;
0072 int m_stationName = 0;
0073 int m_stationEta = 0;
0074 int m_stationPhi = 0;
0075 int m_multilayer = 0;
0076 int m_tubeLayer = 0;
0077 int m_tube = 0;
0078 };
0079
0080 inline bool operator==(const DriftCircle& lhs, const DriftCircle& rhs) {
0081 return (lhs.stationName() == rhs.stationName() &&
0082 lhs.stationEta() == rhs.stationEta() &&
0083 lhs.stationPhi() == rhs.stationPhi() &&
0084 lhs.multilayer() == rhs.multilayer() &&
0085 lhs.tubeLayer() == rhs.tubeLayer() && lhs.tube() == rhs.tube() &&
0086 std::abs(rhs.rDrift() - lhs.rDrift()) < 1.e-8 &&
0087 std::abs(rhs.rDriftError() - lhs.rDriftError()) < 1.e-8);
0088 }
0089
0090
0091 using DriftCircleContainer = std::vector<DriftCircle>;
0092
0093 }