Index: external/TrackCovariance/VertexFit.cc
===================================================================
--- external/TrackCovariance/VertexFit.cc	(revision 2eaa9fdcc2a8faebe1e705ee2fe598140f869054)
+++ external/TrackCovariance/VertexFit.cc	(revision 537d24f49bbba0f867531c63ed175d70bffd39cb)
@@ -46,5 +46,5 @@
 	fWinvi = new TMatrixDSym * [Ntr];	// ACA'
 	for (Int_t i = 0; i < Ntr; i++) fWinvi[i] = new TMatrixDSym(3);
-
+	
 }
 // ObsTrk list
@@ -65,7 +65,7 @@
 	{
 		fPar[i] = new TVectorD(track[i]->GetObsPar());
-		//std::cout << "fPar = " << std::endl; fPar[i]->Print();
+		//cout << "fPar = " << endl; fPar[i]->Print();
 		fCov[i] = new TMatrixDSym(track[i]->GetCov());
-		//std::cout << "fCov = " << std::endl; fCov[i]->Print();
+		//cout << "fCov = " << endl; fCov[i]->Print();
 	}
 	//
@@ -83,5 +83,5 @@
 	for (Int_t i = 0; i < Ntr; i++) fWinvi[i] = new TMatrixDSym(3);
 
-	//std::cout << "VertexFit constructor executed" << std::endl;
+	//cout << "VertexFit constructor executed" << endl;
 }
 //
