Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LogicalBorderSurface Class Reference

#include <G4LogicalBorderSurface.hh>

+ Inheritance diagram for G4LogicalBorderSurface:

Public Member Functions

 G4LogicalBorderSurface (const G4String &name, G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2, G4SurfaceProperty *surfaceProperty)
 
 ~G4LogicalBorderSurface ()
 
 G4LogicalBorderSurface (const G4LogicalBorderSurface &)=delete
 
G4LogicalBorderSurfaceoperator= (const G4LogicalBorderSurface &)=delete
 
G4bool operator== (const G4LogicalBorderSurface &right) const
 
G4bool operator!= (const G4LogicalBorderSurface &right) const
 
void SetPhysicalVolumes (G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2)
 
const G4VPhysicalVolumeGetVolume1 () const
 
const G4VPhysicalVolumeGetVolume2 () const
 
void SetVolume1 (G4VPhysicalVolume *vol1)
 
void SetVolume2 (G4VPhysicalVolume *vol2)
 
- 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 *trs)
 
virtual ~G4LogicalSurface ()
 
 G4LogicalSurface (const G4LogicalSurface &)=delete
 
G4LogicalSurfaceoperator= (const G4LogicalSurface &)=delete
 
G4bool operator== (const G4LogicalSurface &right) const
 
G4bool 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 ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 50 of file G4LogicalBorderSurface.hh.

Constructor & Destructor Documentation

◆ G4LogicalBorderSurface() [1/2]

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

Definition at line 44 of file G4LogicalBorderSurface.cc.

49 : G4LogicalSurface(name, surfaceProperty),
50 Volume1(vol1), Volume2(vol2)
51{
52 if (theBorderSurfaceTable == nullptr)
53 {
54 theBorderSurfaceTable = new G4LogicalBorderSurfaceTable;
55 }
56
57 // Store in the table of Surfaces
58 //
59 theBorderSurfaceTable->insert(std::make_pair(std::make_pair(vol1,vol2),this));
60}
std::map< std::pair< const G4VPhysicalVolume *, const G4VPhysicalVolume * >, G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable

◆ ~G4LogicalBorderSurface()

G4LogicalBorderSurface::~G4LogicalBorderSurface ( )

Definition at line 62 of file G4LogicalBorderSurface.cc.

63{
64}

◆ G4LogicalBorderSurface() [2/2]

G4LogicalBorderSurface::G4LogicalBorderSurface ( const G4LogicalBorderSurface )
delete

Member Function Documentation

◆ CleanSurfaceTable()

void G4LogicalBorderSurface::CleanSurfaceTable ( )
static

Definition at line 138 of file G4LogicalBorderSurface.cc.

139{
140 if (theBorderSurfaceTable != nullptr)
141 {
142 for(auto pos = theBorderSurfaceTable->cbegin();
143 pos != theBorderSurfaceTable->cend(); ++pos)
144 {
145 if (pos->second) { delete pos->second; }
146 }
147 theBorderSurfaceTable->clear();
148 }
149 return;
150}

◆ DumpInfo()

void G4LogicalBorderSurface::DumpInfo ( )
static

Definition at line 118 of file G4LogicalBorderSurface.cc.

119{
120 G4cout << "***** Surface Table : Nb of Surfaces = "
121 << GetNumberOfBorderSurfaces() << " *****" << G4endl;
122
123 if (theBorderSurfaceTable != nullptr)
124 {
125 for(auto pos = theBorderSurfaceTable->cbegin();
126 pos != theBorderSurfaceTable->cend(); ++pos)
127 {
128 G4LogicalBorderSurface* pSurf = pos->second;
129 G4cout << pSurf->GetName() << " : " << G4endl
130 << " Border of volumes "
131 << pSurf->GetVolume1()->GetName() << " and "
132 << pSurf->GetVolume2()->GetName() << G4endl;
133 }
134 }
135 G4cout << G4endl;
136}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static size_t GetNumberOfBorderSurfaces()
const G4VPhysicalVolume * GetVolume2() const
const G4VPhysicalVolume * GetVolume1() const
const G4String & GetName() const
const G4String & GetName() const

◆ GetNumberOfBorderSurfaces()

std::size_t G4LogicalBorderSurface::GetNumberOfBorderSurfaces ( )
static

Definition at line 95 of file G4LogicalBorderSurface.cc.

96{
97 if (theBorderSurfaceTable != nullptr)
98 {
99 return theBorderSurfaceTable->size();
100 }
101 return 0;
102}

Referenced by DumpInfo(), and G4GDMLWriteStructure::GetBorderSurface().

◆ GetSurface()

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

Definition at line 105 of file G4LogicalBorderSurface.cc.

107{
108 if (theBorderSurfaceTable != nullptr)
109 {
110 auto pos = theBorderSurfaceTable->find(std::make_pair(vol1,vol2));
111 if(pos != theBorderSurfaceTable->cend()) return pos->second;
112 }
113 return nullptr;
114}

Referenced by G4MicroElecSurface::PostStepDoIt(), and G4OpBoundaryProcess::PostStepDoIt().

◆ GetSurfaceTable()

const G4LogicalBorderSurfaceTable * G4LogicalBorderSurface::GetSurfaceTable ( )
static

Definition at line 86 of file G4LogicalBorderSurface.cc.

87{
88 if (theBorderSurfaceTable == nullptr)
89 {
90 theBorderSurfaceTable = new G4LogicalBorderSurfaceTable;
91 }
92 return theBorderSurfaceTable;
93}

Referenced by G4GDMLWriteStructure::GetBorderSurface().

◆ GetVolume1()

const G4VPhysicalVolume * G4LogicalBorderSurface::GetVolume1 ( ) const
inline

◆ GetVolume2()

const G4VPhysicalVolume * G4LogicalBorderSurface::GetVolume2 ( ) const
inline

◆ operator!=()

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

Definition at line 77 of file G4LogicalBorderSurface.cc.

78{
79 return (this != (G4LogicalBorderSurface *) &right);
80}

◆ operator=()

G4LogicalBorderSurface & G4LogicalBorderSurface::operator= ( const G4LogicalBorderSurface )
delete

◆ operator==()

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

Definition at line 71 of file G4LogicalBorderSurface.cc.

72{
73 return (this == (G4LogicalBorderSurface *) &right);
74}

◆ SetPhysicalVolumes()

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

◆ SetVolume1()

void G4LogicalBorderSurface::SetVolume1 ( G4VPhysicalVolume vol1)
inline

◆ SetVolume2()

void G4LogicalBorderSurface::SetVolume2 ( G4VPhysicalVolume vol2)
inline

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