1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //////////////////////////////////////////////////////////////////////////////
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.
24 //////////////////////////////////////////////////////////////////////////////
26 // For examples, parameters and testing macros refer to:
27 // http:/home.cern.ch/radomski
29 // for more detailed description refer to ALICE NOTE
30 // "GeVSim Monte-Carlo Event Generator"
31 // S.Radosmki, P. Foka.
34 // Sylwester Radomski,
39 ////////////////////////////////////////////////////////////////////////////////
41 // Updated and revised: September 2002, S. Radomski, GSI
43 ////////////////////////////////////////////////////////////////////////////////
47 #include "AliGeVSimParticle.h"
49 ClassImp(AliGeVSimParticle)
52 ////////////////////////////////////////////////////////////////////////////////////////////////////
53 AliGeVSimParticle::AliGeVSimParticle():
62 fIsDirectedSimple(kTRUE),
63 fIsEllipticSimple(kTRUE),
64 fIsEllipticOld(kFALSE)
66 // Default constructor
67 for (Int_t i = 0; i < 4; i++) fV1[i] = 0.;
68 for (Int_t i = 0; i < 3; i++) fV2[i] = 0.;
71 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity,
72 Float_t T, Float_t dY, Float_t exp):
81 fIsDirectedSimple(kTRUE),
82 fIsEllipticSimple(kTRUE),
83 fIsEllipticOld(kFALSE)
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 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
93 fV2[0] = fV2[1] = fV2[2] = 0.;
96 ////////////////////////////////////////////////////////////////////////////////////////////////////
98 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity):
107 fIsDirectedSimple(kTRUE),
108 fIsEllipticSimple(kTRUE),
109 fIsEllipticOld(kFALSE)
112 // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
114 // Note that multiplicity can be interpreted by GeVSim
115 // either as Total multiplicity in the acceptance or dN/dY
117 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
118 fV2[0] = fV2[1] = fV2[2] = 0.;
121 ////////////////////////////////////////////////////////////////////////////////////////////////////
123 void AliGeVSimParticle::SetModel(Int_t model) {
126 // For details about standard and custom models refer to ALICE NOTE
129 if (model < 1 || model > 7)
130 Error("SetModel","Model Id ( %d ) out of range [1..7]", model);
135 ////////////////////////////////////////////////////////////////////////////////////////////////////
137 void AliGeVSimParticle::SetMultiplicity(Float_t mult) {
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
146 ////////////////////////////////////////////////////////////////////////////////////////////////////
148 void AliGeVSimParticle::SetMultTotal(Bool_t isTotal) {
150 // Switch between total multiplicity (kTRUE) and
151 // multiplciity density (kFALSE)
153 // If this method is used its overrides mode in AliGenGeVSim
156 fMultTotal = isTotal;
160 ////////////////////////////////////////////////////////////////////////////////////////////////////
162 void AliGeVSimParticle::SetDirectedSimple(Float_t v1) {
164 // Set directed flow coefficient to a value independent
165 // of transverse momentum and rapidity
169 fIsDirectedSimple = kTRUE;
172 ////////////////////////////////////////////////////////////////////////////////////////////////////
174 void AliGeVSimParticle::SetEllipticSimple(Float_t v2) {
176 // Set elliptic flow coefficient to a value independent
177 // of transverse momentum and rapidity
181 fIsEllipticSimple = kTRUE;
184 ////////////////////////////////////////////////////////////////////////////////////////////////////
186 Bool_t AliGeVSimParticle::IsFlowSimple() const
189 // Function used by AliGenGeVSim
191 // Returns true if both Elliptic and Directed flow has a simple model.
192 // If at least one is parametrised returns false.
195 return (fIsDirectedSimple && fIsEllipticSimple);
198 ////////////////////////////////////////////////////////////////////////////////////////////////////
200 void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
202 // Set parameters for Directed Flow
203 // Actual flow coefficient is calculated as follows
205 // V1(Pt,Y) = (V11 + V12*Pt) * sign(Y) * (V13 + V14 * Y^3)
207 // where sign = 1 for Y > 0 and -1 for Y < 0
219 fIsDirectedSimple = kFALSE;
222 ////////////////////////////////////////////////////////////////////////////////////////////////////
224 void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) {
226 // Set parameters for Elliptic Flow
227 // Actual flow coefficient is calculated as follows
230 // v21 - flow value at saturation
233 // V2 = v21 * (pT/pTMax ) * exp (-v22 * y^2) where pT <= pTmax
234 // v21 * exp (-v22 * y^2) where pT > pTmax
239 // The parametrisation is suitable for relativistic particles
240 // eg. Pions (at RHIC energies)
248 fIsEllipticSimple = kFALSE;
249 fIsEllipticOld = kFALSE;
252 ////////////////////////////////////////////////////////////////////////////////////////////////////
254 void AliGeVSimParticle::SetEllipticOld(Float_t v21, Float_t v22, Float_t v23) {
256 // Set parameters for Elliptic Flow
257 // Actual flow coefficient is calculated as follows
259 // V2 = (V21 + V22 pT^2) * exp (-v22 * y^2)
261 // The parameterisation is suitable for heavy particles: proton, kaon
268 fIsEllipticSimple = kFALSE;
269 fIsEllipticOld = kTRUE;
272 ////////////////////////////////////////////////////////////////////////////////////////////////////
274 Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) {
276 // Return coefficient of a directed flow for a given pt and y.
277 // For coefficient calculation method refer to SetDirectedParam()
280 if (fIsDirectedSimple) return fV1[0];
284 v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
285 (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
290 ////////////////////////////////////////////////////////////////////////////////////////////////////
292 Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) {
294 // Return coefficient of a elliptic flow for a given pt and y.
295 // For coefficient calculation method refer to SetEllipticParam()
298 if (fIsEllipticSimple) return fV2[0];
300 if (fIsEllipticOld) {
302 // old parametrisation
303 return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y);
307 // new "pionic" parameterisation
308 if (pt < fV2[1]) return ( (pt / fV2[1]) * fV2[0] * TMath::Exp(-fV2[2]*y*y) );
309 else return ( fV2[0] * TMath::Exp(-fV2[2]*y*y) );
313 ////////////////////////////////////////////////////////////////////////////////////////////////////