Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:46

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/Common.hpp"
0013 #include "Acts/Detector/ProtoBinning.hpp"
0014 #include "Acts/Surfaces/Surface.hpp"
0015 #include "Acts/Utilities/AxisDefinitions.hpp"
0016 #include "Acts/Utilities/BinningData.hpp"
0017 
0018 #include <optional>
0019 #include <stdexcept>
0020 #include <vector>
0021 
0022 namespace Acts::Experimental {
0023 /// @brief Support surface building instructions
0024 ///
0025 /// There are two ways to build a support surface:
0026 ///
0027 /// 1. Provide a surface type and the values for the binning
0028 ///
0029 /// 2. Provide a surface directly
0030 ///
0031 /// In both cases a binning description for proto material can be attached,
0032 /// if the surface is split into planar approximinations, the proto binning
0033 /// is assumed to be
0034 struct ProtoSupport {
0035   // Building instructions 1 (surface type, parameters, transform is provided):
0036 
0037   /// The surface type to be built
0038   Surface::SurfaceType type = Surface::SurfaceType::Other;
0039 
0040   /// The offset of the support to an estimated position (e.g. from an extent)
0041   double offset = 0.;
0042 
0043   /// A given extent from the volume, this allows to set support surfaces
0044   /// to fit into given volume extensions (flagged by the binning value
0045   /// being constrained by this extent)
0046   Extent volumeExtent;
0047 
0048   /// The volume envelope/clearance parameters: these are chosen such that the
0049   /// support surface does not touch the volume extent
0050   ExtentEnvelope volumeClearance = ExtentEnvelope::Zero();
0051 
0052   /// The constrain(s) from the internal surfaces, done by parsing
0053   /// the polyhedron vertices of the internal objects before support building
0054   ///
0055   /// The internal constraint would overwrite the volume one in order to allow
0056   /// support surfaces to be fitted from global volume extensions to the
0057   /// actually contained internal objects.
0058   std::vector<AxisDirection> internalConstraints = {};
0059 
0060   // Building instructions 2 (surface is provided):
0061 
0062   /// The support surface can already be provided
0063   std::shared_ptr<Surface> surface = nullptr;
0064 
0065   /// The (optional) binning description for proto material
0066   std::optional<BinningDescription> protoMaterialBinning = std::nullopt;
0067 
0068   /// Potential splits into planar approximations (valid for cylinder/disc)
0069   unsigned int splits = 1u;
0070 
0071   /// Planar placement (only valid for planar support surfaces)
0072   AxisDirection pPlacement = AxisDirection::AxisZ;
0073 
0074   /// Indicate if the support surface(s) should always be addressed in
0075   /// navigation
0076   bool assignToAll = true;
0077 };
0078 
0079 }  // namespace Acts::Experimental