ROOT  6.06/08
Reference Guide
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
TFoam Class Reference

Definition at line 29 of file TFoam.h.

Public Member Functions

 TFoam ()
 Default constructor for streamer, user should not use it. More...
 
 TFoam (const Char_t *)
 User constructor, to be employed by the user. More...
 
virtual ~TFoam ()
 Default destructor. More...
 
 TFoam (const TFoam &)
 Copy Constructor NOT IMPLEMENTED (NEVER USED) More...
 
virtual void Initialize ()
 Basic initialization of FOAM invoked by the user. More...
 
virtual void Initialize (TRandom *, TFoamIntegrand *)
 Basic initialization of FOAM invoked by the user. More...
 
virtual void InitCells ()
 Internal subprogram used by Initialize. More...
 
virtual Int_t CellFill (Int_t, TFoamCell *)
 Internal subprogram used by Initialize. More...
 
virtual void Explore (TFoamCell *Cell)
 Internal subprogram used by Initialize. More...
 
virtual void Carver (Int_t &, Double_t &, Double_t &)
 Internal subrogram used by Initialize. More...
 
virtual void Varedu (Double_t [], Int_t &, Double_t &, Double_t &)
 Internal subrogram used by Initialize. More...
 
virtual void MakeAlpha ()
 Internal subrogram used by Initialize. More...
 
virtual void Grow ()
 Internal subrogram used by Initialize. More...
 
virtual Long_t PeekMax ()
 Internal subprogram used by Initialize. More...
 
virtual Int_t Divide (TFoamCell *)
 Internal subrogram used by Initialize. More...
 
virtual void MakeActiveList ()
 Internal subrogram used by Initialize. More...
 
virtual void GenerCel2 (TFoamCell *&)
 Internal subprogram. More...
 
virtual Double_t Eval (Double_t *)
 Internal subprogram. More...
 
virtual void MakeEvent ()
 User subprogram. More...
 
virtual void GetMCvect (Double_t *)
 User may get generated MC point/vector with help of this method. More...
 
virtual void GetMCwt (Double_t &)
 User may get weight MC weight using this method. More...
 
virtual Double_t GetMCwt ()
 User may get weight MC weight using this method. More...
 
virtual Double_t MCgenerate (Double_t *MCvect)
 User subprogram which generates MC event and returns MC weight. More...
 
virtual void GetIntegMC (Double_t &, Double_t &)
 User subprogram. More...
 
virtual void GetIntNorm (Double_t &, Double_t &)
 User subprogram. More...
 
virtual void GetWtParams (Double_t, Double_t &, Double_t &, Double_t &)
 May be called optionally after the MC run. More...
 
virtual void Finalize (Double_t &, Double_t &)
 May be called optionally by the user after the MC run. More...
 
virtual TFoamIntegrandGetRho ()
 
virtual TRandomGetPseRan () const
 
virtual void SetRhoInt (void *Rho)
 User may use this to set pointer to the global function (not descending from TFoamIntegrand) serving as a distribution for FOAM. More...
 
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 interpreted function). More...
 
virtual void SetRho (TFoamIntegrand *Rho)
 User may use this method to set the distribution object. More...
 
virtual void ResetRho (TFoamIntegrand *Rho)
 User may optionally reset the distribution using this method Usually it is done when FOAM object is restored from the disk. More...
 
virtual void SetPseRan (TRandom *PseRan)
 
virtual void ResetPseRan (TRandom *PseRan)
 User may optionally reset random number generator using this method Usually it is done when FOAM object is restored from the disk. More...
 
virtual void SetkDim (Int_t kDim)
 
virtual void SetnCells (Long_t nCells)
 
virtual void SetnSampl (Long_t nSampl)
 
virtual void SetnBin (Int_t nBin)
 
virtual void SetChat (Int_t Chat)
 
virtual void SetOptRej (Int_t OptRej)
 
virtual void SetOptDrive (Int_t OptDrive)
 
virtual void SetEvPerBin (Int_t EvPerBin)
 
virtual void SetMaxWtRej (Double_t MaxWtRej)
 
