]>
Commit | Line | Data |
---|---|---|
0b3bd1ac | 1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoKTPairCut - a pair cut which selects pairs based on their // | |
4 | // transverse momentum kT // | |
5 | // // | |
6 | ///////////////////////////////////////////////////////////////////////////// | |
7 | /*************************************************************************** | |
8 | * | |
9 | * $Id: AliFemtoKTPairCut.cxx,v 1.1.2.2 2007/11/09 11:20:35 akisiel Exp $ | |
10 | * | |
11 | * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu | |
12 | *************************************************************************** | |
13 | * | |
14 | * Description: part of STAR HBT Framework: AliFemtoMaker package | |
15 | * a cut to remove "shared" and "split" pairs | |
16 | * | |
17 | *************************************************************************** | |
18 | * | |
19 | * | |
20 | **************************************************************************/ | |
0b3bd1ac | 21 | #include "AliFemtoKTPairCut.h" |
22 | #include <string> | |
23 | #include <cstdio> | |
fee52126 | 24 | #include <TMath.h> |
0b3bd1ac | 25 | |
26 | #ifdef __ROOT__ | |
27 | ClassImp(AliFemtoKTPairCut) | |
28 | #endif | |
29 | ||
30 | //__________________ | |
31 | AliFemtoKTPairCut::AliFemtoKTPairCut(): | |
32 | AliFemtoPairCut(), | |
33 | fKTMin(0), | |
fee52126 | 34 | fKTMax(1.0e6), |
35 | fPhiMin(0), | |
1b981959 | 36 | fPhiMax(360.0), |
37 | fPtMin(0.0), | |
38 | fPtMax(1000.0) | |
0b3bd1ac | 39 | { |
40 | fKTMin = 0; | |
41 | fKTMax = 1.0e6; | |
42 | } | |
43 | //__________________ | |
44 | AliFemtoKTPairCut::AliFemtoKTPairCut(double lo, double hi) : | |
45 | AliFemtoPairCut(), | |
46 | fKTMin(lo), | |
fee52126 | 47 | fKTMax(hi), |
48 | fPhiMin(0), | |
1b981959 | 49 | fPhiMax(360), |
50 | fPtMin(0.0), | |
51 | fPtMax(1000.0) | |
0b3bd1ac | 52 | { |
53 | } | |
54 | //__________________ | |
55 | AliFemtoKTPairCut::AliFemtoKTPairCut(const AliFemtoKTPairCut& c) : | |
56 | AliFemtoPairCut(c), | |
57 | fKTMin(0), | |
fee52126 | 58 | fKTMax(1.0e6), |
59 | fPhiMin(0), | |
1b981959 | 60 | fPhiMax(360), |
61 | fPtMin(0.0), | |
62 | fPtMax(1000.0) | |
0b3bd1ac | 63 | { |
64 | fKTMin = c.fKTMin; | |
65 | fKTMax = c.fKTMax; | |
fee52126 | 66 | fPhiMin = c.fPhiMin; |
67 | fPhiMax = c.fPhiMax; | |
1b981959 | 68 | fPtMin = c.fPtMin; |
69 | fPtMax = c.fPtMax; | |
0b3bd1ac | 70 | } |
71 | ||
72 | //__________________ | |
73 | AliFemtoKTPairCut::~AliFemtoKTPairCut(){ | |
74 | /* no-op */ | |
75 | } | |
76 | //__________________ | |
71f28971 | 77 | /*bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair){ |
0b3bd1ac | 78 | bool temp = true; |
79 | ||
80 | if (pair->KT() < fKTMin) | |
81 | temp = false; | |
82 | ||
83 | if (pair->KT() > fKTMax) | |
84 | temp = false; | |
85 | ||
86 | return temp; | |
71f28971 | 87 | }*/ |
0b3bd1ac | 88 | //__________________ |
89 | AliFemtoString AliFemtoKTPairCut::Report(){ | |
90 | // Prepare a report from the execution | |
91 | string stemp = "AliFemtoKT Pair Cut \n"; char ctemp[100]; | |
fcda1d4e | 92 | sprintf(ctemp,"Accept pair with kT in range %f , %f",fKTMin,fKTMax); |
fee52126 | 93 | sprintf(ctemp,"Accept pair with angle in range %f , %f",fPhiMin,fPhiMax); |
0b3bd1ac | 94 | stemp += ctemp; |
95 | AliFemtoString returnThis = stemp; | |
96 | return returnThis;} | |
97 | //__________________ | |
98 | ||
99 | TList *AliFemtoKTPairCut::ListSettings() | |
100 | { | |
101 | // return a list of settings in a writable form | |
102 | TList *tListSetttings = new TList(); | |
103 | char buf[200]; | |
fcda1d4e | 104 | snprintf(buf, 200, "AliFemtoKTPairCut.ktmax=%f", fKTMax); |
0b3bd1ac | 105 | tListSetttings->AddLast(new TObjString(buf)); |
fcda1d4e | 106 | snprintf(buf, 200, "AliFemtoKTPairCut.ktmin=%f", fKTMin); |
0b3bd1ac | 107 | tListSetttings->AddLast(new TObjString(buf)); |
fee52126 | 108 | snprintf(buf, 200, "AliFemtoKTPairCut.phimax=%f", fPhiMax); |
109 | tListSetttings->AddLast(new TObjString(buf)); | |
110 | snprintf(buf, 200, "AliFemtoKTPairCut.phimin=%f", fPhiMin); | |
111 | tListSetttings->AddLast(new TObjString(buf)); | |
1b981959 | 112 | snprintf(buf, 200, "AliFemtoKTPairCut.ptmin=%f", fPtMin); |
113 | tListSetttings->AddLast(new TObjString(buf)); | |
114 | snprintf(buf, 200, "AliFemtoKTPairCut.ptmax=%f", fPtMax); | |
115 | tListSetttings->AddLast(new TObjString(buf)); | |
0b3bd1ac | 116 | |
117 | return tListSetttings; | |
118 | } | |
119 | ||
120 | void AliFemtoKTPairCut::SetKTRange(double ktmin, double ktmax) | |
121 | { | |
122 | fKTMin = ktmin; | |
123 | fKTMax = ktmax; | |
124 | } | |
fee52126 | 125 | |
126 | void AliFemtoKTPairCut::SetPhiRange(double phimin, double phimax) | |
127 | { | |
128 | fPhiMin = phimin; | |
129 | fPhiMax = phimax; | |
130 | } | |
131 | ||
1b981959 | 132 | void AliFemtoKTPairCut::SetPTMin(double ptmin, double ptmax) |
133 | { | |
134 | fPtMin = ptmin; | |
135 | fPtMax = ptmax; | |
136 | } | |
137 | ||
71f28971 | 138 | //______________________________________________________ |
139 | bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair) | |
fee52126 | 140 | { |
71f28971 | 141 | bool temp = true; |
fee52126 | 142 | |
71f28971 | 143 | //Taking care of the Kt cut |
144 | if (pair->KT() < fKTMin) | |
145 | temp = false; | |
146 | ||
147 | if (pair->KT() > fKTMax) | |
148 | temp = false; | |
149 | ||
1b981959 | 150 | if (!temp) return temp; |
151 | ||
152 | if ((fPtMin > 0.0) && (fPtMax<1000.0)) { | |
153 | double px1 = pair->Track1()->Track()->P().x(); | |
154 | double py1 = pair->Track1()->Track()->P().y(); | |
155 | ||
156 | double px2 = pair->Track2()->Track()->P().x(); | |
157 | double py2 = pair->Track2()->Track()->P().y(); | |
158 | ||
159 | double pt1 = TMath::Hypot(px1, py1); | |
160 | double pt2 = TMath::Hypot(px2, py2); | |
161 | ||
162 | if ((pt1<fPtMin) || (pt1>fPtMax)) return false; | |
163 | if ((pt2<fPtMin) || (pt2>fPtMax)) return false; | |
164 | } | |
165 | ||
71f28971 | 166 | //Taking care of the Phi cut |
167 | double rpangle = (pair->GetPairAngleEP())*180/TMath::Pi(); | |
fee52126 | 168 | |
fee52126 | 169 | if (rpangle > 180.0) rpangle -= 180.0; |
170 | if (rpangle < 0.0) rpangle += 180.0; | |
171 | ||
fee52126 | 172 | if (fPhiMin < 0) { |
173 | if ((rpangle > fPhiMax) && (rpangle < 180.0+fPhiMin)) | |
174 | temp = false; | |
175 | } | |
176 | else { | |
177 | if ((rpangle < fPhiMin) || (rpangle > fPhiMax)) | |
178 | temp = false; | |
179 | } | |
71f28971 | 180 | return temp; |
181 | } | |
182 | ||
183 | //_____________________________________ | |
184 | bool AliFemtoKTPairCut::Pass(const AliFemtoPair* pair, double aRPAngle) | |
185 | { | |
186 | //The same as above, but it is defined with RP Angle as input in all the Correlatin function classes. | |
187 | ||
188 | bool temp = (aRPAngle > 0.); | |
189 | aRPAngle = true; | |
190 | ||
191 | if (!Pass(pair)) | |
192 | temp = false; | |
fee52126 | 193 | |
194 | return temp; | |
195 | } |