Moving to the new VMC naming convention
[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,
37 Float_t atempmean, Float_t atempstdev, Float_t asigmamean,
38 Float_t asigmastdev, Float_t aexpvelmean, Float_t aexpvelstdev)
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//______________________________________________________________________________
62TMevSimPartTypeParams::~TMevSimPartTypeParams() {}
63
64//______________________________________________________________________________
65TMevSimPartTypeParams::TMevSimPartTypeParams (const TMevSimPartTypeParams& pars) {
66// The copy constructor
67
68 this->fGPid = pars.GetGPid();
69 this->fMultMean = pars.GetMultMean();
70 this->fMultVarianceControl = pars.GetMultVarianceControl();
71 this->fTempMean = pars.GetTempMean();
72 this->fTempStDev = pars.GetTempStDev();
73 this->fSigmaMean = pars.GetSigmaMean();
74 this->fSigmaStDev = pars.GetSigmaStDev();
75 this->fExpVelMean = pars.GetExpVelMean();
76 this->fExpVelStDev = pars.GetExpVelStDev();
77 for (Int_t i = 0; i < 4; i++)
78 for (Int_t j = 0; j < NFLOWTERMS; j++) {
79 this->fVnMean[j][i] = pars.GetVnMeanComponent(j, i);
80 this->fVnStDev[j][i] = pars.GetVnStDevComponent(j, i);
81 }
82}
83
84//______________________________________________________________________________
85TMevSimPartTypeParams& TMevSimPartTypeParams::operator=(const TMevSimPartTypeParams& pars) {
86// The assignment operator
87
88 this->fGPid = pars.GetGPid();
89 this->fMultMean = pars.GetMultMean();
90 this->fMultVarianceControl = pars.GetMultVarianceControl();
91 this->fTempMean = pars.GetTempMean();
92 this->fTempStDev = pars.GetTempStDev();
93 this->fSigmaMean = pars.GetSigmaMean();
94 this->fSigmaStDev = pars.GetSigmaStDev();
95 this->fExpVelMean = pars.GetExpVelMean();
96 this->fExpVelStDev = pars.GetExpVelStDev();
97 for (Int_t i = 0; i < 4; i++)
98 for (Int_t j = 0; j < NFLOWTERMS; j++) {
99 this->fVnMean[j][i] = GetVnMeanComponent(j, i);
100 this->fVnStDev[j][i] = GetVnStDevComponent(j, i);
101 }
102 return (*this);
103}
104
105//______________________________________________________________________________
106void TMevSimPartTypeParams::SetGPid(Int_t gpid) {
107 fGPid = gpid;
108}
109//______________________________________________________________________________
110Int_t TMevSimPartTypeParams::GetGPid() const {
111 return fGPid;
112}
113//______________________________________________________________________________
114void TMevSimPartTypeParams::SetMultMean(Int_t multmean) {
115 fMultMean = multmean;
116}
117//______________________________________________________________________________
118Int_t TMevSimPartTypeParams::GetMultMean() const {
119 return fMultMean;
120}
121//______________________________________________________________________________
122void TMevSimPartTypeParams::SetMultVarianceControl(Int_t multvc) {
123 fMultVarianceControl = multvc;
124}
125//______________________________________________________________________________
126Int_t TMevSimPartTypeParams::GetMultVarianceControl() const {
127 return fMultVarianceControl;
128}
129//______________________________________________________________________________
130void TMevSimPartTypeParams::SetTempParams(Float_t tempmean, Float_t tempsdev) {
131 fTempMean = tempmean;
132 fTempStDev = tempsdev;
133}
134//______________________________________________________________________________
135Float_t TMevSimPartTypeParams::GetTempMean() const {
136 return fTempMean;
137}
138//______________________________________________________________________________
139Float_t TMevSimPartTypeParams::GetTempStDev() const {
140 return fTempStDev;
141}
142//______________________________________________________________________________
143void TMevSimPartTypeParams::SetSigmaPrams(Float_t sigmamean, Float_t sigmastdev) {
144 fSigmaMean = sigmamean;
145 fSigmaStDev = sigmastdev;
146}
147//______________________________________________________________________________
148Float_t TMevSimPartTypeParams::GetSigmaMean() const {
149 return fSigmaMean;
150}
151//______________________________________________________________________________
152Float_t TMevSimPartTypeParams::GetSigmaStDev() const {
153 return fSigmaStDev;
154}
155//______________________________________________________________________________
156void TMevSimPartTypeParams::SetExpVelParams(Float_t expvelmean, Float_t expvelstdev) {
157 fExpVelMean = expvelmean;
158 fExpVelStDev = expvelstdev;
159}
160//______________________________________________________________________________
161Float_t TMevSimPartTypeParams::GetExpVelMean() const {
162 return fExpVelMean;
163}
164//______________________________________________________________________________
165Float_t TMevSimPartTypeParams::GetExpVelStDev() const {
166 return fExpVelStDev;
167}
168//______________________________________________________________________________
169
170void TMevSimPartTypeParams::SetVnMeanComponent
171(Int_t nComponent, Float_t mean1, Float_t mean2, Float_t mean3, Float_t mean4) {
172
173
174 if (nComponent < 0 || nComponent > NFLOWTERMS )
175 Error("SetVnMeanComponent", "Wrong Vn component n = %d (must be [%d , %d])",
176 nComponent, 0, NFLOWTERMS);
177
178 fVnMean[nComponent][0] = mean1;
179 fVnMean[nComponent][1] = mean2;
180 fVnMean[nComponent][2] = mean3;
181 fVnMean[nComponent][3] = mean4;
182}
183//______________________________________________________________________________
184
185void TMevSimPartTypeParams::SetVnStDevComponent
186(Int_t nComponent, Float_t stdev1, Float_t stdev2,Float_t stdev3, Float_t stdev4) {
187
188 if (nComponent < 0 || nComponent > NFLOWTERMS )
189 Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])",
190 nComponent, 0, NFLOWTERMS);
191
192 fVnStDev[nComponent][0] = stdev1;
193 fVnStDev[nComponent][1] = stdev2;
194 fVnStDev[nComponent][2] = stdev3;
195 fVnStDev[nComponent][3] = stdev4;
196}
197
198//______________________________________________________________________________
199
200void TMevSimPartTypeParams::SetVnMeanComponent (Int_t nComponent, Float_t mean[4]) {
201
202 if (nComponent < 0 || nComponent > NFLOWTERMS )
203 Error("SetVnMeanComponent", "Wrong Vn component (%d) (must be [%d,%d])",
204 nComponent, 0, NFLOWTERMS);
205
206 Int_t N = 4;
207 for (Int_t i=0; i<N; i++)
208 fVnMean[nComponent][i] = mean[i];
209
210}
211
212//______________________________________________________________________________
213
214void TMevSimPartTypeParams::SetVnStDevComponent (Int_t nComponent, Float_t stdev[4]) {
215
216 if (nComponent < 0 || nComponent > NFLOWTERMS )
217 Error("SetVnStDevComponent", "Wrong Vn component n = %d (must be [%d , %d])",
218 nComponent, 0, NFLOWTERMS);
219
220 Int_t N = 4;
221 for (Int_t i=0; i<N; i++)
222 fVnStDev[nComponent][i] = stdev[i];
223}
224
225//______________________________________________________________________________
226
227Float_t TMevSimPartTypeParams::GetVnMeanComponent(Int_t nComponent, Int_t nMean) const {
228
229 if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nMean < 0) || (nMean > 3)) return 0.0;
230 return fVnMean[nComponent][nMean];
231}
232//______________________________________________________________________________
233Float_t TMevSimPartTypeParams::GetVnStDevComponent(Int_t nComponent, Int_t nStDev) const {
234
235 if ((nComponent < 0) || (nComponent>NFLOWTERMS) || (nStDev < 0) || (nStDev > 3)) return 0.0;
236 return fVnMean[nComponent][nStDev];
237}
238
239//______________________________________________________________________________
240
241
242
243
244