-//
-// Get other track parameters
-//
- Double_t x0, y0,phi0,r0,psi,pt ;
- if ( fTrack->ComesFromMainVertex() == true )
- {
- //flag = 1 ; // primary track flag
- x0 = fVertex->GetX() ;
- y0 = fVertex->GetY() ;
- phi0 = fVertex->GetPhi() ;
- r0 = fVertex->GetR() ;
- fTrack->SetPhi0(phi0);
- fTrack->SetR0(r0);
- }
- else
- {
- //AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)hits->Last();
- AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)fTrack->lastHit;
- //flag = 0 ; // primary track flag
- x0 = lHit->GetX() ;
- y0 = lHit->GetY() ;
- phi0 = atan2(lHit->GetY(),lHit->GetX());
- if ( phi0 < 0 ) phi0 += 2*pi;
- r0 = sqrt ( lHit->GetX() * lHit->GetX() + lHit->GetY() * lHit->GetY() ) ;
- fTrack->SetPhi0(phi0);
- fTrack->SetR0(r0);
- }
- //
+
+ //Set the first point on the track to the space point coordinates of the innermost track
+ //This will be updated to lie on the fit later on (AliL3Track::UpdateToFirstPoint).
+ Double_t x0,y0,psi,pt ;
+ AliL3ConfMapPoint *lHit = (AliL3ConfMapPoint*)fTrack->GetLastHit();
+ x0 = lHit->GetX();
+ y0 = lHit->GetY();
+ fTrack->SetFirstPoint(x0,y0,0); //Z-value is set in FitLine
+