35 initialise(pattern, weightFunction, generator, rnd, precision);
83 cout <<
" DalitzMCIntegrator::updateEventSet " 84 <<
" need to know pattern first." << endl;
89 cout <<
"missing events: " << missingEvents
93 if(missingEvents > 0){
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() " 188 double meanOfSq = sumsq / fN;
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;
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," 269 : _externalPdf(externalPdf)
271 cout <<
"after construction, externalPdf = " <<
_externalPdf << endl;
278 if(0 != den) weight /= den;
279 double val = _externalPdf->RealVal(evt) * weight;
MINT::IEventGenerator< IDalitzEvent > * _generator
virtual const EVENT_TYPE & getEventRef(unsigned int i) const
static const int _minEvents
virtual double getWeight() const =0
void push_back(const T &c)
integrationWeight(MINT::IReturnRealForEvent< IDalitzEvent > *externalPdf)
int generatePhaseSpaceEvents(int NumEvents, const DalitzEventPattern &pat, TRandom *rnd=0)
bool initialise(const DalitzEventPattern &pattern, MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0, MINT::IEventGenerator< IDalitzEvent > *eventGenerator=0, TRandom *rnd=gRandom, double precision=1.e-2)
MINT::IReturnRealForEvent< IDalitzEvent > * _w
int generateEnoughEvents()
virtual unsigned int size() const
virtual double getWeight() const
virtual counted_ptr< RETURN_TYPE > newEvent()=0
virtual double getGeneratorPdfRelativeToPhaseSpace() const
MINT::IReturnRealForEvent< IDalitzEvent > * _externalPdf
double RealVal(IDalitzEvent &evt)
virtual double getGeneratorPdfRelativeToPhaseSpace() const =0
int addEvents(int Nevents)
DalitzEventPtrList _eventPtrList
int updateEventSet(int Nevents)
void setWeight(MINT::IReturnRealForEvent< IDalitzEvent > *pdf)
virtual void doFinalStats(MINT::Minimiser *mini=0)
bool resetIntegrand(MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0)