Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DigitizationModule.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DigitizationModule.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
13 
14 #include <memory>
15 #include <vector>
16 
17 namespace Acts {
18 
19 class Surface;
20 
21 using SurfacePtr = std::shared_ptr<const Surface>;
22 using SurfacePtrVector = std::vector<SurfacePtr>;
23 
50  public:
59  DigitizationModule(std::shared_ptr<const Segmentation> moduleSegmentation,
60  double halfThickness, int readoutDirection,
61  double lorentzAngle, double energyThreshold = 0.,
62  bool analogue = false);
63 
65  virtual ~DigitizationModule() = default;
66 
75  const DigitizationCell& entryCids,
76  const DigitizationCell& exitCids) const;
77 
81  const DigitizationCell cell(const Vector2& position) const;
82 
84  double halfThickness() const;
85 
87  int readoutDirection() const;
88 
90  double lorentzAngle() const;
91 
93  double energyThreshold() const;
94 
96  bool analogue() const;
97 
99  const Segmentation& segmentation() const;
100 
107  SurfacePtrVector stepSurfaces(const Vector3& start, const Vector3& end) const;
108 
116  const Vector3& end) const;
117 
119  const SurfacePtrVector& boundarySurfaces() const;
120 
123 
126 
127  private:
141  std::shared_ptr<const Segmentation> m_segmentation;
148 };
149 
150 inline double DigitizationModule::halfThickness() const {
151  return m_halfThickness;
152 }
153 
155  return m_readoutDirection;
156 }
157 
158 inline double DigitizationModule::lorentzAngle() const {
159  return m_lorentzAngle;
160 }
161 
162 inline double DigitizationModule::energyThreshold() const {
163  return m_energyThreshold;
164 }
165 
166 inline bool DigitizationModule::analogue() const {
167  return m_analogue;
168 }
169 
171  return (*(m_segmentation.get()));
172 }
173 
175  return m_boundarySurfaces;
176 }
177 
179  const {
181 }
182 
184  const {
186 }
187 
189  const Vector3& start, const Vector3& end) const {
190  return m_segmentation->digitizationStep(start, end, m_halfThickness,
192 }
193 } // namespace Acts