Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-30 09:25:52

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryIdentifier.hpp"
0013 #include "ActsFatras/Digitization/Segmentizer.hpp"
0014 
0015 #include <numeric>
0016 #include <vector>
0017 
0018 namespace ActsExamples {
0019 
0020 /// Simple struct holding cluster information.
0021 struct Cluster {
0022   using Cell = ActsFatras::Segmentizer::ChannelSegment;
0023   /// The module the cluster was formed on
0024   Acts::GeometryIdentifier geometryId;
0025   std::size_t sizeLoc0 = 0;
0026   std::size_t sizeLoc1 = 0;
0027   std::vector<Cell> channels;
0028 
0029   // TODO make this be provided by Fatras?
0030   Acts::Vector3 globalPosition = Acts::Vector3::Zero();
0031   Acts::Vector3 localDirection = Acts::Vector3::Zero();
0032   Acts::Vector3 lengthDirection = Acts::Vector3::Zero();
0033   float localEta = 0.f;
0034   float localPhi = 0.f;
0035   float globalEta = 0.f;
0036   float globalPhi = 0.f;
0037   float etaAngle = 0.f;
0038   float phiAngle = 0.f;
0039 
0040   double sumActivations() const {
0041     return std::accumulate(
0042         channels.begin(), channels.end(), 0.0,
0043         [](double s, const Cluster::Cell& c) { return s + c.activation; });
0044   }
0045 };
0046 
0047 /// Clusters have a one-to-one relation with measurements
0048 using ClusterContainer = std::vector<Cluster>;
0049 
0050 }  // namespace ActsExamples