ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AccumulatedSurfaceMaterial.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AccumulatedSurfaceMaterial.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include <array>
12 #include <vector>
13 
19 
20 namespace Acts {
21 
30  public:
31  using AccumulatedVector = std::vector<AccumulatedMaterialProperties>;
32  using AccumulatedMatrix = std::vector<AccumulatedVector>;
33 
38 
50  double splitFactor = 0.);
51 
56 
61 
66  default;
67 
72  const AccumulatedSurfaceMaterial& asma) = default;
73 
75  ~AccumulatedSurfaceMaterial() = default;
76 
78  const BinUtility& binUtility() const;
79 
86  std::array<size_t, 3> accumulate(const Vector2D& lp,
87  const MaterialProperties& mp,
88  double pathCorrection = 1.);
89 
96  std::array<size_t, 3> accumulate(const Vector3D& gp,
97  const MaterialProperties& mp,
98  double pathCorrection = 1.);
99 
105  void trackAverage(const std::vector<std::array<size_t, 3>>& trackBins = {},
106  bool emptyHit = false);
107 
112  void trackAverage(const Vector3D& gp, bool emptyHit = false);
113 
115  std::unique_ptr<const ISurfaceMaterial> totalAverage();
116 
118  const AccumulatedMatrix& accumulatedMaterial() const;
119 
121  double splitFactor() const;
122 
123  private:
126 
128  double m_splitFactor{0.};
129 
132 };
133 
135  return (m_binUtility);
136 }
137 
140  return (m_accumulatedMaterial);
141 }
142 
144  return m_splitFactor;
145 }
146 } // namespace Acts