// Yc = Y + cos(Phi)/Kappa;
//
-GPUd() float AliHLTTPCCATrackParam::GetDist2( const AliHLTTPCCATrackParam &t ) const
+GPUdi() float AliHLTTPCCATrackParam::GetDist2( const AliHLTTPCCATrackParam &t ) const
{
// get squared distance between tracks
return dx*dx + dy*dy + dz*dz;
}
-GPUd() float AliHLTTPCCATrackParam::GetDistXZ2( const AliHLTTPCCATrackParam &t ) const
+GPUdi() float AliHLTTPCCATrackParam::GetDistXZ2( const AliHLTTPCCATrackParam &t ) const
{
// get squared distance between tracks in X&Z
}
-GPUd() float AliHLTTPCCATrackParam::GetS( float x, float y, float Bz ) const
+GPUdi() float AliHLTTPCCATrackParam::GetS( float x, float y, float Bz ) const
{
//* Get XY path length to the given point
return dS;
}
-GPUd() void AliHLTTPCCATrackParam::GetDCAPoint( float x, float y, float z,
+GPUdi() void AliHLTTPCCATrackParam::GetDCAPoint( float x, float y, float z,
float &xp, float &yp, float &zp,
float Bz ) const
{
//*
-GPUd() bool AliHLTTPCCATrackParam::TransportToX( float x, AliHLTTPCCATrackLinearisation &t0, float Bz, float maxSinPhi, float *DL )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToX( float x, AliHLTTPCCATrackLinearisation &t0, float Bz, float maxSinPhi, float *DL )
{
//* Transport the track parameters to X=x, using linearization at t0, and the field value Bz
//* maxSinPhi is the max. allowed value for |t0.SinPhi()|
float d[5] = { 0,
0,
- fP[2] - t0.SinPhi(),
- fP[3] - t0.DzDs(),
- fP[4] - t0.QPt()
+ GetPar(2) - t0.SinPhi(),
+ GetPar(3) - t0.DzDs(),
+ GetPar(4) - t0.QPt()
};
//float H0[5] = { 1,0, h2, 0, h4 };
t0.SetCosPhi( ex1 );
t0.SetSinPhi( ey1 );
- fX = X() + dx;
- fP[0] = Y() + dy + h2 * d[2] + h4 * d[4];
- fP[1] = Z() + dz + dS * d[3];
- fP[2] = t0.SinPhi() + d[2] + dxBz * d[4];
+ SetX(X() + dx);
+ SetPar(0, Y() + dy + h2 * d[2] + h4 * d[4]);
+ SetPar(1, Z() + dz + dS * d[3]);
+ SetPar(2, t0.SinPhi() + d[2] + dxBz * d[4]);
float c00 = fC[0];
float c10 = fC[1];
}
-GPUd() bool AliHLTTPCCATrackParam::TransportToX( float x, float sinPhi0, float cosPhi0, float Bz, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToX( float x, float sinPhi0, float cosPhi0, float Bz, float maxSinPhi )
{
//* Transport the track parameters to X=x, using linearization at phi0 with 0 curvature,
//* and the field value Bz
float sinPhi = SinPhi() + dxBz * QPt();
if ( maxSinPhi > 0 && CAMath::Abs( sinPhi ) > maxSinPhi ) return 0;
- fX = X() + dx;
- fP[0] += dS * ey + h2 * ( SinPhi() - ey ) + h4 * QPt();
- fP[1] += dS * DzDs();
- fP[2] = sinPhi;
+ SetX(X() + dx);
+ SetPar(0, GetPar(0) + dS * ey + h2 * ( SinPhi() - ey ) + h4 * QPt());
+ SetPar(1, GetPar(1) + dS * DzDs());
+ SetPar(2, sinPhi);
float c00 = fC[0];
-GPUd() bool AliHLTTPCCATrackParam::TransportToX( float x, float Bz, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToX( float x, float Bz, float maxSinPhi )
{
//* Transport the track parameters to X=x
-GPUd() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, AliHLTTPCCATrackLinearisation &t0, AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, AliHLTTPCCATrackLinearisation &t0, AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi )
{
//* Transport the track parameters to X=x taking into account material budget
}
-GPUd() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, AliHLTTPCCATrackFitParam &par, float Bz, float maxSinPhi )
{
//* Transport the track parameters to X=x taking into account material budget
return TransportToXWithMaterial( x, t0, par, Bz, maxSinPhi );
}
-GPUd() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, float Bz, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::TransportToXWithMaterial( float x, float Bz, float maxSinPhi )
{
//* Transport the track parameters to X=x taking into account material budget
//*
-float AliHLTTPCCATrackParam::BetheBlochGeant( float bg2,
+GPUi() float AliHLTTPCCATrackParam::BetheBlochGeant( float bg2,
float kp0,
float kp1,
float kp2,
return mK*mZA*( 1 + bg2 ) / bg2*( 0.5*AliHLTTPCCAMath::Log( 2*me*bg2*maxT / ( mI*mI ) ) - bg2 / ( 1 + bg2 ) - d2 );
}
-float AliHLTTPCCATrackParam::BetheBlochSolid( float bg )
+GPUi() float AliHLTTPCCATrackParam::BetheBlochSolid( float bg )
{
//------------------------------------------------------------------
// This is an approximation of the Bethe-Bloch formula,
return BetheBlochGeant( bg );
}
-float AliHLTTPCCATrackParam::BetheBlochGas( float bg )
+GPUi() float AliHLTTPCCATrackParam::BetheBlochGas( float bg )
{
//------------------------------------------------------------------
// This is an approximation of the Bethe-Bloch formula,
-GPUd() float AliHLTTPCCATrackParam::ApproximateBetheBloch( float beta2 )
+GPUdi() float AliHLTTPCCATrackParam::ApproximateBetheBloch( float beta2 )
{
//------------------------------------------------------------------
// This is an approximation of the Bethe-Bloch formula with
}
-GPUd() void AliHLTTPCCATrackParam::CalculateFitParameters( AliHLTTPCCATrackFitParam &par, float mass )
+GPUdi() void AliHLTTPCCATrackParam::CalculateFitParameters( AliHLTTPCCATrackFitParam &par, float mass )
{
//*!
- float p2 = ( 1. + fP[3] * fP[3] );
- float k2 = fP[4] * fP[4];
+ float qpt = GetPar(4);
+ if( fC[14]>=1. ) qpt = 1./0.35;
+
+ float p2 = ( 1. + GetPar(3) * GetPar(3) );
+ float k2 = qpt * qpt;
float mass2 = mass * mass;
float beta2 = p2 / ( p2 + mass2 * k2 );
// Approximate energy loss fluctuation (M.Ivanov)
const float knst = 0.07; // To be tuned.
- par.fSigmadE2 = knst * par.fEP2 * fP[4];
+ par.fSigmadE2 = knst * par.fEP2 * qpt;
par.fSigmadE2 = par.fSigmadE2 * par.fSigmadE2;
- par.fK22 = ( 1. + fP[3] * fP[3] );
+ par.fK22 = ( 1. + GetPar(3) * GetPar(3) );
par.fK33 = par.fK22 * par.fK22;
- par.fK43 = fP[3] * fP[4] * par.fK22;
- par.fK44 = fP[3] * fP[3] * fP[4] * fP[4];
+ par.fK43 = 0;
+ par.fK44 = GetPar(3) * GetPar(3) * k2;
}
-GPUd() bool AliHLTTPCCATrackParam::CorrectForMeanMaterial( float xOverX0, float xTimesRho, const AliHLTTPCCATrackFitParam &par )
+GPUdi() bool AliHLTTPCCATrackParam::CorrectForMeanMaterial( float xOverX0, float xTimesRho, const AliHLTTPCCATrackFitParam &par )
{
//------------------------------------------------------------------
// This function corrects the track parameters for the crossed material.
float corr = ( 1. - par.fEP2 * dE );
if ( corr < 0.3 || corr > 1.3 ) return 0;
- fP[4] *= corr;
+ SetPar(4, GetPar(4) * corr);
fC40 *= corr;
fC41 *= corr;
fC42 *= corr;
//Multiple scattering******************
float theta2 = par.fTheta2 * CAMath::Abs( xOverX0 );
- fC22 += theta2 * par.fK22 * ( 1. - fP[2] * fP[2] );
+ fC22 += theta2 * par.fK22 * (1.-GetPar(2))*(1.+GetPar(2));
fC33 += theta2 * par.fK33;
fC43 += theta2 * par.fK43;
fC44 += theta2 * par.fK44;
//*
-GPUd() bool AliHLTTPCCATrackParam::Rotate( float alpha, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::Rotate( float alpha, float maxSinPhi )
{
//* Rotate the coordinate system in XY on the angle alpha
return 1;
}
-GPUd() bool AliHLTTPCCATrackParam::Rotate( float alpha, AliHLTTPCCATrackLinearisation &t0, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::Rotate( float alpha, AliHLTTPCCATrackLinearisation &t0, float maxSinPhi )
{
//* Rotate the coordinate system in XY on the angle alpha
return 1;
}
-GPUd() bool AliHLTTPCCATrackParam::Filter( float y, float z, float err2Y, float err2Z, float maxSinPhi )
+GPUdi() bool AliHLTTPCCATrackParam::Filter( float y, float z, float err2Y, float err2Z, float maxSinPhi )
{
//* Add the y,z measurement with the Kalman filter
err2Z += c11;
float
- z0 = y - fP[0],
- z1 = z - fP[1];
+ z0 = y - GetPar(0),
+ z1 = z - GetPar(1);
if ( err2Y < 1.e-8 || err2Z < 1.e-8 ) return 0;
k11 = c11 * mS2;
k31 = c31 * mS2;
- float sinPhi = fP[2] + k20 * z0 ;
+ float sinPhi = GetPar(2) + k20 * z0 ;
if ( maxSinPhi > 0 && CAMath::Abs( sinPhi ) >= maxSinPhi ) return 0;
fNDF += 2;
fChi2 += mS0 * z0 * z0 + mS2 * z1 * z1 ;
- fP[ 0] += k00 * z0 ;
- fP[ 1] += k11 * z1 ;
- fP[ 2] = sinPhi ;
- fP[ 3] += k31 * z1 ;
- fP[ 4] += k40 * z0 ;
+ SetPar(0, GetPar(0) + k00 * z0);
+ SetPar(1, GetPar(1) + k11 * z1);
+ SetPar(2, sinPhi);
+ SetPar(3, GetPar(3) + k31 * z1);
+ SetPar(4, GetPar(4) + k40 * z0);
fC[ 0] -= k00 * c00 ;
fC[ 3] -= k20 * c00 ;
return 1;
}
-GPUd() bool AliHLTTPCCATrackParam::CheckNumericalQuality() const
+GPUdi() bool AliHLTTPCCATrackParam::CheckNumericalQuality() const
{
//* Check that the track parameters and covariance matrix are reasonable
- bool ok = AliHLTTPCCAMath::Finite( fX ) && AliHLTTPCCAMath::Finite( fSignCosPhi ) && AliHLTTPCCAMath::Finite( fChi2 ) && AliHLTTPCCAMath::Finite( fNDF );
+ bool ok = AliHLTTPCCAMath::Finite( GetX() ) && AliHLTTPCCAMath::Finite( fSignCosPhi ) && AliHLTTPCCAMath::Finite( fChi2 ) && AliHLTTPCCAMath::Finite( fNDF );
const float *c = Cov();
for ( int i = 0; i < 15; i++ ) ok = ok && AliHLTTPCCAMath::Finite( c[i] );
for ( int i = 0; i < 5; i++ ) ok = ok && AliHLTTPCCAMath::Finite( Par()[i] );
if ( c[0] <= 0 || c[2] <= 0 || c[5] <= 0 || c[9] <= 0 || c[14] <= 0 ) ok = 0;
- if ( c[0] > 5. || c[2] > 5. || c[5] > 2. || c[9] > 2 || ( CAMath::Abs( QPt() ) > 1.e-4 && c[14] > 2. ) ) ok = 0;
+ if ( c[0] > 5. || c[2] > 5. || c[5] > 2. || c[9] > 2
+ //|| ( CAMath::Abs( QPt() ) > 1.e-2 && c[14] > 2. )
+ ) ok = 0;
if ( CAMath::Abs( SinPhi() ) > .99 ) ok = 0;
if ( CAMath::Abs( QPt() ) > 1. / 0.05 ) ok = 0;
-
+ if( ok ){
+ ok = ok
+ && ( c[1]*c[1]<=c[2]*c[0] )
+ && ( c[3]*c[3]<=c[5]*c[0] )
+ && ( c[4]*c[4]<=c[5]*c[2] )
+ && ( c[6]*c[6]<=c[9]*c[0] )
+ && ( c[7]*c[7]<=c[9]*c[2] )
+ && ( c[8]*c[8]<=c[9]*c[5] )
+ && ( c[10]*c[10]<=c[14]*c[0] )
+ && ( c[11]*c[11]<=c[14]*c[2] )
+ && ( c[12]*c[12]<=c[14]*c[5] )
+ && ( c[13]*c[13]<=c[14]*c[9] );
+ }
return ok;
}
#include <iostream>
#endif
-GPUd() void AliHLTTPCCATrackParam::Print() const
+GPUdi() void AliHLTTPCCATrackParam::Print() const
{
//* print parameters