-// #### -B0-CHANGE-START == JMT
- // for straight line fit
- if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
- Double_t xc = GetCenterX() - GetFirstPointX();
- Double_t yc = GetCenterY() - GetFirstPointY();
-
- Double_t xn = (Double_t) sin( GetPsi() );
- Double_t yn = -1. * (Double_t) cos( GetPsi() );
-
- Double_t d = xc*xn + yc*yn;
-
- Double_t distx = d * xn;
- Double_t disty = d * yn;
-
- Double_t point[2];
-
- point[0] = distx + GetFirstPointX();
- point[1] = disty + GetFirstPointY();
-
- //Update the track parameters
- SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
- SetPhi0(atan2(point[1],point[0]));
- SetFirstPoint(point[0],point[1],GetZ0());
- }
- // for helix fit
- else {
-// #### -B0-UNCHANGED-START == JMT
- Double_t xc = GetCenterX() - GetFirstPointX();
- Double_t yc = GetCenterY() - GetFirstPointY();
-
- Double_t distx1 = xc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
- Double_t disty1 = yc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
- Double_t distance1 = sqrt(distx1*distx1 + disty1*disty1);
-
- Double_t distx2 = xc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
- Double_t disty2 = yc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
- Double_t distance2 = sqrt(distx2*distx2 + disty2*disty2);
-
- //Choose the closest:
- Double_t point[2];
- if(distance1 < distance2)
- {
- point[0] = distx1 + GetFirstPointX();
- point[1] = disty1 + GetFirstPointY();
- }
- else
- {
- point[0] = distx2 + GetFirstPointX();
- point[1] = disty2 + GetFirstPointY();
- }
-
- Double_t pointpsi = atan2(point[1]-GetCenterY(),point[0]-GetCenterX());
- pointpsi -= GetCharge()*AliHLTTPCTransform::PiHalf();
- if(pointpsi < 0) pointpsi += AliHLTTPCTransform::TwoPi();
-
- //Update the track parameters
- SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
- SetPhi0(atan2(point[1],point[0]));
- SetFirstPoint(point[0],point[1],GetZ0());
- SetPsi(pointpsi);
-// #### -B0-UNCHANGED-END == JMT
- }
-// #### -B0-CHANGE-END == JMT
+ // for straight line fit
+ if (AliHLTTPCTransform::GetBFieldValue() == 0.0 ){
+ Double_t xc = GetCenterX() - GetFirstPointX();
+ Double_t yc = GetCenterY() - GetFirstPointY();
+
+ Double_t xn = (Double_t) sin( GetPsi() );
+ Double_t yn = -1. * (Double_t) cos( GetPsi() );
+
+ Double_t d = xc*xn + yc*yn;
+
+ Double_t distx = d * xn;
+ Double_t disty = d * yn;
+
+ Double_t point[2];
+
+ point[0] = distx + GetFirstPointX();
+ point[1] = disty + GetFirstPointY();
+
+ //Update the track parameters
+ SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
+ SetPhi0(atan2(point[1],point[0]));
+ SetFirstPoint(point[0],point[1],GetZ0());
+ }
+ // for helix fit
+ else {
+ Double_t xc = GetCenterX() - GetFirstPointX();
+ Double_t yc = GetCenterY() - GetFirstPointY();
+
+ Double_t distx1 = xc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
+ Double_t disty1 = yc*(1 + GetRadius()/sqrt(xc*xc + yc*yc));
+ Double_t distance1 = sqrt(distx1*distx1 + disty1*disty1);
+
+ Double_t distx2 = xc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
+ Double_t disty2 = yc*(1 - GetRadius()/sqrt(xc*xc + yc*yc));
+ Double_t distance2 = sqrt(distx2*distx2 + disty2*disty2);
+
+ //Choose the closest:
+ Double_t point[2];
+ if(distance1 < distance2)
+ {
+ point[0] = distx1 + GetFirstPointX();
+ point[1] = disty1 + GetFirstPointY();
+ }
+ else
+ {
+ point[0] = distx2 + GetFirstPointX();
+ point[1] = disty2 + GetFirstPointY();
+ }
+
+ Double_t pointpsi = atan2(point[1]-GetCenterY(),point[0]-GetCenterX());
+ pointpsi -= GetCharge()*AliHLTTPCTransform::PiHalf();
+ if(pointpsi < 0) pointpsi += AliHLTTPCTransform::TwoPi();
+
+ //Update the track parameters
+ SetR0(sqrt(point[0]*point[0]+point[1]*point[1]));
+ SetPhi0(atan2(point[1],point[0]));
+ SetFirstPoint(point[0],point[1],GetZ0());
+ SetPsi(pointpsi);
+ }