ATLAS Offline Software
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
11 
15 // CLHEP
17 
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 
26  const Trk::SubtractedCylinderLayer& clay) = default;
27 
29  const Trk::SubtractedCylinderLayer& clay, const Amg::Transform3D& transf)
30  : SubtractedCylinderSurface(clay, transf), Layer(clay) {}
31 
33  const SubtractedCylinderLayer& clay) {
34  if (this != &clay) {
35  // call the assignments of the base classes
38  }
39  return (*this);
40 }
41 
44 {
45  return (*this);
46 }
47 
50 {
51  return (*this);
52 }
53 
55  const Trk::TrackParameters& parm, Trk::PropDirection dir) const {
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 
66  const Trk::TrackParameters& parm, Trk::PropDirection dir) const {
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 
76  m_transforms =
77  std::make_unique<Transforms>(shift * (m_transforms->transform));
78 }
TrackParameters.h
Trk::SubtractedCylinderSurface
Definition: SubtractedCylinderSurface.h:33
MaterialProperties.h
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::SubtractedCylinderLayer::surfaceRepresentation
virtual const SubtractedCylinderSurface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
Definition: SubtractedCylinderLayer.cxx:43
Trk::Layer::m_layerMaterialProperties
std::unique_ptr< LayerMaterialProperties > m_layerMaterialProperties
thickness of the Layer
Definition: Layer.h:289
Trk::SubtractedCylinderSurface::operator=
SubtractedCylinderSurface & operator=(const SubtractedCylinderSurface &psf)
Assignment operator.
Definition: SubtractedCylinderSurface.cxx:48
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::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
GeoPrimitives.h
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::Layer::operator=
Layer & operator=(const Layer &lay)
Assignment operator for Derived classes.
Definition: Layer.cxx:98
Trk::SubtractedCylinderLayer::operator=
SubtractedCylinderLayer & operator=(const SubtractedCylinderLayer &)
Assignment operator.
Definition: SubtractedCylinderLayer.cxx:32
Trk::ParametersBase
Definition: ParametersBase.h:55
beamspotman.dir
string dir
Definition: beamspotman.py:623
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::SubtractedCylinderLayer::SubtractedCylinderLayer
SubtractedCylinderLayer()
Default Constructor.
Definition: SubtractedCylinderLayer.h:39
SubtractedCylinderLayer.h
Trk::SubtractedCylinderLayer::moveLayer
virtual void moveLayer(Amg::Transform3D &shift) override final
move the Layer
Definition: SubtractedCylinderLayer.cxx:75
LayerMaterialProperties.h
Trk::SubtractedCylinderLayer
Definition: SubtractedCylinderLayer.h:36
Trk::Layer
Definition: Layer.h:73