MINT2
Public Member Functions | Static Protected Attributes | List of all members
PhaseSpaceIntegral4body Class Reference

#include <phaseSpaceIntegrals.h>

Public Member Functions

 PhaseSpaceIntegral4body ()
 
double getVal (const DalitzEventPattern &_pat)
 
double getVal (double mum, double d1, double d2, double d3, double d4)
 
double getValCheck (const DalitzEventPattern &_pat)
 
double getValCheck (double mum, double d1, double d2, double d3, double d4)
 

Static Protected Attributes

static TF1 * _f = 0
 

Detailed Description

Definition at line 49 of file phaseSpaceIntegrals.h.

Constructor & Destructor Documentation

◆ PhaseSpaceIntegral4body()

PhaseSpaceIntegral4body::PhaseSpaceIntegral4body ( )

Definition at line 246 of file phaseSpaceIntegrals.cpp.

246  {
247  if(0 == _f){
248  _f = new TF1("d4body_by_ds12", d4body_by_ds12
249  , 0, 10*GeV*GeV
250  , 5
251  );
252  }
253  if(0 == _f){
254  cout << "phaseSpaceIntegral4body::phaseSpaceIntegral3body()"
255  << " failed to get TF1!!!" << endl;
256  }
257 }
double d4body_by_ds12(Double_t *x, Double_t *p)
static const double GeV

Member Function Documentation

◆ getVal() [1/2]

double PhaseSpaceIntegral4body::getVal ( const DalitzEventPattern _pat)

Definition at line 260 of file phaseSpaceIntegrals.cpp.

260  {
261  if(_pat.size() != 5){
262  cout << "phaseSpaceIntegral4body: wrong pattern " << _pat << endl;
263  }
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);
270 }
unsigned int size() const
double getVal(const DalitzEventPattern &_pat)

◆ getVal() [2/2]

double PhaseSpaceIntegral4body::getVal ( double  mum,
double  d1,
double  d2,
double  d3,
double  d4 
)

Definition at line 271 of file phaseSpaceIntegrals.cpp.

273  {
274 
275  bool dbThis = false;
276 
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;
282 
283  double min_s12 = min_m12*min_m12;
284  double max_s12 = max_m12*max_m12;
285 
286  Double_t para[5]={mum, d1, d2, d3, d4};
287 
288  _f->SetParameters(para);
289 
290  Int_t np = 1000;
291  double xpts[1000];
292  double wpts[1000];
293  _f->CalcGaussLegendreSamplingPoints(np,xpts,wpts,1e-15);
294  return _f->IntegralFast(np,xpts,wpts, min_s12, max_s12, para);
295  // return _f->Integral(min_s12, max_s12, para);
296 }

◆ getValCheck() [1/2]

double PhaseSpaceIntegral4body::getValCheck ( const DalitzEventPattern _pat)

Definition at line 297 of file phaseSpaceIntegrals.cpp.

297  {
298  if(_pat.size() != 5){
299  cout << "phaseSpaceIntegral4body: wrong pattern " << _pat << endl;
300  }
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);
307 }
double getValCheck(const DalitzEventPattern &_pat)
unsigned int size() const

◆ getValCheck() [2/2]

double PhaseSpaceIntegral4body::getValCheck ( double  mum,
double  d1,
double  d2,
double  d3,
double  d4 
)

Definition at line 308 of file phaseSpaceIntegrals.cpp.

310  {
311 
312  bool dbThis = false;
313 
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;
319 
320  double min_s12 = min_m12*min_m12;
321  double max_s12 = max_m12*max_m12;
322 
323  Double_t para[5]={mum, d1, d2, d3, d4};
324 
325  _f->SetParameters(para);
326 
327  int NSteps = 10000;
328  double sum = 0;
329  double dx = (max_s12 - min_s12)/((double)NSteps);
330 
331  for(int i=0; i< NSteps; i++){
332  double dim = 0.5 + (double) i;
333  double x = min_s12 + dx*dim;
334  sum += _f->Eval(x);
335  }
336  return sum*dx;
337 }

Member Data Documentation

◆ _f

TF1 * PhaseSpaceIntegral4body::_f = 0
staticprotected

Definition at line 51 of file phaseSpaceIntegrals.h.


The documentation for this class was generated from the following files: