BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDalitzFlatPdf Class Reference

#include <EvtDalitzFlatPdf.hh>

+ Inheritance diagram for EvtDalitzFlatPdf:

Public Member Functions

 EvtDalitzFlatPdf (const EvtDalitzPlot &dp)
 
 EvtDalitzFlatPdf (const EvtDalitzFlatPdf &other)
 
virtual ~EvtDalitzFlatPdf ()
 
virtual EvtPdf< EvtDalitzPoint > * clone () const
 
virtual EvtValError compute_integral (int N) const
 
virtual EvtDalitzPoint randomPoint ()
 
- Public Member Functions inherited from EvtPdf< EvtDalitzPoint >
 EvtPdf ()
 
 EvtPdf (const EvtPdf &other)
 
virtual ~EvtPdf ()
 
virtual EvtPdf< EvtDalitzPoint > * clone () const=0
 
double evaluate (const EvtDalitzPoint &p) const
 
EvtPdfMax< EvtDalitzPointfindMax (const EvtPdf< EvtDalitzPoint > &pc, int N)
 
EvtValError findGenEff (const EvtPdf< EvtDalitzPoint > &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< EvtDalitzPoint > &pc, int N)
 
EvtPredGen< EvtPdfGen< EvtDalitzPoint >, EvtPdfPred< EvtDalitzPoint > > accRejGen (const EvtPdf< EvtDalitzPoint > &pc, int nMax, double factor=1.)
 
virtual EvtDalitzPoint randomPoint ()
 

Protected Member Functions

virtual double pdf (const EvtDalitzPoint &) const
 
virtual double pdf (const EvtDalitzPoint &) const=0
 

Protected Attributes

EvtDalitzPlot _dp
 
- Protected Attributes inherited from EvtPdf< EvtDalitzPoint >
EvtValError _itg
 

Detailed Description

Definition at line 22 of file EvtDalitzFlatPdf.hh.

Constructor & Destructor Documentation

◆ EvtDalitzFlatPdf() [1/2]

EvtDalitzFlatPdf::EvtDalitzFlatPdf ( const EvtDalitzPlot dp)

Definition at line 14 of file EvtDalitzFlatPdf.cc.

16{}
EvtDalitzPlot _dp
Definition: EvtPdf.hh:57

◆ EvtDalitzFlatPdf() [2/2]

EvtDalitzFlatPdf::EvtDalitzFlatPdf ( const EvtDalitzFlatPdf other)

Definition at line 18 of file EvtDalitzFlatPdf.cc.

19 : EvtPdf<EvtDalitzPoint>(other), _dp(other._dp)
20{}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~EvtDalitzFlatPdf()

EvtDalitzFlatPdf::~EvtDalitzFlatPdf ( )
virtual

Definition at line 22 of file EvtDalitzFlatPdf.cc.

23{}

Member Function Documentation

◆ clone()

EvtPdf< EvtDalitzPoint > * EvtDalitzFlatPdf::clone ( ) const
virtual

Implements EvtPdf< EvtDalitzPoint >.

Definition at line 25 of file EvtDalitzFlatPdf.cc.

26{
27 return new EvtDalitzFlatPdf(*this);
28}

◆ compute_integral()

EvtValError EvtDalitzFlatPdf::compute_integral ( int  N) const
virtual

Reimplemented from EvtPdf< EvtDalitzPoint >.

Definition at line 35 of file EvtDalitzFlatPdf.cc.

36{
37 return EvtValError(_dp.getArea(N),0.);
38}
double getArea(int N=1000, EvtCyclic3::Pair i=EvtCyclic3::AB, EvtCyclic3::Pair j=EvtCyclic3::BC) const

◆ pdf()

double EvtDalitzFlatPdf::pdf ( const EvtDalitzPoint ) const
protectedvirtual

Implements EvtPdf< EvtDalitzPoint >.

Definition at line 30 of file EvtDalitzFlatPdf.cc.

31{
32 return 1.;
33}

◆ randomPoint()

EvtDalitzPoint EvtDalitzFlatPdf::randomPoint ( )
virtual

Reimplemented from EvtPdf< EvtDalitzPoint >.

Definition at line 40 of file EvtDalitzFlatPdf.cc.

41{
42 // To obtain a uniform distribution generate
43 // in terms of q's. Generate in a box that circumscribes the
44 // Dalitz plot. Accept points inside. If there are two
45 // many unsuccessful attempts it's a hint that the Dalitz plot
46 // area is tiny compared to the box. It's a pathological
47 // case. Abort.
48
51
52 int n = 0;
53 int maxTries = 1000;
54 while(n++ < maxTries) {
55
56 double q1 = EvtRandom::Flat(_dp.qAbsMin(pair1),_dp.qAbsMax(pair2));
57 double q2 = EvtRandom::Flat(_dp.qAbsMin(pair2),_dp.qAbsMax(pair2));
58
59 EvtDalitzCoord point(pair1,q1,pair2,q2);
60 EvtDalitzPoint x(_dp,point);
61
62 if(x.isValid()) return x;
63 }
64
65 printf("No point generated for dalitz plot after %d tries\n",maxTries);
66 assert(0);
67}
const Int_t n
Double_t x[10]
double qAbsMin(EvtCyclic3::Pair i) const
double qAbsMax(EvtCyclic3::Pair i) const
static double Flat()
Definition: EvtRandom.cc:73

Member Data Documentation

◆ _dp

EvtDalitzPlot EvtDalitzFlatPdf::_dp
protected

Definition at line 37 of file EvtDalitzFlatPdf.hh.

Referenced by compute_integral(), and randomPoint().


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