Geant4-11
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
G4LogicalBorderSurface Class Reference

#include <G4LogicalBorderSurface.hh>

Inheritance diagram for G4LogicalBorderSurface:
G4LogicalSurface

Public Member Functions

 G4LogicalBorderSurface (const G4LogicalBorderSurface &)=delete
 
 G4LogicalBorderSurface (const G4String &name, G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2, G4SurfaceProperty *surfaceProperty)
 
std::size_t GetIndex () const
 
const G4StringGetName () const
 
G4SurfacePropertyGetSurfaceProperty () const
 
G4TransitionRadiationSurface * GetTransitionRadiationSurface () const
 
const G4VPhysicalVolumeGetVolume1 () const
 
const G4VPhysicalVolumeGetVolume2 () const
 
G4bool operator!= (const G4LogicalBorderSurface &right) const
 
G4bool operator!= (const G4LogicalSurface &right) const
 
G4LogicalBorderSurfaceoperator= (const G4LogicalBorderSurface &)=delete
 
G4bool operator== (const G4LogicalBorderSurface &right) const
 
G4bool operator== (const G4LogicalSurface &right) const
 
void SetName (const G4String &name)
 
void SetPhysicalVolumes (G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2)
 
void SetSurfaceProperty (G4SurfaceProperty *ptrSurfaceProperty)
 
void SetTransitionRadiationSurface (G4TransitionRadiationSurface *trs)
 
void SetVolume1 (G4VPhysicalVolume *vol1)
 
void SetVolume2 (G4VPhysicalVolume *vol2)
 
 ~G4LogicalBorderSurface ()
 

Static Public Member Functions

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

Private Attributes

std::size_t Index
 
G4String theName
 
G4SurfacePropertytheSurfaceProperty = nullptr
 
G4TransitionRadiationSurface * theTransRadSurface = nullptr
 
G4VPhysicalVolumeVolume1
 
G4VPhysicalVolumeVolume2
 

Static Private Attributes

static G4LogicalBorderSurfaceTabletheBorderSurfaceTable = nullptr
 

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 Index(theBorderSurfaceTable != nullptr ? theBorderSurfaceTable->size() : 0)
52{
53 if (theBorderSurfaceTable == nullptr)
54 {
56 }
57
58 // Store in the table of Surfaces
59 //
60 theBorderSurfaceTable->insert(std::make_pair(std::make_pair(vol1,vol2),this));
61}
std::map< std::pair< const G4VPhysicalVolume *, const G4VPhysicalVolume * >, G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable
static G4LogicalBorderSurfaceTable * theBorderSurfaceTable
G4LogicalSurface(const G4LogicalSurface &)=delete
const char * name(G4int ptype)

References theBorderSurfaceTable.

◆ ~G4LogicalBorderSurface()

G4LogicalBorderSurface::~G4LogicalBorderSurface ( )

Definition at line 63 of file G4LogicalBorderSurface.cc.

64{
65}

◆ G4LogicalBorderSurface() [2/2]

G4LogicalBorderSurface::G4LogicalBorderSurface ( const G4LogicalBorderSurface )
delete

Member Function Documentation

◆ CleanSurfaceTable()

void G4LogicalBorderSurface::CleanSurfaceTable ( )
static

Definition at line 139 of file G4LogicalBorderSurface.cc.

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

References pos, and theBorderSurfaceTable.

◆ DumpInfo()

void G4LogicalBorderSurface::DumpInfo ( )
static

Definition at line 119 of file G4LogicalBorderSurface.cc.

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

References G4cout, G4endl, G4LogicalSurface::GetName(), G4VPhysicalVolume::GetName(), GetNumberOfBorderSurfaces(), GetVolume1(), GetVolume2(), pos, and theBorderSurfaceTable.

◆ GetIndex()

std::size_t G4LogicalBorderSurface::GetIndex ( ) const
inline

◆ GetName()

const G4String & G4LogicalSurface::GetName ( ) const
inlineinherited

