#include "AliHBTParticle.h"
#include "AliHBTWeights.h"
+#include "AliHBTTrackPoints.h"
ClassImp(AliHBTPair)
fQInvLNotCalc(kTRUE),
fWeight(0.0),
fWeightNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
fPxSum(0.0),
fPySum(0.0),
fPzSum(0.0),
fQInvLNotCalc(kTRUE),
fWeight(0.0),
fWeightNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
fPxSum(0.0),
fPySum(0.0),
fPzSum(0.0),
fQInvLNotCalc(kTRUE),
fWeight(0.0),
fWeightNotCalc(kTRUE),
+ fAvarageDistance(0.0),
+ fAvarageDistanceNotCalc(kTRUE),
fPxSum(0.0),
fPySum(0.0),
fPzSum(0.0),
}
/************************************************************************/
-const AliHBTPair& AliHBTPair::operator=(const AliHBTPair& in)
+AliHBTPair& AliHBTPair::operator=(const AliHBTPair& in)
{
//Assigment operator
in.Copy(*this);
return *this;
}
+/************************************************************************/
Double_t AliHBTPair::GetInvMass()
{
return fInvMass;
}
/************************************************************************/
+
Double_t AliHBTPair::GetQSideCMSLC()
{
- //return Q Side in Central Of Mass System in Longitudialy Comoving Frame
+//return Q Side in Central Of Mass System in Longitudialy Comoving Frame
if (fQSideCMSLCNotCalc)
{
return fQSideCMSLC;
}
/************************************************************************/
+
Double_t AliHBTPair::GetQOutCMSLC()
{
//caculates Qout in Center Of Mass Longitudionally Co-Moving
return fQOutCMSLC;
}
/************************************************************************/
+
Double_t AliHBTPair::GetQLongCMSLC()
{
//return Q Long in Central Of Mass System in Longitudialy Comoving Frame
return fQLongCMSLC;
}
/************************************************************************/
+
Double_t AliHBTPair::GetKt()
{
//calculates the evarage momentum of the pair
}
return fWeight;
}
+/************************************************************************/
+
+Double_t AliHBTPair::GetAvarageDistance()
+{
+//returns and buffers avarage distance between two tracks calculated
+// out of track points (see AliHBTTrackPoints class)
+
+ if (fAvarageDistanceNotCalc)
+ {
+ fAvarageDistance = AvDistance();
+ fAvarageDistanceNotCalc = kFALSE;
+ }
+ return fAvarageDistance;
+}
+/************************************************************************/
+
+Double_t AliHBTPair::AvDistance()
+{
+ //returns avarage distance between two tracks in range
+ //as defined in Track-Points of AliHBTParticle
+ //returns negative value if error uccured f.g. tracks do not have track-points
+ AliHBTTrackPoints* tpts1 = fPart1->GetTrackPoints();
+ if ( tpts1 == 0x0)
+ {//it could be simulated pair
+// Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
+ return -1.0;
+ }
+
+ AliHBTTrackPoints* tpts2 = fPart2->GetTrackPoints();
+ if ( tpts2 == 0x0)
+ {
+// Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
+ return -1.0;
+ }
+
+ return tpts1->AvarageDistance(*tpts2);
+}