31 inline double square (
const double s ) {
return s*
s; }
35 theH(0), theG(0), pointsUpdated(
false), themaxjump(20),thesingjacI(1./0.1), themaxiter(4)
49 if ( Ht == 0. || Gt == 0. ) {
51 <<
"transverse momentum of input trajectory is zero.";
57 <<
"charge of input track is zero.";
63 <<
"magnetic field at point " << gpG <<
" is zero.";
69 <<
"magnetic field at point " << gpH <<
" is zero.";
110 if (A11 < 0) {
return true; };
113 if (A22 < 0) {
return true; };
114 const double A12=
theh * (-
theg * thecospG * thecospH -
116 const double A21= -
theg * (
theh * thecospG * thecospH +
118 const double detaI = 1./(A11 * A22 - A12 * A21);
124 dH=( z1 * A22 - z2 * A12 ) * detaI;
125 dG=( z2 * A11 - z1 * A21 ) * detaI;
157 double pH=0;
double pG=0;
162 }
while ( (!retval) && ( fabs(pG) > qual || fabs(pH) > qual ));
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Sin< T >::type sin(const T &t)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Global3DPoint GlobalPoint
Basic3DVector< long double > operator/(const Basic3DVector< long double > &v, S s)
bool oneIteration(double &, double &) const
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
bool updateCoeffs(const GlobalPoint &, const GlobalPoint &)
GlobalVector momentum() const
Cos< T >::type cos(const T &t)
bool calculate(const GlobalTrajectoryParameters &, const GlobalTrajectoryParameters &, const float qual=.001)
GlobalPoint position() const
TwoTrackMinimumDistanceHelixHelix()
static double square(double x)
GlobalTrajectoryParameters const * theG
static std::atomic< unsigned int > counter
const MagneticField & magneticField() const
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
~TwoTrackMinimumDistanceHelixHelix()
volatile std::atomic< bool > shutdown_flag false
GlobalTrajectoryParameters const * theH
TrackCharge charge() const
const BasicVectorType & basicVector() const