Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
9 class TFoamVect;
10 
11 
12 class TFoamCell : public TObject {
13  // static, the same for all cells!
14 private:
15  Short_t fDim; ///< Dimension of the vector space
16  // MEMBERS
17 private:
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 ---
25 private:
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 
34 public:
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