ATLAS Offline Software
ConeLayer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ConeLayer.cxx, (c) ATLAS Detector software
8 
9 // Trk
10 #include "TrkGeometry/ConeLayer.h"
11 
15 #include "TrkSurfaces/ConeBounds.h"
16 // CLHEP
18 
20  Trk::ConeBounds* cbounds,
21  const Trk::LayerMaterialProperties& laymatprop,
22  double thickness,
23  std::unique_ptr<Trk::OverlapDescriptor> olap,
24  int laytyp)
25  : ConeSurface(transform, cbounds)
26  , Layer(laymatprop, thickness, std::move(olap), laytyp)
27 {}
28 
30  const Trk::LayerMaterialProperties& laymatprop,
31  double thickness,
32  std::unique_ptr<Trk::OverlapDescriptor> olap,
33  int laytyp)
34  : ConeSurface(*cyl)
35  , Layer(laymatprop, thickness, std::move(olap), laytyp)
36 {}
37 
39  Trk::ConeBounds* cbounds,
40  std::unique_ptr<Trk::SurfaceArray> surfaceArray,
41  double thickness,
42  std::unique_ptr<Trk::OverlapDescriptor> olap,
43  int laytyp)
44  : ConeSurface(transform, cbounds)
45  , Layer(std::move(surfaceArray), thickness, std::move(olap), laytyp)
46 {}
47 
49  Trk::ConeBounds* cbounds,
50  std::unique_ptr<Trk::SurfaceArray> surfaceArray,
51  const Trk::LayerMaterialProperties& laymatprop,
52  double thickness,
53  std::unique_ptr<Trk::OverlapDescriptor> olap,
54  int laytyp)
55  : ConeSurface(transform, cbounds)
56  , Layer(std::move(surfaceArray), laymatprop, thickness, std::move(olap), laytyp)
57 {}
58 
59 Trk::ConeLayer::ConeLayer(const Trk::ConeLayer& clay) = default;
60 
62  const Amg::Transform3D& transf)
63  : ConeSurface(clay, transf)
64  , Layer(clay)
65 {}
66 
69 {
70  if (this != &clay) {
71  // call the assignments of the base classes
74  }
75  return (*this);
76 }
77 
78 const Trk::ConeSurface&
80 {
81  return (*this);
82 }
83 
86 {
87  return (*this);
88 }
89 
90 
91 double
93  Trk::PropDirection dir) const
94 {
96  return 0.;
97  // calculate the direction to the normal
98  const Amg::Vector3D& parmPos = parm.position();
99  Amg::Vector3D pastStep(parmPos + dir * parm.momentum().normalized());
100  if (pastStep.perp() > parm.position().perp())
101  return Trk::Layer::m_layerMaterialProperties->alongPreFactor();
102  return Trk::Layer::m_layerMaterialProperties->oppositePreFactor();
103 }
104 
105 double
107  Trk::PropDirection dir) const
108 {
110  return 0;
111  const Amg::Vector3D& parmPos = parm.position();
112  Amg::Vector3D pastStep(parmPos + dir * parm.momentum().normalized());
113  if (pastStep.perp() > parm.position().perp())
114  return Trk::Layer::m_layerMaterialProperties->alongPostFactor();
115  return Trk::Layer::m_layerMaterialProperties->oppositePostFactor();
116 }
117 
118 void
120 {
122  std::make_unique<Transforms>(shift * m_transforms->transform);
123 }
Trk::ConeLayer::preUpdateMaterialFactor
virtual double preUpdateMaterialFactor(const Trk::TrackParameters &par, Trk::PropDirection dir) const override final
getting the MaterialProperties back - for pre-update
Definition: ConeLayer.cxx:92
Trk::ConeSurface::operator=
ConeSurface & operator=(const ConeSurface &csf)
Assignment operator.
Definition: ConeSurface.cxx:86
TrackParameters.h
MaterialProperties.h
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::Layer::m_layerMaterialProperties
std::unique_ptr< LayerMaterialProperties > m_layerMaterialProperties
thickness of the Layer
Definition: Layer.h:289
Trk::ConeLayer::postUpdateMaterialFactor
virtual double postUpdateMaterialFactor(const Trk::TrackParameters &par, Trk::PropDirection dir) const override final
getting the MaterialProperties back - for post-update
Definition: ConeLayer.cxx:106
Trk::ConeBounds
Definition: ConeBounds.h:44
GeoPrimitives.h
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::Surface::m_transforms
std::unique_ptr< Transforms > m_transforms
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:436
Trk::ConeLayer::moveLayer
virtual void moveLayer(Amg::Transform3D &shift) override final
move the Layer
Definition: ConeLayer.cxx:119
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::Layer::operator=
Layer & operator=(const Layer &lay)
Assignment operator for Derived classes.
Definition: Layer.cxx:98
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::ConeLayer
Definition: ConeLayer.h:42
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::ConeLayer::ConeLayer
ConeLayer()
Default Constructor.
Definition: ConeLayer.h:45
Trk::ConeLayer::operator=
ConeLayer & operator=(const ConeLayer &)
Assignment operator for ConeLayers.
Definition: ConeLayer.cxx:68
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ConeLayer.h
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
ConeBounds.h
Trk::ConeSurface
Definition: ConeSurface.h:51
Trk::ConeLayer::surfaceRepresentation
virtual const ConeSurface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
Definition: ConeLayer.cxx:79
LayerMaterialProperties.h
Trk::Layer
Definition: Layer.h:73