16 if ( ! (isLineG && isLineH) )
19 <<
"charge of input track is not zero or field non zero" 20 <<
"\n positions: "<<gOrig<<
" , "<<hOrig
27 const double gMag= theG.
momentum().
mag();
double gMag2 = gMag*gMag;
29 const double hMag= theH.
momentum().
mag();
double hMag2 = hMag*hMag;
31 if ( gMag == 0. || hMag == 0. )
34 <<
"momentum of input trajectory is zero.";
41 double gVec_Dot_hVec = gVec.
dot(hVec);
42 double norm = gVec_Dot_hVec*gVec_Dot_hVec - gMag2*hMag2;
47 <<
"Tracks are parallel.";
53 double tG = (posDiff.
dot(gVec) * hMag2 - gVec_Dot_hVec * posDiff.
dot(hVec))/ norm;
54 double tH = (gVec_Dot_hVec * posDiff.
dot(gVec) - posDiff.
dot(hVec) * gMag2)/ norm;
67 return std::pair<GlobalPoint, GlobalPoint > (
gPos,
hPos );
72 return std::pair<double, double> (
pathG,
pathH);
std::pair< GlobalPoint, GlobalPoint > points() const
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
bool calculate(const GlobalTrajectoryParameters &, const GlobalTrajectoryParameters &)
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
std::pair< double, double > pathLength() const
GlobalVector momentum() const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
GlobalPoint position() const
const MagneticField & magneticField() const
TrackCharge charge() const