CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types
PerigeeConversions Class Reference

#include <PerigeeConversions.h>

Public Member Functions

TrackCharge chargeFromPerigee (const PerigeeTrajectoryParameters &perigee) const
 
CurvilinearTrajectoryError curvilinearError (const PerigeeTrajectoryError &perigeeError, const GlobalTrajectoryParameters &gtp) const
 
PerigeeTrajectoryError ftsToPerigeeError (const FTS &originalFTS) const
 
PerigeeTrajectoryParameters ftsToPerigeeParameters (const FTS &originalFTS, const GlobalPoint &referencePoint, double &pt) const
 
AlgebraicMatrix55 jacobianCurvilinear2Perigee (const FreeTrajectoryState &fts) const
 
AlgebraicMatrix66 jacobianParameters2Cartesian (const AlgebraicVector3 &momentum, const GlobalPoint &position, const TrackCharge &charge, const MagneticField *field) const
 
AlgebraicMatrix55 jacobianPerigee2Curvilinear (const GlobalTrajectoryParameters &gtp) const
 
GlobalVector momentumFromPerigee (const AlgebraicVector3 &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field) const
 
GlobalVector momentumFromPerigee (const PerigeeTrajectoryParameters &parameters, double pt, const GlobalPoint &referencePoint) const
 
GlobalPoint positionFromPerigee (const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint) const
 
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint (const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field) const
 

Private Types

typedef FreeTrajectoryState FTS
 

Detailed Description

Class provides several methods to transform perigee parameters to and from various other parametrisations.

Definition at line 16 of file PerigeeConversions.h.

Member Typedef Documentation

Definition at line 18 of file PerigeeConversions.h.

Member Function Documentation

TrackCharge PerigeeConversions::chargeFromPerigee ( const PerigeeTrajectoryParameters perigee) const

This method returns the charge.

Definition at line 148 of file PerigeeConversions.cc.

References PerigeeTrajectoryParameters::charge().

149 {
150  return parameters.charge();
151 }
dictionary parameters
Definition: Parameters.py:2
CurvilinearTrajectoryError PerigeeConversions::curvilinearError ( const PerigeeTrajectoryError perigeeError,
const GlobalTrajectoryParameters gtp 
) const

Definition at line 102 of file PerigeeConversions.cc.

References PerigeeTrajectoryError::covarianceMatrix().

Referenced by TrajectoryStateClosestToPoint::calculateFTS().

103 {
105  return CurvilinearTrajectoryError(ROOT::Math::Similarity(perigee2curv, perigeeError.covarianceMatrix()));
106 }
AlgebraicMatrix55 jacobianPerigee2Curvilinear(const GlobalTrajectoryParameters &gtp) const
const AlgebraicSymMatrix55 & covarianceMatrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
PerigeeTrajectoryError PerigeeConversions::ftsToPerigeeError ( const FTS originalFTS) const

Definition at line 63 of file PerigeeConversions.cc.

References FreeTrajectoryState::curvilinearError(), and CurvilinearTrajectoryError::matrix().

Referenced by MatcherUsingTracksAlgorithm::getChi2(), MuonTrackingRegionBuilder::region(), and TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint().

64 {
65  AlgebraicSymMatrix55 errorMatrix = originalFTS.curvilinearError().matrix();
66  AlgebraicMatrix55 curv2perigee = jacobianCurvilinear2Perigee(originalFTS);
67  return PerigeeTrajectoryError(ROOT::Math::Similarity(curv2perigee,errorMatrix));
68 }
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const CurvilinearTrajectoryError & curvilinearError() const
AlgebraicMatrix55 jacobianCurvilinear2Perigee(const FreeTrajectoryState &fts) const
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
PerigeeTrajectoryParameters PerigeeConversions::ftsToPerigeeParameters ( const FTS originalFTS,
const GlobalPoint referencePoint,
double &  pt 
) const

This method calculates the perigee parameters from a given FTS and a reference point.

Definition at line 7 of file PerigeeConversions.cc.

