CMS 3D CMS Logo

CurvilinearTrajectoryParameters.cc
Go to the documentation of this file.
2 #include <cmath>
3 
5  const GlobalVector& aP,
6  TrackCharge aCharge) {
7  theQbp = aCharge / aP.mag();
8 
9  double pT2 = aP.x() * aP.x() + aP.y() * aP.y();
10  double pT = sqrt(pT2);
11  thelambda = atan(aP.z() / pT);
12  thephi = atan2(aP.y(), aP.x());
13  thexT = (-aP.y() * aX.x() + aP.x() * aX.y()) / pT;
14  theyT = (-aX.x() * aP.x() * aP.z() - aX.y() * aP.z() * aP.y() + aX.z() * (pT2)) / (aP.mag() * pT);
15 }
16 
18  //FIXME. something is very likely to be missing here
19  double p = 1. / std::abs(Qbp());
20  if ((p += dP) <= 0.)
21  return false;
22  double newQbp = Qbp() > 0 ? 1. / p : -1. / p;
23  theQbp = newQbp;
24  return true;
25 }
T z() const
Definition: PV3DBase.h:61
int TrackCharge
Definition: TrackCharge.h:4
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
T sqrt(T t)
Definition: SSEVec.h:19
T mag() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22