BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBreitWignerPdf Class Reference

#include <EvtBreitWignerPdf.hh>

+ Inheritance diagram for EvtBreitWignerPdf:

Public Member Functions

 EvtBreitWignerPdf (double min, double max, double m0, double g0)
 
 EvtBreitWignerPdf (const EvtBreitWignerPdf &other)
 
virtual ~EvtBreitWignerPdf ()
 
double pdf (const EvtPoint1D &x) const
 
EvtPdf< EvtPoint1D > * clone () const
 
double pdfIntegral (double m) const
 
double pdfIntegralInverse (double x) const
 
double m0 () const
 
double g0 () const
 
- Public Member Functions inherited from EvtIntegPdf1D
 EvtIntegPdf1D (double min, double max)
 
 EvtIntegPdf1D (const EvtIntegPdf1D &)
 
virtual ~EvtIntegPdf1D ()
 
virtual double pdfIntegral (double x) const =0
 
virtual double pdfIntegralInverse (double x) const =0
 
virtual EvtValError compute_integral () const
 
virtual EvtPoint1D randomPoint ()
 
- Public Member Functions inherited from EvtPdf< EvtPoint1D >
 EvtPdf ()
 
 EvtPdf (const EvtPdf &other)
 
virtual ~EvtPdf ()
 
virtual EvtPdf< EvtPoint1D > * clone () const=0
 
double evaluate (const EvtPoint1D &p) const
 
EvtPdfMax< EvtPoint1DfindMax (const EvtPdf< EvtPoint1D > &pc, int N)
 
EvtValError findGenEff (const EvtPdf< EvtPoint1D > &pc, int N, int nFindMax)
 
void setItg (EvtValError itg)
 
EvtValError getItg () const
 
EvtValError getItg (int N) const
 
virtual EvtValError compute_integral () const
 
virtual EvtValError compute_integral (int N) const
 
EvtValError compute_mc_integral (const EvtPdf< EvtPoint1D > &pc, int N)
 
EvtPredGen< EvtPdfGen< EvtPoint1D >, EvtPdfPred< EvtPoint1D > > accRejGen (const EvtPdf< EvtPoint1D > &pc, int nMax, double factor=1.)
 
virtual EvtPoint1D randomPoint ()
 

Additional Inherited Members

virtual double pdf (const EvtPoint1D &) const=0
 
- Protected Attributes inherited from EvtIntegPdf1D
double _min
 
double _max
 
- Protected Attributes inherited from EvtPdf< EvtPoint1D >
EvtValError _itg
 

Detailed Description

Definition at line 17 of file EvtBreitWignerPdf.hh.

Constructor & Destructor Documentation

◆ EvtBreitWignerPdf() [1/2]

EvtBreitWignerPdf::EvtBreitWignerPdf ( double  min,
double  max,
double  m0,
double  g0 
)

Definition at line 21 of file EvtBreitWignerPdf.cc.

◆ EvtBreitWignerPdf() [2/2]

EvtBreitWignerPdf::EvtBreitWignerPdf ( const EvtBreitWignerPdf other)

Definition at line 26 of file EvtBreitWignerPdf.cc.

27 : EvtIntegPdf1D(other), _m0(other._m0), _g0(other._g0)
28{}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~EvtBreitWignerPdf()

EvtBreitWignerPdf::~EvtBreitWignerPdf ( )
virtual

Definition at line 31 of file EvtBreitWignerPdf.cc.

32{}

Member Function Documentation

◆ clone()

EvtPdf< EvtPoint1D > * EvtBreitWignerPdf::clone ( ) const
inlinevirtual

Implements EvtPdf< EvtPoint1D >.

Definition at line 26 of file EvtBreitWignerPdf.hh.

27 {
28 return new EvtBreitWignerPdf(*this);
29 }

◆ g0()

double EvtBreitWignerPdf::g0 ( ) const
inline

Definition at line 37 of file EvtBreitWignerPdf.hh.

37{ return _g0; }

◆ m0()

double EvtBreitWignerPdf::m0 ( ) const
inline

Definition at line 36 of file EvtBreitWignerPdf.hh.

36{ return _m0; }

◆ pdf()

double EvtBreitWignerPdf::pdf ( const EvtPoint1D x) const
virtual

Implements EvtPdf< EvtPoint1D >.

Definition at line 35 of file EvtBreitWignerPdf.cc.

36{
37 double m = x.value();
38 if((0 == (m - _m0)) && (0. == _g0)) {
39
40 printf("Delta function Breit-Wigner\n");
41 assert(0);
42 }
43
44 double ret = _g0/EvtConst::twoPi/((m-_m0)*(m-_m0)+_g0*_g0/4);
45
46 return ret;
47}
Double_t x[10]
static const double twoPi
Definition: EvtConst.hh:29

◆ pdfIntegral()

double EvtBreitWignerPdf::pdfIntegral ( double  m) const
virtual

Implements EvtIntegPdf1D.

Definition at line 50 of file EvtBreitWignerPdf.cc.

51{
52 double itg = 0;
53 if(_g0 == 0) {
54
55 if(m > _m0) itg = 1.;
56 else
57 if(m < _m0) itg = 0.;
58 else
59 itg = 0.5;
60 }
61 else itg = atan((m-_m0)/(_g0/2.))/EvtConst::pi + 0.5;
62
63 return itg;
64}
static const double pi
Definition: EvtConst.hh:28

◆ pdfIntegralInverse()

double EvtBreitWignerPdf::pdfIntegralInverse ( double  x) const
virtual

Implements EvtIntegPdf1D.

Definition at line 67 of file EvtBreitWignerPdf.cc.

68{
69 if(x < 0 || x > 1) {
70
71 printf("Invalid integral value %f\n",x);
72 assert(0);
73 }
74
75 double m = _m0;
76 if(_g0 != 0) m = _m0 + (_g0/2.)*tan(EvtConst::pi*(x-0.5));
77
78 return m;
79}
double tan(const BesAngle a)

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