]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGeVSimParticle.cxx
Merging the VirtualMC branch to the main development branch (HEAD)
[u/mrichter/AliRoot.git] / EVGEN / AliGeVSimParticle.cxx
1 ////////////////////////////////////////////////////////////////////////////////////////////////////
2 //
3 // AliGeVSimParticle is a helper class for GeVSim (AliGenGeVSim) event generator.
4 // An object of this class represents one particle type and contain 
5 // information about particle type thermal parameters.
6 //
7 // For examples, parameters and testing macros refer to:
8 // http:/home.cern.ch/radomski
9 //
10 // Author:
11 // Sylwester Radomski,
12 // GSI, March 2002
13 // 
14 // S.Radomski@gsi.de
15 //
16 ////////////////////////////////////////////////////////////////////////////////////////////////////
17
18 #include "TMath.h"
19 #include "AliGeVSimParticle.h"
20
21 ClassImp(AliGeVSimParticle);
22
23 ////////////////////////////////////////////////////////////////////////////////////////////////////
24
25 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg, Int_t n, Float_t T, Float_t dY, Float_t exp) {
26   //
27   //  pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
28   //  n   - Multiplicity of particle type
29   //  T   - Inverse slope parameter ("temperature")
30   //  dY  - Raridity Width (only for model 1)
31   //  exp - expansion velocity (only for model 4) 
32   
33   fPDG = pdg;
34   fN = n;
35   fT = T;
36   fSigmaY = dY;
37   fExpansion = exp;
38
39   fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
40   fV2[0] = fV2[1] = fV2[2] = 0.;
41 }
42
43 ////////////////////////////////////////////////////////////////////////////////////////////////////
44
45 AliGeVSimParticle::AliGeVSimParticle(Int_t pdg) {
46   //
47   //  pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
48   // 
49
50   fPDG = pdg;
51   fN = 0;
52   fT = 0.;
53   fSigmaY = 0.;
54   fExpansion = 0.;
55   
56   fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
57   fV2[0] = fV2[1] = fV2[2] = 0.; 
58 }
59
60 ////////////////////////////////////////////////////////////////////////////////////////////////////
61
62 void AliGeVSimParticle::SetDirectedFlow(Float_t v11, Float_t v12, Float_t v13, Float_t v14) {
63   //
64   // Set Directed Flow parameters.
65   // Acctual flow coefficient is calculated as follows
66   //
67   // V1(Pt,Y) = (V11 + V12*Pt) * sign(Y) * (V13 + V14 * Y^3)
68   //
69   // where sign = 1 for Y > 0 and -1 for Y < 0
70   // 
71   // Defaults values
72   // v12 = v14 = 0
73   // v13 = 1
74   // 
75   // Note 1: In many cases it is sufficient to set v11 only.
76   // Note 2: Be carefull with parameter v14
77   // 
78
79
80   fV1[0] = v11;
81   fV1[1] = v12;
82   fV1[2] = v13;
83   fV1[3] = v14;
84 }
85
86 ////////////////////////////////////////////////////////////////////////////////////////////////////
87
88 void AliGeVSimParticle::SetEllipticFlow(Float_t v21, Float_t v22, Float_t v23) {
89   //
90   // Set Elliptic Flow parameters.
91   // Acctual flow coefficient is calculated as follows
92   //
93   // V2 = (V21 + V22 * Pt^2) * exp( -V23 * Y^2)
94   // 
95   // Default values:
96   // v22 = v23 = 0
97   //
98   // Note: In many cases it is sufficient to set v21 only
99   //
100   
101   fV2[0] = v21;
102   fV2[1] = v22;
103   fV2[2] = v23;
104 }
105
106 ////////////////////////////////////////////////////////////////////////////////////////////////////
107
108 Float_t AliGeVSimParticle::GetDirectedFlow(Float_t pt, Float_t y) {
109   //
110   // Return coefficient of a directed flow for a given pt and y.
111   // For coefficient calculation method refer to SetDirectedFlow()
112   // 
113   
114   Float_t v;
115   
116   v = (fV1[0] + fV1[1]* pt) * TMath::Sign((Float_t)1.,y) *
117     (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
118
119   return v;
120 }
121
122 ////////////////////////////////////////////////////////////////////////////////////////////////////
123
124 Float_t AliGeVSimParticle::GetEllipticFlow(Float_t pt, Float_t y) {
125   //
126   // Return coefficient of a elliptic flow for a given pt and y.
127   // For coefficient calculation method refer to SetEllipticFlow()
128   // 
129     
130   return  (fV2[0] + fV2[2] * pt * pt) * TMath::Exp( -fV2[3] * y*y );
131 }
132
133 ////////////////////////////////////////////////////////////////////////////////////////////////////
134
135 Float_t AliGeVSimParticle::GetDirectedFlow() {
136   //
137   // Simplified version of GetDirectedFlow(pt,y) for backward compatibility
138   // Return fV1[0]
139   //
140   
141   return fV1[0];
142 }
143
144 ////////////////////////////////////////////////////////////////////////////////////////////////////
145 Float_t AliGeVSimParticle::GetEllipticFlow() {
146   //
147   // Simplified version of GetEllipticFlow(pt,y) for backward compatibility
148   // Return fV2[0]
149   //
150   
151   return fV2[0];
152 }
153
154 ////////////////////////////////////////////////////////////////////////////////////////////////////
155
156
157
158
159
160
161
162
163
164
165
166
167
168