References FreeTrajectoryState::charge(), epsilon, edm::hlt::Exception, MagneticField::inInverseGeV(), M_PI, GlobalTrajectoryParameters::magneticField(), FreeTrajectoryState::momentum(), FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::theta(), theta(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by MatcherUsingTracksAlgorithm::getChi2(), and TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint().

9 {
10  GlobalVector impactDistance = originalFTS.position() - referencePoint;
11 
12  pt = originalFTS.momentum().perp();
13  if (pt==0.) throw cms::Exception("PerigeeConversions", "Track with pt=0");
14 
15  double theta = originalFTS.momentum().theta();
16  double phi = originalFTS.momentum().phi();
17  double field = originalFTS.parameters().magneticField().inInverseGeV(originalFTS.position()).z();
18 // if (field==0.) throw cms::Exception("PerigeeConversions", "Field is 0") << " at " << originalFTS.position() << "\n" ;
19 
20  double positiveMomentumPhi = ( (phi>0) ? phi : (2*M_PI+phi) );
21  double positionPhi = impactDistance.phi();
22  double positivePositionPhi =
23  ( (positionPhi>0) ? positionPhi : (2*M_PI+positionPhi) );
24  double phiDiff = positiveMomentumPhi - positivePositionPhi;
25  if (phiDiff<0.0) phiDiff+= (2*M_PI);
26  double signEpsilon = ( (phiDiff > M_PI) ? -1.0 : 1.0);
27 
28  double epsilon = signEpsilon *
29  sqrt ( impactDistance.x()*impactDistance.x() +
30  impactDistance.y()*impactDistance.y() );
31 
32  // The track parameters:
33  AlgebraicVector5 theTrackParameters;
34 
35  double signTC = - originalFTS.charge();
36  bool isCharged = (signTC!=0) && (fabs(field)>1.e-10);
37  if (isCharged) {
38  theTrackParameters[0] = field / pt*signTC;
39  } else {
40  theTrackParameters[0] = 1 / pt;
41  }
42  theTrackParameters[1] = theta;
43  theTrackParameters[2] = phi;
44  theTrackParameters[3] = epsilon;
45  theTrackParameters[4] = impactDistance.z();
46  return PerigeeTrajectoryParameters(theTrackParameters, isCharged);
47 }
T perp() const
Definition: PV3DBase.h:71
const GlobalTrajectoryParameters & parameters() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
Geom::Theta< T > theta() const
T y() const
Definition: PV3DBase.h:62
TrackCharge charge() const
double double double z
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
GlobalVector momentum() const
GlobalPoint position() const
#define M_PI
Definition: BFit3D.cc:3
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const MagneticField & magneticField() const
const double epsilon
T x() const
Definition: PV3DBase.h:61
Definition: DDAxes.h:10
AlgebraicMatrix55 PerigeeConversions::jacobianCurvilinear2Perigee ( const FreeTrajectoryState fts) const

Jacobians of tranformations between curvilinear frame at point of closest approach in transverse plane and perigee frame. The fts must therefore be given at exactly this point in order to yield the correct Jacobians.

Definition at line 199 of file PerigeeConversions.cc.

References alpha, funct::cos(), Vector3DBase< T, FrameTag >::cross(), Vector3DBase< T, FrameTag >::dot(), alignCSCRings::e, Exhume::I, MagneticField::inInverseGeV(), M_PI, PV3DBase< T, PVType, FrameType >::mag(), GlobalTrajectoryParameters::magneticField(), GlobalTrajectoryParameters::momentum(), FreeTrajectoryState::momentum(), N, AlCaHLTBitMon_ParallelJobs::p, FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), FreeTrajectoryState::signedInverseMomentum(), funct::tan(), PV3DBase< T, PVType, FrameType >::theta(), FreeTrajectoryState::transverseCurvature(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), vdt::x, PV3DBase< T, PVType, FrameType >::y(), Gflash::Z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by PerigeeKinematicState::PerigeeKinematicState().

