EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProtoLayer.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ProtoLayer.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2018 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 #include "Acts/Geometry/Extent.hpp"
15 
16 #include <iostream>
17 
18 namespace Acts {
19 
25 
26 struct ProtoLayer {
27  public:
30 
32  using Range = std::pair<double, double>;
33  std::vector<Range> envelope{(int)binValues, {0., 0.}};
34 
44  const std::vector<const Surface*>& surfaces);
45 
55  const std::vector<std::shared_ptr<const Surface>>& surfaces);
56 
57  ProtoLayer() = default;
58 
62  double min(BinningValue bval, bool addenv = true) const;
63 
64  // Get the parameters : max
67  double max(BinningValue bval, bool addenv = true) const;
68 
69  // Get the parameters : max
72  double medium(BinningValue bval, bool addenv = true) const;
73 
74  // Get the parameters : max
77  double range(BinningValue bval, bool addenv = true) const;
78 
81  std::ostream& toStream(std::ostream& sl) const;
82 
84  const std::vector<const Surface*>& surfaces() const;
85 
89  void add(const GeometryContext& gctx, const Surface& surface);
90 
91  private:
96  void measure(const GeometryContext& gctx,
97  const std::vector<const Surface*>& surfaces);
98 
100  std::vector<const Surface*> m_surfaces = {};
101 };
102 
103 inline const std::vector<const Surface*>& ProtoLayer::surfaces() const {
104  return m_surfaces;
105 }
106 
107 } // namespace Acts