Index: external/TrackCovariance/TrkUtil.cc
===================================================================
--- external/TrackCovariance/TrkUtil.cc	(revision d3165fa85c7b633a935c17863a7edf724a499651)
+++ external/TrackCovariance/TrkUtil.cc	(revision df408d262aaa16117d5426fccf611c470a02368a)
@@ -1,3 +1,4 @@
 #include "TrkUtil.h"
+#include <iostream>
 
 // Constructor
@@ -30,6 +31,6 @@
 	Double_t r2 = x.Perp2();
 	Double_t cross = x(0) * p(1) - x(1) * p(0);
-	Double_t T = sqrt(pt * pt - 2 * a * cross + a * a * r2);
-	Double_t phi0 = TMath::ATan2((p(1) - a * x(0)) / T, (p(0) + a * x(1)) / T);	// Phi0
+	Double_t T = TMath::Sqrt(pt * pt - 2 * a * cross + a * a * r2);
+	Double_t phi0 = atan2((p(1) - a * x(0)) / T, (p(0) + a * x(1)) / T);	// Phi0
 	Double_t D;							// Impact parameter D
 	if (pt < 10.0) D = (T - pt) / a;
@@ -40,6 +41,6 @@
 	Par(2) = C;		// Store C
 	//Longitudinal parameters
-	Double_t B = C * sqrt(TMath::Max(r2 - D * D, 0.0) / (1 + 2 * C * D));
-	Double_t st = TMath::ASin(B) / C;
+	Double_t B = C * TMath::Sqrt(TMath::Max(r2 - D * D, 0.0) / (1 + 2 * C * D));
+	Double_t st = asin(B) / C;
 	Double_t ct = p(2) / pt;
 	Double_t z0 = x(2) - ct * st;
@@ -68,6 +69,6 @@
 	//
 	TVector3 Xval;
-	Xval(0) = -D * TMath::Sin(phi0);
-	Xval(1) = D * TMath::Cos(phi0);
+	Xval(0) = -D * sin(phi0);
+	Xval(1) = D * cos(phi0);
 	Xval(2) = z0;
 	//
@@ -76,4 +77,12 @@
 //
 TVector3 TrkUtil::ParToP(TVectorD Par)
+{
+	if (fBz == 0.0)
+std::cout << "TrkUtil::ParToP: Warning Bz not set" << std::endl;
+	//
+	return ParToP(Par,fBz);
+}
+//
+TVector3 TrkUtil::ParToP(TVectorD Par, Double_t Bz)
 {
 	Double_t C = Par(2);
@@ -82,7 +91,7 @@
 	//
 	TVector3 Pval;
-	Double_t pt = fBz * cSpeed() / TMath::Abs(2 * C);
-	Pval(0) = pt * TMath::Cos(phi0);
-	Pval(1) = pt * TMath::Sin(phi0);
+	Double_t pt = Bz * cSpeed() / TMath::Abs(2 * C);
+	Pval(0) = pt * cos(phi0);
+	Pval(1) = pt * sin(phi0);
 	Pval(2) = pt * ct;
 	//
@@ -103,8 +112,8 @@
 	Double_t b = -cSpeed() * fBz / 2.;
 	pACTS(0) = 1000 * Par(0);		// D from m to mm
-	pACTS(1) = 1000 * Par(3);	// z0 from m to mm
+	pACTS(1) = 1000 * Par(3);		// z0 from m to mm
 	pACTS(2) = Par(1);			// Phi0 is unchanged
-	pACTS(3) = TMath::ATan2(1.0, Par(4));		// Theta in [0, pi] range
-	pACTS(4) = Par(2) / (b * sqrt(1 + Par(4) * Par(4)));		// q/p in GeV
+	pACTS(3) = atan2(1.0, Par(4));		// Theta in [0, pi] range
+	pACTS(4) = Par(2) / (b * TMath::Sqrt(1 + Par(4) * Par(4)));		// q/p in GeV
 	pACTS(5) = 0.0;				// Time: currently undefined
 	//
@@ -123,5 +132,5 @@
 	A(0, 0) = 1000.;		// D-D	conversion to mm
 	A(1, 2) = 1.0;		// phi0-phi0
-	A(2, 4) = 1.0 / (sqrt(1.0 + ct * ct) * b);	// q/p-C
+	A(2, 4) = 1.0 / (TMath::Sqrt(1.0 + ct * ct) * b);	// q/p-C
 	A(3, 1) = 1000.;		// z0-z0 conversion to mm
 	A(4, 3) = -1.0 / (1.0 + ct * ct); // theta - cot(theta)
Index: external/TrackCovariance/TrkUtil.h
===================================================================
--- external/TrackCovariance/TrkUtil.h	(revision d3165fa85c7b633a935c17863a7edf724a499651)
+++ external/TrackCovariance/TrkUtil.h	(revision df408d262aaa16117d5426fccf611c470a02368a)
@@ -20,7 +20,5 @@
 	void SetBfield(Double_t Bz) { fBz = Bz; }
 	TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
-	TVector3 ParToX(TVectorD Par);
 	TVector3 ParToP(TVectorD Par);
-	Double_t ParToQ(TVectorD Par);
 	//
 	// Conversion to ACTS parametrization
@@ -46,5 +44,7 @@
 	static Double_t cSpeed()
 	{
-		return TMath::C()*1.0e-9;	// Reduced speed of light
+		Double_t c = 2.99792458e8;	// speed of light m/sec
+		//return TMath::C()*1.0e-9;	// Incompatible with root5
+		return c*1.0e-9; 		// Reduced speed of light	
 	}
 	//
@@ -52,4 +52,7 @@
 	//
 	static TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q, Double_t Bz);
+	static TVector3 ParToX(TVectorD Par);				// position of minimum distance from z axis
+	static TVector3 ParToP(TVectorD Par, Double_t Bz);	// Get Momentum from track parameters
+	static Double_t ParToQ(TVectorD Par);				// Get track charge
 	//
 	// Conversion from meters to mm
