Warning, file /include/root/TGeoRegion.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TGeoRegion
0012 #define ROOT_TGeoRegion
0013
0014 #include "TNamed.h"
0015
0016 #include "TObjArray.h"
0017
0018 #include "TGeoVolume.h"
0019
0020 class TGeoRegionCut : public TNamed {
0021 protected:
0022 Double_t fCut{0.};
0023
0024 public:
0025 TGeoRegionCut() {}
0026 TGeoRegionCut(const char *name, Double_t cut) : TNamed(name, ""), fCut(cut) {}
0027
0028 ~TGeoRegionCut() override {}
0029
0030 Double_t GetCut() const { return fCut; }
0031 void SetCut(Double_t cut) { fCut = cut; }
0032
0033 ClassDefOverride(TGeoRegionCut, 1)
0034 };
0035
0036 class TGeoRegion : public TNamed {
0037 protected:
0038 TObjArray fVolumes;
0039 TObjArray fCuts;
0040
0041 public:
0042 TGeoRegion() {}
0043 TGeoRegion(const char *name, const char *title = "") : TNamed(name, title) {}
0044 TGeoRegion(const TGeoRegion &other);
0045 TGeoRegion &operator=(const TGeoRegion &other);
0046 ~TGeoRegion() override;
0047
0048
0049 void AddVolume(TGeoVolume *vol) { fVolumes.Add(vol); }
0050 bool AddVolume(const char *name);
0051 int GetNvolumes() const { return fVolumes.GetEntriesFast(); }
0052 TGeoVolume *GetVolume(int i) const { return (TGeoVolume *)fVolumes.At(i); }
0053
0054
0055 void AddCut(const char *name, Double_t cut);
0056 void AddCut(const TGeoRegionCut ®ioncut);
0057 int GetNcuts() const { return fCuts.GetEntriesFast(); }
0058 TGeoRegionCut *GetCut(int i) const { return (TGeoRegionCut *)fCuts.At(i); }
0059
0060 void Print(Option_t *option = "") const override;
0061
0062 ClassDefOverride(TGeoRegion, 1)
0063 };
0064
0065 #endif