Index: external/TrackCovariance/ObsTrk.cc
===================================================================
--- external/TrackCovariance/ObsTrk.cc	(revision f17e10d243be74f5cde1ffb12456e8afc7a02224)
+++ external/TrackCovariance/ObsTrk.cc	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
@@ -10,7 +10,9 @@
 //
 // Constructors
+//
 // x(3) track origin, p(3) track momentum at origin, Q charge, B magnetic field in Tesla
 ObsTrk::ObsTrk(TVector3 x, TVector3 p, Double_t Q, Double_t B, SolGridCov *GC)
 {
+	SetBfield(B);
 	fGC = GC;
 	fGenX = x;
@@ -19,21 +21,26 @@
 	fB = B;
 	fGenPar.ResizeTo(5);
+	fGenParMm.ResizeTo(5);
 	fGenParACTS.ResizeTo(6);
 	fGenParILC.ResizeTo(5);
 	fObsPar.ResizeTo(5);
+	fObsParMm.ResizeTo(5);
 	fObsParACTS.ResizeTo(6);
 	fObsParILC.ResizeTo(5);
 	fCov.ResizeTo(5, 5);
+	fCovMm.ResizeTo(5, 5);
 	fCovACTS.ResizeTo(6, 6);
 	fCovILC.ResizeTo(5, 5);
 	fGenPar = XPtoPar(x,p,Q);
+	fGenParMm = ParToMm(fGenPar);
 	fGenParACTS = ParToACTS(fGenPar);
 	fGenParILC = ParToILC(fGenPar);
 	/*
-	std::cout << "ObsTrk::ObsTrk: fGenPar";
-	for (Int_t i = 0; i < 5; i++)std::cout << fGenPar(i) << ", ";
-	std::cout << std::endl;
+	cout << "ObsTrk::ObsTrk: fGenPar";
+	for (Int_t i = 0; i < 5; i++)cout << fGenPar(i) << ", ";
+	cout << endl;
 	*/
 	fObsPar = GenToObsPar(fGenPar, fGC);
+	fObsParMm = ParToMm(fObsPar);
 	fObsParACTS = ParToACTS(fObsPar);
 	fObsParILC = ParToILC(fObsPar);
@@ -41,11 +48,13 @@
 	fObsP = ParToP(fObsPar);
 	fObsQ = ParToQ(fObsPar);
-	fCovACTS = CovToACTS(fCov);
+	fCovMm = CovToMm(fCov);
+	fCovACTS = CovToACTS(fObsPar, fCov);
 	fCovILC = CovToILC(fCov);
 }
-
+//
 // x[3] track origin, p[3] track momentum at origin, Q charge, B magnetic field in Tesla
 ObsTrk::ObsTrk(Double_t *x, Double_t *p, Double_t Q, Double_t B, SolGridCov* GC)
 {
+	SetBfield(B);
 	fGC = GC;
 	fGenX.SetXYZ(x[0],x[1],x[2]);
@@ -54,10 +63,13 @@
 	fB = B;
 	fGenPar.ResizeTo(5);
+	fGenParMm.ResizeTo(5);
 	fGenParACTS.ResizeTo(6);
 	fGenParILC.ResizeTo(5);
 	fObsPar.ResizeTo(5);
+	fObsParMm.ResizeTo(5);
 	fObsParACTS.ResizeTo(6);
 	fObsParILC.ResizeTo(5);
 	fCov.ResizeTo(5, 5);
+	fCovMm.ResizeTo(5, 5);
 	fCovACTS.ResizeTo(6, 6);
 	fCovILC.ResizeTo(5, 5);
@@ -76,9 +88,7 @@
 	fObsP = ParToP(fObsPar);
 	fObsQ = ParToQ(fObsPar);
-	fCovACTS = CovToACTS(fCov);
+	fCovACTS = CovToACTS(fObsPar, fCov);
 	fCovILC = CovToILC(fCov);
 }
-
-
 //
 // Destructor
@@ -88,77 +98,17 @@
 	fGenP.Clear();
 	fGenPar.Clear();
