35 :
TNamed(
name, ""), fType(
type), fModel(model), fFinish(finish), fValue(value)
38 fProperties.SetOwner();
39 if (model == kMglisur) {
42 }
else if (model == kMunified || model == kMLUT || model == kMdichroic || model == kMDAVIS) {
46 Fatal(
"TGeoOpticalSurface::TGeoOpticalSurface()",
"Constructor called with INVALID model.");
56 if ((stype ==
"dielectric_metal") || (stype ==
"0")) {
58 }
else if ((stype ==
"dielectric_dielectric") || (stype ==
"1")) {
60 }
else if ((stype ==
"dielectric_LUT") || (stype ==
"2")) {
62 }
else if ((stype ==
"dielectric_dichroic") || (stype ==
"3")) {
64 }
else if ((stype ==
"firsov") || (stype ==
"4")) {
86 return "unhandled surface type";
96 if ((smodel ==
"glisur") || (smodel ==
"0")) {
98 }
else if ((smodel ==
"unified") || (smodel ==
"1")) {
100 }
else if ((smodel ==
"LUT") || (smodel ==
"2")) {
115 case kMLUT:
return "LUT";
120 return "unhandled model type";
129 if ((sfinish ==
"polished") || (sfinish ==
"0")) {
131 }
else if ((sfinish ==
"polishedfrontpainted") || (sfinish ==
"1")) {
133 }
else if ((sfinish ==
"polishedbackpainted") || (sfinish ==
"2")) {
135 }
else if ((sfinish ==
"ground") || (sfinish ==
"3")) {
137 }
else if ((sfinish ==
"groundfrontpainted") || (sfinish ==
"4")) {
139 }
else if ((sfinish ==
"groundbackpainted") || (sfinish ==
"5")) {
141 }
else if ((sfinish ==
"polishedlumirrorair") || (sfinish ==
"6")) {
143 }
else if ((sfinish ==
"polishedlumirrorglue") || (sfinish ==
"7")) {
145 }
else if ((sfinish ==
"polishedair") || (sfinish ==
"8")) {
147 }
else if ((sfinish ==
"polishedteflonair") || (sfinish ==
"9")) {
149 }
else if ((sfinish ==
"polishedtioair") || (sfinish ==
"10")) {
151 }
else if ((sfinish ==
"polishedtyvekair") || (sfinish ==
"11")) {
153 }
else if ((sfinish ==
"polishedvm2000air") || (sfinish ==
"12")) {
155 }
else if ((sfinish ==
"polishedvm2000glue") || (sfinish ==
"13")) {
157 }
else if ((sfinish ==
"etchedlumirrorair") || (sfinish ==
"14")) {
159 }
else if ((sfinish ==
"etchedlumirrorglue") || (sfinish ==
"15")) {
161 }
else if ((sfinish ==
"etchedair") || (sfinish ==
"16")) {
163 }
else if ((sfinish ==
"etchedteflonair") || (sfinish ==
"17")) {
165 }
else if ((sfinish ==
"etchedtioair") || (sfinish ==
"18")) {
167 }
else if ((sfinish ==
"etchedtyvekair") || (sfinish ==
"19")) {
169 }
else if ((sfinish ==
"etchedvm2000air") || (sfinish ==
"20")) {
171 }
else if ((sfinish ==
"etchedvm2000glue") || (sfinish ==
"21")) {
173 }
else if ((sfinish ==
"groundlumirrorair") || (sfinish ==
"22")) {
175 }
else if ((sfinish ==
"groundlumirrorglue") || (sfinish ==
"23")) {
177 }
else if ((sfinish ==
"groundair") || (sfinish ==
"24")) {
179 }
else if ((sfinish ==
"groundteflonair") || (sfinish ==
"25")) {
181 }
else if ((sfinish ==
"groundtioair") || (sfinish ==
"26")) {
183 }
else if ((sfinish ==
"groundtyvekair") || (sfinish ==
"27")) {
185 }
else if ((sfinish ==
"groundvm2000air") || (sfinish ==
"28")) {
243 return "unhandled model finish";
251 return (prop) ? prop->
GetTitle() :
nullptr;
259 if ( !prop )
return nullptr;
268 if ( !prop )
return nullptr;
277 Error(
"AddProperty",
"Property %s already added to optical surface %s", property,
GetName());
288 printf(
"*** opticalsurface: %s type: %s model: %s finish: %s value = %g\n",
GetName(),
294 while ((property = (
TNamed *)next()))
295 printf(
" property: %s ref: %s\n", property->
GetName(), property->
GetTitle());
304 Error(
"Print",
"Skin surface %s: volume not set",
GetName());
315 Error(
"Print",
"Border surface %s: nodes not set",
GetName());
318 printf(
"*** bordersurface: %s surfaceproperty: %s physvolref: %s %s \n",
GetName(),
GetTitle(),
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
R__EXTERN TGeoManager * gGeoManager
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class is used in the process of reading and writing the GDML "matrix" tag.
void Print(Option_t *option="") const
Print TNamed name and title.
TGDMLMatrix * GetGDMLMatrix(const char *name) const
Get GDML matrix with a given name;.
This is a wrapper class to G4OpticalSurface.
static ESurfaceType StringToType(const char *type)
bool AddProperty(const char *property, const char *ref)
static const char * ModelToString(ESurfaceModel model)
@ kTdielectric_dielectric
static const char * TypeToString(ESurfaceType type)
static ESurfaceFinish StringToFinish(const char *finish)
TGDMLMatrix * GetProperty(const char *name) const
static const char * FinishToString(ESurfaceFinish finish)
void Print(Option_t *option="") const
Print TNamed name and title.
@ kFPolishedESRGrease_LUT
static ESurfaceModel StringToModel(const char *model)
const char * GetPropertyRef(const char *property)
TGeoVolume const * fVolume
void Print(Option_t *option="") const
Print TNamed name and title.
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.