Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BinnedSurfaceMaterial.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BinnedSurfaceMaterial.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 <cstddef>
17 #include <iosfwd>
18 #include <vector>
19 
20 namespace Acts {
21 
27 
29  public:
31  BinnedSurfaceMaterial() = delete;
32 
46  MaterialSlabVector fullProperties,
47  double splitFactor = 0.,
49 
62  BinnedSurfaceMaterial(const BinUtility& binUtility,
63  MaterialSlabMatrix fullProperties,
64  double splitFactor = 0.,
66 
71 
75  BinnedSurfaceMaterial(const BinnedSurfaceMaterial& bsm) = default;
76 
79 
82 
84  ~BinnedSurfaceMaterial() override = default;
85 
89  BinnedSurfaceMaterial& operator*=(double scale) final;
90 
92  const BinUtility& binUtility() const;
93 
95  const MaterialSlabMatrix& fullMaterial() const;
96 
98  const MaterialSlab& materialSlab(const Vector2& lp) const final;
99 
101  const MaterialSlab& materialSlab(const Vector3& gp) const final;
102 
104  const MaterialSlab& materialSlab(size_t bin0, size_t bin1) const final;
105 
107  std::ostream& toStream(std::ostream& sl) const final;
108 
109  private:
112 
115 };
116 
118  return (m_binUtility);
119 }
120 
122  return m_fullMaterial;
123 }
124 
126  size_t bin0, size_t bin1) const {
127  return m_fullMaterial[bin1][bin0];
128 }
129 } // namespace Acts