ATLAS Offline Software
Public Member Functions | List of all members
MuonCalib::MuonCalibSLPropagator Class Reference

straight line propagator More...

#include <MuonCalibSLPropagator.h>

Collaboration diagram for MuonCalib::MuonCalibSLPropagator:

Public Member Functions

Amg::Vector3D propagateToPlane (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const Amg::Vector3D &planePos, const Amg::Vector3D &planeNormal) const
 Propagator track parameters to a plane. More...
 
Amg::Vector3D propagateToPlane (const Amg::Vector3D &pos, const Amg::Vector3D &dir, double zPosPlane) const
 Propagator track parameters to a plane paralel to the xy plane. More...
 
Amg::Vector3D propagateToCylinder (const Amg::Vector3D &pos, const Amg::Vector3D &dir, double radiusCylinder) const
 Propagator track parameters to a cylinder paralel to the z-axis, centered at (0.,0.) in the xy plane. More...
 
Amg::Vector3D propagateToStraightLine (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const Amg::Vector3D &posLine, const Amg::Vector3D &dirLine) const
 Propagator track parameters to a straight line. More...
 
Amg::Vector3D propagateToPerigee (const Amg::Vector3D &pos, const Amg::Vector3D &dir) const
 Propagator track parameters to the perigee. More...
 
Amg::Vector3D propagate (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const MuonCalibSurface &surf) const
 Propagator track parameters to a plane paralel to the xy plane. More...
 
Amg::Vector3D propagate (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const MuonCalibDisk &disk) const
 Propagator track parameters to a plane paralel to the xy plane. More...
 
Amg::Vector3D propagate (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const MuonCalibCylinder &cylinder) const
 Propagator track parameters to a plane paralel to the xy plane. More...
 

Detailed Description

straight line propagator

Definition at line 17 of file MuonCalibSLPropagator.h.

Member Function Documentation

◆ propagate() [1/3]

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagate ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const MuonCalibCylinder cylinder 
) const

Propagator track parameters to a plane paralel to the xy plane.

Parameters
posposition on the parameters
dirdirection of the parameters
cylinderdestination cylinder
Returns
position on the cylinder

Definition at line 59 of file MuonCalibSLPropagator.cxx.

60  {
61  return propagateToCylinder(pos, dir, cylinder.radius);
62  }

◆ propagate() [2/3]

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagate ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const MuonCalibDisk disk 
) const

Propagator track parameters to a plane paralel to the xy plane.

Parameters
posposition on the parameters
dirdirection of the parameters
diskdestination disk
Returns
position on the plane

Definition at line 55 of file MuonCalibSLPropagator.cxx.

55  {
56  return propagateToPlane(pos, dir, disk.zPos);
57  }

◆ propagate() [3/3]

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagate ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const MuonCalibSurface surf 
) const

Propagator track parameters to a plane paralel to the xy plane.

Parameters
posposition on the parameters
dirdirection of the parameters
diskdestination disk
Returns
position on the surface

Definition at line 64 of file MuonCalibSLPropagator.cxx.

64  {
65  const MuonCalibDisk* disk = dynamic_cast<const MuonCalibDisk*>(&surf);
66  if (disk) return propagate(pos, dir, *disk);
67 
68  const MuonCalibCylinder* cylinder = dynamic_cast<const MuonCalibCylinder*>(&surf);
69  if (cylinder) return propagate(pos, dir, *cylinder);
70  MsgStream log(Athena::getMessageSvc(), "MuonCalibSLPropagator");
71  log << MSG::WARNING << "propagation failed, unkown surface type" << endmsg;
72  return Amg::Vector3D(0., 0., 0.);
73  }

◆ propagateToCylinder()

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagateToCylinder ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
double  radiusCylinder 
) const

Propagator track parameters to a cylinder paralel to the z-axis, centered at (0.,0.) in the xy plane.

Parameters
posposition on the parameters
dirdirection of the parameters
radiusof the cylinder
Returns
position on the cylinder

Definition at line 31 of file MuonCalibSLPropagator.cxx.

