53 {
54
55 std::size_t nSP = 0;
56 for (const auto* spc : spacePointCollections) {
57 nSP += spc->size();
58 }
59 moduleIds.reserve(nSP);
60 allSPPtrs.reserve(nSP);
61
62 std::size_t skipped = 0;
63 for (const auto* spc : spacePointCollections) {
64 for (
const auto*
sp : *spc) {
65 const auto* cl1 =
sp->measurements().front();
66 Identifier atlasIdCl1(
68
70 const auto* cl2 =
sp->measurements().at(1);
71 Identifier atlasIdCl2(
73
79
80 if (overlapFlag == 2 || overlapFlag == 3) {
81 ++skipped;
82 ACTS_VERBOSE("Skip phi overlap spacepoint (flag=" << overlapFlag
83 << ")");
84 continue;
85 }
86 }
87
88 Identifier waferIdCl1 =
93 allSPPtrs.push_back(
sp);
94 }
95 }
96
97 ACTS_DEBUG("Skipped " << skipped << " SPs because of phi overlap");
98 nSP = allSPPtrs.size();
99 ACTS_DEBUG("Keep " << nSP << " SPs for feature creation");
100
101 std::vector<std::size_t> idxs(nSP);
102 std::iota(idxs.begin(), idxs.end(), 0);
103 std::ranges::sort(
104 idxs, [&](
auto a,
auto b) {
return moduleIds.at(
a) < moduleIds.at(b); });
105 std::ranges::sort(moduleIds);
106
107
108
109 std::vector<const xAOD::SpacePoint*> sortedSPPtrs(nSP);
110 for (std::size_t k = 0;
k < nSP; ++
k) {
111 sortedSPPtrs.at(k) = allSPPtrs.at(idxs.at(k));
112 }
113 allSPPtrs.swap(sortedSPPtrs);
114
115 features.assign(nFeatures * nSP, 0.f);
117
118 for (std::size_t k = 0;
k < nSP; ++
k) {
119 ids.at(k) =
static_cast<int>(
k);
120
121 std::span<float>
f(features.data() + k * nFeatures, nFeatures);
122 const auto&
sp = *allSPPtrs.at(k);
123
124 using namespace Acts::VectorHelpers;
125
126 Acts::Vector3 spp{
sp.x(),
sp.y(),
sp.z()};
127
128 if (
sp.measurements().size() == 1) {
129 for (std::size_t j = 0;
j < nFeatures;
j += 4) {
130 f[
j + 0] =
perp(spp) / 1000.f;
131 f[
j + 1] =
phi(spp) / std::numbers::pi_v<float>;
132 f[
j + 2] =
sp.z() / 1000.f;
134 }
135 } else {
137 f[
j + 0] =
perp(spp) / 1000.f;
138 f[
j + 1] =
phi(spp) / std::numbers::pi_v<float>;
139 f[
j + 2] =
sp.z() / 1000.f;
141
142 for (
const auto* m :
sp.measurements()) {
144 auto gp =
cl->globalPosition();
146 f[
j + 0] =
perp(gp) / 1000.f;
147 f[
j + 1] =
phi(gp) / std::numbers::pi_v<float>;
148 f[
j + 2] = gp.z() / 1000.f;
150 }
151 }
152 }
153
154 return StatusCode::SUCCESS;
155}
Scalar eta() const
pseudorapidity method
Scalar perp() const
perp method - perpendicular length
Scalar phi() const
phi method
value_type get_compact() const
Get the compact id.
unsigned long long value_type
int computeOverlapSpFlag(int etaModuleCl1, int phiModuleCl1, int etaModuleCl2, int phiModuleCl2)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
StripCluster_v1 StripCluster
Define the version of the strip cluster class.