]>
Commit | Line | Data |
---|---|---|
1a2762e8 | 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 | ||
803d1ab0 | 16 | /* $Id$ */ |
1a2762e8 | 17 | |
18 | #include "TMevSimPartTypeParams.h" | |
19 | ||
20 | ClassImp(TMevSimPartTypeParams) | |
21 | ||
22 | ||
23 | //______________________________________________________________________________ | |
b15b3ba3 | 24 | TMevSimPartTypeParams::TMevSimPartTypeParams() : |
25 | fGPid(0), | |
26 | fMultMean(0), | |
27 | fMultVarianceControl(0), | |
28 | fTempMean(0), | |
29 | fTempStDev(0), | |
30 | fSigmaMean(0), | |
31 | fSigmaStDev(0), | |
32 | fExpVelMean(0), | |
33 | fExpVelStDev(0) | |
1a2762e8 | 34 | { |
35 | // Default constructor | |
36 | ||
37 | for (Int_t i = 0; i < 4; i++) | |
38 | for (Int_t j = 0; j < NFLOWTERMS; j++) { | |
39 | fVnMean[j][i] = 0.0; | |
40 | fVnStDev[j][i] = 0.0; | |
41 | } | |
42 | } | |
43 | ||
44 | //__________________________________________________________________________ | |
45 | TMevSimPartTypeParams::TMevSimPartTypeParams(Int_t agpid, Int_t amultmean, Int_t amultvc, | |
26d0099f | 46 | Float_t atempmean, Float_t atempstdev, Float_t asigmamean, |
b15b3ba3 | 47 | Float_t asigmastdev, Float_t aexpvelmean, Float_t aexpvelstdev) : |
48 | fGPid(agpid), | |
49 | fMultMean(amultmean), | |
50 | fMultVarianceControl(amultvc), | |
51 | fTempMean(atempmean), | |
52 | fTempStDev(atempstdev), | |
53 | fSigmaMean(asigmamean), | |
54 | fSigmaStDev(asigmastdev), | |
55 | fExpVelMean(aexpvelmean), | |
56 | fExpVelStDev(aexpvelstdev) | |
1a2762e8 | 57 | { |
58 | // Construct the particle type parametrs class. Use the values provide | |
59 | // by the user to initialize the internal variables. For the meaning of | |
60 | // the parametrs see the TMevSim class documentation. | |
61 | ||
1a2762e8 | 62 | for (Int_t i = 0; i < 4; i++) |
63 | for (Int_t j = 0; j < NFLOWTERMS; j++) { | |
64 | fVnMean[j][i] = 0.0; | |
65 | fVnStDev[j][i] = 0.0; | |
66 | } | |
67 | ||
68 | } | |
69 | ||
70 | //______________________________________________________________________________ | |
26d0099f | 71 | TMevSimPartTypeParams::~TMevSimPartTypeParams() |
72 | { | |
73 | //dtor | |
74 | } | |
1a2762e8 | 75 | |
76 | //______________________________________________________________________________ | |
b15b3ba3 | 77 | TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars) : |
78 | TObject(pars), | |
79 | fGPid(pars.fGPid), | |
80 | fMultMean(pars.fMultMean), | |
81 | fMultVarianceControl(pars.fMultVarianceControl), | |
82 | fTempMean(pars.fTempMean), | |
83 | fTempStDev(pars.fTempStDev), | |
84 | fSigmaMean(pars.fSigmaMean), | |
85 | fSigmaStDev(pars.fSigmaStDev), | |
86 | fExpVelMean(pars.fExpVelMean), | |
87 | fExpVelStDev(pars.fExpVelStDev) | |
88 | { | |
1a2762e8 | 89 | // The copy constructor |
90 | ||
1a2762e8 | 91 | for (Int_t i = 0; i < 4; i++) |
92 | for (Int_t j = 0; j < NFLOWTERMS; j++) { | |
93 | this->fVnMean[j][i] = pars.GetVnMeanComponent(j, i); | |
94 | this->fVnStDev[j][i] = pars.GetVnStDevComponent(j, i); | |
95 | } | |
96 | } | |
97 | ||
98 | //______________________________________________________________________________ | |
b15b3ba3 | 99 | TMevSimPartTypeParams& TMevSimPartTypeParams::operator=(const TMevSimPartTypeParams& pars) |
100 | { | |
1a2762e8 | 101 | // The assignment operator |
b15b3ba3 | 102 | |
103 | if(this != &pars) { | |
104 | TObject::operator=(pars); | |
105 | fGPid = pars.fGPid; | |
106 | fMultMean = pars.fMultMean; | |
107 | fMultVarianceControl = pars.fMultVarianceControl; | |
108 | fTempMean = pars.fTempMean; | |
109 | fTempStDev = pars.fTempStDev; | |
110 | fSigmaMean = pars.fSigmaMean; | |
111 | fSigmaStDev = pars.fSigmaStDev; | |
112 | fExpVelMean = pars.fExpVelMean; | |
113 | fExpVelStDev = pars.fExpVelStDev; | |
114 | for (Int_t i = 0; i < 4; i++) | |
115 | for (Int_t j = 0; j < NFLOWTERMS; j++) { | |
116 | fVnMean[j][i] = GetVnMeanComponent(j, i); | |
117 | fVnStDev[j][i] = GetVnStDevComponent(j, i); | |
118 | } | |
119 | } | |
1a2762e8 | 120 | return (*this); |
121 | } | |
122 | ||
123 | //______________________________________________________________________________ | |
124 | void TMevSimPartTypeParams::SetGPid(Int_t gpid) { | |
26d0099f | 125 | //Sets pid |
1a2762e8 | 126 | fGPid = gpid; |
127 | } | |
128 | //______________________________________________________________________________ | |
129 | Int_t TMevSimPartTypeParams::GetGPid() const { | |
26d0099f | 130 | //returns pid |
1a2762e8 | 131 | return fGPid; |
132 | } | |
133 | //______________________________________________________________________________ | |
134 | void TMevSimPartTypeParams::SetMultMean(Int_t multmean) { | |
26d0099f | 135 | //sets multiplicity mean |
1a2762e8 | 136 | fMultMean = multmean; |
137 | } | |
138 | //______________________________________________________________________________ | |
139 | Int_t TMevSimPartTypeParams::GetMultMean() const { | |
26d0099f | 140 | //returns multiplicity mean |
1a2762e8 | 141 | return fMultMean; |
142 | } | |
143 | //______________________________________________________________________________ | |
144 | void TMevSimPartTypeParams::SetMultVarianceControl(Int_t multvc) { | |
26d0099f | 145 | //sets multiplicity variance |
1a2762e8 | 146 | fMultVarianceControl = multvc; |
147 | } | |
148 | //______________________________________________________________________________ | |
149 | Int_t TMevSimPartTypeParams::GetMultVarianceControl() const { | |
26d0099f | 150 | //returns multiplicity variance |
1a2762e8 | 151 | return fMultVarianceControl; |
152 | } | |
153 | //______________________________________________________________________________ | |
154 | void TMevSimPartTypeParams::SetTempParams(Float_t tempmean, Float_t tempsdev) { | |
26d0099f | 155 | //Sets mean and variance of temperature |
1a2762e8 | 156 | fTempMean = tempmean; |
157 | fTempStDev = tempsdev; | |
158 | } | |
159 | //______________________________________________________________________________ | |
160 | Float_t TMevSimPartTypeParams::GetTempMean() const { | |
26d0099f | 161 | //returns mean temperature |
1a2762e8 | 162 | return fTempMean; |
163 | } | |
164 | //______________________________________________________________________________ | |
165 | Float_t TMevSimPartTypeParams::GetTempStDev() const { | |
26d0099f | 166 | //returns temperature variance |
1a2762e8 | 167 | return fTempStDev; |
168 | } | |
169 | //______________________________________________________________________________ | |
170 | void TMevSimPartTypeParams::SetSigmaPrams(Float_t sigmamean, Float_t sigmastdev) { | |
26d0099f | 171 | //Sets mean and variance of rapidity |
1a2762e8 | 172 | fSigmaMean = sigmamean; |
173 | fSigmaStDev = sigmastdev; | |
174 | } | |
175 | //______________________________________________________________________________ | |
176 | Float_t TMevSimPartTypeParams::GetSigmaMean() const { | |
26d0099f | 177 | //returns mean rapidity |
1a2762e8 | 178 | return fSigmaMean; |
179 | } | |
180 | //______________________________________________________________________________ | |
181 | Float_t TMevSimPartTypeParams::GetSigmaStDev() const { | |
26d0099f | 182 | //returns rapidity variance |
1a2762e8 | 183 | return fSigmaStDev; |
184 | } | |
185 | //______________________________________________________________________________ | |
186 | void TMevSimPartTypeParams::SetExpVelParams(Float_t expvelmean, Float_t expvelstdev) { | |
26d0099f | 187 | //Sets mean and variance of Expansion velocity ala Scott Pratt (in units of c) |
1a2762e8 | 188 | fExpVelMean = expvelmean; |
189 | fExpVelStDev = expvelstdev; | |
190 | } | |
191 | //______________________________________________________________________________ | |
192 | Float_t TMevSimPartTypeParams::GetExpVelMean() const { | |
26d0099f | 193 | //Sets mean of Expansion velocity ala Scott Pratt (in units of c) |
1a2762e8 | 194 | return fExpVelMean; |
195 | } | |
196 | //______________________________________________________________________________ | |
197 | Float_t TMevSimPartTypeParams::GetExpVelStDev() const { | |
26d0099f | 198 | //Sets variance of Expansion velocity ala Scott Pratt (in units of c) |
1a2762e8 | 199 | return fExpVelStDev; |
200 | } | |
201 | //______________________________________________________________________________ | |
202 | ||
203 | void TMevSimPartTypeParams::SetVnMeanComponent | |
204 | (Int_t nComponent, Float_t mean1, Float_t mean2, Float_t mean3, Float_t mean4) { | |
26d0099f | 205 | //Sets VnMean: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
206 | // mean include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 207 | |
208 | if (nComponent < 0 || nComponent > NFLOWTERMS ) | |
209 | Error("SetVnMeanComponent", "Wrong Vn component n = %d (must be [%d , %d])", | |
210 | nComponent, 0, NFLOWTERMS); | |
211 | ||
212 | fVnMean[nComponent][0] = mean1; | |
213 | fVnMean[nComponent][1] = mean2; | |
214 | fVnMean[nComponent][2] = mean3; | |
215 | fVnMean[nComponent][3] = mean4; | |
216 | } | |
217 | //______________________________________________________________________________ | |
218 | ||
219 | void TMevSimPartTypeParams::SetVnStDevComponent | |
220 | (Int_t nComponent, Float_t stdev1, Float_t stdev2,Float_t stdev3, Float_t stdev4) { | |
26d0099f | 221 | //Sets VnStDev: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
222 | // standard deviation include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 223 | |
224 | if (nComponent < 0 || nComponent > NFLOWTERMS ) | |
225 | Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])", | |
226 | nComponent, 0, NFLOWTERMS); | |
227 | ||
228 | fVnStDev[nComponent][0] = stdev1; | |
229 | fVnStDev[nComponent][1] = stdev2; | |
230 | fVnStDev[nComponent][2] = stdev3; | |
231 | fVnStDev[nComponent][3] = stdev4; | |
232 | } | |
233 | ||
234 | //______________________________________________________________________________ | |
235 | ||
236 | void TMevSimPartTypeParams::SetVnMeanComponent (Int_t nComponent, Float_t mean[4]) { | |
26d0099f | 237 | //Sets VnMean: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
238 | // mean include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 239 | if (nComponent < 0 || nComponent > NFLOWTERMS ) |
240 | Error("SetVnMeanComponent", "Wrong Vn component (%d) (must be [%d,%d])", | |
241 | nComponent, 0, NFLOWTERMS); | |
242 | ||
26d0099f | 243 | Int_t n = 4; |
244 | for (Int_t i=0; i<n; i++) | |
1a2762e8 | 245 | fVnMean[nComponent][i] = mean[i]; |
246 | ||
247 | } | |
248 | ||
249 | //______________________________________________________________________________ | |
250 | ||
251 | void TMevSimPartTypeParams::SetVnStDevComponent (Int_t nComponent, Float_t stdev[4]) { | |
26d0099f | 252 | //Sets VnStDev: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
253 | // standard deviation include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 254 | |
255 | if (nComponent < 0 || nComponent > NFLOWTERMS ) | |
256 | Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])", | |
257 | nComponent, 0, NFLOWTERMS); | |
258 | ||
26d0099f | 259 | Int_t n = 4; |
260 | for (Int_t i=0; i<n; i++) | |
1a2762e8 | 261 | fVnStDev[nComponent][i] = stdev[i]; |
262 | } | |
263 | ||
264 | //______________________________________________________________________________ | |
265 | ||
266 | Float_t TMevSimPartTypeParams::GetVnMeanComponent(Int_t nComponent, Int_t nMean) const { | |
26d0099f | 267 | //Returns VnMean: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
268 | // mean include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 269 | |
270 | if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nMean < 0) || (nMean > 3)) return 0.0; | |
271 | return fVnMean[nComponent][nMean]; | |
272 | } | |
273 | //______________________________________________________________________________ | |
274 | Float_t TMevSimPartTypeParams::GetVnStDevComponent(Int_t nComponent, Int_t nStDev) const { | |
26d0099f | 275 | //Returns VnStDev: Anisotropic flow parameters for Fourier components NFLOWTERMS=1,6 |
276 | // standard deviation include all 6 sets of parameters, set them to 0 if not used | |
1a2762e8 | 277 | |
278 | if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nStDev < 0) || (nStDev > 3)) return 0.0; | |
279 | return fVnMean[nComponent][nStDev]; | |
280 | } | |
281 | ||
282 | //______________________________________________________________________________ | |
283 | ||
284 | ||
285 | ||
286 | ||
287 |