Back to home page

EIC code displayed by LXR

 
 

    


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

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/Units.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Geometry/ITrackingVolumeBuilder.hpp"
0014 #include "Acts/Geometry/ITrackingVolumeHelper.hpp"
0015 #include "Acts/Utilities/BinningType.hpp"
0016 #include "Acts/Utilities/Logger.hpp"
0017 
0018 #include <algorithm>
0019 #include <array>
0020 #include <limits>
0021 #include <memory>
0022 #include <ostream>
0023 #include <stdexcept>
0024 #include <string>
0025 #include <utility>
0026 #include <vector>
0027 
0028 namespace Acts {
0029 
0030 class IVolumeMaterial;
0031 class ISurfaceMaterial;
0032 class ILayerBuilder;
0033 class IConfinedTrackingVolumeBuilder;
0034 
0035 /// @enum WrappingCondition
0036 enum WrappingCondition {
0037   Undefined = 0,         ///< inconsistency detected
0038   Attaching = 1,         ///< attach the volumes
0039   Inserting = 2,         ///< insert the new volume
0040   Wrapping = 3,          ///< wrap the new volume around
0041   CentralInserting = 4,  ///< insert the new one into the center
0042   CentralWrapping = 5,   ///< wrap the new central volume around
0043   NoWrapping = 6         ///< no inner volume present - no wrapping needed
0044 };
0045 
0046 /// VolumeConfig struct to understand the layer config
0047 struct VolumeConfig {
0048   bool present{false};                  ///< layers are present
0049   bool wrapping{false};                 ///< in what way they are binned
0050   double rMin;                          ///< min parameter r
0051   double rMax;                          ///< max parameter r
0052   double zMin;                          ///< min parameter z
0053   double zMax;                          ///< max parameter z
0054   LayerVector layers;                   ///< the layers you have
0055   MutableTrackingVolumeVector volumes;  ///< the confined volumes you have
0056 
0057   /// Default constructor
0058   VolumeConfig()
0059       : rMin(std::numeric_limits<double>::max()),
0060         rMax(std::numeric_limits<double>::lowest()),
0061         zMin(std::numeric_limits<double>::max()),
0062         zMax(std::numeric_limits<double>::lowest()),
0063         layers() {}
0064 
0065   /// Adapt to the dimensions of another config in Z
0066   /// it will take the maximum/minimum values and just overwrite them
0067   ///
0068   /// @param [in] lConfig is the config to which it should be adapted
0069   void adaptZ(const VolumeConfig& lConfig) {
0070     if (lConfig.present) {
0071       zMin = std::min(zMin, lConfig.zMin);
0072       zMax = std::max(zMax, lConfig.zMax);
0073     }
0074   }
0075 
0076   /// Adapt to the dimensions of another config in R
0077   /// it will take the maximum/minimum values and just overwrite them
0078   ///
0079   /// @param [in] lConfig is the config to which it should be adapted
0080   void adaptR(const VolumeConfig& lConfig) {
0081     if (lConfig.present) {
0082       rMin = std::min(rMin, lConfig.rMin);
0083       rMax = std::max(rMax, lConfig.rMax);
0084     }
0085   }
0086 
0087   /// Adapt to the dimensions of another config
0088   /// it will take the maximum/minimum values and just overwrite them
0089   ///
0090   /// @param [in] lConfig is the config to which it should be adapted
0091   void adapt(const VolumeConfig& lConfig) {
0092     adaptZ(lConfig);
0093     adaptR(lConfig);
0094   }
0095 
0096   /// Attach method - non-const
0097   /// it attaches the one volume config to the other one in Z
0098   /// this is the non-cost method, i.e. the mid point is used
0099   ///
0100   /// @param [in] lConfig is the config to which it should be attached
0101   /// @note lConfig will be changed
0102   void midPointAttachZ(VolumeConfig& lConfig) {
0103     if (lConfig.zMin >= zMax) {
0104       double zMid = 0.5 * (lConfig.zMin + zMax);
0105       lConfig.zMin = zMid;
0106       zMax = zMid;
0107     } else {
0108       double zMid = 0.5 * (zMin + lConfig.zMax);
0109       lConfig.zMax = zMid;
0110       zMin = zMid;
0111     }
0112   }
0113 
0114   /// Attach method - const
0115   /// it attaches the one volume config to the other one
0116   ///
0117   /// @param [in] lConfig is the confit to which it should be attached
0118   void attachZ(const VolumeConfig& lConfig) {
0119     if (lConfig.zMin >= zMax) {
0120       zMax = lConfig.zMin;
0121     } else {
0122       zMin = lConfig.zMax;
0123     }
0124   }
0125 
0126   /// Overlap check radially
0127   ///
0128   /// @param [in] vConfig is the config against which is checked
0129   /// @return boolean if the overlap in r exists
0130   bool overlapsInR(const VolumeConfig& vConfig) const {
0131     if (!present) {
0132       return false;
0133     }
0134     return std::max(rMin, vConfig.rMin) <= std::min(rMax, vConfig.rMax);
0135   }
0136 
0137   /// Overlap check longitudinally
0138   ///
0139   /// @param [in] vConfig is the config against which is checked
0140   /// @return boolean if the overlap in z exists
0141   bool overlapsInZ(const VolumeConfig& vConfig) const {
0142     if (!present) {
0143       return false;
0144     }
0145     return std::max(zMin, vConfig.zMin) <= std::min(zMax, vConfig.zMax);
0146   }
0147 
0148   /// Compatibility check full set
0149   ///
0150   /// @param [in] vConfig is the config against which is checked
0151   /// @return boolean if the current volume wraps the vConfig fully
0152   bool wraps(const VolumeConfig& vConfig) const {
0153     if ((zMax <= vConfig.zMin) || (zMin >= vConfig.zMax)) {
0154       return true;
0155     }
0156     return containsInR(vConfig);
0157   }
0158 
0159   /// Check if contained full set
0160   ///
0161   /// @param [in] vConfig is the config against which is checked
0162   bool contains(const VolumeConfig& vConfig) const {
0163     return (containsInR(vConfig) && containsInZ(vConfig));
0164   }
0165 
0166   /// Check if contained radially
0167   ///
0168   /// @param [in] vConfig is the config against which is checked
0169   bool containsInR(const VolumeConfig& vConfig) const {
0170     return (rMin >= vConfig.rMax);
0171   }
0172 
0173   /// Check if contained longitudinally
0174   ///
0175   /// @param [in] vConfig is the config against which is checked
0176   bool containsInZ(const VolumeConfig& vConfig) const {
0177     return (vConfig.zMin > zMin && vConfig.zMax < zMax);
0178   }
0179 
0180   /// Method for output formatting
0181   std::string toString() const {
0182     /// for screen output
0183     std::stringstream sl;
0184     sl << rMin << ", " << rMax << " / " << zMin << ", " << zMax;
0185     return sl.str();
0186   }
0187 };
0188 
0189 /// @brief The WrappingSetup that is happening here
0190 struct WrappingConfig {
0191  public:
0192   /// the new volumes
0193   VolumeConfig nVolumeConfig;
0194   VolumeConfig cVolumeConfig;
0195   VolumeConfig pVolumeConfig;
0196 
0197   /// the combined volume
0198   VolumeConfig containerVolumeConfig;
0199 
0200   /// existing volume config with potential gaps
0201   VolumeConfig existingVolumeConfig;
0202   VolumeConfig fGapVolumeConfig;
0203   VolumeConfig sGapVolumeConfig;
0204 
0205   /// externally provided config, this can only change the
0206   /// the ncp volumes
0207   VolumeConfig externalVolumeConfig;
0208 
0209   // WrappingCondition
0210   WrappingCondition wCondition = Undefined;
0211   std::string wConditionScreen = "[left untouched]";
0212 
0213   /// constructor
0214   WrappingConfig() = default;
0215 
0216   /// configure the new Volume
0217   void configureContainerVolume() {
0218     // set the container to be present
0219     containerVolumeConfig.present = true;
0220     std::string wConditionAddon = "";
0221     // if we have more than one config present
0222     if ((nVolumeConfig.present && cVolumeConfig.present) ||
0223         (cVolumeConfig.present && pVolumeConfig.present) ||
0224         (nVolumeConfig.present && pVolumeConfig.present)) {
0225       wCondition = Wrapping;
0226       wConditionScreen = "grouped to ";
0227     }
0228     // adapt the new volume config to the existing configs
0229     if (nVolumeConfig.present) {
0230       containerVolumeConfig.adapt(nVolumeConfig);
0231       wConditionScreen += "[n]";
0232     }
0233     if (cVolumeConfig.present) {
0234       containerVolumeConfig.adapt(cVolumeConfig);
0235       wConditionScreen += "[c]";
0236     }
0237     if (pVolumeConfig.present) {
0238       containerVolumeConfig.adapt(pVolumeConfig);
0239       wConditionScreen += "[p]";
0240     }
0241     // adapt the external one
0242     if (externalVolumeConfig.present) {
0243       containerVolumeConfig.adapt(externalVolumeConfig);
0244     }
0245     // attach the volume configs
0246     if (nVolumeConfig.present && cVolumeConfig.present) {
0247       nVolumeConfig.midPointAttachZ(cVolumeConfig);
0248     }
0249     if (cVolumeConfig.present && pVolumeConfig.present) {
0250       cVolumeConfig.midPointAttachZ(pVolumeConfig);
0251     }
0252     // adapt r afterwards
0253     // - easy if no existing volume
0254     // - possible if no central volume
0255     if (!existingVolumeConfig.present || !cVolumeConfig.present) {
0256       nVolumeConfig.adaptR(containerVolumeConfig);
0257       cVolumeConfig.adaptR(containerVolumeConfig);
0258       pVolumeConfig.adaptR(containerVolumeConfig);
0259     }
0260   }
0261 
0262   /// wrap, insert, attach
0263   void wrapInsertAttach() {
0264     // action is only needed if an existing volume
0265     // is present
0266     if (existingVolumeConfig.present) {
0267       // 0 - simple attachment case
0268       if (!cVolumeConfig.present) {
0269         // check if it can be easily attached
0270         if (nVolumeConfig.present &&
0271             nVolumeConfig.zMax < existingVolumeConfig.zMin) {
0272           nVolumeConfig.attachZ(existingVolumeConfig);
0273           // will attach the new volume(s)
0274           wCondition = Attaching;
0275           wConditionScreen = "[n attached]";
0276         }
0277         if (pVolumeConfig.present &&
0278             pVolumeConfig.zMin > existingVolumeConfig.zMax) {
0279           pVolumeConfig.attachZ(existingVolumeConfig);
0280           // will attach the new volume(s)
0281           wCondition = Attaching;
0282           wConditionScreen = "[p attached]";
0283         }
0284         // see if inner glue volumes are needed
0285         if (containerVolumeConfig.rMin > existingVolumeConfig.rMin) {
0286           nVolumeConfig.rMin = existingVolumeConfig.rMin;
0287           pVolumeConfig.rMin = existingVolumeConfig.rMin;
0288         } else {
0289           fGapVolumeConfig.present = true;
0290           // get the zMin/zMax boundaries
0291           fGapVolumeConfig.adaptZ(existingVolumeConfig);
0292           fGapVolumeConfig.rMin = containerVolumeConfig.rMin;
0293           fGapVolumeConfig.rMax = existingVolumeConfig.rMin;
0294         }
0295         // see if outer glue volumes are needed
0296         if (containerVolumeConfig.rMax < existingVolumeConfig.rMax) {
0297           nVolumeConfig.rMax = existingVolumeConfig.rMax;
0298           pVolumeConfig.rMax = existingVolumeConfig.rMax;
0299         } else {
0300           sGapVolumeConfig.present = true;
0301           // get the zMin/zMax boundaries
0302           sGapVolumeConfig.adaptZ(existingVolumeConfig);
0303           sGapVolumeConfig.rMin = existingVolumeConfig.rMax;
0304           sGapVolumeConfig.rMax = containerVolumeConfig.rMax;
0305         }
0306       } else {
0307         // full wrapping or full insertion case
0308         if (existingVolumeConfig.rMax < containerVolumeConfig.rMin) {
0309           // Full wrapping case
0310           // - set the rMin
0311           nVolumeConfig.rMin = existingVolumeConfig.rMax;
0312           cVolumeConfig.rMin = existingVolumeConfig.rMax;
0313           pVolumeConfig.rMin = existingVolumeConfig.rMax;
0314           // - set the rMax
0315           nVolumeConfig.rMax = containerVolumeConfig.rMax;
0316           cVolumeConfig.rMax = containerVolumeConfig.rMax;
0317           pVolumeConfig.rMax = containerVolumeConfig.rMax;
0318           // will wrap the new volume(s) around existing
0319           wCondition = Wrapping;
0320           wConditionScreen = "[fully wrapped]";
0321         } else if (existingVolumeConfig.rMin > containerVolumeConfig.rMax) {
0322           // full insertion case
0323           // set the rMax
0324           nVolumeConfig.rMax = existingVolumeConfig.rMin;
0325           cVolumeConfig.rMax = existingVolumeConfig.rMin;
0326           pVolumeConfig.rMax = existingVolumeConfig.rMin;
0327           // set the rMin
0328           nVolumeConfig.rMin = containerVolumeConfig.rMin;
0329           cVolumeConfig.rMin = containerVolumeConfig.rMin;
0330           pVolumeConfig.rMin = containerVolumeConfig.rMin;
0331           // will insert the new volume(s) into existing
0332           wCondition = Inserting;
0333           wConditionScreen = "[fully inserted]";
0334         } else if (cVolumeConfig.wraps(existingVolumeConfig)) {
0335           // central wrapping case
0336           // set the rMax
0337           nVolumeConfig.rMax = containerVolumeConfig.rMax;
0338           cVolumeConfig.rMax = containerVolumeConfig.rMax;
0339           pVolumeConfig.rMax = containerVolumeConfig.rMax;
0340           // set the rMin
0341           nVolumeConfig.rMin = existingVolumeConfig.rMin;
0342           cVolumeConfig.rMin = existingVolumeConfig.rMax;
0343           pVolumeConfig.rMin = existingVolumeConfig.rMin;
0344           // set the Central Wrapping
0345           wCondition = CentralWrapping;
0346           wConditionScreen = "[centrally wrapped]";
0347         } else if (existingVolumeConfig.wraps(cVolumeConfig)) {
0348           // central insertion case
0349           // set the rMax
0350           nVolumeConfig.rMax = containerVolumeConfig.rMax;
0351           cVolumeConfig.rMax = existingVolumeConfig.rMin;
0352           pVolumeConfig.rMax = containerVolumeConfig.rMax;
0353           // set the rMin
0354           nVolumeConfig.rMin = containerVolumeConfig.rMin;
0355           cVolumeConfig.rMin = containerVolumeConfig.rMin;
0356           pVolumeConfig.rMin = containerVolumeConfig.rMin;
0357           // set the Central Wrapping
0358           wCondition = CentralWrapping;
0359           wConditionScreen = "[centrally inserted]";
0360         } else if ((existingVolumeConfig.rMax > containerVolumeConfig.rMin &&
0361                     existingVolumeConfig.rMin < containerVolumeConfig.rMin) ||
0362                    (existingVolumeConfig.rMax > containerVolumeConfig.rMax &&
0363                     existingVolumeConfig.rMin < containerVolumeConfig.rMax)) {
0364           // The volumes are overlapping this shouldn't be happening return an
0365           // error
0366           throw std::invalid_argument(
0367               "Volumes are overlapping, this shouldn't be happening. Please "
0368               "check your geometry building.");
0369         }
0370 
0371         // check if gaps are needed
0372         //
0373         // the gap reference is either the container for FULL wrapping,
0374         // insertion
0375         // or it is the centralVolume for central wrapping, insertion
0376         VolumeConfig referenceVolume =
0377             (wCondition == Wrapping || wCondition == Inserting)
0378                 ? containerVolumeConfig
0379                 : cVolumeConfig;
0380         // - at the negative sector
0381         if (existingVolumeConfig.zMin > referenceVolume.zMin) {
0382           fGapVolumeConfig.present = true;
0383           fGapVolumeConfig.adaptR(existingVolumeConfig);
0384           fGapVolumeConfig.zMin = referenceVolume.zMin;
0385           fGapVolumeConfig.zMax = existingVolumeConfig.zMin;
0386         } else {
0387           // adapt lower z boundary
0388           if (nVolumeConfig.present) {
0389             nVolumeConfig.zMin = existingVolumeConfig.zMin;
0390           } else if (cVolumeConfig.present) {
0391             cVolumeConfig.zMin = existingVolumeConfig.zMin;
0392           }
0393         }
0394         // - at the positive sector
0395         if (existingVolumeConfig.zMax < referenceVolume.zMax) {
0396           sGapVolumeConfig.present = true;
0397           sGapVolumeConfig.adaptR(existingVolumeConfig);
0398           sGapVolumeConfig.zMin = existingVolumeConfig.zMax;
0399           sGapVolumeConfig.zMax = referenceVolume.zMax;
0400         } else {
0401           // adapt higher z boundary
0402           if (pVolumeConfig.present) {
0403             pVolumeConfig.zMax = existingVolumeConfig.zMax;
0404           } else if (cVolumeConfig.present) {
0405             cVolumeConfig.zMax = existingVolumeConfig.zMax;
0406           }
0407         }
0408       }
0409     }
0410     return;
0411   }
0412 
0413   /// Method for output formatting
0414   std::string toString() const {
0415     // for screen output
0416     std::stringstream sl;
0417     if (containerVolumeConfig.present) {
0418       sl << "New container built with       configuration: "
0419          << containerVolumeConfig.toString() << '\n';
0420     }
0421     // go through the new ones first
0422     if (nVolumeConfig.present) {
0423       sl << " - n: Negative Endcap, current configuration: "
0424          << nVolumeConfig.toString() << '\n';
0425     }
0426     if (cVolumeConfig.present) {
0427       sl << " - c: Barrel, current          configuration: "
0428          << cVolumeConfig.toString() << '\n';
0429     }
0430     if (pVolumeConfig.present) {
0431       sl << " - p: Negative Endcap, current configuration: "
0432          << pVolumeConfig.toString() << '\n';
0433     }
0434     if (existingVolumeConfig.present) {
0435       sl << "Existing volume with           configuration: "
0436          << existingVolumeConfig.toString() << '\n';
0437       if (fGapVolumeConfig.present) {
0438         sl << " - g1: First gap volume,       configuration : "
0439            << fGapVolumeConfig.toString() << '\n';
0440       }
0441       if (sGapVolumeConfig.present) {
0442         sl << " - g2: Second gap volume,      configuration : "
0443            << sGapVolumeConfig.toString() << '\n';
0444       }
0445       if (wCondition != Undefined) {
0446         sl << "WrappingCondition = " << wCondition << '\n';
0447       }
0448     }
0449     return sl.str();
0450   }
0451 };
0452 
0453 /// @class CylinderVolumeBuilder
0454 ///
0455 /// A volume builder to be used for building concentric cylinder volumes
0456 ///  - a) configured volume
0457 ///  - b) wrapping around a cylindrical/disk layer config
0458 ///
0459 /// All are optionally wrapped around a given volume which has to by a cylinder
0460 /// volume and which has to be center at z == 0
0461 ///
0462 /// To receive the tracking volume it is possible to also hand over a triple of
0463 /// layers, which is a C++ tuple of three pointers to layer vectors (defined in
0464 /// the ITrackingVolumeBuilder). This functionality is needed for a possible
0465 /// translation of an geometry existing in another format. The first entry
0466 /// represents the layers of the negative endcap, the second the layers of the
0467 /// barrel and the third the layers of the positive endcap. If the one of these
0468 /// pointers is a nullptr no layers will be created for this volume
0469 ///
0470 /// For the endcap region it is possible to check for a ring layout,
0471 /// in which case an attempt to split into individual ring volumes is done
0472 class CylinderVolumeBuilder : public ITrackingVolumeBuilder {
0473  public:
0474   /// @struct Config
0475   /// Nested configuration struct for this CylinderVolumeBuilder
0476   struct Config {
0477     /// The tracking volume helper for construction
0478     std::shared_ptr<const ITrackingVolumeHelper> trackingVolumeHelper = nullptr;
0479     /// The string based identification
0480     std::string volumeName = "";
0481     /// The world material
0482     std::shared_ptr<const IVolumeMaterial> volumeMaterial = nullptr;
0483     /// Build the volume to the beam line
0484     bool buildToRadiusZero = false;
0485     /// Check for endcap ring layout
0486     bool checkRingLayout = false;
0487     /// Tolerance for endcap ring association
0488     double ringTolerance = 0 * UnitConstants::mm;
0489     /// Builder to construct layers within the volume
0490     std::shared_ptr<const ILayerBuilder> layerBuilder = nullptr;
0491     /// Builder to construct confined volumes within the volume
0492     std::shared_ptr<const IConfinedTrackingVolumeBuilder> ctVolumeBuilder =
0493         nullptr;
0494     /// Additional envelope in R to create rMin, rMax
0495     std::pair<double, double> layerEnvelopeR = {1. * UnitConstants::mm,
0496                                                 1. * UnitConstants::mm};
0497     /// the additional envelope in Z to create zMin, zMax
0498     double layerEnvelopeZ = 1. * UnitConstants::mm;
0499 
0500     // The potential boundary material (MB) options - there are 6 at maximum
0501     /// -------------------- MB (outer [1]) ---------------
0502     /// | MB [2]  NEC  MB [3] |  B |  MB [4]  PEC  MB [5] |
0503     /// -------------------- MB (inner [0]) ---------------
0504     std::array<std::shared_ptr<const ISurfaceMaterial>, 6> boundaryMaterial{
0505         nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
0506   };
0507 
0508   /// Constructor
0509   ///
0510   /// @param [in] cvbConfig is the configuration struct to steer the builder
0511   /// @param [in] logger logging instance
0512   CylinderVolumeBuilder(const Config& cvbConfig,
0513                         std::unique_ptr<const Logger> logger = getDefaultLogger(
0514                             "CylinderVolumeBuilder", Logging::INFO));
0515 
0516   /// Destructor
0517   ~CylinderVolumeBuilder() override;
0518 
0519   /// CylinderVolumeBuilder main call method
0520   ///
0521   /// @param [in] gctx geometry context for which this cylinder volume is built
0522   /// @param [in] existingVolume is an (optional) volume to be included
0523   /// @param [in] externalBounds are (optional) external confinement
0524   ///             constraints
0525   /// @return a mutable pointer to a new TrackingVolume which includes the
0526   ///         optionally provided existingVolume consistently for further
0527   ///         processing
0528   MutableTrackingVolumePtr trackingVolume(
0529       const GeometryContext& gctx, TrackingVolumePtr existingVolume = nullptr,
0530       std::shared_ptr<const VolumeBounds> externalBounds =
0531           nullptr) const override;
0532 
0533   /// Set configuration method
0534   ///
0535   /// @param [in] cvbConfig is the new configuration to be set
0536   void setConfiguration(const Config& cvbConfig);
0537 
0538   /// Get configuration method
0539   ///
0540   /// @return a copy of the config object
0541   Config getConfiguration() const;
0542 
0543   /// set logging instance
0544   ///
0545   /// @param [in] newLogger is the logging instance to be set
0546   void setLogger(std::unique_ptr<const Logger> newLogger);
0547 
0548   /// Analyze the config to gather needed dimension
0549   ///
0550   /// @param [in] gctx the geometry context for this building
0551   /// @param [in] lVector is the vector of layers that are parsed
0552   /// @param [in] mtvVector Vector of mutable tracking volumes to analyze
0553   ///
0554   /// @return a VolumeConfig representing this layer
0555   VolumeConfig analyzeContent(
0556       const GeometryContext& gctx, const LayerVector& lVector,
0557       const MutableTrackingVolumeVector& mtvVector) const;
0558 
0559  private:
0560   /// Configuration struct
0561   Config m_cfg;
0562 
0563   /// Private access to the logger
0564   ///
0565   /// @return a const reference to the logger
0566   const Logger& logger() const { return *m_logger; }
0567 
0568   /// the logging instance
0569   std::unique_ptr<const Logger> m_logger;
0570 
0571   /// Helper method check the layer containment,
0572   /// both for inside / outside.
0573   ///
0574   /// @param [in] gctx the geometry context for this building
0575   /// @param [in] layerConfig is the VolumeConfig to be tested
0576   ///        the wrapping flag may be set
0577   /// @param [in] insideConfig is the inside volume in order to
0578   ///        check the wrapping
0579   /// @param [in] volumeConfig is the volume to be tested
0580   /// @param [in] sign distinguishes inside/outside testing
0581   ///
0582   /// @return boolean that indicates the test result
0583   bool checkLayerContainment(const GeometryContext& gctx,
0584                              VolumeConfig& layerConfig,
0585                              const VolumeConfig& insideConfig,
0586                              const VolumeConfig& volumeConfig, int sign) const;
0587 };
0588 
0589 /// Return the configuration object
0590 inline CylinderVolumeBuilder::Config CylinderVolumeBuilder::getConfiguration()
0591     const {
0592   return m_cfg;
0593 }
0594 
0595 }  // namespace Acts