#include <DalitzMCIntegrator.h>
Definition at line 28 of file DalitzMCIntegrator.h.
◆ DalitzMCIntegrator() [1/2]
Definition at line 20 of file DalitzMCIntegrator.cpp.
35 initialise(pattern, weightFunction, generator, rnd, precision);
bool initialise(const DalitzEventPattern &pattern, MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0, MINT::IEventGenerator< IDalitzEvent > *eventGenerator=0, TRandom *rnd=gRandom, double precision=1.e-2)
◆ DalitzMCIntegrator() [2/2]
DalitzMCIntegrator::DalitzMCIntegrator |
( |
| ) |
|
◆ ~DalitzMCIntegrator()
virtual DalitzMCIntegrator::~DalitzMCIntegrator |
( |
| ) |
|
|
inlinevirtual |
◆ addEvents()
int DalitzMCIntegrator::addEvents |
( |
int |
Nevents | ) |
|
|
protected |
Definition at line 99 of file DalitzMCIntegrator.cpp.
109 for(
int i=0; i < Nevents*1000 && N_success < Nevents; i++){
112 if(dbThis) cout <<
"got event with ptr: " << ptr << endl;
116 int printEvery = 1000;
117 if(N_success > 10000) printEvery=10000;
118 bool printout = (N_success%printEvery == 0);
120 cout <<
" DalitzMCIntegrator::addEvents: added " << N_success
121 <<
" th event" << endl;
125 cout <<
" added " << Nevents <<
" _eventList.size() " MINT::IEventGenerator< IDalitzEvent > * _generator
void push_back(const T &c)
int generatePhaseSpaceEvents(int NumEvents, const DalitzEventPattern &pat, TRandom *rnd=0)
virtual unsigned int size() const
virtual counted_ptr< RETURN_TYPE > newEvent()=0
DalitzEventPtrList _eventPtrList
◆ determineNumEvents()
int DalitzMCIntegrator::determineNumEvents |
( |
| ) |
|
|
protected |
Definition at line 213 of file DalitzMCIntegrator.cpp.
217 double safetyFactor = 1.15;
220 cout <<
" DalitzMCIntegrator::determineNumEvents():" 223 <<
"\n > to achieve requested pecision of " <<
_precision <<
"," 224 <<
"\n > I think we'll need " << (
_variance*safetyFactor/maxVariance)
225 <<
" times that, i.e. " <<
_numEvents <<
" events" << endl;
static const int _minEvents
virtual unsigned int size() const
DalitzEventPtrList _eventPtrList
int updateEventSet(int Nevents)
◆ doFinalStats()
◆ evaluateSum()
double DalitzMCIntegrator::evaluateSum |
( |
| ) |
|
|
protected |
Definition at line 130 of file DalitzMCIntegrator.cpp.
188 double meanOfSq = sumsq / fN;
virtual const EVENT_TYPE & getEventRef(unsigned int i) const
virtual unsigned int size() const
virtual double getWeight() const
virtual double getGeneratorPdfRelativeToPhaseSpace() const
double RealVal(IDalitzEvent &evt)
DalitzEventPtrList _eventPtrList
◆ generateEnoughEvents()
int DalitzMCIntegrator::generateEnoughEvents |
( |
| ) |
|
|
protected |
Definition at line 230 of file DalitzMCIntegrator.cpp.
virtual unsigned int size() const
int addEvents(int Nevents)
DalitzEventPtrList _eventPtrList
◆ getMPS() [1/2]
◆ getMPS() [2/2]
◆ getVal()
double DalitzMCIntegrator::getVal |
( |
| ) |
|
Definition at line 238 of file DalitzMCIntegrator.cpp.
242 if(
_Ncalls > 100) printEvery = 100;
243 if(
_Ncalls > 1000) printEvery = 1000;
244 if(
_Ncalls > 10000) printEvery = 10000;
245 if(
_Ncalls > 100000) printEvery = 100000;
248 time_t tstart = time(0);
250 double delT = difftime(time(0), tstart);
255 cout <<
"DalitzMCIntegrator::getVal, " <<
_Ncalls <<
"th call: Returning " <<
_mean 256 <<
" this call took " << delT <<
" s,"
virtual unsigned int size() const
DalitzEventPtrList _eventPtrList
◆ histoSet()
Definition at line 109 of file DalitzMCIntegrator.h.
DalitzEventPtrList _eventPtrList
DalitzHistoSet reWeightedHistoSet(MINT::IReturnRealForEvent< IDalitzEvent > *w)
◆ initialise()
Definition at line 49 of file DalitzMCIntegrator.cpp.
MINT::IEventGenerator< IDalitzEvent > * _generator
MINT::IReturnRealForEvent< IDalitzEvent > * _w
int generateEnoughEvents()
void setWeight(MINT::IReturnRealForEvent< IDalitzEvent > *pdf)
◆ initialised()
bool DalitzMCIntegrator::initialised |
( |
| ) |
const |
|
inline |
◆ RealVal()
double DalitzMCIntegrator::RealVal |
( |
| ) |
|
|
inlinevirtual |
◆ resetIntegrand()
Definition at line 73 of file DalitzMCIntegrator.cpp.
MINT::IReturnRealForEvent< IDalitzEvent > * _w
void setWeight(MINT::IReturnRealForEvent< IDalitzEvent > *pdf)
◆ setPrecision()
void DalitzMCIntegrator::setPrecision |
( |
double |
prec | ) |
|
|
inline |
◆ updateEventSet()
int DalitzMCIntegrator::updateEventSet |
( |
int |
Nevents | ) |
|
|
protected |
Definition at line 81 of file DalitzMCIntegrator.cpp.
83 cout <<
" DalitzMCIntegrator::updateEventSet " 84 <<
" need to know pattern first." << endl;
89 cout <<
"missing events: " << missingEvents
93 if(missingEvents > 0){
virtual unsigned int size() const
int addEvents(int Nevents)
DalitzEventPtrList _eventPtrList
◆ _eventPtrList
◆ _generator
◆ _initialised
bool DalitzMCIntegrator::_initialised |
|
private |
◆ _iw
◆ _mean
double DalitzMCIntegrator::_mean |
|
mutableprivate |
◆ _minEvents
const int DalitzMCIntegrator::_minEvents =1000 |
|
staticprivate |
◆ _mps
◆ _Ncalls
long int DalitzMCIntegrator::_Ncalls |
|
private |
◆ _numEvents
int DalitzMCIntegrator::_numEvents |
|
private |
◆ _pat
◆ _precision
double DalitzMCIntegrator::_precision |
|
protected |
◆ _rnd
TRandom* DalitzMCIntegrator::_rnd |
|
protected |
◆ _sumT
double DalitzMCIntegrator::_sumT |
|
private |
◆ _variance
double DalitzMCIntegrator::_variance |
|
mutableprivate |
◆ _w
◆ _weightSum
double DalitzMCIntegrator::_weightSum |
|
private |
The documentation for this class was generated from the following files: