Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoOpticalSurface.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 05/12/18
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGeoOpticalSurface
13#define ROOT_TGeoOpticalSurface
14
15#include <TNamed.h>
16#include <TList.h>
17
18////////////////////////////////////////////////////////////////////////////
19// //
20// TGeoOpticalSurface - class describing surface properties for //
21// compatibility with Geant4 //
22// //
23////////////////////////////////////////////////////////////////////////////
24
25class TGDMLMatrix;
26
27class TGeoOpticalSurface : public TNamed {
28public:
30 kFpolished, // smooth perfectly polished surface
31 kFpolishedfrontpainted, // smooth top-layer (front) paint
32 kFpolishedbackpainted, // same is 'polished' but with a back-paint
33
34 kFground, // rough surface
35 kFgroundfrontpainted, // rough top-layer (front) paint
36 kFgroundbackpainted, // same as 'ground' but with a back-paint
37
38 kFpolishedlumirrorair, // mechanically polished surface, with lumirror
39 kFpolishedlumirrorglue, // mechanically polished surface, with lumirror & meltmount
40 kFpolishedair, // mechanically polished surface
41 kFpolishedteflonair, // mechanically polished surface, with teflon
42 kFpolishedtioair, // mechanically polished surface, with tio paint
43 kFpolishedtyvekair, // mechanically polished surface, with tyvek
44 kFpolishedvm2000air, // mechanically polished surface, with esr film
45 kFpolishedvm2000glue, // mechanically polished surface, with esr film & meltmount
46
47 kFetchedlumirrorair, // chemically etched surface, with lumirror
48 kFetchedlumirrorglue, // chemically etched surface, with lumirror & meltmount
49 kFetchedair, // chemically etched surface
50 kFetchedteflonair, // chemically etched surface, with teflon
51 kFetchedtioair, // chemically etched surface, with tio paint
52 kFetchedtyvekair, // chemically etched surface, with tyvek
53 kFetchedvm2000air, // chemically etched surface, with esr film
54 kFetchedvm2000glue, // chemically etched surface, with esr film & meltmount
55
56 kFgroundlumirrorair, // rough-cut surface, with lumirror
57 kFgroundlumirrorglue, // rough-cut surface, with lumirror & meltmount
58 kFgroundair, // rough-cut surface
59 kFgroundteflonair, // rough-cut surface, with teflon
60 kFgroundtioair, // rough-cut surface, with tio paint
61 kFgroundtyvekair, // rough-cut surface, with tyvek
62 kFgroundvm2000air, // rough-cut surface, with esr film
63 kFgroundvm2000glue, // rough-cut surface, with esr film & meltmount
64
65 // for DAVIS model
66 kFRough_LUT, // rough surface
67 kFRoughTeflon_LUT, // rough surface wrapped in Teflon tape
68 kFRoughESR_LUT, // rough surface wrapped with ESR
69 kFRoughESRGrease_LUT, // rough surface wrapped with ESR and coupled with opical grease
70 kFPolished_LUT, // polished surface
71 kFPolishedTeflon_LUT, // polished surface wrapped in Teflon tape
72 kFPolishedESR_LUT, // polished surface wrapped with ESR
73 kFPolishedESRGrease_LUT, // polished surface wrapped with ESR and coupled with opical grease
74 kFDetector_LUT // polished surface with optical grease
75 };
76
78 kMglisur, // original GEANT3 model
79 kMunified, // UNIFIED model
80 kMLUT, // Look-Up-Table model
81 kMDAVIS, // DAVIS model
82 kMdichroic // dichroic filter
83 };
84
86 kTdielectric_metal, // dielectric-metal interface
87 kTdielectric_dielectric, // dielectric-dielectric interface
88 kTdielectric_LUT, // dielectric-Look-Up-Table interface
89 kTdielectric_LUTDAVIS, // dielectric-Look-Up-Table DAVIS interface
90 kTdielectric_dichroic, // dichroic filter interface
91 kTfirsov, // for Firsov Process
92 kTx_ray // for x-ray mirror process
93 };
94
95private:
96 std::string fName = ""; // Surface name
98 ESurfaceModel fModel = kMglisur; // Surface model
99 ESurfaceFinish fFinish = kFpolished; // Surface finish
100
101 Double_t fValue = 0.0; // The value used to determine sigmaalpha and polish
102 Double_t fSigmaAlpha = 0.0; // The sigma of micro-facet polar angle
103 Double_t fPolish = 0.0; // Polish parameter in glisur model
104
105 TList fProperties; // List of surface properties
106 TList fConstProperties; // user-defined constant properties
107
108 // No copy
111
112public:
113 // constructors
115
118
120
121 // Accessors
122 bool AddProperty(const char *property, const char *ref);
123 bool AddConstProperty(const char *property, const char *ref);
124 const char *GetPropertyRef(const char *property);
125 const char *GetPropertyRef(Int_t i) const
126 {
127 return (fProperties.At(i) ? fProperties.At(i)->GetTitle() : nullptr);
128 }
129 const char *GetConstPropertyRef(const char *property) const;
130 const char *GetConstPropertyRef(Int_t i) const
131 {
132 return (fConstProperties.At(i) ? fConstProperties.At(i)->GetTitle() : nullptr);
133 }
134 TList const &GetProperties() const { return fProperties; }
135 TList const &GetConstProperties() const { return fConstProperties; }
138 TGDMLMatrix *GetProperty(const char *name) const;
139 TGDMLMatrix *GetProperty(Int_t i) const;
140 Double_t GetConstProperty(const char *property, Bool_t *error = nullptr) const;
141 Double_t GetConstProperty(Int_t i, Bool_t *error = nullptr) const;
142 ESurfaceType GetType() const { return fType; }
143 ESurfaceModel GetModel() const { return fModel; }
144 ESurfaceFinish GetFinish() const { return fFinish; }
145 Double_t GetPolish() const { return fPolish; }
146 Double_t GetValue() const { return fValue; }
148
150 void SetModel(ESurfaceModel model) { fModel = model; }
151 void SetFinish(ESurfaceFinish finish) { fFinish = finish; }
152 void SetPolish(Double_t polish) { fPolish = polish; }
154 void SetSigmaAlpha(Double_t sigmaalpha) { fSigmaAlpha = sigmaalpha; }
155
156 void Print(Option_t *option = "") const override;
157
158 static ESurfaceType StringToType(const char *type);
159 static const char *TypeToString(ESurfaceType type);
160 static ESurfaceModel StringToModel(const char *model);
161 static const char *ModelToString(ESurfaceModel model);
162 static ESurfaceFinish StringToFinish(const char *finish);
163 static const char *FinishToString(ESurfaceFinish finish);
164
165 ClassDefOverride(TGeoOpticalSurface, 2) // Class representing an optical surface
166};
167
168////////////////////////////////////////////////////////////////////////////
169// //
170// TGeoSkinSurface - class describing a surface having optical properties //
171// surrounding a volume //
172// //
173////////////////////////////////////////////////////////////////////////////
174
175class TGeoVolume;
176
177class TGeoSkinSurface : public TNamed {
178private:
179 TGeoOpticalSurface const *fSurface = nullptr; // Referenced optical surface
180 TGeoVolume const *fVolume = nullptr; // Referenced volume
181public:
183 TGeoSkinSurface(const char *name, const char *ref, TGeoOpticalSurface const *surf, TGeoVolume const *vol)
184 : TNamed(name, ref), fSurface(surf), fVolume(vol)
185 {
186 }
187 ~TGeoSkinSurface() override {}
188
189 TGeoOpticalSurface const *GetSurface() const { return fSurface; }
190 TGeoVolume const *GetVolume() const { return fVolume; }
191
192 void Print(Option_t *option = "") const override;
193
194 ClassDefOverride(TGeoSkinSurface, 1) // A surface with optical properties surrounding a volume
195};
196
197////////////////////////////////////////////////////////////////////////////
198// //
199// TGeoBorderSurface - class describing a surface having optical //
200// properties between 2 touching volumes //
201// //
202////////////////////////////////////////////////////////////////////////////
203
204class TGeoNode;
205
206class TGeoBorderSurface : public TNamed {
207private:
208 TGeoOpticalSurface const *fSurface = nullptr; // Referenced optical surface
209 TGeoNode const *fNode1 = nullptr; // Referenced node 1
210 TGeoNode const *fNode2 = nullptr; // Referenced node 2
211public:
213 TGeoBorderSurface(const char *name, const char *ref, TGeoOpticalSurface const *surf, TGeoNode const *node1,
214 TGeoNode const *node2)
215 : TNamed(name, ref), fSurface(surf), fNode1(node1), fNode2(node2)
216 {
217 }
218 ~TGeoBorderSurface() override {}
219
220 TGeoOpticalSurface const *GetSurface() const { return fSurface; }
221 TGeoNode const *GetNode1() const { return fNode1; }
222 TGeoNode const *GetNode2() const { return fNode2; }
223
224 void Print(Option_t *option = "") const override;
225
226 ClassDefOverride(TGeoBorderSurface, 1) // A surface with optical properties betwqeen 2 touching volumes
227};
228
229#endif // ROOT_TGeoOpticalSurface
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h GetProperty
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
char name[80]
Definition TGX11.cxx:110
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.
Definition TGDMLMatrix.h:33
TGeoNode const * fNode2
TGeoBorderSurface(const char *name, const char *ref, TGeoOpticalSurface const *surf, TGeoNode const *node1, TGeoNode const *node2)
TGeoNode const * GetNode2() const
TGeoNode const * fNode1
TGeoOpticalSurface const * GetSurface() const
TGeoNode const * GetNode1() const
void Print(Option_t *option="") const override
This method must be overridden when a class wants to print itself.
TGeoOpticalSurface const * fSurface
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
This is a wrapper class to G4OpticalSurface.
Int_t GetNproperties() const
TList const & GetProperties() const
static ESurfaceType StringToType(const char *type)
Int_t GetNconstProperties() const
const char * GetPropertyRef(Int_t i) const
Double_t GetPolish() const
bool AddProperty(const char *property, const char *ref)
static const char * ModelToString(ESurfaceModel model)
void SetSigmaAlpha(Double_t sigmaalpha)
static const char * TypeToString(ESurfaceType type)
ESurfaceModel GetModel() const
const char * GetConstPropertyRef(const char *property) const
TList const & GetConstProperties() const
void SetPolish(Double_t polish)
void SetModel(ESurfaceModel model)
static ESurfaceFinish StringToFinish(const char *finish)
ESurfaceFinish GetFinish() const
TGeoOpticalSurface & operator=(const TGeoOpticalSurface &)=delete
static const char * FinishToString(ESurfaceFinish finish)
void Print(Option_t *option="") const override
This method must be overridden when a class wants to print itself.
Double_t GetSigmaAlpha() const
void SetValue(Double_t value)
bool AddConstProperty(const char *property, const char *ref)
void SetFinish(ESurfaceFinish finish)
const char * GetConstPropertyRef(Int_t i) const
void SetType(ESurfaceType type)
Double_t GetConstProperty(const char *property, Bool_t *error=nullptr) const
static ESurfaceModel StringToModel(const char *model)
TGeoOpticalSurface(const TGeoOpticalSurface &)=delete
const char * GetPropertyRef(const char *property)
Double_t GetValue() const
ESurfaceType GetType() const
TGeoSkinSurface(const char *name, const char *ref, TGeoOpticalSurface const *surf, TGeoVolume const *vol)
~TGeoSkinSurface() override
TGeoVolume const * fVolume
TGeoVolume const * GetVolume() const
void Print(Option_t *option="") const override
This method must be overridden when a class wants to print itself.
TGeoOpticalSurface const * fSurface
TGeoOpticalSurface const * GetSurface() const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
A doubly linked list.
Definition TList.h:38
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Definition TList.cxx:357
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual const char * GetTitle() const
Returns title of object.
Definition TObject.cxx:483