]>
Commit | Line | Data |
---|---|---|
1 | #include "AliHBTPair.h" | |
2 | #include "AliHBTParticle.h" | |
3 | #include <iostream.h> | |
4 | ||
5 | ClassImp(AliHBTPair) | |
6 | ||
7 | //value of rev | |
8 | /************************************************************************/ | |
9 | AliHBTPair::AliHBTPair(Bool_t rev) | |
10 | { | |
11 | //value of rev defines if it is Swaped | |
12 | //if you pass kTRUE swpaped pair will NOT be created | |
13 | //though you wont be able to get the swaped pair from this pair | |
14 | ||
15 | if(!rev) fSwapedPair = new AliHBTPair(kTRUE); //if false create swaped pair | |
16 | else fSwapedPair = 0x0; //if true set the pointer to NULL | |
17 | ||
18 | } | |
19 | /************************************************************************/ | |
20 | Double_t AliHBTPair::GetInvMass() | |
21 | { | |
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 | /************************************************************************/ | |
34 | Double_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 | /************************************************************************/ | |
46 | Double_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 | /************************************************************************/ | |
59 | Double_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 | /************************************************************************/ | |
73 | Double_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 | ||
85 | Double_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); | |
101 | fKStar = Q/2; | |
102 | fKStarNotCalc = kFALSE; | |
103 | } | |
104 | return fKStar; | |
105 | } | |
106 | /************************************************************************/ | |
107 | ||
108 | Double_t AliHBTPair::GetQInv() | |
109 | { | |
110 | if(fQInvNotCalc) | |
111 | { | |
112 | CalculateQInvL(); | |
113 | fQInv = TMath::Sqrt(TMath::Abs(fQInvL)); | |
114 | fQInvNotCalc = kFALSE; | |
115 | } | |
116 | return fQInv; | |
117 | } | |
118 | ||
119 | /************************************************************************/ | |
120 | Double_t AliHBTPair::GetQSide() | |
121 | { | |
122 | //returns Q side | |
123 | return -1; | |
124 | } | |
125 | ||
126 | Double_t AliHBTPair::GetQLong() | |
127 | { | |
128 | //returns Q long | |
129 | return -1; | |
130 | } | |
131 | ||
132 | Double_t AliHBTPair::GetQOut() | |
133 | { | |
134 | //returns Q out | |
135 | return -1; | |
136 | } | |
137 | /************************************************************************/ | |
138 | ||
139 | /************************************************************************/ | |
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 |