]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGeVSimParticle.cxx
AliFastGlauber is a singleton.
[u/mrichter/AliRoot.git] / EVGEN / AliGeVSimParticle.cxx
CommitLineData
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 49ClassImp(AliGeVSimParticle)
7816887f 50
1c56e311 51
4966b266 52////////////////////////////////////////////////////////////////////////////////////////////////////
1c56e311 53AliGeVSimParticle::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
67}
7816887f 68
7e4131fc 69AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity,
1c56e311 70 Float_t T, Float_t dY, Float_t exp):
71 fPDG(pdg),
72 fModel(model),
73 fN(multiplicity),
74 fMultTotal(kTRUE),
75 fIsSetMult(kFALSE),
76 fT(T),
77 fSigmaY(dY),
78 fExpansion(exp),
79 fIsDirectedSimple(kTRUE),
80 fIsEllipticSimple(kTRUE),
81 fIsEllipticOld(kFALSE)
82{
4966b266 83 //
7e4131fc 84 // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
85 // model - momentum distribution model (1 - 7)
86 // multiplicity - multiplicity of particle type
87 // T - Inverse slope parameter ("temperature")
88 // dY - Raridity Width (only for model 1)
89 // exp - expansion velocity (only for model 4)
4966b266 90 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
91 fV2[0] = fV2[1] = fV2[2] = 0.;
7816887f 92}
93
4966b266 94////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 95
1c56e311 96AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity):
97 fPDG(pdg),
98 fModel(model),
99 fN(multiplicity),
100 fMultTotal(kTRUE),
101 fIsSetMult(kFALSE),
102 fT(0.),
103 fSigmaY(0.),
104 fExpansion(0.),
105 fIsDirectedSimple(kTRUE),
106 fIsEllipticSimple(kTRUE),
107 fIsEllipticOld(kFALSE)
108 {
4966b266 109 //
7e4131fc 110 // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
111 //
112 // Note that multiplicity can be interpreted by GeVSim
113 // either as Total multiplicity in the acceptance or dN/dY
4966b266 114 //
4966b266 115 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
116 fV2[0] = fV2[1] = fV2[2] = 0.;
7e4131fc 117}
118
119////////////////////////////////////////////////////////////////////////////////////////////////////
120
121void AliGeVSimParticle::SetModel(Int_t model) {
122 //
123 // Set Model (1-7)
124 // For details about standard and custom models refer to ALICE NOTE
125 //
126
127 if (model < 1 || model > 7)
128 Error("SetModel","Model Id ( %d ) out of range [1..7]", model);
129
130 fModel = model;
131}
132
133////////////////////////////////////////////////////////////////////////////////////////////////////
134
135void AliGeVSimParticle::SetMultiplicity(Float_t mult) {
136 //
137 // Set multiplicity. The value is interpreted either as a total multiplciity
138 // in the acceptance or as a multiplicity density - dN/dY at midrapidity
139 //
140
141 fN = mult;
142}
143
144////////////////////////////////////////////////////////////////////////////////////////////////////
145
146void AliGeVSimParticle::SetMultTotal(Bool_t isTotal) {
147 //
148 // Switch between total multiplicity (kTRUE) and
149 // multiplciity density (kFALSE)
150 //
151 // If this method is used its overrides mode in AliGenGeVSim
152 //
153
154 fMultTotal = isTotal;
155 fIsSetMult = kTRUE;
156}
157
158////////////////////////////////////////////////////////////////////////////////////////////////////
159
160void AliGeVSimParticle::SetDirectedSimple(Float_t v1) {
161 //
162 // Set directed flow coefficient to a value independent
163 // of transverse momentum and rapidity
164 //
165
166 fV1[0] = v1;
167 fIsDirectedSimple = kTRUE;
168}
169
170////////////////////////////////////////////////////////////////////////////////////////////////////
171
172void AliGeVSimParticle::SetEllipticSimple(Float_t v2) {
173 //
174 // Set elliptic flow coefficient to a value independent
175 // of transverse momentum and rapidity
176 //
177
178 fV2[0] = v2;
179 fIsEllipticSimple = kTRUE;
180}
181
182////////////////////////////////////////////////////////////////////////////////////////////////////
183
ac3faee4 184Bool_t AliGeVSimParticle::IsFlowSimple() const
185{
7e4131fc 186 //
187 // Function used by AliGenGeVSim
188 //
189 // Returns true if both Elliptic and Directed flow has a simple model.
190 // If at least one is parametrised returns false.
191 //
192
193 return (fIsDirectedSimple && fIsEllipticSimple);
7816887f 194}
195
4966b266 196////////////////////////////////////////////////////////////////////////////////////////////////////
197
7e4131fc 198void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
4966b266 199 //
7e4131fc 200 // Set parameters for Directed Flow
201 // Actual flow coefficient is calculated as follows
4966b266 202 //
203 // V1(Pt,Y) = (V11 + V12*Pt) * sign(Y) * (V13 + V14 * Y^3)
204 //
205 // where sign = 1 for Y > 0 and -1 for Y < 0
206 //
207 // Defaults values
208 // v12 = v14 = 0
209 // v13 = 1
210 //
4966b266 211
212 fV1[0] = v11;
213 fV1[1] = v12;
214 fV1[2] = v13;
215 fV1[3] = v14;
7e4131fc 216
217 fIsDirectedSimple = kFALSE;
4966b266 218}
7816887f 219
4966b266 220////////////////////////////////////////////////////////////////////////////////////////////////////
221
7e4131fc 222void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) {
4966b266 223 //
7e4131fc 224 // Set parameters for Elliptic Flow
225 // Actual flow coefficient is calculated as follows
226 //
227 // pTmax is in GeV
228 // v21 - flow value at saturation
229 //
230 //
231 // V2 = v21 * (pT/pTMax ) * exp (-v22 * y^2) where pT <= pTmax
232 // v21 * exp (-v22 * y^2) where pT > pTmax
4966b266 233 //
4966b266 234 // Default values:
7e4131fc 235 // v22 = 0
4966b266 236 //
7e4131fc 237 // The parametrisation is suitable for relativistic particles
238 // eg. Pions (at RHIC energies)
4966b266 239 //
7e4131fc 240
241
242 fV2[0] = v21;
243 fV2[1] = pTmax;
244 fV2[2] = v22;
245
246 fIsEllipticSimple = kFALSE;
247 fIsEllipticOld = kFALSE;
248}
249
250////////////////////////////////////////////////////////////////////////////////////////////////////
251
252void AliGeVSimParticle::SetEllipticOld(Float_t v21, Float_t v22, Float_t v23) {
253 //
254 // Set parameters for Elliptic Flow
255 // Actual flow coefficient is calculated as follows
256 //
257 // V2 = (V21 + V22 pT^2) * exp (-v22 * y^2)
258 //
259 // The parameterisation is suitable for heavy particles: proton, kaon
260 //
261
4966b266 262 fV2[0] = v21;
263 fV2[1] = v22;
264 fV2[2] = v23;
7e4131fc 265
266 fIsEllipticSimple = kFALSE;
267 fIsEllipticOld = kTRUE;
4966b266 268}
7816887f 269
4966b266 270////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 271
4966b266 272Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) {
273 //
274 // Return coefficient of a directed flow for a given pt and y.
7e4131fc 275 // For coefficient calculation method refer to SetDirectedParam()
4966b266 276 //
277
7e4131fc 278 if (fIsDirectedSimple) return fV1[0];
279
4966b266 280 Float_t v;
281
635be086 282 v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
4966b266 283 (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
7816887f 284
4966b266 285 return v;
286}
7816887f 287
4966b266 288////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 289
4966b266 290Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) {
291 //
292 // Return coefficient of a elliptic flow for a given pt and y.
7e4131fc 293 // For coefficient calculation method refer to SetEllipticParam()
4966b266 294 //
7e4131fc 295
296 if (fIsEllipticSimple) return fV2[0];
297
298 if (fIsEllipticOld) {
4966b266 299
7e4131fc 300 // old parametrisation
301 return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y);
7816887f 302
7e4131fc 303 } else {
7816887f 304
7e4131fc 305 // new "pionic" parameterisation
306 if (pt < fV2[1]) return ( (pt / fV2[1]) * fV2[0] * TMath::Exp(-fV2[2]*y*y) );
307 else return ( fV2[0] * TMath::Exp(-fV2[2]*y*y) );
308 }
4966b266 309}
7816887f 310
4966b266 311////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 312
313
314
315
316
317
318
319
320
321
322
323
324
325
326