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
69 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity,
70 Float_t T, Float_t dY, Float_t exp):
79 fIsDirectedSimple(kTRUE),
80 fIsEllipticSimple(kTRUE),
81 fIsEllipticOld(kFALSE)
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.;
94 ////////////////////////////////////////////////////////////////////////////////////////////////////
96 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t model, Float_t multiplicity):
105 fIsDirectedSimple(kTRUE),
106 fIsEllipticSimple(kTRUE),
107 fIsEllipticOld(kFALSE)
110 // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
112 // Note that multiplicity can be interpreted by GeVSim
113 // either as Total multiplicity in the acceptance or dN/dY
115 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
116 fV2[0] = fV2[1] = fV2[2] = 0.;
119 ////////////////////////////////////////////////////////////////////////////////////////////////////
121 void AliGeVSimParticle::SetModel(Int_t model) {
124 // For details about standard and custom models refer to ALICE NOTE
127 if (model < 1 || model > 7)
128 Error("SetModel","Model Id ( %d ) out of range [1..7]", model);
133 ////////////////////////////////////////////////////////////////////////////////////////////////////
135 void AliGeVSimParticle::SetMultiplicity(Float_t mult) {
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
144 ////////////////////////////////////////////////////////////////////////////////////////////////////
146 void AliGeVSimParticle::SetMultTotal(Bool_t isTotal) {
148 // Switch between total multiplicity (kTRUE) and
149 // multiplciity density (kFALSE)
151 // If this method is used its overrides mode in AliGenGeVSim
154 fMultTotal = isTotal;
158 ////////////////////////////////////////////////////////////////////////////////////////////////////
160 void AliGeVSimParticle::SetDirectedSimple(Float_t v1) {
162 // Set directed flow coefficient to a value independent
163 // of transverse momentum and rapidity
167 fIsDirectedSimple = kTRUE;
170 ////////////////////////////////////////////////////////////////////////////////////////////////////
172 void AliGeVSimParticle::SetEllipticSimple(Float_t v2) {
174 // Set elliptic flow coefficient to a value independent
175 // of transverse momentum and rapidity
179 fIsEllipticSimple = kTRUE;
182 ////////////////////////////////////////////////////////////////////////////////////////////////////
184 Bool_t AliGeVSimParticle::IsFlowSimple() const
187 // Function used by AliGenGeVSim
189 // Returns true if both Elliptic and Directed flow has a simple model.
190 // If at least one is parametrised returns false.
193 return (fIsDirectedSimple && fIsEllipticSimple);
196 ////////////////////////////////////////////////////////////////////////////////////////////////////
198 void AliGeVSimParticle::SetDirectedParam(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
200 // Set parameters for Directed Flow
201 // Actual flow coefficient is calculated as follows
203 // V1(Pt,Y) = (V11 + V12*Pt) * sign(Y) * (V13 + V14 * Y^3)
205 // where sign = 1 for Y > 0 and -1 for Y < 0
217 fIsDirectedSimple = kFALSE;
220 ////////////////////////////////////////////////////////////////////////////////////////////////////
222 void AliGeVSimParticle::SetEllipticParam(Float_t v21, Float_t pTmax, Float_t v22) {
224 // Set parameters for Elliptic Flow
225 // Actual flow coefficient is calculated as follows
228 // v21 - flow value at saturation
231 // V2 = v21 * (pT/pTMax ) * exp (-v22 * y^2) where pT <= pTmax
232 // v21 * exp (-v22 * y^2) where pT > pTmax
237 // The parametrisation is suitable for relativistic particles
238 // eg. Pions (at RHIC energies)
246 fIsEllipticSimple = kFALSE;
247 fIsEllipticOld = kFALSE;
250 ////////////////////////////////////////////////////////////////////////////////////////////////////
252 void AliGeVSimParticle::SetEllipticOld(Float_t v21, Float_t v22, Float_t v23) {
254 // Set parameters for Elliptic Flow
255 // Actual flow coefficient is calculated as follows
257 // V2 = (V21 + V22 pT^2) * exp (-v22 * y^2)
259 // The parameterisation is suitable for heavy particles: proton, kaon
266 fIsEllipticSimple = kFALSE;
267 fIsEllipticOld = kTRUE;
270 ////////////////////////////////////////////////////////////////////////////////////////////////////
272 Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) {
274 // Return coefficient of a directed flow for a given pt and y.
275 // For coefficient calculation method refer to SetDirectedParam()
278 if (fIsDirectedSimple) return fV1[0];
282 v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
283 (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
288 ////////////////////////////////////////////////////////////////////////////////////////////////////
290 Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) {
292 // Return coefficient of a elliptic flow for a given pt and y.
293 // For coefficient calculation method refer to SetEllipticParam()
296 if (fIsEllipticSimple) return fV2[0];
298 if (fIsEllipticOld) {
300 // old parametrisation
301 return (fV2[0]+fV2[1]*pt*pt) * TMath::Exp(-fV2[2]*y*y);
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) );
311 ////////////////////////////////////////////////////////////////////////////////////////////////////