|
||||
Warning, file /include/Acts/Geometry/ProtoLayer.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // This file is part of the Acts project. 0002 // 0003 // Copyright (C) 2017-2018 CERN for the benefit of the Acts project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 #include "Acts/Geometry/Extent.hpp" 0011 #include "Acts/Geometry/GeometryContext.hpp" 0012 #include "Acts/Surfaces/Surface.hpp" 0013 #include "Acts/Utilities/BinningType.hpp" 0014 0015 #include <iostream> 0016 #include <memory> 0017 #include <utility> 0018 #include <vector> 0019 0020 namespace Acts { 0021 0022 /// @struct ProtoLayer 0023 /// 0024 /// Encapsulates min/max boundaries that will be turned into a layer. 0025 /// The struct allows this information to be obtained in a consistent 0026 /// way, or be caller provided. 0027 0028 struct ProtoLayer { 0029 public: 0030 /// The extent of the ProtoLayer 0031 Extent extent; 0032 0033 /// The envelope parameters 0034 ExtentEnvelope envelope = zeroEnvelopes; 0035 0036 /// Constructor 0037 /// 0038 /// Loops over a provided vector of surface and calculates the various 0039 /// min/max values in one go. Also takes into account the thickness 0040 /// of an associated DetectorElement, if it exists. 0041 /// 0042 /// @param gctx The current geometry context object, e.g. alignment 0043 /// @param surfaces The vector of surfaces to consider 0044 ProtoLayer(const GeometryContext& gctx, 0045 const std::vector<const Surface*>& surfaces); 0046 0047 /// Constructor 0048 /// 0049 /// Loops over a provided vector of surface and calculates the various 0050 /// min/max values in one go. Also takes into account the thickness 0051 /// of an associated DetectorElement, if it exists. 0052 /// 0053 /// @param gctx The current geometry context object, e.g. alignment 0054 /// @param surfaces The vector of surfaces to consider 0055 ProtoLayer(const GeometryContext& gctx, 0056 const std::vector<std::shared_ptr<const Surface>>& surfaces); 0057 0058 ProtoLayer() = default; 0059 0060 /// Get the parameters : min 0061 /// @param bval The accessed binning value 0062 /// @param addenv The steering if enevlope is added or not 0063 double min(BinningValue bval, bool addenv = true) const; 0064 0065 // Get the parameters : max 0066 /// @param bval The accessed binning value 0067 /// @param addenv The steering if enevlope is added or not 0068 double max(BinningValue bval, bool addenv = true) const; 0069 0070 // Get the parameters : max 0071 /// @param bval The accessed binning value 0072 /// @param addenv The steering if enevlope is added or not 0073 double medium(BinningValue bval, bool addenv = true) const; 0074 0075 // Get the parameters : max 0076 /// @param bval The accessed binning value 0077 /// @param addenv The steering if enevlope is added or not 0078 double range(BinningValue bval, bool addenv = true) const; 0079 0080 /// Output to ostream 0081 /// @param sl the input ostream 0082 std::ostream& toStream(std::ostream& sl) const; 0083 0084 /// Give access to the surfaces used/assigned to the ProtoLayer 0085 const std::vector<const Surface*>& surfaces() const; 0086 0087 /// Add a surface, this will also increase the extent 0088 /// @param gctx The current geometry context object, e.g. alignment 0089 /// @param surface The surface which is added to the ProtoLayer 0090 void add(const GeometryContext& gctx, const Surface& surface); 0091 0092 private: 0093 /// Helper method which performs the actual min/max calculation 0094 /// 0095 /// @param gctx The current geometry context object, e.g. alignment 0096 /// @param surfaces The surfaces to build this protolayer out of 0097 void measure(const GeometryContext& gctx, 0098 const std::vector<const Surface*>& surfaces); 0099 0100 /// Store the list of surfaces used for this proto layer 0101 std::vector<const Surface*> m_surfaces = {}; 0102 }; 0103 0104 inline const std::vector<const Surface*>& ProtoLayer::surfaces() const { 0105 return m_surfaces; 0106 } 0107 0108 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |