ATLAS Offline Software
SaggedLineSurface.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 // SaggedLineSurface.cxx, (c) ATLAS Detector software
8 
9 // Trk
12 
13 // From Dan Levin: MDT
14 // linear density of wire: lambda=wireLinearDensity=19.3 [gm/cm^3] * PI*
15 //(25 *10^-4 )^2 [cm^2] = 378.954 microgram/cm
16 // From Dan Levin: MDT
17 // wireTen=350 for most chambers, 285 gm for some NIKHEF chambers (BOL),
18 
22  m_saggingDescriptor(nullptr),
23  m_saggedLineDirection{}
24 {}
25 
27  const Amg::Transform3D& htrans,
28  double radius,
29  double halez,
32  , Trk::StraightLineSurface(htrans, radius, halez)
33  , m_saggingDescriptor(lsd)
34  , m_saggedLineDirection{}
35 {}
36 
39  , Trk::StraightLineSurface(htrans)
40  , m_saggingDescriptor(nullptr)
41  , m_saggedLineDirection{}
42 {}
43 
45  const Trk::TrkDetElementBase& detelement,
46  const Identifier& id)
48  , Trk::StraightLineSurface(detelement, id)
49  , m_saggingDescriptor()
50  , m_saggedLineDirection{}
51 {}
52 
54  double wireLength, double wireTension, double linearDensity) :
56  Trk::StraightLineSurface(detelement,id),
57  m_saggingDescriptor(new Trk::LineSaggingDescriptor(wireLength, wireTension, linearDensity)), m_saggedLineDirection{}
58 {
59 
60 }
61 
63  Trk::DistortedSurface(sls),
65  m_saggingDescriptor(new Trk::LineSaggingDescriptor(sls.distortionDescriptor())),
66  m_saggedLineDirection{}
67 {}
68 
70 {
71  delete m_saggingDescriptor;
72 }
73 
75 {
76  if (this != &sls ) {
77  Trk::DistortedSurface::operator=(sls);
79  delete m_saggingDescriptor;
80  m_saggedLineDirection=sls.m_saggedLineDirection;
81  m_saggingDescriptor=new Trk::LineSaggingDescriptor(sls.distortionDescriptor());
82  }
83  return *this;
84 }
85 
87 {
88  // prepare
89  std::unique_ptr<Amg::Transform3D> newHepTransform =nullptr;
90  if (!m_saggedLineDirection.isValid()) {
91  m_saggedLineDirection.set(transform().rotation().col(2));
92  }
93  if (m_saggingDescriptor){
94  // first get the hep transform from the distortion descriptor
95  newHepTransform.reset(m_saggingDescriptor->correctedSurfaceTransform(
96  lp, center(), *(m_saggedLineDirection.ptr())));
98  // get the sagging descriptor and the endpoints from GeoModel
99  // m_saggingDescriptor
100  throw std::logic_error("Condition not implemented ( Trk::SaggedLineSurface::correctedSurface (1) ).");
101  } else {
102  throw std::logic_error("Condition not implemented ( Trk::SaggedLineSurface::correctedSurface (2) ).");
103  }
104  return (newHepTransform) ? new Trk::StraightLineSurface(*newHepTransform,bounds().r(),10e3) : nullptr;
105 }
106 
107 
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
Trk::SaggedLineSurface::correctedSurface
virtual StraightLineSurface * correctedSurface(const Amg::Vector2D &lp) const override final
Get the NEW corrected surface - this is a factory (the user has to delete the surface)
Definition: SaggedLineSurface.cxx:86
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::SaggedLineSurface::operator=
Trk::SaggedLineSurface & operator=(const Trk::SaggedLineSurface &sls)
Definition: SaggedLineSurface.cxx:74
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
Trk::SaggedLineSurface::distortionDescriptor
virtual const LineSaggingDescriptor & distortionDescriptor() const override final
Get the Distortion descriptor
Definition: SaggedLineSurface.h:87
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
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
Trk::LineSaggingDescriptor
Definition: LineSaggingDescriptor.h:33
query_example.col
col
Definition: query_example.py:7
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
CylinderBounds.h
SaggedLineSurface.h
Trk::DistortedSurface
Definition: DistortedSurface.h:31
Trk::SaggedLineSurface
Definition: SaggedLineSurface.h:35
Trk::SaggedLineSurface::SaggedLineSurface
SaggedLineSurface()
Default Constructor - needed for pool and inherited classes.
Definition: SaggedLineSurface.cxx:19
Trk::SaggedLineSurface::~SaggedLineSurface
virtual ~SaggedLineSurface()
Destructor.
Definition: SaggedLineSurface.cxx:69
Trk::SaggedLineSurface::m_saggedLineDirection
CxxUtils::CachedValue< Amg::Vector3D > m_saggedLineDirection
nominal end position
Definition: SaggedLineSurface.h:79
Trk::StraightLineSurface::operator=
StraightLineSurface & operator=(const StraightLineSurface &slsf)
Assignment operator.
Definition: StraightLineSurface.cxx:76
Trk::StraightLineSurface
Definition: StraightLineSurface.h:51
Identifier
Definition: IdentifierFieldParser.cxx:14