virtual void SetInhiDiv (Int_t, Int_t)
 This can be called before Initialize, after setting kDim It defines which variables are excluded in the process of the cell division. More...
 
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 for certain variable iDim. More...
 
virtual const char * GetVersion () const
 
virtual Int_t GetTotDim () const
 
virtual Double_t GetPrimary () const
 
virtual void GetPrimary (Double_t &prime)
 
virtual Long_t GetnCalls () const
 
virtual Long_t GetnEffev () const
 
virtual void CheckAll (Int_t)
 User utility, miscellaneous and debug. More...
 
virtual void PrintCells ()
 Prints geometry of ALL cells of the FOAM. More...
 
virtual void RootPlot2dim (Char_t *)
 Debugging tool which plots 2-dimensional cells as rectangles in C++ format readable for root. More...
 
virtual void LinkCells (void)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsSortable () const
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Protected Attributes

TString fName
 
TString fVersion
 
TString fDate
 
Int_t fDim
 
Int_t fNCells
 
Int_t fRNmax
 
Int_t fOptDrive
 
Int_t fChat
 
Int_t fOptRej
 
Int_t fNBin
 
Int_t fNSampl
 
Int_t fEvPerBin
 
Int_tfMaskDiv
 
Int_tfInhiDiv
 [fDim] Dynamic Mask for cell division More...
 
Int_t fOptPRD
 [fDim] Flags for inhibiting cell division More...
 
TFoamVect ** fXdivPRD
 
Int_t fNoAct
 Lists of division values encoded in one vector per direction. More...
 
Int_t fLastCe
 
TFoamCell ** fCells
 
TFoamMaxwtfMCMonit
 
Double_t fMaxWtRej
 
TRefArrayfCellsAct
 
Double_tfPrimAcu
 
TObjArrayfHistEdg
 
TObjArrayfHistDbg
 
TH1DfHistWt
 
Double_tfMCvect
 
Double_t fMCwt
 
Double_tfRvec
 
TFoamIntegrandfRho
 
TMethodCallfMethodCall
 Pointer to the user-defined integrand function/distribution. More...
 
TRandomfPseRan
 ROOT's pointer to user-defined global distribution function. More...
 
Long_t fNCalls
 
Long_t fNEffev
 
Double_t fSumWt
 
Double_t fSumWt2
 
Double_t fSumOve
 
Double_t fNevGen
 
Double_t fWtMax
 
Double_t fWtMin
 
Double_t fPrime
 
Double_t fMCresult
 
Double_t fMCerror
 
Double_tfAlpha
 

Private Member Functions

Double_t Sqr (Double_t x) const
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

#include <TFoam.h>

+ Inheritance diagram for TFoam:
+ Collaboration diagram for TFoam:

Constructor & Destructor Documentation

§ TFoam() [1/3]

TFoam::TFoam ( )

Default constructor for streamer, user should not use it.

Definition at line 178 of file TFoam.cxx.

§ TFoam() [2/3]

TFoam::TFoam ( const Char_t Name)

User constructor, to be employed by the user.

Definition at line 199 of file TFoam.cxx.

§ ~TFoam()

TFoam::~TFoam ( )
virtual

Default destructor.

Definition at line 263 of file TFoam.cxx.

§ TFoam() [3/3]

TFoam::TFoam ( const TFoam From)

Copy Constructor NOT IMPLEMENTED (NEVER USED)

Definition at line 304 of file TFoam.cxx.

Member Function Documentation

§ Carver()

void TFoam::Carver ( Int_t kBest,
Double_t xBest,
Double_t yBest 
)
virtual

Internal subrogram used by Initialize.

Determines the best edge-candidate and the position of the division plane for the future cell division, in the case of the optimization of the maximum weight. It exploits results of the cell MC exploration run stored in fHistEdg.

Definition at line 780 of file TFoam.cxx.

Referenced by Explore().

§ CellFill()

Int_t TFoam::CellFill ( Int_t  Status,
TFoamCell parent 
)
virtual

Internal subprogram used by Initialize.

