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 "ActsFatras/Digitization/Segmentizer.hpp"
0013
0014 #include <numeric>
0015 #include <vector>
0016
0017 namespace ActsExamples {
0018
0019
0020 struct Cluster {
0021 using Cell = ActsFatras::Segmentizer::ChannelSegment;
0022 std::size_t sizeLoc0 = 0;
0023 std::size_t sizeLoc1 = 0;
0024 std::vector<Cell> channels;
0025
0026
0027 Acts::Vector3 globalPosition = Acts::Vector3::Zero();
0028 Acts::Vector3 localDirection = Acts::Vector3::Zero();
0029 Acts::Vector3 lengthDirection = Acts::Vector3::Zero();
0030 float localEta = 0.f;
0031 float localPhi = 0.f;
0032 float globalEta = 0.f;
0033 float globalPhi = 0.f;
0034 float etaAngle = 0.f;
0035 float phiAngle = 0.f;
0036
0037 double sumActivations() const {
0038 return std::accumulate(
0039 channels.begin(), channels.end(), 0.0,
0040 [](double s, const Cluster::Cell& c) { return s + c.activation; });
0041 }
0042 };
0043
0044
0045 using ClusterContainer = std::vector<Cluster>;
0046
0047 }