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