ATLAS Offline Software
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Trk::LineSaggingDescriptor Class Referencefinal

#include <LineSaggingDescriptor.h>

Inheritance diagram for Trk::LineSaggingDescriptor:
Collaboration diagram for Trk::LineSaggingDescriptor:

Public Member Functions

 LineSaggingDescriptor ()
 Default Constructor. More...
 
 LineSaggingDescriptor (double wireLength, double wireTension, double linearDensity)
 Constructor with arguments. More...
 
 LineSaggingDescriptor (const LineSaggingDescriptor &lsd)
 Constructor with arguments. More...
 
 ~LineSaggingDescriptor ()=default
 Destructor. More...
 
virtual LineSaggingDescriptorclone () const override final
 clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surface class. More...
 
LineSaggingDescriptoroperator= (const LineSaggingDescriptor &lsd)
 Assignment operator. More...
 
Amg::Transform3DcorrectedSurfaceTransform (const Amg::Vector2D &locp, const Amg::Vector3D &lineCenter, const Amg::Vector3D &lineDirection, double cosFi=0.) const
 Get the HepGeom::Transform3D* for the corrected Surface. More...
 
MsgStream & dump (MsgStream &sl) const override final
 Output Method for MsgStream, to be overloaded by child classes. More...
 
std::ostream & dump (std::ostream &sl) const override final
 Output Method for std::ostream, to be overloaded by child classes. More...
 

Protected Attributes

double m_wireLength
 < the wire end positions More...
 
double m_wireTension
 
double m_linearDensity
 

Static Protected Attributes

static const double s_elecStatFactor
 direction of gravity More...
 
static const Amg::Vector3D s_gravityDirection = -1 * Amg::Vector3D::UnitY()
 
static const Amg::Vector3D s_referenceDirection
 

Detailed Description

Fill in documentation

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 33 of file LineSaggingDescriptor.h.

Constructor & Destructor Documentation

◆ LineSaggingDescriptor() [1/3]

Trk::LineSaggingDescriptor::LineSaggingDescriptor ( )
inline

Default Constructor.

Definition at line 38 of file LineSaggingDescriptor.h.

39  //nop
40  }

◆ LineSaggingDescriptor() [2/3]

Trk::LineSaggingDescriptor::LineSaggingDescriptor ( double  wireLength,
double  wireTension,
double  linearDensity 
)

Constructor with arguments.

Definition at line 26 of file LineSaggingDescriptor.cxx.

28  :
30  m_wireLength(wireLength),
31  m_wireTension(wireTension),
32  m_linearDensity(linearDensity)
33 {
34 
35 }

◆ LineSaggingDescriptor() [3/3]

Trk::LineSaggingDescriptor::LineSaggingDescriptor ( const LineSaggingDescriptor lsd)

Constructor with arguments.

Definition at line 38 of file LineSaggingDescriptor.cxx.

38  :
40  m_wireLength(lsd.m_wireLength),
41  m_wireTension(lsd.m_wireTension),
42  m_linearDensity(lsd.m_linearDensity)
43 {}

◆ ~LineSaggingDescriptor()

Trk::LineSaggingDescriptor::~LineSaggingDescriptor ( )
default

Destructor.

Member Function Documentation

◆ clone()

LineSaggingDescriptor * Trk::LineSaggingDescriptor::clone ( ) const
inlinefinaloverridevirtual

clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surface class.

Implements Trk::DistortionDescriptor.

Definition at line 88 of file LineSaggingDescriptor.h.

89  { return new LineSaggingDescriptor(*this); }

◆ correctedSurfaceTransform()

Amg::Transform3D * Trk::LineSaggingDescriptor::correctedSurfaceTransform ( const Amg::Vector2D locp,
const Amg::Vector3D lineCenter,
const Amg::Vector3D lineDirection,
double  cosFi = 0. 
) const

Get the HepGeom::Transform3D* for the corrected Surface.

Definition at line 57 of file LineSaggingDescriptor.cxx.

61 {
62  // calculate scale product between gravity and wire
63  double cosLineGrav = s_gravityDirection.dot(lineDirection);
64 
65  // calculate cos angle between gravity direction and wire sagging direction
66  cosFi = sqrt( 1 - cosLineGrav*cosLineGrav );
67 
68  // create new vector pointing perpendicular to the wire
69  // sag should be pointing down, init with global direction of global negative y-axis
71 
72  // if gravity and wire sagging direction are not point in same direction, recalculate sag direction
73  if (cosFi > 0.001 ){
74  sagDir = (s_gravityDirection - cosLineGrav*lineDirection);
75  sagDir = sagDir.unit();
76  }
77 
78  // wlsquare
79  double wireLengthSquare= m_wireLength*m_wireLength;
80 
81  // calculate reference sag per meter square
82  double refSagPerMeterSq = 100.0*(m_linearDensity*s_elecStatFactor)/(8.*m_wireTension);
83 
84  // compute maximum sag in microns use wireln in m,
85  double sagMax = refSagPerMeterSq*(wireLengthSquare*1e-9); // (*10e-6*0.001)
86  double actualSagMax = sagMax*cosFi;
87  double s=locp[Trk::locZ];
88 
89  // sag in microns where at longitudinal location of the hit
90  double sag=(1.0-4.*((s*s)/(wireLengthSquare)))*actualSagMax;
91 
92  // new center position
93  Amg::Translation3D newCenter(lineCenter+sag*sagDir);
94 
95  // new z direction - build d(sag)/d(z)
96  //double dsagdz = 8.0*s*sagMax/wireLengthSquare;
97  // and the vector
98  const Amg::Vector3D& newLineDir(lineDirection);
99  // build the other vectors
100  Amg::Vector3D newLineY(newLineDir.cross(sagDir));
101  // build the x vector
102  Amg::Vector3D newLineX(newLineY.cross(newLineDir));
103 
105  rot.col(0) = newLineX;
106  rot.col(1) = newLineY;
107  rot.col(2) = newLineDir;
108 
109  // new transform
110  Amg::Transform3D* newLineTransform = new Amg::Transform3D;
111  (*newLineTransform) = rot;
112  (*newLineTransform) *= newCenter;
113 
114  return newLineTransform; // ! (newRotation, newCenter);
115 
116 }

