30 inline double square (
const double s ) {
return s*
s; }
34 theH(0), theG(0), pointsUpdated(
false), themaxjump(20),thesingjacI(1./0.1), themaxiter(4)
48 if ( Ht == 0. || Gt == 0. ) {
50 <<
"transverse momentum of input trajectory is zero.";
56 <<
"charge of input track is zero.";
62 <<
"magnetic field at point " << gpG <<
" is zero.";
68 <<
"magnetic field at point " << gpH <<
" is zero.";
109 if (A11 < 0) {
return true; };
112 if (A22 < 0) {
return true; };
113 const double A12=
theh * (-
theg * thecospG * thecospH -
115 const double A21= -
theg * (
theh * thecospG * thecospH +
117 const double detaI = 1./(A11 * A22 - A12 * A21);
123 dH=( z1 * A22 - z2 * A12 ) * detaI;
124 dG=( z2 * A11 - z1 * A21 ) * detaI;
156 double pH=0;
double pG=0;
161 }
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()
GlobalTrajectoryParameters const * theG
static std::atomic< unsigned int > counter
double square(const double a)
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