@@ -89,13 +89,13 @@
 VertexFit::~VertexFit()
 {
-	fxCst.Clear();
+	fxCst.Clear();	
 	fCovCst.Clear();
-	fXv.Clear();
-	fcovXv.Clear();
+	fXv.Clear();	
+	fcovXv.Clear();	
 	fChi2List.Clear();
 	//
 	for (Int_t i= 0; i < fNtr; i++)
 	{
-		fPar[i]->Clear();
+		fPar[i]->Clear(); 
 		fCov[i]->Clear();
 		//
@@ -195,5 +195,5 @@
 		if (Ntry > NtryMax)
 		{
-			std::cout << "FastRv: maximum number of iteration reached" << std::endl;
+			cout << "FastRv: maximum number of iteration reached" << endl;
 			break;
 		}
@@ -217,5 +217,5 @@
 	if (N != 3)
 	{
-		std::cout << "RegInv3 called with  matrix size != 3. Abort & return standard inversion." << std::endl;
+		cout << "RegInv3 called with  matrix size != 3. Abort & return standard inversion." << endl;
 		return Smat.Invert();
 	}
@@ -263,5 +263,5 @@
 	else
 	{
-		std::cout << "RegInv3: found negative elements in diagonal. Return standard inversion." << std::endl;
+		cout << "RegInv3: found negative elements in diagonal. Return standard inversion." << endl;
 		return Smat.Invert();
 	}
@@ -273,5 +273,5 @@
 {
 	//
-	// Derivative of track 3D position vector with respect to track parameters at constant phase
+	// Derivative of track 3D position vector with respect to track parameters at constant phase 
 	//
 	// par = vector of track parameters
@@ -395,5 +395,5 @@
 	//
 	// Stored quantities
-	Double_t *fi = new Double_t[fNtr];				// Phases
+	Double_t *fi = new Double_t[fNtr];				// Phases 
 	TVectorD **x0i = new TVectorD*[fNtr];			// Track expansion point
 	TVectorD **ai = new TVectorD*[fNtr];				// dx/dphi
@@ -416,5 +416,5 @@
 	// Find track pair with largest phi difference
 	Int_t isel=0; Int_t jsel=0; // selected track indices
-	Double_t dphiMax = 0.0;	// Max phi difference
+	Double_t dphiMax = 0.0;	// Max phi difference 
 	for (Int_t i = 0; i < fNtr-1; i++)
 	{
@@ -438,5 +438,5 @@
 	}
 	//
-	//
+	// 
 	//ObsTrk* t1 = tracks[isel];
 	TVectorD p1 = *fPar[isel];
@@ -447,5 +447,5 @@
 	R = 0.9*R + 0.1*Rd;
 	//
-	//std::cout << "VertexFinder: fast R = " << R << std::endl;
+	//cout << "VertexFinder: fast R = " << R << endl;
 	//
 	// Iteration properties
@@ -464,12 +464,12 @@
 		H.Zero();		// Reset H matrix
 		DW1D.Zero();
-		//
-		//std::cout << "VertexFinder: start loop on tracks" << std::endl;
+		// 
+		//cout << "VertexFinder: start loop on tracks" << endl;
 		for (Int_t i = 0; i < fNtr; i++)
 		{
-			// Get track helix parameters and their covariance matrix
+			// Get track helix parameters and their covariance matrix 
 			//ObsTrk *t = tracks[i];
 			TVectorD par = *fPar[i];
-			TMatrixDSym Cov = *fCov[i];
+			TMatrixDSym Cov = *fCov[i]; 
 			Double_t fs;
 			if (Ntry <= 0)	// Initialize all phases on first pass
@@ -485,26 +485,26 @@
 			//
 			fs = fi[i];								// Get phase
-			//std::cout << "VertexFinder: phase fs set" << std::endl;
+			//cout << "VertexFinder: phase fs set" << endl;
 			TVectorD xs = Fill_x(par, fs);
-			//std::cout << "VertexFinder: position xs set" << std::endl;
+			//cout << "VertexFinder: position xs set" << endl;
 			x0i[i] = new TVectorD(xs);				// Start helix position
-			//std::cout << "VertexFinder: position x0i stored" << std::endl;
+			//cout << "VertexFinder: position x0i stored" << endl;
 			// W matrix = (A*C*A')^-1; W^-1 = A*C*A'
 			TMatrixD A = Fill_A(par, fs);			// A = dx/da = derivatives wrt track parameters
-			//std::cout << "VertexFinder: derivatives A set" << std::endl;
+			//cout << "VertexFinder: derivatives A set" << endl;
 			TMatrixDSym Winv = Cov.Similarity(A);	// W^-1 = A*C*A'
 			Winvi[i] = new TMatrixDSym(Winv);		// Store W^-1 matrix
-			//std::cout << "VertexFinder: Winvi stored" << std::endl;
+			//cout << "VertexFinder: Winvi stored" << endl;
 			TMatrixDSym W = RegInv3(Winv);			// W = (A*C*A')^-1
 			Wi[i] = new TMatrixDSym(W);				// Store W matrix
-			//std::cout << "VertexFinder: Wi stored" << std::endl;
+			//cout << "VertexFinder: Wi stored" << endl;
 			TVectorD a = Fill_a(par, fs);			// a = dx/ds = derivatives wrt phase
-			//std::cout << "VertexFinder: derivatives a set" << std::endl;
+			//cout << "VertexFinder: derivatives a set" << endl;
 			ai[i] = new TVectorD(a);				// Store a
-			//std::cout << "VertexFinder: derivatives a stored" << std::endl;
+			//cout << "VertexFinder: derivatives a stored" << endl;
 			Double_t a2 = W.Similarity(a);
 			a2i[i] = a2;							// Store a2
 			// Build D matrix
-			TMatrixDSym B(3);
+			TMatrixDSym B(3); 
 			B.Rank1Update(a, 1.0);
 			B *= -1. / a2;
@@ -512,7 +512,7 @@
 			TMatrixDSym Ds = W+B;					// D matrix
 			Di[i] = new TMatrixDSym(Ds);			// Store D matrix
-			//std::cout << "VertexFinder: matrix Di stored" << std::endl;
+			//cout << "VertexFinder: matrix Di stored" << endl;
 			TMatrixDSym DsW1Ds = Winv.Similarity(Ds);	// Service matrix to calculate covX
-			DW1D += DsW1Ds;
+			DW1D += DsW1Ds;								
 			// Update hessian
 			H += Ds;
@@ -524,8 +524,8 @@
 		TMatrixDSym H1 = RegInv3(H);
 		x = H1*cterm;
-		//std::cout << "VertexFinder: x vertex set" << std::endl;
+		//cout << "VertexFinder: x vertex set" << endl;
 		// Update vertex covariance
 		covX = DW1D.Similarity(H1);
-		//std::cout << "VertexFinder: cov vertex set" << std::endl;
+		//cout << "VertexFinder: cov vertex set" << endl;
 		// Update phases and chi^2
 		Chi2 = 0.0;
@@ -541,5 +541,5 @@
 		}
 
-		//std::cout << "VertexFinder: end chi2 calculation" << std::endl;
+		//cout << "VertexFinder: end chi2 calculation" << endl;
 		//
 		TVectorD dx = x - x0;
@@ -559,26 +559,26 @@
 		//
 
-		//std::cout << "VertexFinder: before store intermediate data" << std::endl;
+		//cout << "VertexFinder: before store intermediate data" << endl;
 		for (Int_t i = 0; i < fNtr; i++)
 		{
-			//std::cout << "VertexFinder: inside store intermediate data" << std::endl;
-			//std::cout << "i = " << i << ", fi[i] = " << fi[i] << std::endl;
-			//std::cout << "i = " << i << ", ffi[i] = " << ffi[i] << std::endl;
+			//cout << "VertexFinder: inside store intermediate data" << endl;
+			//cout << "i = " << i << ", fi[i] = " << fi[i] << endl;
+			//cout << "i = " << i << ", ffi[i] = " << ffi[i] << endl;
 			ffi[i] = fi[i];				// Fit phases
-			//std::cout << "VertexFinder: fi stored" << std::endl;
+			//cout << "VertexFinder: fi stored" << endl;
 			fx0i[i] = x0i[i];			// Track expansion points
-			//std::cout << "VertexFinder: x0i stored" << std::endl;
+			//cout << "VertexFinder: x0i stored" << endl;
 			fai[i] = ai[i];				// dx/dphi
-			//std::cout << "VertexFinder: ai stored" << std::endl;
+			//cout << "VertexFinder: ai stored" << endl;
 			fa2i[i] = a2i[i];			// a'Wa
-			//std::cout << "VertexFinder: a2i stored" << std::endl;
+			//cout << "VertexFinder: a2i stored" << endl;
 			fDi[i] = Di[i];				// W-WBW
-			//std::cout << "VertexFinder: Di stored" << std::endl;
+			//cout << "VertexFinder: Di stored" << endl;
 			fWi[i] = Wi[i];				// (ACA')^-1
-			//std::cout << "VertexFinder: Wi stored" << std::endl;
+			//cout << "VertexFinder: Wi stored" << endl;
 			fWinvi[i] = Winvi[i];		// ACA'
-			//std::cout << "VertexFinder: Winvi stored" << std::endl;
+			//cout << "VertexFinder: Winvi stored" << endl;
 		}
-		//std::cout << "Iteration " << Ntry << " completed - Before cleanup" << std::endl;
+		//cout << "Iteration " << Ntry << " completed - Before cleanup" << endl;
 		//
 		// Cleanup
@@ -599,10 +599,10 @@
 		}
 
-		//std::cout << "Iteration " << Ntry << " completed - After cleanup" << std::endl;
+		//cout << "Iteration " << Ntry << " completed - After cleanup" << endl;
 	}
 	//
 	fVtxDone = kTRUE;	// Set fitting completion flag
 	//
-	delete[] fi;		// Phases
+	delete[] fi;		// Phases 
 	delete[] x0i;		// Track expansion point
 	delete[] ai;		// dx/dphi
@@ -615,5 +615,5 @@
 TVectorD VertexFit::GetVtx()
 {
-	//std::cout << "GetVtx: flag set to " << fVtxDone << std::endl;
+	//cout << "GetVtx: flag set to " << fVtxDone << endl;
 	if (!fVtxDone)VertexFinder();
 	return fXv;
@@ -641,13 +641,13 @@
 void VertexFit::AddVtxConstraint(TVectorD xv, TMatrixDSym cov)	// Add gaussian vertex constraint
 {
-	std::cout << "VertexFit::AddVtxConstraint: Not implemented yet" << std::endl;
+	cout << "VertexFit::AddVtxConstraint: Not implemented yet" << endl;
 }
 //
 void VertexFit::AddTrk(TVectorD par, TMatrixDSym Cov)			// Add track to input list
 {
-	std::cout << "VertexFit::AddTrk: Not implemented yet" << std::endl;
+	cout << "VertexFit::AddTrk: Not implemented yet" << endl;
 }
 void VertexFit::RemoveTrk(Int_t iTrk)							// Remove iTrk track
 {
-	std::cout << "VertexFit::RemoveTrk: Not implemented yet" << std::endl;
-}
+	cout << "VertexFit::RemoveTrk: Not implemented yet" << endl;
+}
