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 features.assign(nFeatures * nSP, 0.f);
109
110 for (std::size_t k = 0;
k < nSP; ++
k) {
111 ids.at(k) =
static_cast<int>(
k);
113
114 std::span<float>
f(features.data() + k * nFeatures, nFeatures);
115 const auto&
sp = *allSPPtrs.at(i);
116
117 using namespace Acts::VectorHelpers;
118
119 Acts::Vector3 spp{
sp.x(),
sp.y(),
sp.z()};
120
121 if (
sp.measurements().size() == 1) {
122 for (std::size_t j = 0;
j < nFeatures;
j += 4) {
123 f[
j + 0] =
perp(spp) / 1000.f;
124 f[
j + 1] =
phi(spp) / std::numbers::pi_v<float>;
125 f[
j + 2] =
sp.z() / 1000.f;
127 }
128 } else {
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 for (
const auto* m :
sp.measurements()) {
137 auto gp =
cl->globalPosition();
139 f[
j + 0] =
perp(gp) / 1000.f;
140 f[
j + 1] =
phi(gp) / std::numbers::pi_v<float>;
141 f[
j + 2] = gp.z() / 1000.f;
143 }
144 }
145 }
146
147 return StatusCode::SUCCESS;
148}
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.