library: libFoam #include "TFoamCell.h"

# TFoamCell

class description - source file - inheritance tree (.pdf)

## class TFoamCell : public TObject

| Inheritance Chart:
`TObject`
| <- | `TFoamCell` |

        public:

                          TFoamCell()
                          TFoamCell(Int_t)
                          TFoamCell(TFoamCell&)
                  virtual ~TFoamCell()
                     void CalcVolume()
           static TClass* Class()
                     void Fill(Int_t, TFoamCell*, TFoamCell*, TFoamCell*)
                    Int_t GetBest() const
               TFoamCell* GetDau0() const
               TFoamCell* GetDau1() const
                 Double_t GetDriv() const
                     void GetHcub(TFoamVect&, TFoamVect&) const
                     void GetHSize(TFoamVect&) const
                 Double_t GetIntg() const
               TFoamCell* GetPare() const
                 Double_t GetPrim() const
                    Int_t GetSerial() const
                    Int_t GetStat() const
                 Double_t GetVolume() const
                 Double_t GetXdiv() const
          virtual TClass* IsA() const
               TFoamCell& operator=(TFoamCell&)
             virtual void Print(Option_t* option) const
                     void SetBest(Int_t Best)
                     void SetDau0(TFoamCell* Daug)
                     void SetDau1(TFoamCell* Daug)
                     void SetDriv(Double_t Driv)
                     void SetIntg(Double_t Intg)
                     void SetPrim(Double_t Prim)
                     void SetSerial(Int_t Serial)
                     void SetStat(Int_t Stat)
                     void SetXdiv(Double_t Xdiv)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        private:

           Short_t fDim       Dimension of the vector space
             Int_t fSerial    Serial number
             Int_t fStatus    Status (active, inactive)
              TRef fParent    Pointer to parent cell
              TRef fDaught0   Pointer to daughter 1
              TRef fDaught1   Pointer to daughter 2
          Double_t fXdiv      Factor for division
             Int_t fBest      Best Edge for division
          Double_t fVolume    Cartesian Volume of cell
          Double_t fIntegral  Integral over cell (estimate from exploration)
          Double_t fDrive     Driver  integral, only for cell build-up
          Double_t fPrimary   Primary integral, only for MC generation

## Class Description

     Class TFoamCell  used in TFoam
     ==============================
     Objects of this class are hyper-rectangular cells organized in the binary tree.
     Special algorithm for encoding relative positioning of the cells
     allow to save total memory allocation needed for the system of cells.

    _________________________________________________________________________________

TFoamCell()

     Default constructor for streamer

TFoamCell(Int_t kDim)

     User constructor allocating single empty Cell

TFoamCell(TFoamCell &From): TObject(From)

     Copy constructor (not tested!)

~TFoamCell()

     Destructor

void Fill(Int_t Status, TFoamCell *Parent, TFoamCell *Daugh1, TFoamCell *Daugh2)

     Fills in certain data into newly allocated cell

void GetHcub( TFoamVect &Posi, TFoamVect &Size) const

     Provides size and position of the cell
     These parameter are calculated by analyzing information in all parents
     cells up to the root cell. It takes time but saves memory.

void GetHSize( TFoamVect &Size) const

     Provides size of the cell
     Size parameters are calculated by analyzing information in all parents
     cells up to the root cell. It takes time but saves memory.

void CalcVolume(void)

     Calculates volume of the cell using size params which are calculated

void Print(Option_t *option) const

     Printout of the cell geometry parameters for the debug purpose

### Inline Functions

             TFoamCell& operator=(TFoamCell&)
               Double_t GetXdiv() const
                  Int_t GetBest() const
                   void SetBest(Int_t Best)
                   void SetXdiv(Double_t Xdiv)
               Double_t GetVolume() const
               Double_t GetIntg() const
               Double_t GetDriv() const
               Double_t GetPrim() const
                   void SetIntg(Double_t Intg)
                   void SetDriv(Double_t Driv)
                   void SetPrim(Double_t Prim)
                  Int_t GetStat() const
                   void SetStat(Int_t Stat)
             TFoamCell* GetPare() const
             TFoamCell* GetDau0() const
             TFoamCell* GetDau1() const
                   void SetDau0(TFoamCell* Daug)
                   void SetDau1(TFoamCell* Daug)
                   void SetSerial(Int_t Serial)
                  Int_t GetSerial() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)

Author: S. Jadach, P.Sawicki
Last update: root/foam:$Name: $:$Id: TFoamCell.cxx,v 1.7 2005/04/25 10:03:18 brun Exp $