199  {
200 
201  GlobalVector p = fts.momentum();
202 
203  GlobalVector Z = GlobalVector(0.,0.,1.);
204  GlobalVector T = p.unit();
205  GlobalVector U = Z.cross(T).unit();;
206  GlobalVector V = T.cross(U);
207 
208  GlobalVector I = GlobalVector(-p.x(), -p.y(), 0.); //opposite to track dir.
209  I = I.unit();
210  GlobalVector J(-I.y(), I.x(),0.); //counterclockwise rotation
211  GlobalVector K(Z);
212  GlobalPoint x = fts.position();
214  GlobalVector H = B.unit();
215  GlobalVector HxT = H.cross(T);
216  GlobalVector N = HxT.unit();
217  double alpha = HxT.mag();
218  double qbp = fts.signedInverseMomentum();
219  double Q = -B.mag() * qbp;
220  double alphaQ = alpha * Q;
221 
222  double lambda = 0.5 * M_PI - p.theta();
223  double coslambda = cos(lambda), tanlambda = tan(lambda);
224 
225  double TI = T.dot(I);
226  double NU = N.dot(U);
227  double NV = N.dot(V);
228  double UI = U.dot(I);
229  double VI = V.dot(I);
230  double UJ = U.dot(J);
231  double VJ = V.dot(J);
232  double UK = U.dot(K);
233  double VK = V.dot(K);
234 
235  AlgebraicMatrix55 jac;
236 
237  if( fabs(fts.transverseCurvature())<1.e-10 ) {
238  jac(0,0) = 1/coslambda;
239  jac(0,1) = tanlambda/coslambda/fts.parameters().momentum().mag();
240  }else{
241  double Bz = B.z();
242  jac(0,0) = -Bz/coslambda;
243  jac(0,1) = -Bz * tanlambda/coslambda*qbp;
244  jac(1,3) = alphaQ * NV * UI/TI;
245  jac(1,4) = alphaQ * NV * VI/TI;
246  jac(0,3) = -jac(0,1) * jac(1,3);
247  jac(0,4) = -jac(0,1) * jac(1,4);
248  jac(2,3) = -alphaQ/coslambda * NU * UI/TI;
249  jac(2,4) = -alphaQ/coslambda * NU * VI/TI;
250  }
251  jac(1,1) = -1.;
252  jac(2,2) = 1.;
253  jac(3,3) = VK/TI;
254  jac(3,4) = -UK/TI;
255  jac(4,3) = -VJ/TI;
256  jac(4,4) = UJ/TI;
257 
258  return jac;
259 
260 }
const double Z[kNumberCalorimeter]
float alpha
Definition: AMPTWrapper.h:95
const GlobalTrajectoryParameters & parameters() const
T y() const
Definition: PV3DBase.h:62
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
T mag() const
Definition: PV3DBase.h:66
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const std::complex< double > I
Definition: I.h:8
GlobalVector momentum() const
Vector3DBase unit() const
Definition: Vector3DBase.h:57
GlobalPoint position() const
#define M_PI
Definition: BFit3D.cc:3
#define N
Definition: blowfish.cc:9
double transverseCurvature() const
const MagneticField & magneticField() const
x
Definition: VDTMath.h:216
long double T
T x() const
Definition: PV3DBase.h:61
double signedInverseMomentum() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Global3DVector GlobalVector
Definition: GlobalVector.h:10
AlgebraicMatrix66 PerigeeConversions::jacobianParameters2Cartesian ( const AlgebraicVector3 momentum,
const GlobalPoint position,
const TrackCharge charge,
const MagneticField field 
) const

Jacobians of tranformations between the parametrixation (x, y, z, transverse curvature, theta, phi) to Cartesian

