7 (
const FTS& originalFTS,
const GlobalPoint& referencePoint,
double & pt)
const
13 if (pt==0.)
throw cms::Exception(
"PerigeeConversions",
"Track with pt=0");
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);
29 sqrt ( impactDistance.
x()*impactDistance.
x() +
30 impactDistance.
y()*impactDistance.
y() );
35 double signTC = - originalFTS.
charge();
36 bool isCharged = (signTC!=0) && (fabs(field)>1.e-10);
38 theTrackParameters[0] = field / pt*signTC;
40 theTrackParameters[0] = 1 / pt;
42 theTrackParameters[1] =
theta;
43 theTrackParameters[2] =
phi;
44 theTrackParameters[3] =
epsilon;
45 theTrackParameters[4] = impactDistance.
z();
63 (
const FTS& originalFTS)
const
113 -theVector[3]*
cos(theVector[2])+referencePoint.
y(),
114 theVector[4]+referencePoint.
z());
122 sin(parameters.
phi()) * pt,
132 if (momentum[0]==0.)
throw cms::Exception(
"PerigeeConversions",
"Track with rho=0");
135 if ( charge!=0 && bz>1.
e-10 ) {
139 pt = 1 / momentum[0];
143 sin(momentum[2]) * pt,
144 pt/
tan(momentum[1]));
150 return parameters.
charge();
159 (momentum, referencePoint, charge, field);
163 momentumFromPerigee(momentum, charge, referencePoint, field), charge,
164 field), cartesianTrajErr);
175 if (momentum[0]==0.)
throw cms::Exception(
"PerigeeConversions",
"Track with rho=0");
178 if (charge!=0 && fabs(bField)>1.
e-10) {
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]);
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]));
219 double Q = -B.
mag() * qbp;
220 double alphaQ = alpha * Q;
223 double coslambda =
cos(lambda), tanlambda =
tan(lambda);
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);
238 jac(0,0) = 1/coslambda;
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;
285 double Q = -B.
mag() * qbp;
286 double alphaQ = alpha * Q;
289 double coslambda =
cos(lambda), sinlambda =
sin(lambda);
290 double mqbpt = -1./coslambda * qbp;
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);
304 jac(0,0) = coslambda;
305 jac(0,1) = sinlambda/coslambda/gtp.
momentum().
mag();
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;
const double Z[kNumberCalorimeter]
const AlgebraicVector5 & vector() const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field) const
const GlobalTrajectoryParameters & parameters() const
TrackCharge chargeFromPerigee(const PerigeeTrajectoryParameters &perigee) const
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
TrackCharge charge() const
Sin< T >::type sin(const T &t)
PerigeeTrajectoryParameters ftsToPerigeeParameters(const FTS &originalFTS, const GlobalPoint &referencePoint, double &pt) const
GlobalVector momentumFromPerigee(const AlgebraicVector3 &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field) const
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
CurvilinearTrajectoryError curvilinearError(const PerigeeTrajectoryError &perigeeError, const GlobalTrajectoryParameters >p) const
const CurvilinearTrajectoryError & curvilinearError() const
static int position[TOTALCHAMBERS][3]
Geom::Theta< T > theta() const
float transverseCurvature() const
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
AlgebraicMatrix66 jacobianParameters2Cartesian(const AlgebraicVector3 &momentum, const GlobalPoint &position, const TrackCharge &charge, const MagneticField *field) const
float signedInverseMomentum() const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
GlobalVector momentum() const
Cos< T >::type cos(const T &t)
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters ¶meters, const GlobalPoint &referencePoint) const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Tan< T >::type tan(const T &t)
const std::complex< double > I
AlgebraicMatrix55 jacobianPerigee2Curvilinear(const GlobalTrajectoryParameters >p) const
AlgebraicMatrix55 jacobianCurvilinear2Perigee(const FreeTrajectoryState &fts) const
GlobalVector momentum() const
const AlgebraicSymMatrix55 & covarianceMatrix() const
GlobalPoint position() const
Vector3DBase unit() const
GlobalPoint position() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
double transverseCurvature() const
const AlgebraicSymMatrix55 & matrix() const
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS) const
const MagneticField & magneticField() const
double signedInverseMomentum() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Global3DVector GlobalVector