It initializes content of the newly allocated active cell.

Definition at line 512 of file TFoam.cxx.

Referenced by Divide(), and InitCells().

§ CheckAll()

void TFoam::CheckAll ( Int_t  level)
virtual

User utility, miscellaneous and debug.

Checks all pointers in the tree of cells. This is useful autodiagnostic. level=0, no printout, failures causes STOP level=1, printout, failures lead to WARNINGS only

Definition at line 1419 of file TFoam.cxx.

Referenced by GetnEffev(), and Grow().

§ Divide()

Int_t TFoam::Divide ( TFoamCell cell)
virtual

Internal subrogram used by Initialize.

It divides cell iCell into two daughter cells. The iCell is retained and tagged as inactive, daughter cells are appended at the end of the buffer. New vertex is added to list of vertices. List of active cells is updated, iCell removed, two daughters added and their properties set with help of MC sampling (TFoam_Explore) Returns Code RC=-1 of buffer limit is reached, fLastCe=fnBuf.

Definition at line 961 of file TFoam.cxx.

Referenced by Grow().

§ Eval()

Double_t TFoam::Eval ( Double_t xRand)
virtual

Internal subprogram.

Evaluates distribution to be generated.

Definition at line 1109 of file TFoam.cxx.

Referenced by Explore(), and MakeEvent().

§ Explore()

void TFoam::Explore ( TFoamCell cell)
virtual

Internal subprogram used by Initialize.

It explores newly defined cell with help of special short MC sampling. As a result, estimates of true and drive volume is defined/determined Average and dispersion of the weight distribution will is found along each edge and the best edge (minimum dispersion, best maximum weight) is memorized for future use. The optimal division point for eventual future cell division is determined/recorded. Recorded are also minimum and maximum weight etc. The volume estimate in all (inactive) parent cells is updated. Note that links to parents and initial volume = 1/2 parent has to be already defined prior to calling this routine.

Definition at line 553 of file TFoam.cxx.

Referenced by Divide(), and InitCells().

§ Finalize()

void TFoam::Finalize ( Double_t IntNorm,
Double_t Errel 
)
virtual

May be called optionally by the user after the MC run.

It provides normalization and also prints some information/statistics on the MC run.

Definition at line 1303 of file TFoam.cxx.

§ GenerCel2()

void TFoam::GenerCel2 ( TFoamCell *&  pCell)
virtual

Internal subprogram.

Return randomly chosen active cell with probability equal to its contribution into total driver integral using interpolation search.

Definition at line 1131 of file TFoam.cxx.

Referenced by MakeEvent().

§ GetIntegMC()

void TFoam::GetIntegMC ( Double_t mcResult,
Double_t mcError 
)
virtual

User subprogram.

It provides the value of the integral calculated from the averages of the MC run May be called after (or during) the MC run.

Definition at line 1254 of file TFoam.cxx.

Referenced by Finalize(), and GetIntNorm().

§ GetIntNorm()

void TFoam::GetIntNorm ( Double_t IntNorm,
Double_t Errel 
)
virtual

User subprogram.

It returns NORMALIZATION integral to be combined with the average weights and content of the histograms in order to get proper absolute normalization of the integrand and distributions. It can be called after initialization, before or during the MC run.

Definition at line 1273 of file TFoam.cxx.

Referenced by Finalize().

§ GetMCvect()

void TFoam::GetMCvect ( Double_t MCvect)
virtual

User may get generated MC point/vector with help of this method.

Definition at line 1219 of file TFoam.cxx.

Referenced by RooFoamGenerator::generateEvent(), and MCgenerate().

§ GetMCwt() [1/2]

void TFoam::GetMCwt ( Double_t mcwt)
virtual

User may get weight MC weight using this method.

Definition at line 1234 of file TFoam.cxx.

§ GetMCwt() [2/2]

Double_t TFoam::GetMCwt ( void  )
virtual

User may get weight MC weight using this method.

Definition at line 1227 of file TFoam.cxx.

§ GetnCalls()

virtual Long_t TFoam::GetnCalls ( ) const
inlinevirtual

