Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-27 07:55:10

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