40 using namespace starlightConstants;
47 _maxWeightObserved(0),
61 _n = daughterMasses.size();
63 printWarn <<
"number of daughters = " <<
_n <<
" does not make sense." << endl;
82 for (
unsigned int i = 1; i <
_n; ++i)
100 const double* daughterMasses)
103 m.resize(nmbOfDaughters, 0);
105 m[i] = daughterMasses[i];
115 const double nBodyMass = nBody.
M();
117 printWarn <<
"number of daughter particles = " <<
_n <<
" is smaller than 2. "
118 <<
"weight is set to 0." << endl;
120 }
else if (nBodyMass <
_mSum[
_n - 1]) {
121 printWarn <<
"n-body mass = " << nBodyMass <<
" is smaller than sum of daughter masses = "
122 <<
_mSum[
_n - 1] <<
". weight is set to 0." << endl;
138 const double maxWeight)
140 const double nBodyMass = nBody.
M();
142 printWarn <<
"number of daughter particles = " <<
_n <<
" is smaller than 2. "
143 <<
"no event generated." << endl;
145 }
else if (nBodyMass <
_mSum[
_n - 1]) {
146 printWarn <<
"n-body mass = " << nBodyMass <<
" is smaller than sum of daughter masses = "
147 <<
_mSum[
_n - 1] <<
". no event generated." << endl;
164 _M[
_n - 1] = nBodyMass;
166 vector<double> r(
_n - 2, 0);
167 for (
unsigned int i = 0; i < (
_n - 2); ++i)
169 sort(r.begin(), r.end());
171 const double massInterval = nBodyMass -
_mSum[
_n - 1];
172 for (
unsigned int i = 1; i < (
_n - 1); ++i)
173 _M[i] = _mSum[i] + r[i - 1] * massInterval;
182 for (
unsigned int i = 1; i <
_n; ++i)
185 for (
unsigned int i = 1; i <
_n; ++i)
187 const double massInterval =
_M[_n - 1] -
_mSum[_n - 1];
188 _weight =
_norm * pow(massInterval, (
int)_n - 2) * momProd /
_M[_n - 1];
206 for (
unsigned int i =
_n - 1; i >= 1; --i) {
228 const unsigned int nmbOfIterations)
231 for (
unsigned int i = 0; i < nmbOfIterations; ++i) {
243 out <<
"nBodyPhaseSpaceGen parameters:" << endl
244 <<
" number of daughter particles ............... " <<
_n << endl
245 <<
" masses of the daughter particles ........... " <<
_m << endl
246 <<
" sums of daughter particle masses ........... " <<
_mSum << endl
247 <<
" effective masses of (i + 1)-body systems ... " <<
_M << endl
248 <<
" cos(polar angle) in (i + 1)-body systems ... " <<
_cosTheta << endl
249 <<
" azimuth in (i + 1)-body systems ............ " <<
_phi << endl
250 <<
" breakup momenta in (i + 1)-body systems .... " <<
_breakupMom << endl
251 <<
" normalization value ........................ " <<
_norm << endl
252 <<
" weight of generated event .................. " <<
_weight << endl
253 <<
" maximum weight used in hit-miss MC ......... " <<
_maxWeight << endl
255 <<
" daughter four-momenta:" << endl;
256 for (
unsigned int i = 0; i <
_n; ++i)
257 out <<
" daughter " << i <<
": " <<
_daughters[i] << endl;