File indexing completed on 2025-01-18 10:11:46
0001
0002
0003
0004 #ifndef ROOT_TFoamCell
0005 #define ROOT_TFoamCell
0006
0007 #include "TRef.h"
0008
0009 class TFoamVect;
0010
0011
0012 class TFoamCell : public TObject {
0013
0014 private:
0015 Short_t fDim;
0016
0017 private:
0018
0019 Int_t fSerial;
0020 Int_t fStatus;
0021
0022
0023
0024
0025
0026 TRef fParent;
0027 TRef fDaught0;
0028 TRef fDaught1;
0029
0030 Int_t fParentIdx = -1;
0031 Int_t fDaught0Idx = -1;
0032 Int_t fDaught1Idx = -1;
0033
0034
0035 TFoamCell** fCells = nullptr;
0036
0037 private:
0038 Double_t fXdiv;
0039 Int_t fBest;
0040
0041 Double_t fVolume;
0042 Double_t fIntegral;
0043 Double_t fDrive;
0044 Double_t fPrimary;
0045
0046 public:
0047 TFoamCell();
0048 TFoamCell(Int_t);
0049 TFoamCell(TFoamCell const&) = delete;
0050 TFoamCell(TFoamCell &&) = delete;
0051 ~TFoamCell() override;
0052 void Fill(Int_t, TFoamCell*, TFoamCell*, TFoamCell*);
0053 TFoamCell& operator=(const TFoamCell&) = delete;
0054 TFoamCell& operator=(TFoamCell &&) = delete;
0055
0056 Double_t GetXdiv() const { return fXdiv;}
0057 Int_t GetBest() const { return fBest;}
0058 void SetBest(Int_t Best){ fBest =Best;}
0059 void SetXdiv(Double_t Xdiv){ fXdiv =Xdiv;}
0060 void GetHcub( TFoamVect&, TFoamVect&) const;
0061 void GetHSize( TFoamVect& ) const;
0062
0063 void CalcVolume();
0064 Double_t GetVolume() const { return fVolume;}
0065 Double_t GetIntg() const { return fIntegral;}
0066 Double_t GetDriv() const { return fDrive;}
0067 Double_t GetPrim() const { return fPrimary;}
0068 void SetIntg(Double_t Intg){ fIntegral=Intg;}
0069 void SetDriv(Double_t Driv){ fDrive =Driv;}
0070 void SetPrim(Double_t Prim){ fPrimary =Prim;}
0071
0072 Int_t GetStat() const { return fStatus;}
0073 void SetStat(Int_t Stat){ fStatus=Stat;}
0074
0075
0076 TFoamCell* GetPare() const { return fParentIdx >= 0 ? fCells[fParentIdx] : (TFoamCell*) fParent.GetObject(); }
0077 TFoamCell* GetDau0() const { return fDaught0Idx >= 0 ? fCells[fDaught0Idx] : (TFoamCell*) fDaught0.GetObject(); }
0078 TFoamCell* GetDau1() const { return fDaught1Idx >= 0 ? fCells[fDaught1Idx] : (TFoamCell*) fDaught1.GetObject(); }
0079
0080 void SetDau0(TFoamCell* Daug){ fDaught0Idx = Daug ? Daug->fSerial : -1;}
0081 void SetDau1(TFoamCell* Daug){ fDaught1Idx = Daug ? Daug->fSerial : -1;}
0082 void SetSerial(Int_t Serial){ fSerial=Serial;}
0083 Int_t GetSerial() const { return fSerial;}
0084 void SetCells(TFoamCell** cells) { fCells = cells;}
0085 TFoamCell** GetCells() const { return fCells;}
0086
0087 void Print(Option_t *option) const override ;
0088
0089 ClassDefOverride(TFoamCell,2)
0090 };
0091 #endif