Definition at line 143 of file TFoam.h.

§ GetnEffev()

virtual Long_t TFoam::GetnEffev ( ) const
inlinevirtual

Definition at line 144 of file TFoam.h.

§ GetPrimary() [1/2]

virtual Double_t TFoam::GetPrimary ( ) const
inlinevirtual

Definition at line 141 of file TFoam.h.

§ GetPrimary() [2/2]

virtual void TFoam::GetPrimary ( Double_t prime)
inlinevirtual

Definition at line 142 of file TFoam.h.

§ GetPseRan()

virtual TRandom* TFoam::GetPseRan ( ) const
inlinevirtual

Definition at line 119 of file TFoam.h.

§ GetRho()

virtual TFoamIntegrand* TFoam::GetRho ( )
inlinevirtual

Definition at line 118 of file TFoam.h.

§ GetTotDim()

virtual Int_t TFoam::GetTotDim ( ) const
inlinevirtual

Definition at line 140 of file TFoam.h.

§ GetVersion()

virtual const char* TFoam::GetVersion ( ) const
inlinevirtual

Definition at line 139 of file TFoam.h.

§ GetWtParams()

void TFoam::GetWtParams ( Double_t  eps,
Double_t aveWt,
Double_t wtMax,
Double_t sigma 
)
virtual

May be called optionally after the MC run.

Returns various parameters of the MC weight for efficiency evaluation

Definition at line 1290 of file TFoam.cxx.

Referenced by Finalize().

§ Grow()

void TFoam::Grow ( )
virtual

Internal subrogram used by Initialize.

It grow new cells by the binary division process.

Definition at line 893 of file TFoam.cxx.

Referenced by Initialize().

§ InitCells()

void TFoam::InitCells ( )
virtual

Internal subprogram used by Initialize.

It initializes "root part" of the FOAM of the tree of cells.

Definition at line 480 of file TFoam.cxx.

Referenced by Initialize().

§ Initialize() [1/2]

void TFoam::Initialize ( )
virtual

Basic initialization of FOAM invoked by the user.

IMPORTANT: Random number generator and the distribution object has to be provided using SetPseRan and SetRho prior to invoking this initializator!

Definition at line 356 of file TFoam.cxx.

Referenced by Initialize(), and RooFoamGenerator::RooFoamGenerator().

§ Initialize() [2/2]

void TFoam::Initialize ( TRandom PseRan,
TFoamIntegrand fun 
)
virtual

Basic initialization of FOAM invoked by the user.

Mandatory!

This method starts the process of the cell build-up. User must invoke Initialize with two arguments or Initialize without arguments. This is done BEFORE generating first MC event and AFTER allocating FOAM object and reseting (optionally) its internal parameters/switches. The overall operational scheme of the FOAM is the following:

This method invokes several other methods:

InitCells initializes memory storage for cells and begins exploration process from the root cell. The empty cells are allocated/filled using CellFill. The procedure Grow which loops over cells, picks up the cell with the biggest ``driver integral'', see Comp. Phys. Commun. 152 152 (2003) 55 for explanations, with the help of PeekMax procedure. The chosen cell is split using Divide. Subsequently, the procedure Explore called by the Divide (and by InitCells for the root cell) does the most important job in the FOAM object build-up: it performs a small MC run for each newly allocated daughter cell. Explore calculates how profitable the future split of the cell will be and defines the optimal cell division geometry with the help of Carver or Varedu procedures, for maximum weight or variance optimization respectively. All essential results of the exploration are written into the explored cell object. At the very end of the foam build-up, Finally, MakeActiveList is invoked to create a list of pointers to all active cells, for the purpose of the quick access during the MC generation. The procedure Explore employs MakeAlpha to generate random coordinates inside a given cell with the uniform distribution. The above sequence of the procedure calls is depicted in the following figure:

Definition at line 344 of file TFoam.cxx.

§ LinkCells()

void TFoam::LinkCells ( void  )
virtual

Definition at line 1558 of file TFoam.cxx.

Referenced by GetnEffev().

§ MakeActiveList()

void TFoam::MakeActiveList ( )
virtual

Internal subrogram used by Initialize.

It finds out number of active cells fNoAct, creates list of active cell fCellsAct and primary cumulative fPrimAcu. They are used during the MC generation to choose randomly an active cell.

Definition at line 993 of file TFoam.cxx.

Referenced by Initialize().

§ MakeAlpha()

void TFoam::MakeAlpha ( )
virtual

Internal subrogram used by Initialize.

Provides random vector Alpha 0< Alpha(i) < 1

Definition at line 878 of file TFoam.cxx.

Referenced by Explore(), and MakeEvent().

§ MakeEvent()

void TFoam::MakeEvent ( void  )
virtual

User subprogram.

It generates randomly point/vector according to user-defined distribution. Prior initialization with help of Initialize() is mandatory. Generated MC point/vector is available using GetMCvect and the MC weight with GetMCwt. MC point is generated with wt=1 or with variable weight, see OptRej switch.

Definition at line 1169 of file TFoam.cxx.

Referenced by RooFoamGenerator::generateEvent(), and MCgenerate().

§ MCgenerate()

Double_t TFoam::MCgenerate ( Double_t MCvect)
virtual

User subprogram which generates MC event and returns MC weight.

Definition at line 1242 of file TFoam.cxx.

§ PeekMax()

Long_t TFoam::PeekMax ( )
virtual

Internal subprogram used by Initialize.

It finds cell with maximal driver integral for the purpose of the division.

Definition at line 928 of file TFoam.cxx.

Referenced by Grow().

§ PrintCells()

void TFoam::PrintCells ( void  )
virtual

Prints geometry of ALL cells of the FOAM.

Definition at line 1487 of file TFoam.cxx.

Referenced by GetnEffev(), and Initialize().

§ ResetPseRan()

void TFoam::ResetPseRan ( TRandom PseRan)
virtual

User may optionally reset random number generator using this method Usually it is done when FOAM object is restored from the disk.

IMPORTANT: this method deletes existing random number generator registered in the FOAM object. In particular such an object is created by the streamer during the disk-read operation.

Definition at line 1036 of file TFoam.cxx.

Referenced by SetPseRan().

§ ResetRho()

void TFoam::ResetRho ( TFoamIntegrand fun)
virtual

User may optionally reset the distribution using this method Usually it is done when FOAM object is restored from the disk.

IMPORTANT: this method deletes existing distribution object registered in the FOAM object. In particular such an object is created by the streamer diring the disk-read operation. This method is used only in very special cases, because the distribution in most cases should be "owned" by the FOAM object and should not be replaced by another one after initialization.

Definition at line 1078 of file TFoam.cxx.

Referenced by GetPseRan().

§ RootPlot2dim()

void TFoam::RootPlot2dim ( Char_t filename)
virtual

Debugging tool which plots 2-dimensional cells as rectangles in C++ format readable for root.

Definition at line 1504 of file TFoam.cxx.

Referenced by GetnEffev().

§ SetChat()

virtual void TFoam::SetChat ( Int_t  Chat)
inlinevirtual

Definition at line 131 of file TFoam.h.

Referenced by RooFoamGenerator::RooFoamGenerator().

§ SetEvPerBin()

virtual void TFoam::SetEvPerBin ( Int_t  EvPerBin)
inlinevirtual

Definition at line 134 of file TFoam.h.

§ SetInhiDiv()

void TFoam::SetInhiDiv ( Int_t  iDim,
Int_t  InhiDiv 
)
virtual

This can be called before Initialize, after setting kDim It defines which variables are excluded in the process of the cell division.

For example 'FoamX->SetInhiDiv(1, 1);' inhibits division of y-variable. The resulting map of cells in 2-dim. case will look as follows:

Definition at line 1355 of file TFoam.cxx.

Referenced by SetMaxWtRej().

§ SetkDim()

virtual void TFoam::SetkDim ( Int_t  kDim)
inlinevirtual

Definition at line 127 of file TFoam.h.

Referenced by RooFoamGenerator::RooFoamGenerator().

§ SetMaxWtRej()

virtual void TFoam::SetMaxWtRej ( Double_t  MaxWtRej)
inlinevirtual

Definition at line 135 of file TFoam.h.

§ SetnBin()

virtual void TFoam::SetnBin ( Int_t  nBin)
inlinevirtual

Definition at line 130 of file TFoam.h.

§ SetnCells()

virtual void TFoam::SetnCells ( Long_t  nCells)
inlinevirtual

Definition at line 128 of file TFoam.h.

Referenced by RooFoamGenerator::RooFoamGenerator().

§ SetnSampl()

virtual void TFoam::SetnSampl ( Long_t  nSampl)
inlinevirtual

Definition at line 129 of file TFoam.h.

Referenced by RooFoamGenerator::RooFoamGenerator().

§ SetOptDrive()

virtual void TFoam::SetOptDrive ( Int_t  OptDrive)
inlinevirtual

Definition at line 133 of file TFoam.h.

§ SetOptRej()

virtual void TFoam::SetOptRej ( Int_t  OptRej)
inlinevirtual

Definition at line 132 of file TFoam.h.

§ SetPseRan()

virtual void TFoam::SetPseRan ( TRandom PseRan)
inlinevirtual

Definition at line 124 of file TFoam.h.

Referenced by Initialize(), ResetPseRan(), and RooFoamGenerator::RooFoamGenerator().

§ SetRho()

void TFoam::SetRho ( TFoamIntegrand Rho)
virtual

User may use this method to set the distribution object.

Definition at line 1048 of file TFoam.cxx.

Referenced by GetPseRan(), Initialize(), ResetRho(), and RooFoamGenerator::RooFoamGenerator().

§ SetRhoInt() [1/2]

void TFoam::SetRhoInt ( void fun)
virtual

User may use this to set pointer to the global function (not descending from TFoamIntegrand) serving as a distribution for FOAM.

It is useful for simple interactive applications. Note that persistency for FOAM object will not work in the case of such a distribution.

Definition at line 1094 of file TFoam.cxx.

Referenced by GetPseRan().

§ SetRhoInt() [2/2]

void TFoam::SetRhoInt ( Double_t(*)(Int_t, Double_t *)  fun)
virtual

User may use this method to set the distribution object as a global function pointer (and not as an interpreted function).

Definition at line 1059 of file TFoam.cxx.

§ SetXdivPRD()

void TFoam::SetXdivPRD ( Int_t  iDim,
Int_t  len,
Double_t  xDiv[] 
)
virtual

This should be called before Initialize, after setting kDim It predefines values of the cell division for certain variable iDim.

For example setting 3 predefined division lines using: xDiv[0]=0.30; xDiv[1]=0.40; xDiv[2]=0.65; FoamX->SetXdivPRD(0,3,xDiv); results in the following 2-dim. pattern of the cells:

Definition at line 1379 of file TFoam.cxx.

Referenced by SetMaxWtRej().

§ Sqr()

Double_t TFoam::Sqr ( Double_t  x) const
inlineprivate

Definition at line 152 of file TFoam.h.

Referenced by Varedu().

§ Varedu()

void TFoam::Varedu ( Double_t  [],
Int_t ,
Double_t ,
Double_t  
)
virtual

Internal subrogram used by Initialize.

In determines the best edge candidate and the position of the cell division plane in case of the variance reduction for future cell division, using results of the MC exploration run stored in fHistEdg

Definition at line 704 of file TFoam.cxx.

Referenced by Explore().

Member Data Documentation

§ fAlpha

Double_t* TFoam::fAlpha
protected

Definition at line 83 of file TFoam.h.

Referenced by Explore(), Initialize(), MakeAlpha(), MakeEvent(), TFoam(), and ~TFoam().

§ fCells

TFoamCell** TFoam::fCells
protected

§ fCellsAct

TRefArray* TFoam::fCellsAct
protected

Definition at line 59 of file TFoam.h.

Referenced by GenerCel2(), MakeActiveList(), TFoam(), and ~TFoam().

§ fChat

Int_t TFoam::fChat
protected

Definition at line 41 of file TFoam.h.

Referenced by Finalize(), Grow(), Initialize(), and TFoam().

§ fDate

TString TFoam::fDate
protected

Definition at line 35 of file TFoam.h.

Referenced by Initialize(), and TFoam().

§ fDim

Int_t TFoam::fDim
protected

§ fEvPerBin

Int_t TFoam::fEvPerBin
protected

Definition at line 46 of file TFoam.h.

Referenced by Explore(), Initialize(), and TFoam().

§ fHistDbg

TObjArray* TFoam::fHistDbg
protected

Definition at line 62 of file TFoam.h.

Referenced by Initialize(), TFoam(), Varedu(), and ~TFoam().

§ fHistEdg

TObjArray* TFoam::fHistEdg
protected

Definition at line 61 of file TFoam.h.

Referenced by Carver(), Explore(), Initialize(), TFoam(), Varedu(), and ~TFoam().

§ fHistWt

TH1D* TFoam::fHistWt
protected

Definition at line 63 of file TFoam.h.

Referenced by Explore(), Initialize(), MakeEvent(), TFoam(), and ~TFoam().

§ fInhiDiv

Int_t* TFoam::fInhiDiv
protected

[fDim] Dynamic Mask for cell division

Definition at line 49 of file TFoam.h.

Referenced by Explore(), Initialize(), SetInhiDiv(), TFoam(), and ~TFoam().

§ fLastCe

Int_t TFoam::fLastCe
protected

§ fMaskDiv

Int_t* TFoam::fMaskDiv
protected

Definition at line 48 of file TFoam.h.

Referenced by Carver(), Explore(), Initialize(), TFoam(), Varedu(), and ~TFoam().

§ fMaxWtRej

Double_t TFoam::fMaxWtRej
protected

Definition at line 58 of file TFoam.h.

Referenced by Initialize(), MakeEvent(), and TFoam().

§ fMCerror

Double_t TFoam::fMCerror
protected

Definition at line 81 of file TFoam.h.

Referenced by Initialize().

§ fMCMonit

TFoamMaxwt* TFoam::fMCMonit
protected

Definition at line 57 of file TFoam.h.

Referenced by GetWtParams(), Initialize(), MakeEvent(), TFoam(), and ~TFoam().

§ fMCresult

Double_t TFoam::fMCresult
protected

Definition at line 80 of file TFoam.h.

Referenced by Initialize().

§ fMCvect

Double_t* TFoam::fMCvect
protected

Definition at line 65 of file TFoam.h.

Referenced by GetMCvect(), Initialize(), MakeEvent(), TFoam(), and ~TFoam().

§ fMCwt

Double_t TFoam::fMCwt
protected

Definition at line 66 of file TFoam.h.

Referenced by GetMCwt(), MakeEvent(), and MCgenerate().

§ fMethodCall

TMethodCall* TFoam::fMethodCall
protected

Pointer to the user-defined integrand function/distribution.

Definition at line 70 of file TFoam.h.

Referenced by Eval(), Initialize(), SetRhoInt(), and TFoam().

§ fName

TString TFoam::fName
protected

Definition at line 33 of file TFoam.h.

Referenced by Initialize(), and TFoam().

§ fNBin

Int_t TFoam::fNBin
protected

Definition at line 44 of file TFoam.h.

Referenced by Carver(), Explore(), Initialize(), TFoam(), and Varedu().

§ fNCalls

Long_t TFoam::fNCalls
protected

Definition at line 73 of file TFoam.h.

Referenced by Explore(), Finalize(), GetnCalls(), Initialize(), MakeEvent(), and TFoam().

§ fNCells

Int_t TFoam::fNCells
protected

Definition at line 37 of file TFoam.h.

Referenced by CellFill(), Divide(), Grow(), InitCells(), Initialize(), TFoam(), and ~TFoam().

§ fNEffev

Long_t TFoam::fNEffev
protected

Definition at line 74 of file TFoam.h.

Referenced by Explore(), GetnEffev(), and TFoam().

§ fNevGen

Double_t TFoam::fNevGen
protected

Definition at line 77 of file TFoam.h.

Referenced by Finalize(), GetIntegMC(), GetWtParams(), Initialize(), and MakeEvent().

§ fNoAct

Int_t TFoam::fNoAct
protected

Lists of division values encoded in one vector per direction.

Definition at line 53 of file TFoam.h.

Referenced by CellFill(), Divide(), GenerCel2(), MakeActiveList(), and TFoam().

§ fNSampl

Int_t TFoam::fNSampl
protected

Definition at line 45 of file TFoam.h.

Referenced by Explore(), Initialize(), and TFoam().

§ fOptDrive

Int_t TFoam::fOptDrive
protected

Definition at line 40 of file TFoam.h.

Referenced by Explore(), Initialize(), and TFoam().

§ fOptPRD

Int_t TFoam::fOptPRD
protected

[fDim] Flags for inhibiting cell division

Definition at line 50 of file TFoam.h.

Referenced by Explore(), SetXdivPRD(), and TFoam().

§ fOptRej

Int_t TFoam::fOptRej
protected

Definition at line 42 of file TFoam.h.

Referenced by Finalize(), GetIntNorm(), Initialize(), MakeEvent(), and TFoam().

§ fPrimAcu

Double_t* TFoam::fPrimAcu
protected

Definition at line 60 of file TFoam.h.

Referenced by GenerCel2(), MakeActiveList(), TFoam(), and ~TFoam().

§ fPrime

Double_t TFoam::fPrime
protected

Definition at line 79 of file TFoam.h.

Referenced by Finalize(), GetIntegMC(), GetIntNorm(), GetPrimary(), Initialize(), and MakeActiveList().

§ fPseRan

TRandom* TFoam::fPseRan
protected

ROOT's pointer to user-defined global distribution function.

Definition at line 71 of file TFoam.h.

Referenced by GenerCel2(), GetPseRan(), Initialize(), MakeAlpha(), MakeEvent(), ResetPseRan(), and TFoam().

§ fRho

TFoamIntegrand* TFoam::fRho
protected

Definition at line 69 of file TFoam.h.

Referenced by Eval(), GetRho(), Initialize(), ResetRho(), SetRho(), SetRhoInt(), TFoam(), and ~TFoam().

§ fRNmax

Int_t TFoam::fRNmax
protected

Definition at line 38 of file TFoam.h.

Referenced by Initialize().

§ fRvec

Double_t* TFoam::fRvec
protected

Definition at line 67 of file TFoam.h.

Referenced by Initialize(), MakeAlpha(), TFoam(), and ~TFoam().

§ fSumOve

Double_t TFoam::fSumOve
protected

Definition at line 76 of file TFoam.h.

Referenced by Finalize(), Initialize(), and MakeEvent().

§ fSumWt

Double_t TFoam::fSumWt
protected

Definition at line 75 of file TFoam.h.

Referenced by Finalize(), GetIntegMC(), GetWtParams(), Initialize(), and MakeEvent().

§ fSumWt2

Double_t TFoam::fSumWt2
protected

Definition at line 75 of file TFoam.h.

Referenced by GetIntegMC(), GetWtParams(), Initialize(), and MakeEvent().

§ fVersion

TString TFoam::fVersion
protected

Definition at line 34 of file TFoam.h.

Referenced by Initialize(), and TFoam().

§ fWtMax

Double_t TFoam::fWtMax
protected

Definition at line 78 of file TFoam.h.

Referenced by Finalize(), Initialize(), MakeEvent(), and TFoam().

§ fWtMin

Double_t TFoam::fWtMin
protected

Definition at line 78 of file TFoam.h.

Referenced by Finalize(), Initialize(), MakeEvent(), and TFoam().

§ fXdivPRD

TFoamVect** TFoam::fXdivPRD
protected

Definition at line 51 of file TFoam.h.

Referenced by Explore(), Initialize(), SetXdivPRD(), TFoam(), and ~TFoam().


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