MINT2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DalitzPdfBaseMCInteg Class Referenceabstract

#include <DalitzPdfBaseMCInteg.h>

Inheritance diagram for DalitzPdfBaseMCInteg:
MINT::PdfBase< IDalitzEvent > IDalitzPdf MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IPdf< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnRealForEvent< IDalitzEvent >

Public Member Functions

 DalitzPdfBaseMCInteg (const DalitzEventPattern &pat, IFastAmplitudeIntegrable *amps, double precision=1.e-3, MINT::IEventGenerator< IDalitzEvent > *generator=0, MINT::MinuitParameterSet *mps=0)
 
 DalitzPdfBaseMCInteg (const DalitzPdfBaseMCInteg &other)
 
virtual ~DalitzPdfBaseMCInteg ()
 
void setIntegrationPrecision (double prec)
 
void setEventGenerator (MINT::IEventGenerator< IDalitzEvent > *g)
 
MINT::IEventGenerator< IDalitzEvent > * getEventGenerator ()
 
const MINT::IEventGenerator< IDalitzEvent > * getEventGenerator () const
 
void parametersChanged ()
 
virtual double getVal (IDalitzEvent &evt)
 
virtual double getVal_withPs (IDalitzEvent &evt)
 
virtual double getVal_noPs (IDalitzEvent &evt)
 
virtual double getNewVal (IDalitzEvent &evt)
 
virtual double getVal (IDalitzEvent *evt)
 
virtual double getVal_withPs (IDalitzEvent *evt)
 
virtual double getVal_noPs (IDalitzEvent *evt)
 
virtual double getNewVal (IDalitzEvent *evt)
 
virtual double RealVal (IDalitzEvent &evt)
 
MINT::MinuitParameterSetgetMPS ()
 
const MINT::MinuitParameterSetgetMPS () const
 
virtual DalitzHistoSet histoSet ()
 
IFastAmplitudeIntegrablegetFitAmpSum ()
 
virtual void endFit ()
 
double getIntegralValue () const
 
double getIntegralValue ()
 
double redoIntegrator ()
 
void doFinalStats (MINT::Minimiser *mini=0)
 
- Public Member Functions inherited from MINT::PdfBase< IDalitzEvent >
 PdfBase ()
 
 PdfBase (const PdfBase< IDalitzEvent > &)
 
virtual void beginFit ()
 
virtual ~PdfBase ()
 
- Public Member Functions inherited from MINT::IPdf< IDalitzEvent >
virtual void Gradient (IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)
 
virtual bool useAnalyticGradient ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 

Protected Member Functions

virtual double un_normalised_noPs (IDalitzEvent &evt)=0
 
virtual double phaseSpace (IDalitzEvent &evt)
 
virtual bool getNorm ()
 
virtual bool integrating ()
 
IFastAmplitudeIntegrablegetAmps ()
 
MINT::IEventGenerator< IDalitzEvent > * makeDefaultGenerator ()
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 

Protected Attributes

MINT::MinuitParameterSet_mps
 
DalitzEventPattern _pat
 
double _norm
 
double _precision
 
DalitzMCIntegrator _mcint
 
IFastAmplitudeIntegrable_amps
 
MINT::IEventGenerator< IDalitzEvent > * _generator
 
bool _integrating
 
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
 
double _val
 

Detailed Description

Definition at line 50 of file DalitzPdfBaseMCInteg.h.

Constructor & Destructor Documentation

◆ DalitzPdfBaseMCInteg() [1/2]

DalitzPdfBaseMCInteg::DalitzPdfBaseMCInteg ( const DalitzEventPattern pat,
IFastAmplitudeIntegrable amps,
double  precision = 1.e-3,
MINT::IEventGenerator< IDalitzEvent > *  generator = 0,
MINT::MinuitParameterSet mps = 0 
)

Definition at line 62 of file DalitzPdfBaseMCInteg.cpp.