+	fGenParMm.Clear();
 	fGenParACTS.Clear();
+	fGenParILC.Clear();
 	fObsX.Clear();
 	fObsP.Clear();
 	fObsPar.Clear();
+	fObsParMm.Clear();
 	fObsParACTS.Clear();
+	fObsParILC.Clear();
 	fCov.Clear();
+	fCovMm.Clear();
 	fCovACTS.Clear();
-}
-TVectorD ObsTrk::XPtoPar(TVector3 x, TVector3 p, Double_t Q)
-{
-	//
-	TVectorD Par(5);
-	// Transverse parameters
-	Double_t a = -Q*fB*0.2998;			// Units are Tesla, GeV and meters
-	Double_t pt = p.Pt();
-	Double_t C = a / (2 * pt);			// Half curvature
-	//std::cout << "ObsTrk::XPtoPar: fB = " << fB << ", a = " << a << ", pt = " << pt << ", C = " << C << std::endl;
-	Double_t r2 = x.Perp2();
-	Double_t cross = x(0)*p(1) - x(1)*p(0);
-	Double_t T = TMath::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 D;							// Impact parameter D
-	if (pt < 10.0) D = (T - pt) / a;
-	else D = (-2 * cross + a*r2) / (T + pt);
-	//
-	Par(0) = D;		// Store D
-	Par(1) = phi0;	// Store phi0
-	Par(2) = C;		// Store C
-	//Longitudinal parameters
-	Double_t B = C*TMath::Sqrt(TMath::Max(r2 - D*D,0.0) / (1 + 2 * C*D));
-	Double_t st = TMath::ASin(B) / C;
-	Double_t ct = p(2) / pt;
-	Double_t z0 = x(2) - ct*st;
-	//
-	Par(3) = z0;		// Store z0
-	Par(4) = ct;		// Store cot(theta)
-	//
-	return Par;
-}
-//
-TVector3 ObsTrk::ParToX(TVectorD Par)
-{
-	Double_t D    = Par(0);
-	Double_t phi0 = Par(1);
-	Double_t z0   = Par(3);
-	//
-	TVector3 Xval;
-	Xval(0) = -D*TMath::Sin(phi0);
-	Xval(1) =  D*TMath::Cos(phi0);
-	Xval(2) =  z0;
-	//
-	return Xval;
-}
-//
-TVector3 ObsTrk::ParToP(TVectorD Par)
-{
-	Double_t C    = Par(2);
-	Double_t phi0 = Par(1);
-	Double_t ct   = Par(4);
-	//
-	TVector3 Pval;
-	Double_t pt = fB*0.2998 / TMath::Abs(2 * C);
-	Pval(0) = pt*TMath::Cos(phi0);
-	Pval(1) = pt*TMath::Sin(phi0);
-	Pval(2) = pt*ct;
-	//
-	return Pval;
-}
-//
-
-Double_t ObsTrk::ParToQ(TVectorD Par)
-{
-	return TMath::Sign(1.0, -Par(2));
+	fCovILC.Clear();
 }
 //
@@ -172,13 +122,13 @@
 	// Check ranges
 	Double_t minPt = GC->GetMinPt ();
-	//if (pt < minPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << std::endl;
+	//if (pt < minPt) cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is below grid range of " << minPt << endl;
 	Double_t maxPt = GC->GetMaxPt();
-	//if (pt > maxPt) std::cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << std::endl;
+	//if (pt > maxPt) cout << "Warning ObsTrk::GenToObsPar: pt " << pt << " is above grid range of " << maxPt << endl;
 	Double_t minAn = GC->GetMinAng();
-  //if (angd < minAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
-	//	<< " is below grid range of " << minAn << std::endl;
+	//if (angd < minAn) cout << "Warning ObsTrk::GenToObsPar: angle " << angd 
+	//	<< " is below grid range of " << minAn << endl;
 	Double_t maxAn = GC->GetMaxAng();
-	//if (angd > maxAn) std::cout << "Warning ObsTrk::GenToObsPar: angle " << angd
-	//	<< " is above grid range of " << maxAn << std::endl;
+	//if (angd > maxAn) cout << "Warning ObsTrk::GenToObsPar: angle " << angd
+	//	<< " is above grid range of " << maxAn << endl;
 	//
 	TMatrixDSym Cov = GC->GetCov(pt, angd);
@@ -207,79 +157,2 @@
 	return oPar;
 }
-// Parameter conversion to ACTS format
-TVectorD ObsTrk::ParToACTS(TVectorD Par)
-{
-	TVectorD pACTS(6);	// Return vector
-	//
-	Double_t b = -0.29988*fB / 2.;
-	pACTS(0) = 1000*Par(0);		// D 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*TMath::Sqrt(1 + Par(4)*Par(4)));		// q/p in GeV
-	pACTS(5) = 0.0;				// Time: currently undefined
-	//
-	return pACTS;
-}
-// Covariance conversion to ACTS format
-TMatrixDSym ObsTrk::CovToACTS(TMatrixDSym Cov)
-{
-	TMatrixDSym cACTS(6); cACTS.Zero();
-	Double_t b = -0.29988*fB / 2.;
-	//
-	// Fill derivative matrix
-	TMatrixD A(5, 5);	A.Zero();
-	Double_t ct = fGenPar(4);	// cot(theta)
-	Double_t C = fGenPar(2);		// half curvature
-	A(0, 0) = 1000.;		// D-D	conversion to mm
-	A(1, 2) = 1.0;		// phi0-phi0
-	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)
-	A(4, 4) = -C*ct / (b*pow(1.0 + ct*ct,3.0/2.0)); // q/p-cot(theta)
-	//
-	TMatrixDSym Cv = Cov;
-	TMatrixD At(5, 5);
-	At.Transpose(A);
-	Cv.Similarity(At);
-	TMatrixDSub(cACTS, 0, 4, 0, 4) = Cv;
-	cACTS(5, 5) = 0.1;	// Currently undefined: set to arbitrary value to avoid crashes
-	//
-	return cACTS;
-}
-
-// Parameter conversion to ILC format
-TVectorD ObsTrk::ParToILC(TVectorD Par)
-{
-	TVectorD pILC(5);	// Return vector
-	//
-	pILC(0) = Par(0)*1.0e3;			// d0 in mm
-	pILC(1) = Par(1);				// phi0 is unchanged
-	pILC(2) = -2 * Par(2)*1.0e-3;	// w in mm^-1
-	pILC(3) = Par(3)*1.0e3;			// z0 in mm
-	pILC(4) = Par(4);				// tan(lambda) = cot(theta)
-	//
-	return pILC;
-}
-// Covariance conversion to ILC format
-TMatrixDSym ObsTrk::CovToILC(TMatrixDSym Cov)
-{
-	TMatrixDSym cILC(5); cILC.Zero();
-	//
-	// Fill derivative matrix
-	TMatrixD A(5, 5);	A.Zero();
-	//
-	A(0, 0) = 1.0e3;		// D-d0 in mm
-	A(1, 1) = 1.0;		// phi0-phi0
-	A(2, 2) = -2.0e-3;	// w-C
-	A(3, 3) = 1.0e3;		// z0-z0 conversion to mm
-	A(4, 4) = 1.0;		// tan(lambda) - cot(theta)
-	//
-	TMatrixDSym Cv = Cov;
-	TMatrixD At(5, 5);
-	At.Transpose(A);
-	Cv.Similarity(At);
-	cILC = Cv;
-	//
-	return cILC;
-}
Index: external/TrackCovariance/ObsTrk.h
===================================================================
--- external/TrackCovariance/ObsTrk.h	(revision f17e10d243be74f5cde1ffb12456e8afc7a02224)
+++ external/TrackCovariance/ObsTrk.h	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
@@ -6,4 +6,5 @@
 #include <TMatrixDSym.h>
 #include <TDecompChol.h>
+#include "TrkUtil.h"
 #include "SolGridCov.h"
 //
@@ -13,5 +14,6 @@
 //         INFN - Sezione di Pisa, Italy
 //
-class ObsTrk{
+class ObsTrk: public TrkUtil
+{
 	//
 	// Class to handle simulation of tracking resolution
@@ -19,34 +21,31 @@
 	// Prefix Gen marks variables before resolution smearing
 	//
-private:
-	Double_t fB;						// Solenoid magnetic field
-	SolGridCov *fGC;					// Covariance matrix grid
+private:	
+	Double_t fB;					// Solenoid magnetic field
+	SolGridCov *fGC;				// Covariance matrix grid
 	Double_t fGenQ;					// Generated track charge
 	Double_t fObsQ;					// Observed  track charge
 	TVector3 fGenX;					// Generated track origin (x,y,z)
-	TVector3 fObsX;					// Observed  track origin (x,y,z) @ track min. approach
+	TVector3 fObsX;					// Observed  track origin (x,y,z) @ track min. approach 
 	TVector3 fGenP;					// Generated track momentum at track origin
 	TVector3 fObsP;					// Observed  track momentum @ track minimum approach
-	TVectorD fGenPar;				// Generated helix track parameters (D, phi0, C, z0, cot(th))
+	TVectorD fGenPar;				// Generated helix track parameters (D, phi0, C, z0, cot(th)) in meters
+	TVectorD fGenParMm;				// Generated helix track parameters (D, phi0, C, z0, cot(th)) in mm
 	TVectorD fGenParACTS;			// Generated helix track parameters (D, z0, phi0, th, q/p, time
-	TVectorD fGenParILC;				// Generated helix track parameters (w, phi0, d0, z0, tan(lambda))
-	TVectorD fObsPar;				// Observed  helix track parameters (D, phi0, C, z0, cot(th))
+	TVectorD fGenParILC;			// Generated helix track parameters (w, phi0, d0, z0, tan(lambda))
+	TVectorD fObsPar;				// Observed  helix track parameters (D, phi0, C, z0, cot(th)) in meters
+	TVectorD fObsParMm;				// Observed  helix track parameters (D, phi0, C, z0, cot(th)) in mm
 	TVectorD fObsParACTS;			// Observed  helix track parameters (D, z0, phi0, th, q/p, time
-	TVectorD fObsParILC;				// Observed  helix track parameters (d0, phi0, w, z0, tan(lambda))
-	TMatrixDSym fCov;				// INterpolated covariance of track parameters
+	TVectorD fObsParILC;			// Observed  helix track parameters (d0, phi0, w, z0, tan(lambda))
+	TMatrixDSym fCov;				// Interpolated covariance of track in meters
+	TMatrixDSym fCovMm;				// Interpolated covariance of track parameters in mm
 	TMatrixDSym fCovACTS;			// Covariance of track parameters in ACTS format
 									// (D, z0, phi0, theta, q/p, time)
-	TMatrixDSym fCovILC;				// Covariance of track parameters in ILC format
+	TMatrixDSym fCovILC;			// Covariance of track parameters in ILC format
 									// (d0, phi0, w, z0, tan(lambda))
 	//
-	// Conversion to ACTS parametrization
+	// Service routines
 	//
-	TVectorD ParToACTS(TVectorD Par);		// Parameter conversion
-	TMatrixDSym CovToACTS(TMatrixDSym Cov);	// Covariance
-	//
-	// Conversion to ILC parametrization
-	//
-	TVectorD ParToILC(TVectorD Par);		// Parameter conversion
-	TMatrixDSym CovToILC(TMatrixDSym Cov);	// Covariance conversion
+	TVectorD GenToObsPar(TVectorD gPar, SolGridCov* GC);
 	//
 public:
@@ -54,16 +53,8 @@
 	// Constructors
 	// x(3) track origin, p(3) track momentum at origin, Q charge, B magnetic field in Tesla
-	ObsTrk(TVector3 x, TVector3 p, Double_t Q, Double_t B, SolGridCov *GC);	// Initialize and generate smeared track
+	ObsTrk(TVector3 x, TVector3 p, Double_t Q, Double_t B, SolGridCov *GC);	// Initialize and generate smeared 
 	ObsTrk(Double_t *x, Double_t *p, Double_t Q, Double_t B, SolGridCov* GC);	// Initialize and generate smeared track
-  // Destructor
+	// Destructor
 	~ObsTrk();
-	//
-	// Service routines
-	//
-	TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q);
-	TVectorD GenToObsPar(TVectorD gPar, SolGridCov *GC);
-	TVector3 ParToX(TVectorD Par);
-	TVector3 ParToP(TVectorD Par);
-	Double_t ParToQ(TVectorD Par);
 	//
 	// Accessors
@@ -75,5 +66,6 @@
 	TVector3 GetGenP()	{ return fGenP; }
 	// D, phi0, C, z0, cot(th)
-	TVectorD GetGenPar()	{ return fGenPar; }
+	TVectorD GetGenPar()	{ return fGenPar; }		// in meters
+	TVectorD GetGenParMm()	{ return fGenParMm; }		// in mm
 	// D, z0, phi0, theta, q/p, time
 	TVectorD GetGenParACTS()	{ return fGenParACTS; }
@@ -85,5 +77,6 @@
 	TVector3 GetObsP()	{ return fObsP; }
 	// D, phi0, C, z0, cot(th)
-	TVectorD GetObsPar()	{ return fObsPar; }
+	TVectorD GetObsPar()	{ return fObsPar; }		// in meters
+	TVectorD GetObsParMm()	{ return fObsParMm; }	// In mm
 	// D, z0, phi0, theta, q/p, time
 	TVectorD GetObsParACTS()	{ return fObsParACTS; }
@@ -91,7 +84,9 @@
 	TVectorD GetObsParILC()	{ return fObsParILC; }
 	// Covariances
-	TMatrixDSym GetCov(){ return fCov; }
+	TMatrixDSym GetCov()	{ return fCov; }	// in meters
+	TMatrixDSym GetCovMm()	{ return fCov; }	// in mm
 	TMatrixDSym GetCovACTS(){ return fCovACTS; }
 	TMatrixDSym GetCovILC(){ return fCovILC; }
+	//
 };
 
