Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-13 09:21:49

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/Material/Material.hpp"
0013 #include "Acts/Utilities/Logger.hpp"
0014 #include "ActsExamples/GenericDetector/ProtoLayerCreator.hpp"
0015 
0016 namespace Acts {
0017 class TrackingGeometry;
0018 }
0019 
0020 namespace ActsExamples::Generic {
0021 
0022 class GenericDetectorBuilder {
0023  public:
0024   static constexpr float kPixelCentralModuleT = 0.15f;
0025   static constexpr float kPixelEndcapModuleT = 0.15f;
0026 
0027   static constexpr float kShortStripCentralModuleT = 0.25f;
0028   static constexpr float kShortStripEndcapModuleT = 0.25f;
0029 
0030   static constexpr float kLongStripCentralModuleT = 0.35f;
0031   static constexpr float kLongStripEndcapModuleT = 0.35f;
0032 
0033   // Module material properties - X0, L0, A, Z, Rho
0034   // Acts::Material pcMaterial(95.7, 465.2, 28.03, 14., 2.32e-3);
0035   static const Acts::Material kSiliconMaterial;
0036 
0037   static constexpr double kPstRadius = 200 * Acts::UnitConstants::mm;
0038   static constexpr double kPstHalfLengthZ = 2800 * Acts::UnitConstants::mm;
0039 
0040   static constexpr double kBeamPipeRadius = 19 * Acts::UnitConstants::mm;
0041   static constexpr double kBeamPipeHalfLengthZ = 3 * Acts::UnitConstants::m;
0042 
0043   // Unused in Gen3
0044   static constexpr double kPstThickness = 1.8 * Acts::UnitConstants::mm;
0045   static constexpr double kBeamPipeThickness = 0.8 * Acts::UnitConstants::mm;
0046 
0047   struct Config {
0048     ProtoLayerCreator::DetectorElementFactory detectorElementFactory;
0049     Acts::Logging::Level layerLogLevel = Acts::Logging::INFO;
0050     bool protoMaterial = false;
0051     std::size_t buildLevel = 3;
0052   };
0053 
0054   explicit GenericDetectorBuilder(
0055       const Config& cfg,
0056       std::unique_ptr<const Acts::Logger> logger =
0057           Acts::getDefaultLogger("GenDetBldr", Acts::Logging::INFO));
0058 
0059  protected:
0060   ProtoLayerCreator createPixelProtoLayerCreator();
0061   ProtoLayerCreator createShortStripProtoLayerCreator();
0062   ProtoLayerCreator createLongStripProtoLayerCreator();
0063 
0064   Config m_cfg;
0065 
0066   std::unique_ptr<const Acts::Logger> m_logger;
0067   const Acts::Logger& logger() const { return *m_logger; }
0068 
0069   std::shared_ptr<const Acts::ISurfaceMaterial> m_beamPipeMaterial;
0070   std::shared_ptr<const Acts::ISurfaceMaterial> m_pstMaterial;
0071 
0072   std::shared_ptr<const Acts::ISurfaceMaterial> m_pixelCentralMaterial;
0073   std::shared_ptr<const Acts::ISurfaceMaterial> m_pixelEndcapMaterial;
0074   std::shared_ptr<const Acts::ISurfaceMaterial> m_pixelCentralModuleMaterial;
0075   std::shared_ptr<const Acts::ISurfaceMaterial> m_pixelEndcapModuleMaterial;
0076 
0077   std::shared_ptr<const Acts::ISurfaceMaterial> m_shortStripCentralMaterial;
0078   std::shared_ptr<const Acts::ISurfaceMaterial> m_shortStripEndcapMaterial;
0079   std::shared_ptr<const Acts::ISurfaceMaterial>
0080       m_shortStripCentralModuleMaterial;
0081   std::shared_ptr<const Acts::ISurfaceMaterial>
0082       m_shortStripEndcapModuleMaterial;
0083 
0084   std::shared_ptr<const Acts::ISurfaceMaterial> m_longStripCentralMaterial;
0085   std::shared_ptr<const Acts::ISurfaceMaterial> m_longStripEndcapMaterial;
0086   std::shared_ptr<const Acts::ISurfaceMaterial>
0087       m_longStripCentralModuleMaterial;
0088   std::shared_ptr<const Acts::ISurfaceMaterial> m_longStripEndcapModuleMaterial;
0089 };
0090 
0091 }  // namespace ActsExamples::Generic