ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometry
src
SubtractedCylinderLayer.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// SubtractedCylinderLayer.cxx, (c) ATLAS Detector software
8
9
// Trk
10
#include "
TrkGeometry/SubtractedCylinderLayer.h
"
11
12
#include "
TrkGeometry/LayerMaterialProperties.h
"
13
#include "
TrkGeometry/MaterialProperties.h
"
14
#include "
TrkParameters/TrackParameters.h
"
15
// CLHEP
16
#include "
GeoPrimitives/GeoPrimitives.h
"
17
18
Trk::SubtractedCylinderLayer::SubtractedCylinderLayer
(
19
const
Trk::SubtractedCylinderSurface
* subCyl,
20
const
Trk::LayerMaterialProperties
& laymatprop,
double
thickness
,
21
std::unique_ptr<Trk::OverlapDescriptor> olap,
int
laytyp)
22
:
SubtractedCylinderSurface
(*subCyl),
23
Layer
(laymatprop,
thickness
,
std
::move(olap), laytyp) {}
24
25
Trk::SubtractedCylinderLayer::SubtractedCylinderLayer
(
26
const
Trk::SubtractedCylinderLayer
& clay) =
default
;
27
28
Trk::SubtractedCylinderLayer::SubtractedCylinderLayer
(
29
const
Trk::SubtractedCylinderLayer
& clay,
const
Amg::Transform3D
& transf)
30
:
SubtractedCylinderSurface
(clay, transf),
Layer
(clay) {}
31
32
Trk::SubtractedCylinderLayer
&
Trk::SubtractedCylinderLayer::operator=
(
33
const
SubtractedCylinderLayer
& clay) {
34
if
(
this
!= &clay) {
35
// call the assignments of the base classes
36
Trk::SubtractedCylinderSurface::operator=
(clay);
37
Trk::Layer::operator=
(clay);
38
}
39
return
(*
this
);
40
}
41
42
const
Trk::SubtractedCylinderSurface
&
43
Trk::SubtractedCylinderLayer::surfaceRepresentation
()
const
44
{
45
return
(*
this
);
46
}
47
48
Trk::SubtractedCylinderSurface
&
49
Trk::SubtractedCylinderLayer::surfaceRepresentation
()
50
{
51
return
(*
this
);
52
}
53
54
double
Trk::SubtractedCylinderLayer::preUpdateMaterialFactor
(
55
const
Trk::TrackParameters
& parm,
Trk::PropDirection
dir)
const
{
56
if
(!
Trk::Layer::m_layerMaterialProperties
)
return
0.;
57
// calculate the direction to the normal
58
const
Amg::Vector3D
& parmPos = parm.
position
();
59
Amg::Vector3D
pastStep(parmPos + dir * parm.
momentum
().normalized());
60
if
(pastStep.perp() > parm.
position
().perp())
61
return
Trk::Layer::m_layerMaterialProperties
->alongPreFactor();
62
return
Trk::Layer::m_layerMaterialProperties
->oppositePreFactor();
63
}
64
65
double
Trk::SubtractedCylinderLayer::postUpdateMaterialFactor
(
66
const
Trk::TrackParameters
& parm,
Trk::PropDirection
dir)
const
{
67
if
(!
Trk::Layer::m_layerMaterialProperties
)
return
0;
68
const
Amg::Vector3D
& parmPos = parm.
position
();
69
Amg::Vector3D
pastStep(parmPos + dir * parm.
momentum
().normalized());
70
if
(pastStep.perp() > parm.
position
().perp())
71
return
Trk::Layer::m_layerMaterialProperties
->alongPostFactor();
72
return
Trk::Layer::m_layerMaterialProperties
->oppositePostFactor();
73
}
74
75
void
Trk::SubtractedCylinderLayer::moveLayer
(
Amg::Transform3D
& shift) {
76
m_transforms
=
77
std::make_unique<Transforms>(shift * (
m_transforms
->transform));
78
}
GeoPrimitives.h
LayerMaterialProperties.h
MaterialProperties.h
SubtractedCylinderLayer.h
TrackParameters.h
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::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::SubtractedCylinderLayer
Class to describe a cylindrical detector layer for tracking, with subtraction; it inhertis from both,...
Definition
SubtractedCylinderLayer.h:36
Trk::SubtractedCylinderLayer::surfaceRepresentation
virtual const SubtractedCylinderSurface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
Definition
SubtractedCylinderLayer.cxx:43
Trk::SubtractedCylinderLayer::operator=
SubtractedCylinderLayer & operator=(const SubtractedCylinderLayer &)
Assignment operator.
Definition
SubtractedCylinderLayer.cxx:32
Trk::SubtractedCylinderLayer::preUpdateMaterialFactor
virtual double preUpdateMaterialFactor(const Trk::TrackParameters &par, Trk::PropDirection dir) const override final
getting the MaterialProperties back - for pre-update
Definition
SubtractedCylinderLayer.cxx:54
Trk::SubtractedCylinderLayer::SubtractedCylinderLayer
SubtractedCylinderLayer()
Default Constructor.
Definition
SubtractedCylinderLayer.h:39
Trk::SubtractedCylinderLayer::postUpdateMaterialFactor
virtual double postUpdateMaterialFactor(const Trk::TrackParameters &par, Trk::PropDirection dir) const override final
getting the MaterialProperties back - for post-update
Definition
SubtractedCylinderLayer.cxx:65
Trk::SubtractedCylinderLayer::moveLayer
virtual void moveLayer(Amg::Transform3D &shift) override final
move the Layer
Definition
SubtractedCylinderLayer.cxx:75
Trk::SubtractedCylinderSurface
Class for a cylinder subtracted/shared surface in the ATLAS detector.
Definition
SubtractedCylinderSurface.h:33
Trk::SubtractedCylinderSurface::SubtractedCylinderSurface
SubtractedCylinderSurface()=default
Defaults.
Trk::SubtractedCylinderSurface::operator=
SubtractedCylinderSurface & operator=(SubtractedCylinderSurface &&)=default
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