missing commits
[u/mrichter/AliRoot.git] / EVGEN / AliGeVSimParticle.cxx
... / ...
CommitLineData
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//////////////////////////////////////////////////////////////////////////////
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//
24//////////////////////////////////////////////////////////////////////////////
25//
26// For examples, parameters and testing macros refer to:
27// http:/home.cern.ch/radomski
28//
29// for more detailed description refer to ALICE NOTE
30// "GeVSim Monte-Carlo Event Generator"
31// S.Radosmki, P. Foka.
32//
33// Author:
34// Sylwester Radomski,
35// GSI, March 2002
36//
37// S.Radomski@gsi.de
38//
39////////////////////////////////////////////////////////////////////////////////
40//
41// Updated and revised: September 2002, S. Radomski, GSI
42//
43////////////////////////////////////////////////////////////////////////////////
44
45
46#include "TMath.h"
47#include "AliGeVSimParticle.h"
48
49ClassImp(AliGeVSimParticle)
50
51
52////////////////////////////////////////////////////////////////////////////////////////////////////
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}
68
69AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity,
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{
83 //
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)
90 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
91 fV2[0] = fV2[1] = fV2[2] = 0.;
92}
93
94////////////////////////////////////////////////////////////////////////////////////////////////////
95
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 {
109 //
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
114 //
115 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
116 fV2[0] = fV2[1] = fV2[2] = 0.;
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
184Bool_t AliGeVSimParticle::IsFlowSimple() const
185{
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);
194}
195
196////////////////////////////////////////////////////////////////////////////////////////////////////
197
198void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
199 //
200 // Set parameters for Directed Flow
201 // Actual flow coefficient is calculated as follows
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 //
211
212 fV1[0] = v11;
213 fV1[1] = v12;
214 fV1[2] = v13;
215 fV1[3] = v14;
216
217 fIsDirectedSimple = kFALSE;
218}
219
220////////////////////////////////////////////////////////////////////////////////////////////////////
221
222void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) {
223 //
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
233 //
234 // Default values:
235 // v22 = 0
236 //
237 // The parametrisation is suitable for relativistic particles
238 // eg. Pions (at RHIC energies)
239 //
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
262 fV2[0] = v21;
263 fV2[1] = v22;
264 fV2[2] = v23;
265
266 fIsEllipticSimple = kFALSE;
267 fIsEllipticOld = kTRUE;
268}
269
270////////////////////////////////////////////////////////////////////////////////////////////////////
271
272Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) {
273 //
274 // Return coefficient of a directed flow for a given pt and y.
275 // For coefficient calculation method refer to SetDirectedParam()
276 //
277
278 if (fIsDirectedSimple) return fV1[0];
279
280 Float_t v;
281
282 v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
283 (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
284
285 return v;
286}
287
288////////////////////////////////////////////////////////////////////////////////////////////////////
289
290Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) {
291 //
292 // Return coefficient of a elliptic flow for a given pt and y.
293 // For coefficient calculation method refer to SetEllipticParam()
294 //
295
296 if (fIsEllipticSimple) return fV2[0];
297
298 if (fIsEllipticOld) {
299
300 // old parametrisation
301 return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y);
302
303 } else {
304
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 }
309}
310
311////////////////////////////////////////////////////////////////////////////////////////////////////
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326