11 #ifndef ROOT_TGeoRegion
12 #define ROOT_TGeoRegion
20 class TGeoRegionCut :
public TNamed {
26 TGeoRegionCut(
const char *name, Double_t cut) : TNamed(name,
""), fCut(cut) {}
28 virtual ~TGeoRegionCut() {}
30 Double_t GetCut()
const {
return fCut; }
31 void SetCut(Double_t cut) { fCut = cut; }
33 ClassDef(TGeoRegionCut, 1)
36 class TGeoRegion :
public TNamed {
43 TGeoRegion(
const char *name,
const char *title =
"") : TNamed(name, title) {}
44 TGeoRegion(
const TGeoRegion &other);
45 TGeoRegion &operator=(
const TGeoRegion &other);
46 virtual ~TGeoRegion();
49 void AddVolume(TGeoVolume *vol) { fVolumes.Add(vol); }
50 bool AddVolume(
const char *name);
51 int GetNvolumes()
const {
return fVolumes.GetEntriesFast(); }
52 TGeoVolume *GetVolume(
int i)
const {
return (TGeoVolume *)fVolumes.At(i); }
55 void AddCut(
const char *name, Double_t cut);
56 void AddCut(
const TGeoRegionCut ®ioncut);
57 int GetNcuts()
const {
return fCuts.GetEntriesFast(); }
58 TGeoRegionCut *GetCut(
int i)
const {
return (TGeoRegionCut *)fCuts.At(i); }
60 virtual void Print(Option_t *option =
"")
const;
62 ClassDef(TGeoRegion, 1)