Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:11

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2016-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 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Digitization/DigitizationCell.hpp"
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/Utilities/Logger.hpp"
0015 
0016 #include <memory>
0017 #include <utility>
0018 #include <vector>
0019 
0020 namespace Acts {
0021 
0022 class DigitizationModule;
0023 struct DigitizationStep;
0024 
0025 /// @class PlanarModuleStepper
0026 ///
0027 /// Module for fast, geometric digitization
0028 /// this is a planar module stepper that calculates the step length
0029 /// in given segmentations and retrunes digitisation steps
0030 
0031 class PlanarModuleStepper {
0032  public:
0033   /// Constructor
0034   ///
0035   /// @param mlogger is the logging instance
0036   PlanarModuleStepper(std::unique_ptr<const Logger> mlogger = getDefaultLogger(
0037                           "PlanarModuleStepper", Logging::INFO));
0038 
0039   /// Destructor
0040   ~PlanarModuleStepper() = default;
0041 
0042   /// Calculate the steps caused by this track - full simulation interface
0043   ///
0044   /// @param gctx The current geometry context object, e.g. alignment
0045   /// @param dmodule is the digitization module
0046   /// @param startPoint is the starting position of the stepping
0047   /// @param endPoint is the end position of the stepping
0048   ///
0049   /// @return is the vector of digitization steps
0050   std::vector<DigitizationStep> cellSteps(const GeometryContext& gctx,
0051                                           const DigitizationModule& dmodule,
0052                                           const Vector3& startPoint,
0053                                           const Vector3& endPoint) const;
0054 
0055   /// Calculate the steps caused by this track - fast simulation interface
0056   ///
0057   /// @param gctx The current geometry context object, e.g. alignment
0058   /// @param dmodule is the digitization module
0059   /// @param moduleIntersection is the 2d intersection at the module surface
0060   /// @param trackDirection is the track direction at the intersection
0061   ///
0062   /// @return is the vector of digitization steps
0063   std::vector<DigitizationStep> cellSteps(const GeometryContext& gctx,
0064                                           const DigitizationModule& dmodule,
0065                                           const Vector2& moduleIntersection,
0066                                           const Vector3& trackDirection) const;
0067 
0068   /// Set logging instance
0069   ///
0070   /// @param logger is the logging instance to be set
0071   void setLogger(std::unique_ptr<const Logger> logger) {
0072     m_logger = std::move(logger);
0073   }
0074 
0075  private:
0076   /// Private access method to the logging instance
0077   const Logger& logger() const { return *m_logger; }
0078 
0079   /// logging instance
0080   std::unique_ptr<const Logger> m_logger;
0081 };
0082 
0083 }  // namespace Acts