Line data Source code
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 :
49 6 : ClassImp(AliGeVSimParticle)
50 :
51 :
52 : ////////////////////////////////////////////////////////////////////////////////////////////////////
53 0 : AliGeVSimParticle::AliGeVSimParticle():
54 0 : fPDG(0),
55 0 : fModel(0),
56 0 : fN(0),
57 0 : fMultTotal(kTRUE),
58 0 : fIsSetMult(kFALSE),
59 0 : fT(0.),
60 0 : fSigmaY(0.),
61 0 : fExpansion(0.),
62 0 : fIsDirectedSimple(kTRUE),
63 0 : fIsEllipticSimple(kTRUE),
64 0 : fIsEllipticOld(kFALSE)
65 0 : {
66 : // Default constructor
67 0 : for (Int_t i = 0; i < 4; i++) fV1[i] = 0.;
68 0 : for (Int_t i = 0; i < 3; i++) fV2[i] = 0.;
69 0 : }
70 :
71 0 : AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity,
72 : Float_t T, Float_t dY, Float_t exp):
73 0 : fPDG(pdg),
74 0 : fModel(model),
75 0 : fN(multiplicity),
76 0 : fMultTotal(kTRUE),
77 0 : fIsSetMult(kFALSE),
78 0 : fT(T),
79 0 : fSigmaY(dY),
80 0 : fExpansion(exp),
81 0 : fIsDirectedSimple(kTRUE),
82 0 : fIsEllipticSimple(kTRUE),
83 0 : fIsEllipticOld(kFALSE)
84 0 : {
85 : //
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)
92 0 : fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
93 0 : fV2[0] = fV2[1] = fV2[2] = 0.;
94 0 : }
95 :
96 : ////////////////////////////////////////////////////////////////////////////////////////////////////
97 :
98 0 : AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity):
99 0 : fPDG(pdg),
100 0 : fModel(model),
101 0 : fN(multiplicity),
102 0 : fMultTotal(kTRUE),
103 0 : fIsSetMult(kFALSE),
104 0 : fT(0.),
105 0 : fSigmaY(0.),
106 0 : fExpansion(0.),
107 0 : fIsDirectedSimple(kTRUE),
108 0 : fIsEllipticSimple(kTRUE),
109 0 : fIsEllipticOld(kFALSE)
110 0 : {
111 : //
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
116 : //
117 0 : fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
118 0 : fV2[0] = fV2[1] = fV2[2] = 0.;
119 0 : }
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 0 : if (model < 1 || model > 7)
130 0 : Error("SetModel","Model Id ( %d ) out of range [1..7]", model);
131 :
132 0 : fModel = model;
133 0 : }
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 0 : fN = mult;
144 0 : }
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 0 : fMultTotal = isTotal;
157 0 : fIsSetMult = kTRUE;
158 0 : }
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 0 : fV1[0] = v1;
169 0 : fIsDirectedSimple = kTRUE;
170 0 : }
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 0 : fV2[0] = v2;
181 0 : fIsEllipticSimple = kTRUE;
182 0 : }
183 :
184 : ////////////////////////////////////////////////////////////////////////////////////////////////////
185 :
186 : Bool_t AliGeVSimParticle::IsFlowSimple() const
187 : {
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 0 : return (fIsDirectedSimple && fIsEllipticSimple);
196 : }
197 :
198 : ////////////////////////////////////////////////////////////////////////////////////////////////////
199 :
200 : void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
201 : //
202 : // Set parameters for Directed Flow
203 : // Actual flow coefficient is calculated as follows
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 : //
213 :
214 0 : fV1[0] = v11;
215 0 : fV1[1] = v12;
216 0 : fV1[2] = v13;
217 0 : fV1[3] = v14;
218 :
219 0 : fIsDirectedSimple = kFALSE;
220 0 : }
221 :
222 : ////////////////////////////////////////////////////////////////////////////////////////////////////
223 :
224 : void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) {
225 : //
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
235 : //
236 : // Default values:
237 : // v22 = 0
238 : //
239 : // The parametrisation is suitable for relativistic particles
240 : // eg. Pions (at RHIC energies)
241 : //
242 :
243 :
244 0 : fV2[0] = v21;
245 0 : fV2[1] = pTmax;
246 0 : fV2[2] = v22;
247 :
248 0 : fIsEllipticSimple = kFALSE;
249 0 : fIsEllipticOld = kFALSE;
250 0 : }
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 :
264 0 : fV2[0] = v21;
265 0 : fV2[1] = v22;
266 0 : fV2[2] = v23;
267 :
268 0 : fIsEllipticSimple = kFALSE;
269 0 : fIsEllipticOld = kTRUE;
270 0 : }
271 :
272 : ////////////////////////////////////////////////////////////////////////////////////////////////////
273 :
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.
277 : // For coefficient calculation method refer to SetDirectedParam()
278 : //
279 :
280 0 : if (fIsDirectedSimple) return fV1[0];
281 :
282 : Float_t v;
283 :
284 0 : v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
285 0 : (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
286 :
287 : return v;
288 0 : }
289 :
290 : ////////////////////////////////////////////////////////////////////////////////////////////////////
291 :
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.
295 : // For coefficient calculation method refer to SetEllipticParam()
296 : //
297 :
298 0 : if (fIsEllipticSimple) return fV2[0];
299 :
300 0 : if (fIsEllipticOld) {
301 :
302 : // old parametrisation
303 0 : return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y);
304 :
305 : } else {
306 :
307 : // new "pionic" parameterisation
308 0 : if (pt < fV2[1]) return ( (pt / fV2[1]) * fV2[0] * TMath::Exp(-fV2[2]*y*y) );
309 0 : else return ( fV2[0] * TMath::Exp(-fV2[2]*y*y) );
310 : }
311 0 : }
312 :
313 : ////////////////////////////////////////////////////////////////////////////////////////////////////
314 :
315 :
316 :
317 :
318 :
319 :
320 :
321 :
322 :
323 :
324 :
325 :
326 :
327 :
328 :
|