Definition at line 171 of file PerigeeConversions.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::bField, DeDxDiscriminatorTools::charge(), funct::cos(), alignCSCRings::e, edm::hlt::Exception, MagneticField::inInverseGeV(), funct::sin(), funct::tan(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by KinematicPerigeeConversions::jacobianParameters2Kinematic().

174 {
175  if (momentum[0]==0.) throw cms::Exception("PerigeeConversions", "Track with rho=0");
176  double factor = 1.;
177  double bField = field->inInverseGeV(position).z();
178  if (charge!=0 && fabs(bField)>1.e-10) {
179 // if (bField==0.) throw cms::Exception("PerigeeConversions", "Field is 0");
180  factor = -bField*charge;
181  }
182  AlgebraicMatrix66 frameTransJ;
183  frameTransJ(0,0) = 1;
184  frameTransJ(1,1) = 1;
185  frameTransJ(2,2) = 1;
186  frameTransJ(3,3) = - factor * cos(momentum[2]) / (momentum[0]*momentum[0]);
187  frameTransJ(4,3) = - factor * sin(momentum[2]) / (momentum[0]*momentum[0]);
188  frameTransJ(5,3) = - factor / tan(momentum[1]) / (momentum[0]*momentum[0]);
189 
190  frameTransJ(3,5) = - factor * sin(momentum[2]) / (momentum[0]);
191  frameTransJ(4,5) = factor * cos(momentum[2]) / (momentum[0]);
192  frameTransJ(5,4) = - factor / (momentum[0]*sin(momentum[1])*sin(momentum[1]));
193 
194  return frameTransJ;
195 }
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double charge(const std::vector< uint8_t > &Ampls)
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
AlgebraicMatrix55 PerigeeConversions::jacobianPerigee2Curvilinear ( const GlobalTrajectoryParameters gtp) const

Definition at line 265 of file PerigeeConversions.cc.

References alpha, funct::cos(), Vector3DBase< T, FrameTag >::cross(), Vector3DBase< T, FrameTag >::dot(), alignCSCRings::e, f, Exhume::I, MagneticField::inInverseGeV(), M_PI, PV3DBase< T, PVType, FrameType >::mag(), GlobalTrajectoryParameters::magneticField(), GlobalTrajectoryParameters::momentum(), N, AlCaHLTBitMon_ParallelJobs::p, GlobalTrajectoryParameters::position(), GlobalTrajectoryParameters::signedInverseMomentum(), funct::sin(), PV3DBase< T, PVType, FrameType >::theta(), GlobalTrajectoryParameters::transverseCurvature(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), vdt::x, PV3DBase< T, PVType, FrameType >::y(), Gflash::Z, and PV3DBase< T, PVType, FrameType >::z().

265  {
266 
267  GlobalVector p = gtp.momentum();
268 
269  GlobalVector Z = GlobalVector(0.f,0.f,1.f);
270  GlobalVector T = p.unit();
271  GlobalVector U = Z.cross(T).unit();;
272  GlobalVector V = T.cross(U);
273 
274  GlobalVector I = GlobalVector(-p.x(), -p.y(), 0.f); //opposite to track dir.
275  I = I.unit();
276  GlobalVector J(-I.y(), I.x(),0.f); //counterclockwise rotation
277  GlobalVector K(Z);
278  GlobalPoint x = gtp.position();
280  GlobalVector H = B.unit();
281  GlobalVector HxT = H.cross(T);
282  GlobalVector N = HxT.unit();
283  double alpha = HxT.mag();
284  double qbp = gtp.signedInverseMomentum();
285  double Q = -B.mag() * qbp;
286  double alphaQ = alpha * Q;
287 
288  double lambda = 0.5 * M_PI - p.theta();
289  double coslambda = cos(lambda), sinlambda = sin(lambda);
290  double mqbpt = -1./coslambda * qbp;
291 
292  double TJ = T.dot(J);
293  double TK = T.dot(K);
294  double NU = N.dot(U);
295  double NV = N.dot(V);
296  double UJ = U.dot(J);
297  double VJ = V.dot(J);
298  double UK = U.dot(K);
299  double VK = V.dot(K);
300 
301  AlgebraicMatrix55 jac;
302 
303  if( fabs(gtp.transverseCurvature())<1.e-10f ) {
304  jac(0,0) = coslambda;
305  jac(0,1) = sinlambda/coslambda/gtp.momentum().mag();
306  }else{
307  jac(0,0) = -coslambda/B.z();
308  jac(0,1) = -sinlambda * mqbpt;
309  jac(1,3) = -alphaQ * NV * TJ;
310  jac(1,4) = -alphaQ * NV * TK;
311  jac(2,3) = -alphaQ/coslambda * NU * TJ;
312  jac(2,4) = -alphaQ/coslambda * NU * TK;
313  }
314  jac(1,1) = -1.;
315  jac(2,2) = 1.;
316  jac(3,3) = UJ;
317  jac(3,4) = UK;
318  jac(4,3) = VJ;
319  jac(4,4) = VK;
320 
321  return jac;
322 }
const double Z[kNumberCalorimeter]
float alpha
Definition: AMPTWrapper.h:95
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T y() const
Definition: PV3DBase.h:62
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
T mag() const
Definition: PV3DBase.h:66
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:119
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const std::complex< double > I
Definition: I.h:8
double f[11][100]
Vector3DBase unit() const
Definition: Vector3DBase.h:57
#define M_PI
Definition: BFit3D.cc:3
#define N
Definition: blowfish.cc:9
const MagneticField & magneticField() const
x
Definition: VDTMath.h:216
long double T
T x() const
Definition: PV3DBase.h:61
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalVector PerigeeConversions::momentumFromPerigee ( const AlgebraicVector3 momentum,
const TrackCharge charge,
const GlobalPoint referencePoint,
const MagneticField field 
) const

This method returns the (Cartesian) momentum. The parameters need not be the full perigee parameters, as long as the first 3 parameters are the transverse curvature, theta and phi.

Definition at line 128 of file PerigeeConversions.cc.

References abs, funct::cos(), alignCSCRings::e, edm::hlt::Exception, MagneticField::inInverseGeV(), funct::sin(), funct::tan(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by TrajectoryStateClosestToPoint::calculateFTS(), and TrajectoryStateClosestToPoint::momentum().

130 {
131  double pt;
132  if (momentum[0]==0.) throw cms::Exception("PerigeeConversions", "Track with rho=0");
133 
134  double bz = fabs(field->inInverseGeV(referencePoint).z());
135  if ( charge!=0 && bz>1.e-10 ) {
136  pt = std::abs(bz/momentum[0]);
137  if (pt<1.e-10) throw cms::Exception("PerigeeConversions", "pt is 0");
138  } else {
139  pt = 1 / momentum[0];
140  }
141 
142  return GlobalVector(cos(momentum[2]) * pt,
143  sin(momentum[2]) * pt,
144  pt/tan(momentum[1]));
145 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define abs(x)
Definition: mlp_lapack.h:159
double charge(const std::vector< uint8_t > &Ampls)
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalVector PerigeeConversions::momentumFromPerigee ( const PerigeeTrajectoryParameters parameters,
double  pt,
const GlobalPoint referencePoint 
) const

This method returns the (Cartesian) momentum from the PerigeeTrajectoryParameters

Definition at line 119 of file PerigeeConversions.cc.

References funct::cos(), PerigeeTrajectoryParameters::phi(), funct::sin(), funct::tan(), and PerigeeTrajectoryParameters::theta().

120 {
121  return GlobalVector(cos(parameters.phi()) * pt,
122  sin(parameters.phi()) * pt,
123  pt / tan(parameters.theta()));
124 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalPoint PerigeeConversions::positionFromPerigee ( const PerigeeTrajectoryParameters parameters,
const GlobalPoint referencePoint 
) const

This method returns the position (on the helix) at which the parameters are defined

Definition at line 109 of file PerigeeConversions.cc.

References funct::cos(), funct::sin(), PerigeeTrajectoryParameters::vector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by TrajectoryStateClosestToPoint::calculateFTS(), and TrajectoryStateClosestToPoint::position().

110 {
111  AlgebraicVector5 theVector = parameters.vector();
112  return GlobalPoint(theVector[3]*sin(theVector[2])+referencePoint.x(),
113  -theVector[3]*cos(theVector[2])+referencePoint.y(),
114  theVector[4]+referencePoint.z());
115 }
const AlgebraicVector5 & vector() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:62
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 5 > AlgebraicVector5
T x() const
Definition: PV3DBase.h:61
TrajectoryStateClosestToPoint PerigeeConversions::trajectoryStateClosestToPoint ( const AlgebraicVector3 momentum,
const GlobalPoint referencePoint,
const TrackCharge charge,
const AlgebraicSymMatrix66 theCovarianceMatrix,
const MagneticField field 
) const

Public constructor. This constructor takes a momentum, with parameters (transverse curvature, theta, phi) and a position, which is both the reference position and the position at which the momentum is defined. The covariance matrix is defined for these 6 parameters, in the order (x, y, z, transverse curvature, theta, phi).

Definition at line 154 of file PerigeeConversions.cc.

Referenced by PerigeeMultiLTS::createRefittedTrackState(), and PerigeeLinearizedTrackState::createRefittedTrackState().

157 {
159  (momentum, referencePoint, charge, field);
160  CartesianTrajectoryError cartesianTrajErr(ROOT::Math::Similarity(param2cart, theCovarianceMatrix));
161 
162  FTS theFTS(GlobalTrajectoryParameters(referencePoint,
163  momentumFromPerigee(momentum, charge, referencePoint, field), charge,
164  field), cartesianTrajErr);
165 
166  return TrajectoryStateClosestToPoint(theFTS, referencePoint);
167 }
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
GlobalVector momentumFromPerigee(const AlgebraicVector3 &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field) const
double charge(const std::vector< uint8_t > &Ampls)
AlgebraicMatrix66 jacobianParameters2Cartesian(const AlgebraicVector3 &momentum, const GlobalPoint &position, const TrackCharge &charge, const MagneticField *field) const