]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGeVSimParticle.cxx
Bugfix in GetMemorySize.
[u/mrichter/AliRoot.git] / EVGEN / AliGeVSimParticle.cxx
CommitLineData
4966b266 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"
7816887f 19#include "AliGeVSimParticle.h"
20
21ClassImp(AliGeVSimParticle);
22
4966b266 23////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 24
4966b266 25AliGeVSimParticle::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
7816887f 33 fPDG = pdg;
34 fN = n;
35 fT = T;
36 fSigmaY = dY;
37 fExpansion = exp;
38
4966b266 39 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
40 fV2[0] = fV2[1] = fV2[2] = 0.;
7816887f 41}
42
4966b266 43////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 44
4966b266 45AliGeVSimParticle::AliGeVSimParticle(Int_t pdg) {
46 //
47 // pdg - Particle type code in PDG standard (see: http://pdg.lbl.gov)
48 //
7816887f 49
50 fPDG = pdg;
51 fN = 0;
52 fT = 0.;
53 fSigmaY = 0.;
54 fExpansion = 0.;
55
4966b266 56 fV1[0] = fV1[1] = fV1[2] = fV1[3] = 0.;
57 fV2[0] = fV2[1] = fV2[2] = 0.;
7816887f 58}
59
4966b266 60////////////////////////////////////////////////////////////////////////////////////////////////////
61
62void 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}
7816887f 85
4966b266 86////////////////////////////////////////////////////////////////////////////////////////////////////
87
88void 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}
7816887f 105
4966b266 106////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 107
4966b266 108Float_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(1.,y) *
117 (fV1[2] + fV1[3] * TMath::Abs(y*y*y) );
7816887f 118
4966b266 119 return v;
120}
7816887f 121
4966b266 122////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 123
4966b266 124Float_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}
7816887f 132
4966b266 133////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 134
4966b266 135Float_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}
7816887f 143
4966b266 144////////////////////////////////////////////////////////////////////////////////////////////////////
145Float_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}
7816887f 153
4966b266 154////////////////////////////////////////////////////////////////////////////////////////////////////
7816887f 155
156
157
158
159
160
161
162
163
164
165
166
167
168