Logo ROOT  
Reference Guide
TFoamCell.h
Go to the documentation of this file.
1// @(#)root/foam:$Id$
2// Author: S. Jadach <mailto:Stanislaw.jadach@ifj.edu.pl>, P.Sawicki <mailto:Pawel.Sawicki@ifj.edu.pl>
3
4#ifndef ROOT_TFoamCell
5#define ROOT_TFoamCell
6
7#include "TRef.h"
8
9class TFoamVect;
10
11
12class TFoamCell : public TObject {
13 // static, the same for all cells!
14private:
15 Short_t fDim; ///< Dimension of the vector space
16 // MEMBERS
17private:
18 //--- linked tree organization ---
19 Int_t fSerial; ///< Serial number
20 Int_t fStatus; ///< Status (active, inactive)
21 TRef fParent; ///< Pointer to parent cell
22 TRef fDaught0; ///< Pointer to daughter 1
23 TRef fDaught1; ///< Pointer to daughter 2
24 //--- M.C. sampling and choice of the best edge ---
25private:
26 Double_t fXdiv; ///< Factor for division
27 Int_t fBest; ///< Best Edge for division
28 //--- Integrals of all kinds ---
29 Double_t fVolume; ///< Cartesian Volume of cell
30 Double_t fIntegral; ///< Integral over cell (estimate from exploration)
31 Double_t fDrive; ///< Driver integral, only for cell build-up
32 Double_t fPrimary; ///< Primary integral, only for MC generation
33
34public:
35 TFoamCell(); // Default Constructor for ROOT streamers
36 TFoamCell(Int_t); // User Constructor
37 TFoamCell(TFoamCell &); // Copy Constructor
38 virtual ~TFoamCell(); // Destructor
39 void Fill(Int_t, TFoamCell*, TFoamCell*, TFoamCell*); // Assigns values of attributes
40 TFoamCell& operator=(const TFoamCell&); // Substitution operator (never used)
41 //--------------- Geometry ----------------------------------
42 Double_t GetXdiv() const { return fXdiv;} // Pointer to Xdiv
43 Int_t GetBest() const { return fBest;} // Pointer to Best
44 void SetBest(Int_t Best){ fBest =Best;} // Set Best edge candidate
45 void SetXdiv(Double_t Xdiv){ fXdiv =Xdiv;} // Set x-division for best edge cand.
46 void GetHcub( TFoamVect&, TFoamVect&) const; // Get position and size vectors (h-cubical subspace)
47 void GetHSize( TFoamVect& ) const; // Get size only of cell vector (h-cubical subspace)
48 //--------------- Integrals/Volumes -------------------------
49 void CalcVolume(); // Calculates volume of cell
50 Double_t GetVolume() const { return fVolume;} // Volume of cell
51 Double_t GetIntg() const { return fIntegral;} // Get Integral
52 Double_t GetDriv() const { return fDrive;} // Get Drive
53 Double_t GetPrim() const { return fPrimary;} // Get Primary
54 void SetIntg(Double_t Intg){ fIntegral=Intg;} // Set true integral
55 void SetDriv(Double_t Driv){ fDrive =Driv;} // Set driver integral
56 void SetPrim(Double_t Prim){ fPrimary =Prim;} // Set primary integral
57 //--------------- linked tree organization ------------------
58 Int_t GetStat() const { return fStatus;} // Get Status
59 void SetStat(Int_t Stat){ fStatus=Stat;} // Set Status
60 TFoamCell* GetPare() const { return (TFoamCell*) fParent.GetObject(); } // Get Pointer to parent cell
61 TFoamCell* GetDau0() const { return (TFoamCell*) fDaught0.GetObject(); } // Get Pointer to 1-st daughter vertex
62 TFoamCell* GetDau1() const { return (TFoamCell*) fDaught1.GetObject(); } // Get Pointer to 2-nd daughter vertex
63 void SetDau0(TFoamCell* Daug){ fDaught0 = Daug;} // Set pointer to 1-st daughter
64 void SetDau1(TFoamCell* Daug){ fDaught1 = Daug;} // Set pointer to 2-nd daughter
65 void SetSerial(Int_t Serial){ fSerial=Serial;} // Set serial number
66 Int_t GetSerial() const { return fSerial;} // Get serial number
67 //--- other ---
68 void Print(Option_t *option) const ; // Prints cell content
69
70 ClassDef(TFoamCell,1) //Single cell of FOAM
71};
72#endif
int Int_t
Definition: RtypesCore.h:45
short Short_t
Definition: RtypesCore.h:39
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
Used by TFoam.
Definition: TFoamCell.h:12
Double_t fXdiv
Factor for division.
Definition: TFoamCell.h:26
virtual ~TFoamCell()
Destructor.
Definition: TFoamCell.cxx:75
void SetXdiv(Double_t Xdiv)
Definition: TFoamCell.h:45
TFoamCell * GetDau1() const
Definition: TFoamCell.h:62
void CalcVolume()
Calculates volume of the cell using size params which are calculated.
Definition: TFoamCell.cxx:170
void Print(Option_t *option) const
Printout of the cell geometry parameters for the debug purpose.
Definition: TFoamCell.cxx:185
TRef fDaught1
Pointer to daughter 2.
Definition: TFoamCell.h:23
Double_t GetVolume() const
Definition: TFoamCell.h:50
Int_t GetSerial() const
Definition: TFoamCell.h:66
Double_t fIntegral
Integral over cell (estimate from exploration)
Definition: TFoamCell.h:30
Int_t fStatus
Status (active, inactive)
Definition: TFoamCell.h:20
Double_t GetDriv() const
Definition: TFoamCell.h:52
Int_t GetStat() const
Definition: TFoamCell.h:58
TFoamCell * GetDau0() const
Definition: TFoamCell.h:61
Double_t GetXdiv() const
Definition: TFoamCell.h:42
void SetStat(Int_t Stat)
Definition: TFoamCell.h:59
Double_t fVolume
Cartesian Volume of cell.
Definition: TFoamCell.h:29
TRef fParent
Pointer to parent cell.
Definition: TFoamCell.h:21
Double_t GetPrim() const
Definition: TFoamCell.h:53
TRef fDaught0
Pointer to daughter 1.
Definition: TFoamCell.h:22
Int_t GetBest() const
Definition: TFoamCell.h:43
void GetHcub(TFoamVect &, TFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
Definition: TFoamCell.cxx:116
TFoamCell * GetPare() const
Definition: TFoamCell.h:60
Double_t fDrive
Driver integral, only for cell build-up.
Definition: TFoamCell.h:31
Short_t fDim
Dimension of the vector space.
Definition: TFoamCell.h:15
Double_t fPrimary
Primary integral, only for MC generation.
Definition: TFoamCell.h:32
TFoamCell()
Default constructor for streamer.
Definition: TFoamCell.cxx:24
void SetSerial(Int_t Serial)
Definition: TFoamCell.h:65
Double_t GetIntg() const
Definition: TFoamCell.h:51
TFoamCell & operator=(const TFoamCell &)
Substitution operator = (never used)
Definition: TFoamCell.cxx:82
void Fill(Int_t, TFoamCell *, TFoamCell *, TFoamCell *)
Fills in certain data into newly allocated cell.
Definition: TFoamCell.cxx:103
void SetDau1(TFoamCell *Daug)
Definition: TFoamCell.h:64
void SetPrim(Double_t Prim)
Definition: TFoamCell.h:56
void SetDriv(Double_t Driv)
Definition: TFoamCell.h:55
Int_t fBest
Best Edge for division.
Definition: TFoamCell.h:27
Int_t fSerial
Serial number.
Definition: TFoamCell.h:19
void SetIntg(Double_t Intg)
Definition: TFoamCell.h:54
void GetHSize(TFoamVect &) const
Provides size of the cell Size parameters are calculated by analyzing information in all parents cell...
Definition: TFoamCell.cxx:145
void SetDau0(TFoamCell *Daug)
Definition: TFoamCell.h:63
void SetBest(Int_t Best)
Definition: TFoamCell.h:44
Auxiliary class TFoamVect of n-dimensional vector, with dynamic allocation used for the cartesian geo...
Definition: TFoamVect.h:10
Mother of all ROOT objects.
Definition: TObject.h:37
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
Definition: TRef.h:32
TObject * GetObject() const
Return a pointer to the referenced object.
Definition: TRef.cxx:377