28 ClassImp(TGeoRegionCut);
34 TGeoRegion::~TGeoRegion()
41 TGeoRegion::TGeoRegion(
const TGeoRegion &other) : TNamed(other), fVolumes(other.fVolumes)
43 for (
int i = 0; i < other.GetNcuts(); ++i)
44 AddCut(*other.GetCut(i));
49 TGeoRegion &TGeoRegion::operator=(
const TGeoRegion &other)
52 TNamed::operator=(other);
53 fVolumes.operator=(other.fVolumes);
54 for (
int i = 0; i < other.GetNcuts(); ++i)
55 AddCut(*(TGeoRegionCut *)other.fCuts.At(i));
62 bool TGeoRegion::AddVolume(
const char *name)
66 TGeoVolume *vol = gGeoManager->GetVolume(name);
75 void TGeoRegion::AddCut(
const char *name, Double_t cut)
77 fCuts.Add(
new TGeoRegionCut(name, cut));
82 void TGeoRegion::AddCut(
const TGeoRegionCut ®ioncut)
84 fCuts.Add(
new TGeoRegionCut(regioncut));
89 void TGeoRegion::Print(Option_t *)
const
91 printf(
"== Region: %s\n", GetName());
93 for (
int i = 0; i < GetNvolumes(); ++i)
94 printf(
"%s ", GetVolume(i)->GetName());
96 for (
int i = 0; i < GetNcuts(); ++i)
97 printf(
" %s value %g\n", GetCut(i)->GetName(), GetCut(i)->GetCut());