Skip to content

Commit

Permalink
protection against null MF
Browse files Browse the repository at this point in the history
  • Loading branch information
cerati committed Jul 8, 2013
1 parent 48bd73b commit 2f33fb8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GlobalTrajectoryParameters {
theX(aX), theP(aP),
theCharge(aCharge)
{
cachedMagneticField = theField->inTesla(theX);
cachedMagneticField = theField ? theField->inTesla(theX) : GlobalVector(0, 0, 0);
} // we must initialize cache to non-NAN to avoid FPE

/** Constructing class from global position, direction (unit length)
Expand Down

0 comments on commit 2f33fb8

Please sign in to comment.