Scaling to tail implemented
[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{
21 if(fInvMassNotCalc)
22 {
23 CalculateInvMassSqr(); //method is inline so we not waste th time for jumping into method
24
25 if(fInvMassSqr<0) fInvMass = TMath::Sqrt(-fInvMassSqr);
26 else fInvMass = TMath::Sqrt(fInvMassSqr);
27
28 fInvMassNotCalc = kFALSE;
29 }
30 return fInvMass;
31}
32/************************************************************************/
33Double_t AliHBTPair::GetQSideCMSLC()
34{
35 //return Q Side in Central Of Mass System in Longitudialy Comoving Frame
36
37 if (fQSideCMSLCNotCalc)
38 {
39 fQSideCMSLC = (fPart1->Px()*fPart2->Py()-fPart2->Px()*fPart1->Py())/GetKt();
40 fQSideCMSLCNotCalc = kFALSE;
41 }
42 return fQSideCMSLC;
43}
44/************************************************************************/
45Double_t AliHBTPair::GetQOutCMSLC()
46{
47 if(fQOutCMSLCNotCalc)
48 {
49 CalculateSums();
50 CalculateDiffs();
51 Double_t k2 = fPxSum*fPxDiff+fPySum*fPyDiff;
52 fQOutCMSLC = 0.5*k2/GetKt();
53 fQOutCMSLCNotCalc = kFALSE;
54 }
55 return fQOutCMSLC;
56}
57/************************************************************************/
58Double_t AliHBTPair::GetQLongCMSLC()
59{
60 if (fQLongCMSLCNotCalc)
61 {
62 CalculateSums();
63 CalculateDiffs();
64 Double_t beta = fPzSum/fESum;
65 Double_t gamma = 1.0/TMath::Sqrt(1.0 - beta*beta);
66 fQLongCMSLC = gamma*( fPzDiff - beta*fEDiff );
67 fQLongCMSLCNotCalc = kFALSE;
68 }
69 return fQLongCMSLC;
70}
71/************************************************************************/
72Double_t AliHBTPair::GetKt()
73{
74 if(fKtNotCalc)
75 {
76 CalculateSums();
77 fKt = 0.5*TMath::Hypot(fPxSum,fPySum);
78 fKtNotCalc = kFALSE;
79 }
80 return fKt;
81}
82/************************************************************************/
83
84Double_t AliHBTPair::GetKStar()
85{
86 if (fKStarNotCalc)
87 {
88
89 CalculateSums();
90
91 Double_t Ptrans = fPxSum*fPxSum + fPySum*fPySum;
92 Double_t Mtrans = fESum*fESum - fPzSum*fPzSum;
93 Double_t Pinv = TMath::Sqrt(Mtrans - Ptrans);
94
95 Double_t Q = ( fPart1->GetMass()*fPart1->GetMass() - fPart2->GetMass()*fPart2->GetMass())/Pinv;
96
97 CalculateQInvL();
98
99 Q = TMath::Sqrt( Q*Q - fQInvL);
100 fKStar = Q/2;
101 fKStarNotCalc = kFALSE;
102 }
103 return fKStar;
104}
105/************************************************************************/
106
107Double_t AliHBTPair::GetQInv()
108{
109 if(fQInvNotCalc)
110 {
111 CalculateQInvL();
112
113 if (fQInvL < 0.) fQInv = TMath::Sqrt(-fQInvL);
114 else fQInv = -TMath::Sqrt( fQInvL);
115
116 fQInvNotCalc = kFALSE;
117 }
118
119 return fQInv;
120}
121
122
123
124
125
126
127
128