◆ dump() [1/2]

MsgStream & Trk::LineSaggingDescriptor::dump ( MsgStream &  sl) const
finaloverridevirtual

Output Method for MsgStream, to be overloaded by child classes.

Implements Trk::DistortionDescriptor.

Definition at line 119 of file LineSaggingDescriptor.cxx.

120 {
121  sl << std::setiosflags(std::ios::fixed);
122  sl << std::setprecision(7);
123  sl << "Trk::LineSaggingDescriptor";
124  sl << '\t' << "- wire length :" << m_wireLength << std::endl;
125  sl << '\t' << "- wire tension :" << m_wireTension << std::endl;
126  sl << '\t' << "- linear density :" << m_linearDensity << std::endl;
127  sl << std::setprecision(-1);
128  return sl;
129 }

◆ dump() [2/2]

std::ostream & Trk::LineSaggingDescriptor::dump ( std::ostream &  sl) const
finaloverridevirtual

Output Method for std::ostream, to be overloaded by child classes.

Implements Trk::DistortionDescriptor.

Definition at line 131 of file LineSaggingDescriptor.cxx.

132 {
133  sl << std::setiosflags(std::ios::fixed);
134  sl << std::setprecision(7);
135  sl << "Trk::LineSaggingDescriptor:";
136  sl << '\t' << "- wire length :" << m_wireLength << std::endl;
137  sl << '\t' << "- wire tension :" << m_wireTension << std::endl;
138  sl << '\t' << "- linear density :" << m_linearDensity << std::endl;
139  sl << std::setprecision(-1);
140  return sl;
141 }

◆ operator=()

Trk::LineSaggingDescriptor & Trk::LineSaggingDescriptor::operator= ( const LineSaggingDescriptor lsd)

Assignment operator.

Definition at line 46 of file LineSaggingDescriptor.cxx.

47 {
48  if (this!=&lsd){
49  m_wireLength = lsd.m_wireLength;
50  m_wireTension = lsd.m_wireTension;
51  m_linearDensity = lsd.m_linearDensity;
52  }
53  return(*this);
54 }

Member Data Documentation

◆ m_linearDensity

double Trk::LineSaggingDescriptor::m_linearDensity
protected

Definition at line 76 of file LineSaggingDescriptor.h.

◆ m_wireLength

double Trk::LineSaggingDescriptor::m_wireLength
protected

< the wire end positions

Definition at line 74 of file LineSaggingDescriptor.h.

◆ m_wireTension

double Trk::LineSaggingDescriptor::m_wireTension
protected

Definition at line 75 of file LineSaggingDescriptor.h.

◆ s_elecStatFactor

const double Trk::LineSaggingDescriptor::s_elecStatFactor
staticprotected

direction of gravity

Definition at line 79 of file LineSaggingDescriptor.h.

◆ s_gravityDirection

const Amg::Vector3D Trk::LineSaggingDescriptor::s_gravityDirection = -1 * Amg::Vector3D::UnitY()
staticprotected

Definition at line 80 of file LineSaggingDescriptor.h.

◆ s_referenceDirection

const Amg::Vector3D Trk::LineSaggingDescriptor::s_referenceDirection
staticprotected

Definition at line 81 of file LineSaggingDescriptor.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Trk::LineSaggingDescriptor::m_wireLength
double m_wireLength
< the wire end positions
Definition: LineSaggingDescriptor.h:74
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::LineSaggingDescriptor::s_elecStatFactor
static const double s_elecStatFactor
direction of gravity
Definition: LineSaggingDescriptor.h:79
Trk::LineSaggingDescriptor::s_gravityDirection
static const Amg::Vector3D s_gravityDirection
Definition: LineSaggingDescriptor.h:80
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::LineSaggingDescriptor::LineSaggingDescriptor
LineSaggingDescriptor()
Default Constructor.
Definition: LineSaggingDescriptor.h:38
Trk::LineSaggingDescriptor::m_wireTension
double m_wireTension
Definition: LineSaggingDescriptor.h:75
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
Trk::LineSaggingDescriptor::m_linearDensity
double m_linearDensity
Definition: LineSaggingDescriptor.h:76
Trk::DistortionDescriptor
Definition: DistortionDescriptor.h:39