#define ClassDefOverride(name, id)
Abstract class representing n-dimensional real positive integrand function.
Small auxiliary class for controlling MC weight.
Auxiliary class TFoamVect of n-dimensional vector, with dynamic allocation used for the cartesian geo...
TFoam is the main class of the multi-dimensional general purpose Monte Carlo event generator (integra...
TFoamCell * getCell(std::size_t i) const
virtual void MakeActiveList()
Internal method used by Initialize.
virtual void CheckAll(Int_t)
User utility, miscellaneous and debug.
TString fName
Name of a given instance of the FOAM class.
virtual Int_t Divide(TFoamCell *)
Internal method used by Initialize.
virtual void PrintCells()
Prints geometry of ALL cells of the FOAM.
TH1D * fHistWt
Histogram of the MC wt.
virtual void GetMCvect(Double_t *)
User may get generated MC point/vector with help of this method.
TFoamIntegrand * fRho
! Pointer to the user-defined integrand function/distribution
TRandom * fPseRan
Pointer to user-defined generator of pseudorandom numbers.
Double_t fMCerror
and its error
Double_t fPrime
Primary integral R' (R=R'<wt>)
Int_t fChat
Chat=0,1,2 chat level in output, Chat=1 normal level.
virtual void InitCells()
Internal method used by Initialize.
Double_t fNevGen
Total number of the generated MC events.
virtual void MakeEvent()
User method.
Double_t fSumWt2
Total sum of wt and wt^2.
TFoamVect ** fXdivPRD
! Lists of division values encoded in one vector per direction
~TFoam() override
Default destructor.
virtual Int_t GetTotDim() const
virtual Long_t PeekMax()
Internal method used by Initialize.
virtual void GenerCel2(TFoamCell *&)
Internal method.
virtual void SetEvPerBin(Int_t EvPerBin)
virtual void Initialize()
Basic initialization of FOAM invoked by the user.
virtual void Varedu(Double_t[5], Int_t &, Double_t &, Double_t &)
Internal method used by Initialize.
virtual void GetIntNorm(Double_t &, Double_t &)
User method.
TFoamMaxwt * fMCMonit
Monitor of the MC weight for measuring MC efficiency.
Int_t fRNmax
Maximum No. of the rand. numb. requested at once.
Int_t * fInhiDiv
! [fDim] Flags for inhibiting cell division
Long_t fNCalls
Total number of the function calls.
virtual Double_t GetMCwt()
User may get weight MC weight using this method.
virtual void SetnSampl(Long_t nSampl)
Double_t fWtMin
Maximum/Minimum MC weight.
virtual void ResetRho(TFoamIntegrand *Rho)
User may optionally reset the distribution using this method.
Int_t fEvPerBin
Maximum number of effective (wt=1) events per bin.
virtual void GetIntegMC(Double_t &, Double_t &)
User method.
Double_t fMaxWtRej
Maximum weight in rejection for getting wt=1 events.
Int_t fNCells
Maximum number of cells.
Double_t * fRvec
[fRNmax] random number vector from r.n. generator fDim+1 maximum elements
virtual void RootPlot2dim(Char_t *)
Debugging tool which plots 2-dimensional cells as rectangles in C++ format readable for root.
Double_t * fAlpha
[fDim] Internal parameters of the hyper-rectangle
Int_t fOptDrive
Optimization switch =1,2 for variance or maximum weight optimization.
virtual void Explore(TFoamCell *Cell)
Internal method used by Initialize.
virtual const char * GetVersion() const
virtual Long_t GetnEffev() const
virtual Double_t Eval(Double_t *)
Internal method.
virtual void SetMaxWtRej(Double_t MaxWtRej)
virtual void MakeAlpha()
Internal method used by Initialize.
virtual void ResetPseRan(TRandom *PseRan)
User may optionally reset random number generator using this method.
TMethodCall * fMethodCall
! ROOT's pointer to user-defined global distribution function
Double_t Sqr(Double_t x) const
virtual TRandom * GetPseRan() const
Int_t fLastCe
Index of the last cell.
Int_t fOptPRD
Option switch for predefined division, for quick check.
TObjArray * fHistDbg
Histograms of wt, for debug.
virtual void SetXdivPRD(Int_t, Int_t, Double_t[])
This should be called before Initialize, after setting kDim It predefines values of the cell division...
Double_t fSumOve
Total Sum of overweighted events.
virtual void SetInhiDiv(Int_t, Int_t)
This can be called before Initialize, after setting kDim It defines which variables are excluded in t...
virtual void SetChat(Int_t Chat)
std::vector< Long_t > fCellsAct
Index of active cells, constructed at the end of foam build-up.
virtual void SetOptDrive(Int_t OptDrive)
virtual void SetnCells(Long_t nCells)
virtual Long_t GetnCalls() const
virtual TFoamIntegrand * GetRho()
Int_t * fMaskDiv
! [fDim] Dynamic Mask for cell division
virtual void GetPrimary(Double_t &prime)
virtual void LinkCells(void)
virtual void SetRho(TFoamIntegrand *Rho)
User may use this method to set the distribution object.
virtual void SetRhoInt(Double_t(*fun)(Int_t, Double_t *))
User may use this method to set the distribution object as a global function pointer (and not as an i...
Int_t fNoAct
Number of active cells.
virtual void Finalize(Double_t &, Double_t &)
May be called optionally by the user after the MC run.
Long_t fNEffev
Total number of effective events (wt=1) in the foam buildup.
Int_t fOptRej
Switch =0 for weighted events; =1 for unweighted events in MC.
virtual Double_t GetPrimary() const
Double_t * fPrimAcu
[fNoAct] Array of cumulative probability of all active cells
virtual Double_t MCgenerate(Double_t *MCvect)
User method which generates MC event and returns MC weight.
Double_t * fMCvect
[fDim] Generated MC vector for the outside user
TString fVersion
Actual version of the FOAM like (1.01m)
virtual void SetOptRej(Int_t OptRej)
virtual Int_t CellFill(Int_t, TFoamCell *)
Internal method used by Initialize.
Int_t fDim
Dimension of the integration/simulation space.
Int_t fNSampl
No. of MC events, when dividing (exploring) cell.
TString fDate
Release date of FOAM.
TFoamCell ** fCells
[fNCells] Array of ALL cells
virtual void SetPseRan(TRandom *PseRan)
virtual void SetnBin(Int_t nBin)
virtual void SetkDim(Int_t kDim)
TObjArray * fHistEdg
Histograms of wt, one for each cell edge.
Double_t fMCresult
True Integral R from MC series.
virtual void GetWtParams(Double_t, Double_t &, Double_t &, Double_t &)
May be called optionally after the MC run.
Int_t fNBin
No. of bins in the edge histogram for cell MC exploration.
virtual void Grow()
Internal method used by Initialize.
TFoam()
Default constructor for streamer, user should not use it.
virtual void Carver(Int_t &, Double_t &, Double_t &)
Internal method used by Initialize.
1-D histogram with a double per channel (see TH1 documentation)
Method or function calling interface.
Mother of all ROOT objects.
This is the base class for the ROOT Random number generators.
const char * Data() const