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