Index: external/TrackCovariance/TrkUtil.cc
===================================================================
--- external/TrackCovariance/TrkUtil.cc	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
+++ external/TrackCovariance/TrkUtil.cc	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
@@ -0,0 +1,209 @@
+#include "TrkUtil.h"
+
+// Constructor
+TrkUtil::TrkUtil(Double_t Bz)
+{
+	fBz = Bz;
+}
+TrkUtil::TrkUtil()
+{
+	fBz = 0.0;
+}
+//
+// Destructor
+TrkUtil::~TrkUtil()
+{
+	fBz = 0.0;
+}
+//
+// Helix parameters from position and momentum
+// static
+TVectorD TrkUtil::XPtoPar(TVector3 x, TVector3 p, Double_t Q, Double_t Bz)
+{
+	//
+	TVectorD Par(5);
+	// Transverse parameters
+	Double_t a = -Q * Bz * cSpeed();			// Units are Tesla, GeV and meters
+	Double_t pt = p.Pt();
+	Double_t C = a / (2 * pt);			// Half curvature
+	//cout << "ObsTrk::XPtoPar: fB = " << fB << ", a = " << a << ", pt = " << pt << ", C = " << C << endl;
+	Double_t r2 = x.Perp2();
+	Double_t cross = x(0) * p(1) - x(1) * p(0);
+	Double_t T = TMath::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 D;							// Impact parameter D
+	if (pt < 10.0) D = (T - pt) / a;
+	else D = (-2 * cross + a * r2) / (T + pt);
+	//
+	Par(0) = D;		// Store D
+	Par(1) = phi0;	// Store phi0
+	Par(2) = C;		// Store C
+	//Longitudinal parameters
+	Double_t B = C * TMath::Sqrt(TMath::Max(r2 - D * D, 0.0) / (1 + 2 * C * D));
+	Double_t st = TMath::ASin(B) / C;
+	Double_t ct = p(2) / pt;
+	Double_t z0 = x(2) - ct * st;
+	//
+	Par(3) = z0;		// Store z0
+	Par(4) = ct;		// Store cot(theta)
+	//
+	return Par;
+}
+// non-static
+TVectorD TrkUtil::XPtoPar(TVector3 x, TVector3 p, Double_t Q)
+{
+	//
+	TVectorD Par(5);
+	Double_t Bz = fBz;
+	Par = XPtoPar(x, p, Q, Bz);
+	//
+	return Par;
+}
+//
+TVector3 TrkUtil::ParToX(TVectorD Par)
+{
+	Double_t D = Par(0);
+	Double_t phi0 = Par(1);
+	Double_t z0 = Par(3);
+	//
+	TVector3 Xval;
+	Xval(0) = -D * TMath::Sin(phi0);
+	Xval(1) = D * TMath::Cos(phi0);
+	Xval(2) = z0;
+	//
+	return Xval;
+}
+//
+TVector3 TrkUtil::ParToP(TVectorD Par)
+{
+	Double_t C = Par(2);
+	Double_t phi0 = Par(1);
+	Double_t ct = Par(4);
+	//
+	TVector3 Pval;
+	Double_t pt = fBz * cSpeed() / TMath::Abs(2 * C);
+	Pval(0) = pt * TMath::Cos(phi0);
+	Pval(1) = pt * TMath::Sin(phi0);
+	Pval(2) = pt * ct;
+	//
+	return Pval;
+}
+//
+Double_t TrkUtil::ParToQ(TVectorD Par)
+{
+	return TMath::Sign(1.0, -Par(2));
+}
+
+//
+// Parameter conversion to ACTS format
+TVectorD TrkUtil::ParToACTS(TVectorD Par)
+{
+	TVectorD pACTS(6);	// Return vector
+	//
+	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(2) = Par(1);			// Phi0 is unchanged
+	pACTS(3) = TMath::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
+	//
+	return pACTS;
+}
+// Covariance conversion to ACTS format
+TMatrixDSym TrkUtil::CovToACTS(TVectorD Par, TMatrixDSym Cov)
+{
+	TMatrixDSym cACTS(6); cACTS.Zero();
+	Double_t b = -cSpeed() * fBz / 2.;
+	//
+	// Fill derivative matrix
+	TMatrixD A(5, 5);	A.Zero();
+	Double_t ct = Par(4);	// cot(theta)
+	Double_t C = Par(2);		// half curvature
+	A(0, 0) = 1000.;		// D-D	conversion to mm
+	A(1, 2) = 1.0;		// phi0-phi0
+	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)
+	A(4, 4) = -C * ct / (b * pow(1.0 + ct * ct, 3.0 / 2.0)); // q/p-cot(theta)
+	//
+	TMatrixDSym Cv = Cov;
+	TMatrixD At(5, 5);
+	At.Transpose(A);
+	Cv.Similarity(At);
+	TMatrixDSub(cACTS, 0, 4, 0, 4) = Cv;
+	cACTS(5, 5) = 0.1;	// Currently undefined: set to arbitrary value to avoid crashes
+	//
+	return cACTS;
+}
+//
+// Parameter conversion to ILC format
+TVectorD TrkUtil::ParToILC(TVectorD Par)
+{
+	TVectorD pILC(5);	// Return vector
+	//
+	pILC(0) = Par(0) * 1.0e3;			// d0 in mm
+	pILC(1) = Par(1);				// phi0 is unchanged
+	pILC(2) = -2 * Par(2) * 1.0e-3;	// w in mm^-1
+	pILC(3) = Par(3) * 1.0e3;			// z0 in mm
+	pILC(4) = Par(4);				// tan(lambda) = cot(theta)
+	//
+	return pILC;
+}
+// Covariance conversion to ILC format
+TMatrixDSym TrkUtil::CovToILC(TMatrixDSym Cov)
+{
+	TMatrixDSym cILC(5); cILC.Zero();
+	//
+	// Fill derivative matrix
+	TMatrixD A(5, 5);	A.Zero();
+	//
+	A(0, 0) = 1.0e3;		// D-d0 in mm
+	A(1, 1) = 1.0;			// phi0-phi0
+	A(2, 2) = -2.0e-3;		// w-C
+	A(3, 3) = 1.0e3;		// z0-z0 conversion to mm
+	A(4, 4) = 1.0;			// tan(lambda) - cot(theta)
+	//
+	TMatrixDSym Cv = Cov;
+	TMatrixD At(5, 5);
+	At.Transpose(A);
+	Cv.Similarity(At);
+	cILC = Cv;
+	//
+	return cILC;
+}
+//
+// Conversion from meters to mm
+TVectorD TrkUtil::ParToMm(TVectorD Par)				// Parameter conversion
+{
+	TVectorD Pmm(5);					// Return vector
+	//
+	Pmm(0) = Par(0) * 1.0e3;			// d0 in mm
+	Pmm(1) = Par(1);					// phi0 is unchanged
+	Pmm(2) = Par(2) * 1.0e-3;			// C in mm^-1
+	Pmm(3) = Par(3) * 1.0e3;			// z0 in mm
+	Pmm(4) = Par(4);					// tan(lambda) = cot(theta) unchanged
+	//
+	return Pmm;
+}
+TMatrixDSym TrkUtil::CovToMm(TMatrixDSym Cov)		// Covariance conversion
+{
+	TMatrixDSym Cmm(5); Cmm.Zero();
+	//
+	// Fill derivative matrix
+	TMatrixD A(5, 5);	A.Zero();
+	//
+	A(0, 0) = 1.0e3;		// D-d0 in mm
+	A(1, 1) = 1.0;			// phi0-phi0
+	A(2, 2) = 1.0e-3;		// C-C
+	A(3, 3) = 1.0e3;		// z0-z0 conversion to mm
+	A(4, 4) = 1.0;			// lambda - cot(theta)
+	//
+	TMatrixDSym Cv = Cov;
+	TMatrixD At(5, 5);
+	At.Transpose(A);
+	Cv.Similarity(At);
+	Cmm = Cv;
+	//
+	return Cmm;
+}
Index: external/TrackCovariance/TrkUtil.h
===================================================================
--- external/TrackCovariance/TrkUtil.h	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
+++ external/TrackCovariance/TrkUtil.h	(revision c9e746633bfcea5a7601389c52f8c1c0240faac3)
@@ -0,0 +1,62 @@
+//
+#ifndef G__TRKUTIL_H
+#define G__TRKUTIL_H
+//
+#include <TVector3.h>
+#include <TVectorD.h>
+#include <TMatrixDSym.h>
+//
+//
+// Class test
+
+class TrkUtil {
+	//
+	//
+protected:
+	Double_t fBz;							// Solenoid magnetic field
+	//
+	// Service routines
+	//
+	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
+	//
+	TVectorD ParToACTS(TVectorD Par);		// Parameter conversion
+	TMatrixDSym CovToACTS(TVectorD Par, TMatrixDSym Cov);	// Covariance conversion
+	//
+	// Conversion to ILC parametrization
+	//
+	TVectorD ParToILC(TVectorD Par);		// Parameter conversion
+	TMatrixDSym CovToILC(TMatrixDSym Cov);	// Covariance conversion
+
+public:
+	//
+	// Constructors
+	TrkUtil();
+	TrkUtil(Double_t Bz);
+	// Destructor
+	~TrkUtil();
+	//
+	// Overload methods to allow call without instantiating class
+	//
+	static Double_t cSpeed()
+	{
+		return TMath::C()*1.0e-9;	// Reduced speed of light
+	}
+	//
+	// Service routines
+	//
+	static TVectorD XPtoPar(TVector3 x, TVector3 p, Double_t Q, Double_t Bz);
+	//
+	// Conversion from meters to mm
+	//
+	static TVectorD ParToMm(TVectorD Par);			// Parameter conversion
+	static TMatrixDSym CovToMm(TMatrixDSym Cov);	// Covariance conversion
+
+};
+
+#endif
