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 #include "TMevSimPartTypeParams.h"
20 ClassImp(TMevSimPartTypeParams)
23 //______________________________________________________________________________
24 TMevSimPartTypeParams::TMevSimPartTypeParams()
26 // Default constructor
28 for (Int_t i = 0; i < 4; i++)
29 for (Int_t j = 0; j < NFLOWTERMS; j++) {
35 //__________________________________________________________________________
36 TMevSimPartTypeParams::TMevSimPartTypeParams(Int_t agpid, Int_t amultmean, Int_t amultvc,
37 Float_t atempmean, Float_t atempstdev, Float_t asigmamean,
38 Float_t asigmastdev, Float_t aexpvelmean, Float_t aexpvelstdev)
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.
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++) {
61 //______________________________________________________________________________
62 TMevSimPartTypeParams::~TMevSimPartTypeParams()
67 //______________________________________________________________________________
68 TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars) : TObject(pars) {
69 // The copy constructor
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);
87 //______________________________________________________________________________
88 TMevSimPartTypeParams& TMevSimPartTypeParams::operator=(const TMevSimPartTypeParams& pars) {
89 // The assignment operator
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);
108 //______________________________________________________________________________
109 void TMevSimPartTypeParams::SetGPid(Int_t gpid) {
113 //______________________________________________________________________________
114 Int_t TMevSimPartTypeParams::GetGPid() const {
118 //______________________________________________________________________________
119 void TMevSimPartTypeParams::SetMultMean(Int_t multmean) {
120 //sets multiplicity mean
121 fMultMean = multmean;
123 //______________________________________________________________________________
124 Int_t TMevSimPartTypeParams::GetMultMean() const {
125 //returns multiplicity mean
128 //______________________________________________________________________________
129 void TMevSimPartTypeParams::SetMultVarianceControl(Int_t multvc) {
130 //sets multiplicity variance
131 fMultVarianceControl = multvc;
133 //______________________________________________________________________________
134 Int_t TMevSimPartTypeParams::GetMultVarianceControl() const {
135 //returns multiplicity variance
136 return fMultVarianceControl;
138 //______________________________________________________________________________
139 void TMevSimPartTypeParams::SetTempParams(Float_t tempmean, Float_t tempsdev) {
140 //Sets mean and variance of temperature
141 fTempMean = tempmean;
142 fTempStDev = tempsdev;
144 //______________________________________________________________________________
145 Float_t TMevSimPartTypeParams::GetTempMean() const {
146 //returns mean temperature
149 //______________________________________________________________________________
150 Float_t TMevSimPartTypeParams::GetTempStDev() const {
151 //returns temperature variance
154 //______________________________________________________________________________
155 void TMevSimPartTypeParams::SetSigmaPrams(Float_t sigmamean, Float_t sigmastdev) {
156 //Sets mean and variance of rapidity
157 fSigmaMean = sigmamean;
158 fSigmaStDev = sigmastdev;
160 //______________________________________________________________________________
161 Float_t TMevSimPartTypeParams::GetSigmaMean() const {
162 //returns mean rapidity
165 //______________________________________________________________________________
166 Float_t TMevSimPartTypeParams::GetSigmaStDev() const {
167 //returns rapidity variance
170 //______________________________________________________________________________
171 void TMevSimPartTypeParams::SetExpVelParams(Float_t expvelmean, Float_t expvelstdev) {
172 //Sets mean and variance of Expansion velocity ala Scott Pratt (in units of c)
173 fExpVelMean = expvelmean;
174 fExpVelStDev = expvelstdev;
176 //______________________________________________________________________________
177 Float_t TMevSimPartTypeParams::GetExpVelMean() const {
178 //Sets mean of Expansion velocity ala Scott Pratt (in units of c)
181 //______________________________________________________________________________
182 Float_t TMevSimPartTypeParams::GetExpVelStDev() const {
183 //Sets variance of Expansion velocity ala Scott Pratt (in units of c)
186 //______________________________________________________________________________
188 void TMevSimPartTypeParams::SetVnMeanComponent
189 (Int_t nComponent, Float_t mean1, Float_t mean2, Float_t mean3, Float_t mean4) {
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
193 if (nComponent < 0 || nComponent > NFLOWTERMS )
194 Error("SetVnMeanComponent", "Wrong Vn component n = %d (must be [%d , %d])",
195 nComponent, 0, NFLOWTERMS);
197 fVnMean[nComponent][0] = mean1;
198 fVnMean[nComponent][1] = mean2;
199 fVnMean[nComponent][2] = mean3;
200 fVnMean[nComponent][3] = mean4;
202 //______________________________________________________________________________
204 void TMevSimPartTypeParams::SetVnStDevComponent
205 (Int_t nComponent, Float_t stdev1, Float_t stdev2,Float_t stdev3, Float_t stdev4) {
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
209 if (nComponent < 0 || nComponent > NFLOWTERMS )
210 Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])",
211 nComponent, 0, NFLOWTERMS);
213 fVnStDev[nComponent][0] = stdev1;
214 fVnStDev[nComponent][1] = stdev2;
215 fVnStDev[nComponent][2] = stdev3;
216 fVnStDev[nComponent][3] = stdev4;
219 //______________________________________________________________________________
221 void TMevSimPartTypeParams::SetVnMeanComponent (Int_t nComponent, Float_t mean[4]) {
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
224 if (nComponent < 0 || nComponent > NFLOWTERMS )
225 Error("SetVnMeanComponent", "Wrong Vn component (%d) (must be [%d,%d])",
226 nComponent, 0, NFLOWTERMS);
229 for (Int_t i=0; i<n; i++)
230 fVnMean[nComponent][i] = mean[i];
234 //______________________________________________________________________________
236 void TMevSimPartTypeParams::SetVnStDevComponent (Int_t nComponent, Float_t stdev[4]) {
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
240 if (nComponent < 0 || nComponent > NFLOWTERMS )
241 Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])",
242 nComponent, 0, NFLOWTERMS);
245 for (Int_t i=0; i<n; i++)
246 fVnStDev[nComponent][i] = stdev[i];
249 //______________________________________________________________________________
251 Float_t TMevSimPartTypeParams::GetVnMeanComponent(Int_t nComponent, Int_t nMean) const {
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
255 if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nMean < 0) || (nMean > 3)) return 0.0;
256 return fVnMean[nComponent][nMean];
258 //______________________________________________________________________________
259 Float_t TMevSimPartTypeParams::GetVnStDevComponent(Int_t nComponent, Int_t nStDev) const {
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
263 if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nStDev < 0) || (nStDev > 3)) return 0.0;
264 return fVnMean[nComponent][nStDev];
267 //______________________________________________________________________________