26 double m12 = sqrt(s12);
33 if(dbThis) cout <<
" d4body_by_ds12 called with " 42 double p3val = p3.
getVal(mum, m12,
m3, m4);
45 cout <<
" d4body_by_ds12: returning " << p2val <<
" * " << p3val
46 <<
" = " << p2val * p3val
57 double m12 = sqrt(s12);
62 if(dbThis) cout <<
" d3body_by_ds12 called with " 82 double m12 = sqrt(s12);
83 if(m12 < p[1] + p[2])
return 0;
86 double m34 = sqrt(s34);
87 if(m34 < p[3] + p[4])
return 0;
88 if(m12 + m34 > p[0])
return 0;
101 if(ps2 <=0)
return 0;
106 if(ps3 <=0)
return 0;
112 return fct12 * fct34 * ps1*ps2*ps3;
118 double rho123 = x[0];
126 if(s123 < 0)
return 0;
127 double m123 = sqrt(s123);
128 if(m123 + p[4] > p[0])
return 0;
129 if(m123 < p[1] + p[2] + p[3])
return 0;
131 if(s12 < 0)
return 0;
132 double m12 = sqrt(s12);
133 if(m12 + p[3] > m123)
return 0;
134 if(m12 < p[1] + p[2])
return 0;
141 if(ps1 <=0)
return 0;
148 if(ps2 <=0)
return 0;
154 if(ps3 <=0)
return 0;
159 return fct123*fct12 * ps1*ps2*ps3;
195 cout <<
"phaseSpaceIntegral3body::phaseSpaceIntegral3body()" 196 <<
" failed to get TF1!!!" << endl;
202 if(_pat.
size() != 4){
203 cout <<
"phaseSpaceIntegral3body: wrong pattern " << _pat << endl;
205 double mum = _pat[0].mass();
206 double d1 = _pat[1].mass();
207 double d2 = _pat[2].mass();
208 double d3 = _pat[3].mass();
210 return getVal(mum, d1, d2, d3);
214 ,
double d2,
double d3){
216 double min_m12 = (d1 + d2);
217 double max_m12 = (mum - d3);
218 if(dbThis)cout <<
"PhaseSpaceIntegral3body::getVal : from, to " 219 << min_m12 <<
", " << max_m12 << endl;
220 if(min_m12 >= max_m12)
return 0;
222 double min_s12 = min_m12*min_m12;
223 double max_s12 = max_m12*max_m12;
225 Double_t para[4]={mum, d1, d2, d3};
227 _f->SetParameters(para);
238 double returnVal = _f->Integral(min_s12, max_s12);
239 if(dbThis) cout <<
"PhaseSpaceIntegral3body::getVal() returning " 240 << returnVal << endl;
254 cout <<
"phaseSpaceIntegral4body::phaseSpaceIntegral3body()" 255 <<
" failed to get TF1!!!" << endl;
261 if(_pat.
size() != 5){
262 cout <<
"phaseSpaceIntegral4body: wrong pattern " << _pat << endl;
264 double mum = _pat[0].mass();
265 double d1 = _pat[1].mass();
266 double d2 = _pat[2].mass();
267 double d3 = _pat[3].mass();
268 double d4 = _pat[4].mass();
269 return getVal(mum, d1, d2, d3, d4);
272 ,
double d1,
double d2
273 ,
double d3,
double d4){
277 double min_m12 = (d1 + d2);
278 double max_m12 = (mum - d3 - d4);
279 if(dbThis)cout <<
"PhaseSpaceIntegral4body::getVal : from, to " 280 << min_m12 <<
", " << max_m12 << endl;
281 if(min_m12 >= max_m12)
return 0;
283 double min_s12 = min_m12*min_m12;
284 double max_s12 = max_m12*max_m12;
286 Double_t para[5]={mum, d1, d2, d3, d4};
288 _f->SetParameters(para);
293 _f->CalcGaussLegendreSamplingPoints(np,xpts,wpts,1e-15);
294 return _f->IntegralFast(np,xpts,wpts, min_s12, max_s12, para);
298 if(_pat.
size() != 5){
299 cout <<
"phaseSpaceIntegral4body: wrong pattern " << _pat << endl;
301 double mum = _pat[0].mass();
302 double d1 = _pat[1].mass();
303 double d2 = _pat[2].mass();
304 double d3 = _pat[3].mass();
305 double d4 = _pat[4].mass();
306 return getValCheck(mum, d1, d2, d3, d4);
309 ,
double d2,
double d3
314 double min_m12 = (d1 + d2);
315 double max_m12 = (mum - d3 - d4);
316 if(dbThis)cout <<
"PhaseSpaceIntegral4body::getVal : from, to " 317 << min_m12 <<
", " << max_m12 << endl;
318 if(min_m12 >= max_m12)
return 0;
320 double min_s12 = min_m12*min_m12;
321 double max_s12 = max_m12*max_m12;
323 Double_t para[5]={mum, d1, d2, d3, d4};
325 _f->SetParameters(para);
329 double dx = (max_s12 - min_s12)/((
double)NSteps);
331 for(
int i=0; i< NSteps; i++){
332 double dim = 0.5 + (double) i;
333 double x = min_s12 + dx*dim;
371 const int numParticles=5;
376 Double_t p[numParticles];
377 for(
int i=0; i < numParticles; i++){
378 p[i] =
_pat[i].mass();
381 TF2 intFunc(
"d_ps4_by_ds12ds34_withFct" 389 intFunc.SetParameters(p);
397 Int_t mipt = 4000000;
398 Int_t mapt = 400000000;
399 Double_t epsilon = 1.e-8;
400 Double_t relerr = -1;
403 double returnVal = intFunc.IntegralMultiple(nDim, a, b
408 cout <<
"12, 34: just called : " 409 <<
" intFunc.IntegralMultiple( " << nDim
410 <<
", " << a[0] <<
"-" << b[0]
411 <<
", " << a[1] <<
"-" << b[1]
412 <<
", " << mipt <<
", " << mapt
413 <<
", " << epsilon <<
", " << relerr
414 <<
", " << nfnevl <<
", " << iFail
416 <<
" = " << returnVal << endl;
433 const int numParticles=5;
438 TF2 intFunc(
"d_ps4_by_ds13ds12_withFct" 445 Double_t p[numParticles];
446 for(
int i=0; i < numParticles; i++){
447 p[i] =
_pat[i].mass();
450 intFunc.SetParameters(p);
458 Int_t mipt = 4000000;
459 Int_t mapt = 400000000;
460 Double_t epsilon = 1.e-8;
461 Double_t relerr = -1;
464 double returnVal = intFunc.IntegralMultiple(nDim, a, b
470 cout <<
"123, 12: just called : " 471 <<
" intFunc.IntegralMultiple( " << nDim
472 <<
", " << a[0] <<
"-" << b[0]
473 <<
", " << a[1] <<
"-" << b[1]
474 <<
", " << mipt <<
", " << mapt
475 <<
", " << epsilon <<
", " << relerr
476 <<
", " << nfnevl <<
", " << iFail
478 <<
" = " << returnVal << endl;
double d4body_by_ds12(Double_t *x, Double_t *p)
virtual double transformedFctValue(double rho) const
double phaseSpaceIntegral2body(double mum, double d1, double d2)
PhaseSpaceIntegral3body()
PhaseSpaceIntegral4body()
PhaseSpaceIntegral4bodyWith_s123s12(IGenFct *s123f, IGenFct *s12f, const DalitzEventPattern &pat)
double getVal(const DalitzEventPattern &_pat)
PhaseSpaceIntegral4bodyWith_s12s34(IGenFct *s12f, IGenFct *s34f, const DalitzEventPattern &pat)
double getValCheck(const DalitzEventPattern &_pat)
double phaseSpaceIntegral_upTo4body(const DalitzEventPattern &pat)
double d3body_by_ds12(Double_t *x, Double_t *p)
unsigned int size() const
virtual double getRhoMi() const
double d_ps4_by_ds123ds12_withFct(Double_t *x, Double_t *p)
double getVal(const DalitzEventPattern &_pat)
virtual double coordTransformToS(double rho) const
double d_ps4_by_ds12ds34_withFct(Double_t *x, Double_t *p)
virtual double getRhoMa() const