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 
16 
17 #include <array>
18 #include <vector>
19 
20 namespace Acts {
21 
30  public:
31  using AccumulatedVector = std::vector<AccumulatedMaterialSlab>;
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, const MaterialSlab& mp,
87  double pathCorrection = 1.);
88 
95  std::array<size_t, 3> accumulate(const Vector3D& gp, const MaterialSlab& mp,
96  double pathCorrection = 1.);
97 
103  void trackAverage(const std::vector<std::array<size_t, 3>>& trackBins = {},
104  bool emptyHit = false);
105 
110  void trackAverage(const Vector3D& gp, bool emptyHit = false);
111 
113  std::unique_ptr<const ISurfaceMaterial> totalAverage();
114 
116  const AccumulatedMatrix& accumulatedMaterial() const;
117 
119  double splitFactor() const;
120 
121  private:
124 
126  double m_splitFactor{0.};
127 
130 };
131 
133  return (m_binUtility);
134 }
135 
138  return (m_accumulatedMaterial);
139 }
140 
142  return m_splitFactor;
143 }
144 } // namespace Acts