//
// class implements pair of particles and taking care of caluclation (almost)
// all of pair properties (Qinv, InvMass,...)
-// more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
+// more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
//
////////////////////////////////////////////////////////////////////////////
virtual Double_t GetKt(); //returns K transverse
virtual Double_t GetKStar();
+ virtual Double_t GetKStarOut(); //z.ch.
+ virtual Double_t GetKStarSide(); //z.ch.
+ virtual Double_t GetKStarLong(); //z.ch.
+
virtual Double_t GetAvarageDistance();//returns avarage distnace between two tracks
- virtual Double_t GetDeltaP(); //return difference of momenta
+ virtual Double_t GetDeltaE(); //return difference of Energies
+ virtual Double_t GetDeltaP(); //return difference of momenta (scalar difference)
+ virtual Double_t GetDeltaPvector(); //return legth of difference vector of momenta
virtual Double_t GetDeltaPt();
virtual Double_t GetDeltaPx();
virtual Double_t GetDeltaPy();
virtual Double_t GetDeltaPhi();
virtual Double_t GetGammaToLCMS();
+ virtual Double_t GetGammaToTransverse();
virtual Double_t GetPIDProb() const {return fPart1->GetPidProb()*fPart2->GetPidProb();}
+ virtual Double_t GetRStar() ;
+ virtual Double_t GetR() ;//returns distance between particle production points
+
+ void MirrorSecond();
+ void DeleteSecond();
+
+ void Print(const Option_t* option ) const {TObject::Print(option);}
+ void Print() ;
+
protected:
AliVAODParticle* fPart1; //pointer to first particle
AliVAODParticle* fPart2; //pointer to second particle
Double_t fKStar; // KStar
Bool_t fKStarNotCalc;// flag indicating if fKStar is calculated
-
+ Double_t fKStarOut; // KStarOut z.ch.
+ Double_t fKStarSide;// KStarSide z.ch.
+ Double_t fKStarLong;// KStarLong z.ch.
+
+ Bool_t fKStarCompNotCalc; // flag indicating if CalcuteKStarComp() is calculated z.ch.
+
Double_t fPInv; //invariant momentum
Double_t fQSide; //Q Side
Double_t fESum;// Sum of energies
Bool_t fSumsNotCalc;//flag indicating if fPxSum,fPxSum,fPxSum and fESum is calculated for current pair
void CalculateSums();
+ void CalculateKStarComp();
Double_t fPxDiff;// Difference of Px momenta
Double_t fPyDiff;// Difference of Px momenta
{
//sets the particle to the pair
- fPart1 = p1;
+ fPart1 = p1;
fPart2 = p2;
if (fSwappedPair) //if we have Swapped (so we are not)
- fSwappedPair->SetParticles(p2,p1); //set particles for him too
+ fSwappedPair->SetParticles(fPart2,p1); //set particles for him too
Changed();
//and do nothing until will be asked for
}
fQtNotCalc = kTRUE;
fKtNotCalc = kTRUE;
fKStarNotCalc = kTRUE;
+ fKStarCompNotCalc = kTRUE;
fQInvLNotCalc = kTRUE;
fGammaLCMSNotCalc = kTRUE;
fAvarageDistanceNotCalc = kTRUE;
fSumsNotCalc = kFALSE;
}
}
+/****************************************************************/
+inline
+void AliAODPair::CalculateKStarComp()
+{
+
+ if (fKStarCompNotCalc)
+ {
+ CalculateSums();
+
+ Double_t ptrans = fPxSum*fPxSum + fPySum*fPySum;
+ Double_t mtrans = fESum*fESum - fPzSum*fPzSum;
+ Double_t pinv = TMath::Sqrt(mtrans - ptrans);
+ ptrans = TMath::Sqrt(ptrans);
+ mtrans = TMath::Sqrt(mtrans);
+
+ Double_t px1 = fPart1->Px();
+ Double_t py1 = fPart1->Py();
+ Double_t pz1 = fPart1->Pz();
+ Double_t pE1 = fPart1->E();
+
+ // boost to LCMS
+ Double_t beta = fPzSum / fESum;
+ Double_t gamma = fESum / mtrans;
+
+ fKStarLong = gamma * (pz1 - beta * pE1);
+ double temp = gamma * (pE1 - beta * pz1);
+
+ // rotate in transverse plane
+ fKStarSide = (-px1*fPySum + py1*fPxSum)/ptrans;
+ fKStarOut = ( px1*fPxSum + py1*fPySum)/ptrans;
+
+ // go from LCMS to CMS
+ gamma = mtrans/pinv;
+ beta = ptrans/mtrans;
+ fKStarOut = gamma * (fKStarOut - beta * temp);
+
+ fKStarCompNotCalc = kFALSE;
+ }
+}
+
/****************************************************************/
inline
void AliAODPair::CalculateDiffs()
}
/****************************************************************/
+
+inline
+Double_t AliAODPair::GetDeltaE()
+{
+ //returns difference of energies
+ return fPart1->E() - fPart2->E();
+}
+/****************************************************************/
+
+inline
+Double_t AliAODPair::GetDeltaP()
+{
+ //returns difference of momenta (scalars)
+ return fPart1->P() - fPart2->P();
+}
+/****************************************************************/
+
inline
-Double_t AliAODPair::GetDeltaP() //return difference of momenta
+Double_t AliAODPair::GetDeltaPvector() //return difference of momenta
{
- //returns difference of momenta (length of vector)
+ //returns legth of the momenta difference vector
CalculateDiffs();
return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
}