SetDisplayInfo added
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPair.cxx
CommitLineData
1b446896 1#include "AliHBTPair.h"
2#include "AliHBTParticle.h"
3
4ClassImp(AliHBTPair)
5
6//value of rev
7/************************************************************************/
8AliHBTPair::AliHBTPair(Bool_t rev)
9 {
10//value of rev defines if it is Swaped
11//if you pass kTRUE swpaped pair will NOT be created
12//though you wont be able to get the swaped pair from this pair
13
14 if(!rev) fSwapedPair = new AliHBTPair(kTRUE); //if false create swaped pair
15 else fSwapedPair = 0x0; //if true set the pointer to NULL
16
17 }
18/************************************************************************/
19Double_t AliHBTPair::GetInvMass()
20{
b928db6c 21//Returns qinv value for a pair
1b446896 22 if(fInvMassNotCalc)
23 {
24 CalculateInvMassSqr(); //method is inline so we not waste th time for jumping into method
25
26 if(fInvMassSqr<0) fInvMass = TMath::Sqrt(-fInvMassSqr);
27 else fInvMass = TMath::Sqrt(fInvMassSqr);
28
29 fInvMassNotCalc = kFALSE;
30 }
31 return fInvMass;
32}
33/************************************************************************/
34Double_t AliHBTPair::GetQSideCMSLC()
35{
36 //return Q Side in Central Of Mass System in Longitudialy Comoving Frame
37
38 if (fQSideCMSLCNotCalc)
39 {
40 fQSideCMSLC = (fPart1->Px()*fPart2->Py()-fPart2->Px()*fPart1->Py())/GetKt();
41 fQSideCMSLCNotCalc = kFALSE;
42 }
43 return fQSideCMSLC;
44}
45/************************************************************************/
46Double_t AliHBTPair::GetQOutCMSLC()
47{
48 if(fQOutCMSLCNotCalc)
49 {
50 CalculateSums();
51 CalculateDiffs();
52 Double_t k2 = fPxSum*fPxDiff+fPySum*fPyDiff;
53 fQOutCMSLC = 0.5*k2/GetKt();
54 fQOutCMSLCNotCalc = kFALSE;
55 }
56 return fQOutCMSLC;
57}
58/************************************************************************/
59Double_t AliHBTPair::GetQLongCMSLC()
60{
61 if (fQLongCMSLCNotCalc)
62 {
63 CalculateSums();
64 CalculateDiffs();
65 Double_t beta = fPzSum/fESum;
66 Double_t gamma = 1.0/TMath::Sqrt(1.0 - beta*beta);
67 fQLongCMSLC = gamma*( fPzDiff - beta*fEDiff );
68 fQLongCMSLCNotCalc = kFALSE;
69 }
70 return fQLongCMSLC;
71}
72/************************************************************************/
73Double_t AliHBTPair::GetKt()
74{
75 if(fKtNotCalc)
76 {
77 CalculateSums();
78 fKt = 0.5*TMath::Hypot(fPxSum,fPySum);
79 fKtNotCalc = kFALSE;
80 }
81 return fKt;
82}
83/************************************************************************/
84
85Double_t AliHBTPair::GetKStar()
86{
87 if (fKStarNotCalc)
88 {
89
90 CalculateSums();
91
92 Double_t Ptrans = fPxSum*fPxSum + fPySum*fPySum;
93 Double_t Mtrans = fESum*fESum - fPzSum*fPzSum;
94 Double_t Pinv = TMath::Sqrt(Mtrans - Ptrans);
95
96 Double_t Q = ( fPart1->GetMass()*fPart1->GetMass() - fPart2->GetMass()*fPart2->GetMass())/Pinv;
97
98 CalculateQInvL();
99
100 Q = TMath::Sqrt( Q*Q - fQInvL);
7836ee94 101 fKStar = Q/2.;
1b446896 102 fKStarNotCalc = kFALSE;
103 }
104 return fKStar;
105}
106/************************************************************************/
107
108Double_t AliHBTPair::GetQInv()
109{
110 if(fQInvNotCalc)
111 {
112 CalculateQInvL();
30025bb4 113 fQInv = TMath::Sqrt(TMath::Abs(fQInvL));
1b446896 114 fQInvNotCalc = kFALSE;
115 }
1b446896 116 return fQInv;
117}
118
30025bb4 119/************************************************************************/
30025bb4 120/************************************************************************/
121
122/************************************************************************/
1b446896 123
124
125
126
127
128
129