Analysis Software
Documentation for sPHENIX simulation 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 
15 
16 #include <array>
17 #include <cstddef>
18 #include <memory>
19 #include <vector>
20 
21 namespace Acts {
22 
23 class ISurfaceMaterial;
24 
33  public:
34  using AccumulatedVector = std::vector<AccumulatedMaterialSlab>;
35  using AccumulatedMatrix = std::vector<AccumulatedVector>;
36 
41 
53  double splitFactor = 0.);
54 
59 
64 
69  default;
70 
75  const AccumulatedSurfaceMaterial& asma) = default;
76 
78  ~AccumulatedSurfaceMaterial() = default;
79 
81  const BinUtility& binUtility() const;
82 
90  std::array<size_t, 3> accumulate(const Vector2& lp, const MaterialSlab& mp,
91  double pathCorrection = 1.);
92 
100  std::array<size_t, 3> accumulate(const Vector3& gp, const MaterialSlab& mp,
101  double pathCorrection = 1.);
102 
109  void trackVariance(const std::vector<std::array<size_t, 3>>& trackBins,
110  MaterialSlab slabReference, bool emptyHit = false);
111 
117  void trackVariance(const Vector3& gp, MaterialSlab slabReference,
118  bool emptyHit = false);
119 
125  void trackAverage(const std::vector<std::array<size_t, 3>>& trackBins = {},
126  bool emptyHit = false);
127 
132  void trackAverage(const Vector3& gp, bool emptyHit = false);
133 
135  std::unique_ptr<const ISurfaceMaterial> totalAverage();
136 
138  const AccumulatedMatrix& accumulatedMaterial() const;
139 
141  double splitFactor() const;
142 
143  private:
146 
148  double m_splitFactor{0.};
149 
152 };
153 
155  return (m_binUtility);
156 }
157 
160  return (m_accumulatedMaterial);
161 }
162 
164  return m_splitFactor;
165 }
166 } // namespace Acts