◆ GetNumberOfBorderSurfaces()

std::size_t G4LogicalBorderSurface::GetNumberOfBorderSurfaces ( )
static

Definition at line 96 of file G4LogicalBorderSurface.cc.

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

References theBorderSurfaceTable.

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

◆ GetSurface()

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

Definition at line 106 of file G4LogicalBorderSurface.cc.

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

References pos, and theBorderSurfaceTable.

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

◆ GetSurfaceProperty()

G4SurfaceProperty * G4LogicalSurface::GetSurfaceProperty ( ) const
inlineinherited

◆ GetSurfaceTable()

const G4LogicalBorderSurfaceTable * G4LogicalBorderSurface::GetSurfaceTable ( )
static

Definition at line 87 of file G4LogicalBorderSurface.cc.

88{
89 if (theBorderSurfaceTable == nullptr)
90 {
92 }
94}

References theBorderSurfaceTable.

Referenced by G4GDMLWriteStructure::GetBorderSurface().

◆ GetTransitionRadiationSurface()

G4TransitionRadiationSurface * G4LogicalSurface::GetTransitionRadiationSurface ( ) const
inlineinherited

◆ GetVolume1()

const G4VPhysicalVolume * G4LogicalBorderSurface::GetVolume1 ( ) const
inline

◆ GetVolume2()

const G4VPhysicalVolume * G4LogicalBorderSurface::GetVolume2 ( ) const
inline

◆ operator!=() [1/2]

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

Definition at line 78 of file G4LogicalBorderSurface.cc.

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

◆ operator!=() [2/2]

G4bool G4LogicalSurface::operator!= ( const G4LogicalSurface right) const
inlineinherited

◆ operator=()

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

◆ operator==() [1/2]

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

Definition at line 72 of file G4LogicalBorderSurface.cc.

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

◆ operator==() [2/2]

G4bool G4LogicalSurface::operator== ( const G4LogicalSurface right) const
inlineinherited

◆ SetName()

void G4LogicalSurface::SetName ( const G4String name)
inlineinherited

◆ SetPhysicalVolumes()

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

◆ SetSurfaceProperty()

void G4LogicalSurface::SetSurfaceProperty ( G4SurfaceProperty ptrSurfaceProperty)
inlineinherited

◆ SetTransitionRadiationSurface()

void G4LogicalSurface::SetTransitionRadiationSurface ( G4TransitionRadiationSurface *  trs)
inlineinherited

◆ SetVolume1()

void G4LogicalBorderSurface::SetVolume1 ( G4VPhysicalVolume vol1)
inline

◆ SetVolume2()

void G4LogicalBorderSurface::SetVolume2 ( G4VPhysicalVolume vol2)
inline

Field Documentation

◆ Index

std::size_t G4LogicalBorderSurface::Index
private

Definition at line 94 of file G4LogicalBorderSurface.hh.

◆ theBorderSurfaceTable

G4LogicalBorderSurfaceTable * G4LogicalBorderSurface::theBorderSurfaceTable = nullptr
staticprivate

◆ theName

G4String G4LogicalSurface::theName
privateinherited

Definition at line 95 of file G4LogicalSurface.hh.

◆ theSurfaceProperty

G4SurfaceProperty* G4LogicalSurface::theSurfaceProperty = nullptr
privateinherited

Definition at line 97 of file G4LogicalSurface.hh.

◆ theTransRadSurface

G4TransitionRadiationSurface* G4LogicalSurface::theTransRadSurface = nullptr
privateinherited

Definition at line 98 of file G4LogicalSurface.hh.

◆ Volume1

G4VPhysicalVolume* G4LogicalBorderSurface::Volume1
private

Definition at line 91 of file G4LogicalBorderSurface.hh.

◆ Volume2

G4VPhysicalVolume* G4LogicalBorderSurface::Volume2
private

Definition at line 92 of file G4LogicalBorderSurface.hh.


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