ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometry
src
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
12
#include "
TrkGeometry/LayerMaterialProperties.h
"
13
#include "
TrkGeometry/MaterialProperties.h
"
14
#include "
TrkParameters/TrackParameters.h
"
15
#include "
TrkSurfaces/ConeBounds.h
"
16
// CLHEP
17
#include "
GeoPrimitives/GeoPrimitives.h
"
18
19
Trk::ConeLayer::ConeLayer
(
const
Amg::Transform3D
&
transform
,
20
std::shared_ptr<const Trk::ConeBounds> cbounds,
21
const
Trk::LayerMaterialProperties
& laymatprop,
22
double
thickness
,
23
std::unique_ptr<Trk::OverlapDescriptor> olap,
24
int
laytyp)
25
:
ConeSurface
(
transform
,
std
::move(cbounds))
26
,
Layer
(laymatprop,
thickness
,
std
::move(olap), laytyp)
27
{}
28
29
Trk::ConeLayer::ConeLayer
(
Trk::ConeSurface
* cyl,
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
38
Trk::ConeLayer::ConeLayer
(
const
Amg::Transform3D
&
transform
,
39
std::shared_ptr<const 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
,
std
::move(cbounds))
45
,
Layer
(
std
::move(
surfaceArray
),
thickness
,
std
::move(olap), laytyp)
46
{}
47
48
Trk::ConeLayer::ConeLayer
(
const
Amg::Transform3D
&
transform
,
49
std::shared_ptr<const 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
,
std
::move(cbounds))
56
,
Layer
(
std
::move(
surfaceArray
), laymatprop,
thickness
,
std
::move(olap), laytyp)
57
{}
58
59
Trk::ConeLayer::ConeLayer
(
const
Trk::ConeLayer
& clay) =
default
;
60
61
Trk::ConeLayer::ConeLayer
(
const
Trk::ConeLayer
& clay,
62
const
Amg::Transform3D
& transf)
63
:
ConeSurface
(clay, transf)
64
,
Layer
(clay)
65
{}
66
67
Trk::ConeLayer
&
68
Trk::ConeLayer::operator=
(
const
ConeLayer
& clay)
69
{
70
if
(
this
!= &clay) {
71
// call the assignments of the base classes
72
Trk::ConeSurface::operator=
(clay);
73
Trk::Layer::operator=
(clay);
74
}
75
return
(*
this
);
76
}
77
78
const
Trk::ConeSurface
&
79
Trk::ConeLayer::surfaceRepresentation
()
const
80
{
81
return
(*
this
);
82
}
83
84
Trk::ConeSurface
&
85
Trk::ConeLayer::surfaceRepresentation
()
86
{
87
return
(*
this
);
88
}
89
90
91
double
92
Trk::ConeLayer::preUpdateMaterialFactor
(
const
Trk::TrackParameters
& parm,
93
Trk::PropDirection
dir)
const
94
{
95
if
(!
Trk::Layer::m_layerMaterialProperties
)
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
106
Trk::ConeLayer::postUpdateMaterialFactor
(
const
Trk::TrackParameters
& parm,
107
Trk::PropDirection
dir)
const
108
{
109
if
(!
Trk::Layer::m_layerMaterialProperties
)
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
119
Trk::ConeLayer::moveLayer
(
Amg::Transform3D
& shift)
120
{
121
Trk::ConeSurface::m_transforms
=
122
std::make_unique<Transforms>(shift *
m_transforms
->transform);
123
}
ConeBounds.h
ConeLayer.h
GeoPrimitives.h
LayerMaterialProperties.h
MaterialProperties.h
TrackParameters.h
Trk::ConeLayer
Class to describe a cylindrical detector layer for tracking, it inhertis from both,...
Definition
ConeLayer.h:42
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::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::ConeLayer::surfaceRepresentation
virtual const ConeSurface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
Definition
ConeLayer.cxx:79
Trk::ConeLayer::operator=
ConeLayer & operator=(const ConeLayer &)
Assignment operator for ConeLayers.
Definition
ConeLayer.cxx:68
Trk::ConeLayer::moveLayer
virtual void moveLayer(Amg::Transform3D &shift) override final
move the Layer
Definition
ConeLayer.cxx:119
Trk::ConeLayer::ConeLayer
ConeLayer()
Default Constructor.
Definition
ConeLayer.h:45
Trk::ConeSurface
Class for a conical surface in the ATLAS detector.
Definition
ConeSurface.h:52
Trk::ConeSurface::ConeSurface
ConeSurface()
Default Constructor.
Definition
ConeSurface.cxx:18
Trk::ConeSurface::operator=
ConeSurface & operator=(const ConeSurface &csf)
Assignment operator.
Definition
ConeSurface.cxx:86
Trk::LayerMaterialProperties
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
Definition
LayerMaterialProperties.h:64
Trk::Layer::Layer
Layer()=default
Default Constructor.
Trk::Layer::surfaceArray
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
Trk::Layer::thickness
double thickness() const
Return the Thickness of the Layer.
Trk::Layer::operator=
Layer & operator=(const Layer &lay)
Assignment operator for Derived classes.
Definition
Layer.cxx:84
Trk::Layer::m_layerMaterialProperties
std::unique_ptr< LayerMaterialProperties > m_layerMaterialProperties
thickness of the Layer
Definition
Layer.h:288
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::Surface::m_transforms
std::unique_ptr< Transforms > m_transforms
Unique Pointer to the Transforms struct.
Definition
Surface.h:439
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Trk::PropDirection
PropDirection
PropDirection, enum for direction of the propagation.
Definition
PropDirection.h:19
Trk::TrackParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
Definition
Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:27
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0