//- Modified: NvE $Date$ UU-SAP Utrecht
///////////////////////////////////////////////////////////////////////////
-#include "AliTrack.h"
#include "Riostream.h"
+#include "TObjArray.h"
+
+#include "AliBoost.h"
+#include "AliPositionObj.h"
+#include "AliSignal.h"
+#include "AliTimestamp.h"
+#include "AliTrack.h"
ClassImp(AliTrack) // Class implementation to enable ROOT I/O
void AliTrack::Set4Momentum(Ali4Vector& p)
{
// Set the track parameters according to the 4-momentum p
- Double_t E=p.GetScalar();
+ Double_t eE=p.GetScalar();
Double_t dE=p.GetResultError();
Ali3Vector pv=p.Get3Vector();
- SetVector(E,pv);
+ SetVector(eE,pv);
SetScalarError(dE);
}
///////////////////////////////////////////////////////////////////////////
Dumps(t,1,f,u); // Information of all decay products
}
//////////////////////////////////////////////////////////////////////////
-void AliTrack::Dumps(AliTrack* t,Int_t n,TString f,TString u)
+void AliTrack::Dumps(const AliTrack* t,Int_t n,TString f,TString u)
{
// Recursively provide the info of all decay levels of this track
AliTrack* td;
// of scale=0.001 will provide the energy in MeV.
// The error can be obtained by invoking GetResultError() after
// invokation of GetEnergy().
- Double_t E=GetScalar();
- if (E>0)
+ Double_t eE=GetScalar();
+ if (eE>0)
{
if (scale>0)
{
- E*=fEscale/scale;
+ eE*=fEscale/scale;
fDresult*=fEscale/scale;
}
- return E;
+ return eE;
}
else
{
- cout << "*AliTrack::GetEnergy* Unphysical situation E = " << E << endl;
+ cout << "*AliTrack::GetEnergy* Unphysical situation E = " << eE << endl;
cout << " Value 0 will be returned." << endl;
return 0;
}
// thcms : cms theta decay angle (in rad.) of m1
// phicms : cms phi decay angle (in rad.) of m1
- Double_t M=GetMass();
+ Double_t mM=GetMass();
// Compute the 4-momenta of the decay products in the cms
// Note : p2=p1=pnorm for a 2-body decay
Double_t e1=0;
- if (M) e1=((M*M)+(m1*m1)-(m2*m2))/(2.*M);
+ if (mM) e1=((mM*mM)+(m1*m1)-(m2*m2))/(2.*mM);
Double_t e2=0;
- if (M) e2=((M*M)+(m2*m2)-(m1*m1))/(2.*M);
+ if (mM) e2=((mM*mM)+(m2*m2)-(m1*m1))/(2.*mM);
Double_t pnorm=(e1*e1)-(m1*m1);
if (pnorm>0.)
{
pprim2.SetInvariant(m2*m2);
// Determine boost parameters from the parent particle
- Double_t E=GetEnergy();
+ Double_t eE=GetEnergy();
p=Get3Vector();
Ali4Vector pmu;
- pmu.SetVector(E,p);
+ pmu.SetVector(eE,p);
AliBoost q;
q.Set4Momentum(pmu);
fBegin=new AliPositionObj(p);
}
///////////////////////////////////////////////////////////////////////////
-AliPosition* AliTrack::GetBeginPoint()
+AliPosition* AliTrack::GetBeginPoint() const
{
// Provide the position of the track begin-point.
return fBegin;
fEnd=new AliPositionObj(p);
}
///////////////////////////////////////////////////////////////////////////
-AliPosition* AliTrack::GetEndPoint()
+AliPosition* AliTrack::GetEndPoint() const
{
// Provide the position of the track end-point.
return fEnd;
fRef=new AliPositionObj(p);
}
///////////////////////////////////////////////////////////////////////////
-AliPosition* AliTrack::GetReferencePoint()
+AliPosition* AliTrack::GetReferencePoint() const
{
// Provide the position of the track reference-point.
// The reference-point is the point on the track in which the
}
}
///////////////////////////////////////////////////////////////////////////
-AliPosition* AliTrack::GetImpactPoint(TString q)
+AliPosition* AliTrack::GetImpactPoint(TString q) const
{
// Provide the position of the impact-point in the plane "q=0".
// Here q denotes one of the axes X, Y or Z.
fClosest=new AliPositionObj(p);
}
///////////////////////////////////////////////////////////////////////////
-AliPosition* AliTrack::GetClosestPoint()
+AliPosition* AliTrack::GetClosestPoint() const
{
// Provide the point of closest approach w.r.t. some reference
return fClosest;
return fCode;
}
///////////////////////////////////////////////////////////////////////////
-void AliTrack::SetParentTrack(AliTrack* t)
+void AliTrack::SetParentTrack(AliTrack * const t)
{
// Set pointer to the parent track.
fParent=t;
}
///////////////////////////////////////////////////////////////////////////
-AliTrack* AliTrack::GetParentTrack()
+AliTrack* AliTrack::GetParentTrack() const
{
// Provide pointer to the parent track.
return fParent;
return fProb;
}
///////////////////////////////////////////////////////////////////////////
-void AliTrack::SetFitDetails(TObject* obj)
+void AliTrack::SetFitDetails(const TObject* obj)
{
// Enter the object containing the fit details.
// In case an object to hold fit details was already present, this
if (obj) fFit=obj->Clone();
}
///////////////////////////////////////////////////////////////////////////
-TObject* AliTrack::GetFitDetails()
+TObject* AliTrack::GetFitDetails() const
{
// Provide the pointer to the object containing the fit details.
return fFit;
fTstamp=new AliTimestamp(t);
}
///////////////////////////////////////////////////////////////////////////
-AliTimestamp* AliTrack::GetTimestamp()
+AliTimestamp* AliTrack::GetTimestamp() const
{
// Provide the timestamp of this track.
return fTstamp;
}
}
///////////////////////////////////////////////////////////////////////////
-Double_t AliTrack::GetDistance(AliPosition* p,Float_t scale)
+Double_t AliTrack::GetDistance(AliPosition* const p,Float_t scale)
{
// Provide distance of the current track to the position p.
// The error on the result can be obtained as usual by invoking
return dist;
}
///////////////////////////////////////////////////////////////////////////
-Double_t AliTrack::GetDistance(AliTrack* t,Float_t scale)
+Double_t AliTrack::GetDistance(AliTrack* const t,Float_t scale)
{
// Provide distance of the current track to the track t.
// The error on the result can be obtained as usual by invoking