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