Geant4  10.02.p03
G4LogicalBorderSurface Class Reference

#include <G4LogicalBorderSurface.hh>

Inheritance diagram for G4LogicalBorderSurface:
Collaboration diagram for G4LogicalBorderSurface:

Public Member Functions

 G4LogicalBorderSurface (const G4String &name, G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2, G4SurfaceProperty *surfaceProperty)
 
 ~G4LogicalBorderSurface ()
 
void SetPhysicalVolumes (G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2)
 
const G4VPhysicalVolumeGetVolume1 () const
 
const G4VPhysicalVolumeGetVolume2 () const
 
void SetVolume1 (G4VPhysicalVolume *vol1)
 
void SetVolume2 (G4VPhysicalVolume *vol2)
 
G4int operator== (const G4LogicalBorderSurface &right) const
 
G4int operator!= (const G4LogicalBorderSurface &right) const
 
- Public Member Functions inherited from G4LogicalSurface
G4SurfacePropertyGetSurfaceProperty () const
 
void SetSurfaceProperty (G4SurfaceProperty *ptrSurfaceProperty)
 
const G4StringGetName () const
 
void SetName (const G4String &name)
 
G4TransitionRadiationSurface * GetTransitionRadiationSurface () const
 
void SetTransitionRadiationSurface (G4TransitionRadiationSurface *tRadSurf)
 
virtual ~G4LogicalSurface ()
 
G4int operator== (const G4LogicalSurface &right) const
 
G4int operator!= (const G4LogicalSurface &right) const
 

Static Public Member Functions

static G4LogicalBorderSurfaceGetSurface (const G4VPhysicalVolume *vol1, const G4VPhysicalVolume *vol2)
 
static void CleanSurfaceTable ()
 
static const G4LogicalBorderSurfaceTableGetSurfaceTable ()
 
static size_t GetNumberOfBorderSurfaces ()
 
static void DumpInfo ()
 

Private Member Functions

 G4LogicalBorderSurface (const G4LogicalBorderSurface &right)
 
G4LogicalBorderSurfaceoperator= (const G4LogicalBorderSurface &right)
 

Private Attributes

G4VPhysicalVolumeVolume1
 
G4VPhysicalVolumeVolume2
 

Static Private Attributes

static G4LogicalBorderSurfaceTabletheBorderSurfaceTable = 0
 

Additional Inherited Members

- Protected Member Functions inherited from G4LogicalSurface
 G4LogicalSurface (const G4String &name, G4SurfaceProperty *prop)
 

Detailed Description

Definition at line 55 of file G4LogicalBorderSurface.hh.

Constructor & Destructor Documentation

◆ G4LogicalBorderSurface() [1/2]

G4LogicalBorderSurface::G4LogicalBorderSurface ( const G4String name,
G4VPhysicalVolume vol1,
G4VPhysicalVolume vol2,
G4SurfaceProperty surfaceProperty 
)

Definition at line 51 of file G4LogicalBorderSurface.cc.

55  : G4LogicalSurface(name, surfaceProperty),
56  Volume1(vol1), Volume2(vol2)
57 {
59  {
61  }
62 
63  // Store in the table of Surfaces
64  //
65  theBorderSurfaceTable->push_back(this);
66 }
std::vector< G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable
G4LogicalSurface(const G4String &name, G4SurfaceProperty *prop)
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable

◆ ~G4LogicalBorderSurface()

G4LogicalBorderSurface::~G4LogicalBorderSurface ( )

Definition at line 82 of file G4LogicalBorderSurface.cc.

83 {
84 // delete theBorderSurfaceTable; theBorderSurfaceTable=0;
85 }

◆ G4LogicalBorderSurface() [2/2]

G4LogicalBorderSurface::G4LogicalBorderSurface ( const G4LogicalBorderSurface right)
private

Definition at line 69 of file G4LogicalBorderSurface.cc.

70  : G4LogicalSurface(right.GetName(), right.GetSurfaceProperty())
71 {
73  {
75  }
77  Volume1 = right.Volume1;
78  Volume2 = right.Volume2;
79  (*theBorderSurfaceTable) = (*right.theBorderSurfaceTable);
80 }
std::vector< G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable
const G4String & GetName() const
G4LogicalSurface(const G4String &name, G4SurfaceProperty *prop)
G4TransitionRadiationSurface * GetTransitionRadiationSurface() const
void SetTransitionRadiationSurface(G4TransitionRadiationSurface *tRadSurf)
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
G4SurfaceProperty * GetSurfaceProperty() const
Here is the call graph for this function:

Member Function Documentation

◆ CleanSurfaceTable()

void G4LogicalBorderSurface::CleanSurfaceTable ( )
static

Definition at line 178 of file G4LogicalBorderSurface.cc.

179 {
181  {
182  G4LogicalBorderSurfaceTable::iterator pos;
183  for(pos=theBorderSurfaceTable->begin();
184  pos!=theBorderSurfaceTable->end(); pos++)
185  {
186  if (*pos) { delete *pos; }
187  }
188  theBorderSurfaceTable->clear();
189  }
190  return;
191 }
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
static const G4double pos
Here is the caller graph for this function:

◆ DumpInfo()

void G4LogicalBorderSurface::DumpInfo ( )
static

Definition at line 158 of file G4LogicalBorderSurface.cc.

