]>
Commit | Line | Data |
---|---|---|
ac3faee4 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | ////////////////////////////////////////////////////////////////////////////// | |
4966b266 | 19 | // |
20 | // AliGeVSimParticle is a helper class for GeVSim (AliGenGeVSim) event generator. | |
21 | // An object of this class represents one particle type and contain | |
22 | // information about particle type thermal parameters. | |
23 | // | |
ac3faee4 | 24 | ////////////////////////////////////////////////////////////////////////////// |
7e4131fc | 25 | // |
4966b266 | 26 | // For examples, parameters and testing macros refer to: |
27 | // http:/home.cern.ch/radomski | |
7e4131fc | 28 | // |
29 | // for more detailed description refer to ALICE NOTE | |
30 | // "GeVSim Monte-Carlo Event Generator" | |
31 | // S.Radosmki, P. Foka. | |
32 | // | |
4966b266 | 33 | // Author: |
34 | // Sylwester Radomski, | |
35 | // GSI, March 2002 | |
7e4131fc | 36 | // |
4966b266 | 37 | // S.Radomski@gsi.de |
38 | // | |
7e4131fc | 39 | //////////////////////////////////////////////////////////////////////////////// |
40 | // | |
41 | // Updated and revised: September 2002, S. Radomski, GSI | |
42 | // | |
43 | //////////////////////////////////////////////////////////////////////////////// | |
44 | ||
4966b266 | 45 | |
46 | #include "TMath.h" | |
7816887f | 47 | #include "AliGeVSimParticle.h" |
48 | ||
925e6570 | 49 | ClassImp(AliGeVSimParticle) |
7816887f | 50 | |
1c56e311 | 51 | |
4966b266 | 52 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
1c56e311 | 53 | AliGeVSimParticle::AliGeVSimParticle(): |
54 | fPDG(0), | |
55 | fModel(0), | |
56 | fN(0), | |
57 | fMultTotal(kTRUE), | |
58 | fIsSetMult(kFALSE), | |
59 | fT(0.), | |
60 | fSigmaY(0.), | |
61 | fExpansion(0.), | |
62 | fIsDirectedSimple(kTRUE), | |
63 | fIsEllipticSimple(kTRUE), | |
64 | fIsEllipticOld(kFALSE) | |
65 | { | |
66 | // Default constructor | |
08bffa4d | 67 | for (Int_t i = 0; i < 4; i++) fV1[i] = 0.; |
68 | for (Int_t i = 0; i < 3; i++) fV2[i] = 0.; | |
1c56e311 | 69 | } |
7816887f | 70 | |
7e4131fc | 71 | AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity, |
1c56e311 | 72 | Float_t T, Float_t dY, Float_t exp): |
73 | fPDG(pdg), | |
74 | fModel(model), | |
75 | fN(multiplicity), | |
76 | fMultTotal(kTRUE), | |
77 | fIsSetMult(kFALSE), | |
78 | fT(T), | |
79 | fSigmaY(dY), | |
80 | fExpansion(exp), | |
81 | fIsDirectedSimple(kTRUE), | |
82 | fIsEllipticSimple(kTRUE), | |
83 | fIsEllipticOld(kFALSE) | |
84 | { | |
4966b266 | 85 | // |
7e4131fc | 86 | // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov) |
87 | // model - momentum distribution model (1 - 7) | |
88 | // multiplicity - multiplicity of particle type | |
89 | // T - Inverse slope parameter ("temperature") | |
90 | // dY - Raridity Width (only for model 1) | |
91 | // exp - expansion velocity (only for model 4) | |
4966b266 | 92 | fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.; |
93 | fV2[0] = fV2[1] = fV2[2] = 0.; | |
7816887f | 94 | } |
95 | ||
4966b266 | 96 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
7816887f | 97 | |
1c56e311 | 98 | AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity): |
99 | fPDG(pdg), | |
100 | fModel(model), | |
101 | fN(multiplicity), | |
102 | fMultTotal(kTRUE), | |
103 | fIsSetMult(kFALSE), | |
104 | fT(0.), | |
105 | fSigmaY(0.), | |
106 | fExpansion(0.), | |
107 | fIsDirectedSimple(kTRUE), | |
108 | fIsEllipticSimple(kTRUE), | |
109 | fIsEllipticOld(kFALSE) | |
110 | { | |
4966b266 | 111 | // |
7e4131fc | 112 | // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov) |
113 | // | |
114 | // Note that multiplicity can be interpreted by GeVSim | |
115 | // either as Total multiplicity in the acceptance or dN/dY | |
4966b266 | 116 | // |
4966b266 | 117 | fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.; |
118 | fV2[0] = fV2[1] = fV2[2] = 0.; | |
7e4131fc | 119 | } |
120 | ||
121 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
122 | ||
123 | void AliGeVSimParticle::SetModel(Int_t model) { | |
124 | // | |
125 | // Set Model (1-7) | |
126 | // For details about standard and custom models refer to ALICE NOTE | |
127 | // | |
128 | ||
129 | if (model < 1 || model > 7) | |
130 | Error("SetModel","Model Id ( %d ) out of range [1..7]", model); | |
131 | ||
132 | fModel = model; | |
133 | } | |
134 | ||
135 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
136 | ||
137 | void AliGeVSimParticle::SetMultiplicity(Float_t mult) { | |
138 | // | |
139 | // Set multiplicity. The value is interpreted either as a total multiplciity | |
140 | // in the acceptance or as a multiplicity density - dN/dY at midrapidity | |
141 | // | |
142 | ||
143 | fN = mult; | |
144 | } | |
145 | ||
146 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
147 | ||
148 | void AliGeVSimParticle::SetMultTotal(Bool_t isTotal) { | |
149 | // | |
150 | // Switch between total multiplicity (kTRUE) and | |
151 | // multiplciity density (kFALSE) | |
152 | // | |
153 | // If this method is used its overrides mode in AliGenGeVSim | |
154 | // | |
155 | ||
156 | fMultTotal = isTotal; | |
157 | fIsSetMult = kTRUE; | |
158 | } | |
159 | ||
160 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
161 | ||
162 | void AliGeVSimParticle::SetDirectedSimple(Float_t v1) { | |
163 | // | |
164 | // Set directed flow coefficient to a value independent | |
165 | // of transverse momentum and rapidity | |
166 | // | |
167 | ||
168 | fV1[0] = v1; | |
169 | fIsDirectedSimple = kTRUE; | |
170 | } | |
171 | ||
172 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
173 | ||
174 | void AliGeVSimParticle::SetEllipticSimple(Float_t v2) { | |
175 | // | |
176 | // Set elliptic flow coefficient to a value independent | |
177 | // of transverse momentum and rapidity | |
178 | // | |
179 | ||
180 | fV2[0] = v2; | |
181 | fIsEllipticSimple = kTRUE; | |
182 | } | |
183 | ||
184 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
185 | ||
ac3faee4 | 186 | Bool_t AliGeVSimParticle::IsFlowSimple() const |
187 | { | |
7e4131fc | 188 | // |
189 | // Function used by AliGenGeVSim | |
190 | // | |
191 | // Returns true if both Elliptic and Directed flow has a simple model. | |
192 | // If at least one is parametrised returns false. | |
193 | // | |
194 | ||
195 | return (fIsDirectedSimple && fIsEllipticSimple); | |
7816887f | 196 | } |
197 | ||
4966b266 | 198 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
199 | ||
7e4131fc | 200 | void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) { |
4966b266 | 201 | // |
7e4131fc | 202 | // Set parameters for Directed Flow |
203 | // Actual flow coefficient is calculated as follows | |
4966b266 | 204 | // |
205 | // V1(Pt,Y) = (V11 + V12*Pt) * sign(Y) * (V13 + V14 * Y^3) | |
206 | // | |
207 | // where sign = 1 for Y > 0 and -1 for Y < 0 | |
208 | // | |
209 | // Defaults values | |
210 | // v12 = v14 = 0 | |
211 | // v13 = 1 | |
212 | // | |
4966b266 | 213 | |
214 | fV1[0] = v11; | |
215 | fV1[1] = v12; | |
216 | fV1[2] = v13; | |
217 | fV1[3] = v14; | |
7e4131fc | 218 | |
219 | fIsDirectedSimple = kFALSE; | |
4966b266 | 220 | } |
7816887f | 221 | |
4966b266 | 222 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
223 | ||
7e4131fc | 224 | void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) { |
4966b266 | 225 | // |
7e4131fc | 226 | // Set parameters for Elliptic Flow |
227 | // Actual flow coefficient is calculated as follows | |
228 | // | |
229 | // pTmax is in GeV | |
230 | // v21 - flow value at saturation | |
231 | // | |
232 | // | |
233 | // V2 = v21 * (pT/pTMax ) * exp (-v22 * y^2) where pT <= pTmax | |
234 | // v21 * exp (-v22 * y^2) where pT > pTmax | |
4966b266 | 235 | // |
4966b266 | 236 | // Default values: |
7e4131fc | 237 | // v22 = 0 |
4966b266 | 238 | // |
7e4131fc | 239 | // The parametrisation is suitable for relativistic particles |
240 | // eg. Pions (at RHIC energies) | |
4966b266 | 241 | // |
7e4131fc | 242 | |
243 | ||
244 | fV2[0] = v21; | |
245 | fV2[1] = pTmax; | |
246 | fV2[2] = v22; | |
247 | ||
248 | fIsEllipticSimple = kFALSE; | |
249 | fIsEllipticOld = kFALSE; | |
250 | } | |
251 | ||
252 | //////////////////////////////////////////////////////////////////////////////////////////////////// | |
253 | ||
254 | void AliGeVSimParticle::SetEllipticOld(Float_t v21, Float_t v22, Float_t v23) { | |
255 | // | |
256 | // Set parameters for Elliptic Flow | |
257 | // Actual flow coefficient is calculated as follows | |
258 | // | |
259 | // V2 = (V21 + V22 pT^2) * exp (-v22 * y^2) | |
260 | // | |
261 | // The parameterisation is suitable for heavy particles: proton, kaon | |
262 | // | |
263 | ||
4966b266 | 264 | fV2[0] = v21; |
265 | fV2[1] = v22; | |
266 | fV2[2] = v23; | |
7e4131fc | 267 | |
268 | fIsEllipticSimple = kFALSE; | |
269 | fIsEllipticOld = kTRUE; | |
4966b266 | 270 | } |
7816887f | 271 | |
4966b266 | 272 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
7816887f | 273 | |
4966b266 | 274 | Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) { |
275 | // | |
276 | // Return coefficient of a directed flow for a given pt and y. | |
7e4131fc | 277 | // For coefficient calculation method refer to SetDirectedParam() |
4966b266 | 278 | // |
279 | ||
7e4131fc | 280 | if (fIsDirectedSimple) return fV1[0]; |
281 | ||
4966b266 | 282 | Float_t v; |
283 | ||
635be086 | 284 | v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) * |
4966b266 | 285 | (fV1[2] + fV1[3] * TMath::Abs(y*y*y) ); |
7816887f | 286 | |
4966b266 | 287 | return v; |
288 | } | |
7816887f | 289 | |
4966b266 | 290 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
7816887f | 291 | |
4966b266 | 292 | Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) { |
293 | // | |
294 | // Return coefficient of a elliptic flow for a given pt and y. | |
7e4131fc | 295 | // For coefficient calculation method refer to SetEllipticParam() |
4966b266 | 296 | // |
7e4131fc | 297 | |
298 | if (fIsEllipticSimple) return fV2[0]; | |
299 | ||
300 | if (fIsEllipticOld) { | |
4966b266 | 301 | |
7e4131fc | 302 | // old parametrisation |
303 | return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y); | |
7816887f | 304 | |
7e4131fc | 305 | } else { |
7816887f | 306 | |
7e4131fc | 307 | // new "pionic" parameterisation |
308 | if (pt < fV2[1]) return ( (pt / fV2[1]) * fV2[0] * TMath::Exp(-fV2[2]*y*y) ); | |
309 | else return ( fV2[0] * TMath::Exp(-fV2[2]*y*y) ); | |
310 | } | |
4966b266 | 311 | } |
7816887f | 312 | |
4966b266 | 313 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
7816887f | 314 | |
315 | ||
316 | ||
317 | ||
318 | ||
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | ||
326 | ||
327 | ||
328 |