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