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);
GlobalPoint position() const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
bool calculate(const GlobalTrajectoryParameters &, const GlobalTrajectoryParameters &)
TrackCharge charge() const
std::pair< double, double > pathLength() const
GlobalVector momentum() const
std::pair< GlobalPoint, GlobalPoint > points() const
const MagneticField & magneticField() const
Log< level::Warning, false > LogWarning