32  {
33  double sinThsqinv = 1. / dir.perp2();
34  double stepLength = (-pos.x() * dir.x() - pos.y() * dir.y()) * sinThsqinv;
35  double deltaRSq = (radiusCylinder * radiusCylinder - pos.perp2()) * sinThsqinv + stepLength * stepLength;
36  if (deltaRSq > 0.) stepLength += std::sqrt(deltaRSq);
37 
38  return pos + dir * stepLength;
39  }

◆ propagateToPerigee()

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagateToPerigee ( const Amg::Vector3D pos,
const Amg::Vector3D dir 
) const

Propagator track parameters to the perigee.

Parameters
posposition on the parameters
dirdirection of the parameters
Returns
position at perigee

Definition at line 48 of file MuonCalibSLPropagator.cxx.

48  {
49  // calculate distance to perigee
50  Amg::Vector3D dirLine(0., 0., 1.);
51  Amg::Vector3D posLine(0., 0., 0.);
52  return propagateToStraightLine(pos, dir, posLine, dirLine);
53  }

◆ propagateToPlane() [1/2]

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagateToPlane ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const Amg::Vector3D planePos,
const Amg::Vector3D planeNormal 
) const

Propagator track parameters to a plane.

Parameters
posposition on the parameters
dirdirection of the parameters
planePosposition of the plane
normalof the plane
Returns
position on the plane

Definition at line 15 of file MuonCalibSLPropagator.cxx.

16  {
17  double denom = dir.dot(planeNormal);
18  if (std::abs(denom) < 0.00001) denom = 0.00001;
19  double u = (planeNormal.dot(planePos - pos)) / (denom);
20  return pos + u * dir;
21  }

◆ propagateToPlane() [2/2]

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagateToPlane ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
double  zPosPlane 
) const

Propagator track parameters to a plane paralel to the xy plane.

Parameters
posposition on the parameters
dirdirection of the parameters
zPosPlanez position of the plane
Returns
position on the plane

Definition at line 23 of file MuonCalibSLPropagator.cxx.

23  {
24  // calculate intersect pattern measurement plane
25  Amg::Vector3D planePos(0., 0., zPosPlane);
26  Amg::Vector3D planeNormal(0., 0., 1.);
27 
28  return propagateToPlane(pos, dir, planePos, planeNormal);
29  }

◆ propagateToStraightLine()

Amg::Vector3D MuonCalib::MuonCalibSLPropagator::propagateToStraightLine ( const Amg::Vector3D pos,
const Amg::Vector3D dir,
const Amg::Vector3D posLine,
const Amg::Vector3D dirLine 
) const

Propagator track parameters to a straight line.

Parameters
posposition on the parameters
dirdirection of the parameters
posLineposition on the line
dirLinedirection of the line
Returns
point of closest approach to line

Definition at line 41 of file MuonCalibSLPropagator.cxx.

42  {
43  double cosAngle = dirLine.dot(dir);
44  double stepLength = (posLine - pos).dot(dir - dirLine * cosAngle) / (1. - cosAngle * cosAngle);
45  return pos + stepLength * dir;
46  }

The documentation for this class was generated from the following files:
MuonCalib::MuonCalibSLPropagator::propagate
Amg::Vector3D propagate(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const MuonCalibSurface &surf) const
Propagator track parameters to a plane paralel to the xy plane.
Definition: MuonCalibSLPropagator.cxx:64
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonCalib::MuonCalibSLPropagator::propagateToPlane
Amg::Vector3D propagateToPlane(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const Amg::Vector3D &planePos, const Amg::Vector3D &planeNormal) const
Propagator track parameters to a plane.
Definition: MuonCalibSLPropagator.cxx:15
MuonCalib::MuonCalibSLPropagator::propagateToStraightLine
Amg::Vector3D propagateToStraightLine(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const Amg::Vector3D &posLine, const Amg::Vector3D &dirLine) const
Propagator track parameters to a straight line.
Definition: MuonCalibSLPropagator.cxx:41
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib::MuonCalibSLPropagator::propagateToCylinder
Amg::Vector3D propagateToCylinder(const Amg::Vector3D &pos, const Amg::Vector3D &dir, double radiusCylinder) const
Propagator track parameters to a cylinder paralel to the z-axis, centered at (0.,0....
Definition: MuonCalibSLPropagator.cxx:31
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
compute_lumi.denom
denom
Definition: compute_lumi.py:76
beamspotman.dir
string dir
Definition: beamspotman.py:623
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20