159 {
160  G4cout << "***** Surface Table : Nb of Surfaces = "
161  << GetNumberOfBorderSurfaces() << " *****" << G4endl;
162 
164  {
165  for (size_t i=0; i<theBorderSurfaceTable->size(); i++)
166  {
167  G4LogicalBorderSurface* pBorderSurface = (*theBorderSurfaceTable)[i];
168  G4cout << pBorderSurface->GetName() << " : " << G4endl
169  << " Border of volumes "
170  << pBorderSurface->GetVolume1()->GetName() << " and "
171  << pBorderSurface->GetVolume2()->GetName()
172  << G4endl;
173  }
174  }
175  G4cout << G4endl;
176 }
const G4String & GetName() const
static size_t GetNumberOfBorderSurfaces()
const G4VPhysicalVolume * GetVolume1() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
#define G4endl
Definition: G4ios.hh:61
const G4VPhysicalVolume * GetVolume2() const
Here is the call graph for this function:

◆ GetNumberOfBorderSurfaces()

size_t G4LogicalBorderSurface::GetNumberOfBorderSurfaces ( )
static

Definition at line 131 of file G4LogicalBorderSurface.cc.

132 {
134  {
135  return theBorderSurfaceTable->size();
136  }
137  return 0;
138 }
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
Here is the caller graph for this function:

◆ GetSurface()

G4LogicalBorderSurface * G4LogicalBorderSurface::GetSurface ( const G4VPhysicalVolume vol1,
const G4VPhysicalVolume vol2 
)
static

Definition at line 141 of file G4LogicalBorderSurface.cc.

143 {
145  {
146  for (size_t i=0; i<theBorderSurfaceTable->size(); i++)
147  {
148  if( ((*theBorderSurfaceTable)[i]->GetVolume1() == vol1) &&
149  ((*theBorderSurfaceTable)[i]->GetVolume2() == vol2) )
150  return (*theBorderSurfaceTable)[i];
151  }
152  }
153  return 0;
154 }
const G4VPhysicalVolume * GetVolume1() const
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSurfaceTable()

const G4LogicalBorderSurfaceTable * G4LogicalBorderSurface::GetSurfaceTable ( )
static

Definition at line 122 of file G4LogicalBorderSurface.cc.

123 {
125  {
127  }
128  return theBorderSurfaceTable;
129 }
std::vector< G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
Here is the caller graph for this function:

◆ GetVolume1()

const G4VPhysicalVolume* G4LogicalBorderSurface::GetVolume1 ( ) const
inline
Here is the caller graph for this function:

◆ GetVolume2()

const G4VPhysicalVolume* G4LogicalBorderSurface::GetVolume2 ( ) const
inline
Here is the caller graph for this function:

◆ operator!=()

G4int G4LogicalBorderSurface::operator!= ( const G4LogicalBorderSurface right) const

Definition at line 113 of file G4LogicalBorderSurface.cc.

114 {
115  return (this != (G4LogicalBorderSurface *) &right);
116 }

◆ operator=()

G4LogicalBorderSurface & G4LogicalBorderSurface::operator= ( const G4LogicalBorderSurface right)
private

Definition at line 92 of file G4LogicalBorderSurface.cc.

93 {
94  if (&right == this) return *this;
95 
97  SetName(right.GetName());
99  Volume1 = right.Volume1;
100  Volume2 = right.Volume2;
101  (*theBorderSurfaceTable) = (*right.theBorderSurfaceTable);
102 
103  return *this;
104 }
void SetName(const G4String &name)
const G4String & GetName() const
G4TransitionRadiationSurface * GetTransitionRadiationSurface() const
void SetTransitionRadiationSurface(G4TransitionRadiationSurface *tRadSurf)
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
void SetSurfaceProperty(G4SurfaceProperty *ptrSurfaceProperty)
G4SurfaceProperty * GetSurfaceProperty() const
Here is the call graph for this function:

◆ operator==()

G4int G4LogicalBorderSurface::operator== ( const G4LogicalBorderSurface right) const

Definition at line 107 of file G4LogicalBorderSurface.cc.

108 {
109  return (this == (G4LogicalBorderSurface *) &right);
110 }

◆ SetPhysicalVolumes()

void G4LogicalBorderSurface::SetPhysicalVolumes ( G4VPhysicalVolume vol1,
G4VPhysicalVolume vol2 
)
inline

◆ SetVolume1()

void G4LogicalBorderSurface::SetVolume1 ( G4VPhysicalVolume vol1)
inline

◆ SetVolume2()

void G4LogicalBorderSurface::SetVolume2 ( G4VPhysicalVolume vol2)
inline

Member Data Documentation

◆ theBorderSurfaceTable

G4LogicalBorderSurfaceTable * G4LogicalBorderSurface::theBorderSurfaceTable = 0
staticprivate

Definition at line 99 of file G4LogicalBorderSurface.hh.

◆ Volume1

G4VPhysicalVolume* G4LogicalBorderSurface::Volume1
private

Definition at line 96 of file G4LogicalBorderSurface.hh.

◆ Volume2

G4VPhysicalVolume* G4LogicalBorderSurface::Volume2
private

Definition at line 97 of file G4LogicalBorderSurface.hh.


The documentation for this class was generated from the following files: