13 if (!(isLineG && isLineH)) {
15 <<
"charge of input track is not zero or field non zero"
16 <<
"\n positions: " << gOrig <<
" , " << hOrig <<
"\n Bz fields: " << theG.
magneticField().
inTesla(gOrig).
z()
24 double gMag2 = gMag * gMag;
27 double hMag2 = hMag * hMag;
29 if (gMag == 0. || hMag == 0.) {
30 edm::LogWarning(
"TwoTrackMinimumDistanceLineLine") <<
"momentum of input trajectory is zero.";
37 double gVec_Dot_hVec = gVec.
dot(hVec);
38 double norm = gVec_Dot_hVec * gVec_Dot_hVec - gMag2 * hMag2;
41 edm::LogWarning(
"TwoTrackMinimumDistanceLineLine") <<
"Tracks are parallel.";
47 double tG = (posDiff.
dot(gVec) * hMag2 - gVec_Dot_hVec * posDiff.
dot(hVec)) / norm;
48 double tH = (gVec_Dot_hVec * posDiff.
dot(gVec) - posDiff.
dot(hVec) * gMag2) / norm;
60 return std::pair<GlobalPoint, GlobalPoint>(
gPos,
hPos);
64 return std::pair<double, double>(
pathG,
pathH);