65  , _mps(mps)
66  , _pat(pat)
67  , _norm(-1)
68  , _precision(prec)
69  , _amps(amps)
70  , _generator(generator)
71  , _integrating(0)
73  , _val(-1)
74 {
75 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::MinuitParameterSet * _mps
DalitzEventPattern _pat
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
IFastAmplitudeIntegrable * _amps

◆ DalitzPdfBaseMCInteg() [2/2]

DalitzPdfBaseMCInteg::DalitzPdfBaseMCInteg ( const DalitzPdfBaseMCInteg other)

Definition at line 78 of file DalitzPdfBaseMCInteg.cpp.

81  , IDalitzPdf()
82  , PdfBase<IDalitzEvent>(other)
83  , _mps(other._mps)
84  , _pat(other._pat)
85  , _norm(other._norm)
86  , _precision(other._precision)
87  , _amps(other._amps)
88  , _generator(other._generator)
89  , _integrating(other._integrating)
91  , _val(-1)
92 {
93 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::MinuitParameterSet * _mps
DalitzEventPattern _pat
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
IFastAmplitudeIntegrable * _amps

◆ ~DalitzPdfBaseMCInteg()

DalitzPdfBaseMCInteg::~DalitzPdfBaseMCInteg ( )
virtual

Definition at line 95 of file DalitzPdfBaseMCInteg.cpp.

95  {
96 }

Member Function Documentation

◆ doFinalStats()

void DalitzPdfBaseMCInteg::doFinalStats ( MINT::Minimiser mini = 0)

Definition at line 185 of file DalitzPdfBaseMCInteg.cpp.

185  {
186  //_faint.doFinalStats(mini);
187  (void)mini;
188 }

◆ endFit()

void DalitzPdfBaseMCInteg::endFit ( )
virtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 180 of file DalitzPdfBaseMCInteg.cpp.

180  {
181 
182  //_faint.doFinalStats();
183 }

◆ getAmps()

IFastAmplitudeIntegrable * DalitzPdfBaseMCInteg::getAmps ( )
protected

Definition at line 98 of file DalitzPdfBaseMCInteg.cpp.

98  {
99  if(0 == _amps && (! _pat.empty())){
100  _amps = new FitAmpSum(_pat, getMPS());
101  }
102  return _amps;
103 }
DalitzEventPattern _pat
MINT::MinuitParameterSet * getMPS()
IFastAmplitudeIntegrable * _amps

◆ getEventGenerator() [1/2]

IEventGenerator< IDalitzEvent > * DalitzPdfBaseMCInteg::getEventGenerator ( )

Definition at line 41 of file DalitzPdfBaseMCInteg.cpp.

41  {
43  return _generator;
44 }
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::IEventGenerator< IDalitzEvent > * makeDefaultGenerator()

◆ getEventGenerator() [2/2]

const IEventGenerator< IDalitzEvent > * DalitzPdfBaseMCInteg::getEventGenerator ( ) const

Definition at line 45 of file DalitzPdfBaseMCInteg.cpp.

45  {
46  if(0 == _generator){
47  cout << "WARNING in DalitzPdfBaseMCInteg::getEventGenerator() const"
48  << " returning 0 pointer." << endl;
49  }
50  return _generator;
51 }
MINT::IEventGenerator< IDalitzEvent > * _generator

◆ getFitAmpSum()

IFastAmplitudeIntegrable* DalitzPdfBaseMCInteg::getFitAmpSum ( )
inline

Definition at line 145 of file DalitzPdfBaseMCInteg.h.

145 { return _amps;}
IFastAmplitudeIntegrable * _amps

◆ getIntegralValue() [1/2]

double DalitzPdfBaseMCInteg::getIntegralValue ( ) const
inline

Definition at line 148 of file DalitzPdfBaseMCInteg.h.

148  {
149  return _norm;
150  }

◆ getIntegralValue() [2/2]

double DalitzPdfBaseMCInteg::getIntegralValue ( )
inline

Definition at line 151 of file DalitzPdfBaseMCInteg.h.

151  {
152  if(_norm < 0) getNorm(); return _norm;
153  }

◆ getMPS() [1/2]

MinuitParameterSet * DalitzPdfBaseMCInteg::getMPS ( )

Definition at line 13 of file DalitzPdfBaseMCInteg.cpp.

13  {
14  return (0 == _mps ? MinuitParameterSet::getDefaultSet() : _mps);
15 }
MINT::MinuitParameterSet * _mps

◆ getMPS() [2/2]

const MinuitParameterSet * DalitzPdfBaseMCInteg::getMPS ( ) const

Definition at line 16 of file DalitzPdfBaseMCInteg.cpp.

16  {
17  return (0 == _mps ? MinuitParameterSet::getDefaultSet() : _mps);
18 }
MINT::MinuitParameterSet * _mps

◆ getNewVal() [1/2]

virtual double DalitzPdfBaseMCInteg::getNewVal ( IDalitzEvent evt)
inlinevirtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 102 of file DalitzPdfBaseMCInteg.h.

102  {
103  this->parametersChanged();
104  return getVal(evt);
105  };
virtual double getVal(IDalitzEvent &evt)

◆ getNewVal() [2/2]

virtual double DalitzPdfBaseMCInteg::getNewVal ( IDalitzEvent evt)
inlinevirtual

Definition at line 120 of file DalitzPdfBaseMCInteg.h.

120  {
121  this->parametersChanged();
122  if(0 == evt) return 0;
123  return getNewVal(*evt);
124  }
virtual double getNewVal(IDalitzEvent &evt)

◆ getNorm()

bool DalitzPdfBaseMCInteg::getNorm ( )
protectedvirtual

Definition at line 21 of file DalitzPdfBaseMCInteg.cpp.

21  {
22  _integrating = true;
23 
26  _norm = _mcint.getVal();
27 
28  _integrating = false;
29  return _norm > 0;
30 }
DalitzMCIntegrator _mcint
bool initialised() const
IFastAmplitudeIntegrable * getAmps()
MINT::IEventGenerator< IDalitzEvent > * getEventGenerator()
bool initialise(const DalitzEventPattern &pattern, MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0, MINT::IEventGenerator< IDalitzEvent > *eventGenerator=0, TRandom *rnd=gRandom, double precision=1.e-2)
DalitzEventPattern _pat
bool resetIntegrand(MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0)

◆ getVal() [1/2]

double DalitzPdfBaseMCInteg::getVal ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 112 of file DalitzPdfBaseMCInteg.cpp.

112  {
113  //if(_integrating) return getVal_withPs(evt);else
114  return getVal_noPs(evt);
115 }
virtual double getVal_noPs(IDalitzEvent &evt)

◆ getVal() [2/2]

virtual double DalitzPdfBaseMCInteg::getVal ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 108 of file DalitzPdfBaseMCInteg.h.

108  {
109  if(0 == evt) return 0;
110  return getVal(*evt);
111  }
virtual double getVal(IDalitzEvent &evt)

◆ getVal_noPs() [1/2]

double DalitzPdfBaseMCInteg::getVal_noPs ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 116 of file DalitzPdfBaseMCInteg.cpp.

116  {
117 
118  if(_integrating){
119  // shouldn't really do that - use getVal or getVal_withPs
120  // when you integrate (automatically done in getVal()):
121  return un_normalised_noPs(evt);
122  }else{
123  if(_norm == -1) getNorm();
124  double num = un_normalised_noPs(evt);
125  _val= num/_norm;
126 
127  return num/_norm;
128  }
129 }
virtual double un_normalised_noPs(IDalitzEvent &evt)=0

◆ getVal_noPs() [2/2]

virtual double DalitzPdfBaseMCInteg::getVal_noPs ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 116 of file DalitzPdfBaseMCInteg.h.

116  {
117  if(0 == evt) return 0;
118  return getVal_noPs(*evt);
119  }
virtual double getVal_noPs(IDalitzEvent &evt)

◆ getVal_withPs() [1/2]

double DalitzPdfBaseMCInteg::getVal_withPs ( IDalitzEvent evt)
virtual

Implements IDalitzPdf.

Definition at line 130 of file DalitzPdfBaseMCInteg.cpp.

130  {
131 
132  if(_integrating){
133  return un_normalised_noPs(evt)*phaseSpace(evt);
134  }else{
135  if(_norm == -1) getNorm();
136  double num = un_normalised_noPs(evt)*phaseSpace(evt);
137  return num/_norm;
138  }
139 }
virtual double un_normalised_noPs(IDalitzEvent &evt)=0
virtual double phaseSpace(IDalitzEvent &evt)

◆ getVal_withPs() [2/2]

virtual double DalitzPdfBaseMCInteg::getVal_withPs ( IDalitzEvent evt)
inlinevirtual

Implements IDalitzPdf.

Definition at line 112 of file DalitzPdfBaseMCInteg.h.

112  {
113  if(0 == evt) return 0;
114  return getVal_withPs(*evt);
115  }
virtual double getVal_withPs(IDalitzEvent &evt)

◆ histoSet()

DalitzHistoSet DalitzPdfBaseMCInteg::histoSet ( )
virtual

Implements IDalitzPdf.

Definition at line 142 of file DalitzPdfBaseMCInteg.cpp.

142  {
143  // non-const version to satisfy IDalitzPdf
144  return (_mcint.histoSet());
145 }
DalitzMCIntegrator _mcint
DalitzHistoSet histoSet()

◆ integrating()

bool DalitzPdfBaseMCInteg::integrating ( )
protectedvirtual

Definition at line 105 of file DalitzPdfBaseMCInteg.cpp.

105  {
106  return _integrating;
107 }

◆ makeDefaultGenerator()

IEventGenerator< IDalitzEvent > * DalitzPdfBaseMCInteg::makeDefaultGenerator ( )
protected

Definition at line 32 of file DalitzPdfBaseMCInteg.cpp.

32  {
33  if(_pat.empty()) return 0;
34  if(0 == getAmps()) return 0;
36  ptr(getAmps()->makeEventGenerator(_pat));
37  _defaultGenerator = ptr;
38  return _defaultGenerator.get();
39 }
IFastAmplitudeIntegrable * getAmps()
DalitzEventPattern _pat
MINT::counted_ptr< MINT::IEventGenerator< IDalitzEvent > > _defaultGenerator
X * get() const
Definition: counted_ptr.h:123

◆ parametersChanged()

void DalitzPdfBaseMCInteg::parametersChanged ( )
virtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 58 of file DalitzPdfBaseMCInteg.cpp.

58  {
59  getNorm();
60  _val= -1;
61 }

◆ phaseSpace()

double DalitzPdfBaseMCInteg::phaseSpace ( IDalitzEvent evt)
protectedvirtual

Definition at line 109 of file DalitzPdfBaseMCInteg.cpp.

109  {
110  return evt.phaseSpace();
111 }
virtual double phaseSpace() const =0

◆ RealVal()

virtual double DalitzPdfBaseMCInteg::RealVal ( IDalitzEvent evt)
inlinevirtual

Reimplemented from MINT::PdfBase< IDalitzEvent >.

Definition at line 126 of file DalitzPdfBaseMCInteg.h.

126 {return getVal(evt);}
virtual double getVal(IDalitzEvent &evt)

◆ redoIntegrator()

double DalitzPdfBaseMCInteg::redoIntegrator ( )
inline

Definition at line 154 of file DalitzPdfBaseMCInteg.h.

154  {
155  _norm = -1;
156  getNorm();
157  return _norm;
158  }

◆ setEventGenerator()

void DalitzPdfBaseMCInteg::setEventGenerator ( MINT::IEventGenerator< IDalitzEvent > *  g)
inline

Definition at line 93 of file DalitzPdfBaseMCInteg.h.

93 {_generator=g;}
MINT::IEventGenerator< IDalitzEvent > * _generator
static const double g

◆ setIntegrationPrecision()

void DalitzPdfBaseMCInteg::setIntegrationPrecision ( double  prec)

Definition at line 53 of file DalitzPdfBaseMCInteg.cpp.

53  {
54  _precision = prec;
56 }
DalitzMCIntegrator _mcint
void setPrecision(double prec)

◆ un_normalised_noPs()

virtual double DalitzPdfBaseMCInteg::un_normalised_noPs ( IDalitzEvent evt)
protectedpure virtual

Member Data Documentation

◆ _amps

IFastAmplitudeIntegrable* DalitzPdfBaseMCInteg::_amps
protected

Definition at line 60 of file DalitzPdfBaseMCInteg.h.

◆ _defaultGenerator

MINT::counted_ptr<MINT::IEventGenerator<IDalitzEvent> > DalitzPdfBaseMCInteg::_defaultGenerator
protected

Definition at line 64 of file DalitzPdfBaseMCInteg.h.

◆ _generator

MINT::IEventGenerator<IDalitzEvent>* DalitzPdfBaseMCInteg::_generator
protected

Definition at line 62 of file DalitzPdfBaseMCInteg.h.

◆ _integrating

bool DalitzPdfBaseMCInteg::_integrating
protected

Definition at line 63 of file DalitzPdfBaseMCInteg.h.

◆ _mcint

DalitzMCIntegrator DalitzPdfBaseMCInteg::_mcint
protected

Definition at line 59 of file DalitzPdfBaseMCInteg.h.

◆ _mps

MINT::MinuitParameterSet* DalitzPdfBaseMCInteg::_mps
protected

Definition at line 55 of file DalitzPdfBaseMCInteg.h.

◆ _norm

double DalitzPdfBaseMCInteg::_norm
protected

Definition at line 57 of file DalitzPdfBaseMCInteg.h.

◆ _pat

DalitzEventPattern DalitzPdfBaseMCInteg::_pat
protected

Definition at line 56 of file DalitzPdfBaseMCInteg.h.

◆ _precision

double DalitzPdfBaseMCInteg::_precision
protected

Definition at line 58 of file DalitzPdfBaseMCInteg.h.

◆ _val

double DalitzPdfBaseMCInteg::_val
protected

Definition at line 65 of file DalitzPdfBaseMCInteg.h.


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