Geant4-11
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
w
y
Enumerations
a
b
c
d
e
f
g
l
m
p
r
s
t
v
y
z
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
g
h
i
o
q
r
s
t
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
b
c
d
e
f
g
i
j
l
m
n
p
r
s
t
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
geometry
volumes
src
G4LogicalSkinSurface.cc
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// G4LogicalSkinSurface Implementation
27
//
28
// A Logical Surface class for the surface surrounding a single
29
// logical volume.
30
//
31
// Author: John Apostolakis (John.Apostolakis@cern.ch), 26-06-1997
32
// --------------------------------------------------------------------
33
34
#include "
G4LogicalSkinSurface.hh
"
35
#include "
G4LogicalVolume.hh
"
36
37
G4LogicalSkinSurfaceTable
*
G4LogicalSkinSurface::theSkinSurfaceTable
=
nullptr
;
38
39
//
40
// Constructors & destructor
41
//
42
43
G4LogicalSkinSurface::G4LogicalSkinSurface
(
const
G4String
&
name
,
44
G4LogicalVolume
* logicalVolume,
45
G4SurfaceProperty
* surfaceProperty)
46
:
G4LogicalSurface
(
name
, surfaceProperty),
47
LogVolume(logicalVolume)
48
{
49
if
(
theSkinSurfaceTable
==
nullptr
)
50
{
51
theSkinSurfaceTable
=
new
G4LogicalSkinSurfaceTable
;
52
}
53
// Store in the table of Surfaces
54
//
55
theSkinSurfaceTable
->push_back(
this
);
56
}
57
58
G4LogicalSkinSurface::~G4LogicalSkinSurface
()
59
{
60
}
61
62
//
63
// Operators
64
//
65
66
G4bool
67
G4LogicalSkinSurface::operator==
(
const
G4LogicalSkinSurface
& right)
const
68
{
69
return
(
this
== (
G4LogicalSkinSurface
*) &right);
70
}
71
72
G4bool
73
G4LogicalSkinSurface::operator!=
(
const
G4LogicalSkinSurface
& right)
const
74
{
75
return
(
this
!= (
G4LogicalSkinSurface
*) &right);
76
}
77
78
//
79
// Methods
80
//
81
82
const
G4LogicalSkinSurfaceTable
*
G4LogicalSkinSurface::GetSurfaceTable
()
83
{
84
if
(
theSkinSurfaceTable
==
nullptr
)
85
{
86
theSkinSurfaceTable
=
new
G4LogicalSkinSurfaceTable
;
87
}
88
return
theSkinSurfaceTable
;
89
}
90
91
size_t
G4LogicalSkinSurface::GetNumberOfSkinSurfaces
()
92
{
93
if
(
theSkinSurfaceTable
!=
nullptr
)
94
{
95
return
theSkinSurfaceTable
->size();
96
}
97
return
0;
98
}
99
100
G4LogicalSkinSurface
*
101
G4LogicalSkinSurface::GetSurface
(
const
G4LogicalVolume
* vol)
102
{
103
if
(
theSkinSurfaceTable
!=
nullptr
)
104
{
105
for
(
auto
pos
=
theSkinSurfaceTable
->cbegin();
106
pos
!=
theSkinSurfaceTable
->cend(); ++
pos
)
107
{
108
if
((*pos)->GetLogicalVolume() == vol) {
return
*
pos
; }
109
}
110
}
111
return
nullptr
;
112
}
113
114
// Dump info for known surfaces
115
//
116
void
G4LogicalSkinSurface::DumpInfo
()
117
{
118
G4cout
<<
"***** Skin Surface Table : Nb of Surfaces = "
119
<<
GetNumberOfSkinSurfaces
() <<
" *****"
<<
G4endl
;
120
121
if
(
theSkinSurfaceTable
!=
nullptr
)
122
{
123
for
(
auto
pos
=
theSkinSurfaceTable
->cbegin();
124
pos
!=
theSkinSurfaceTable
->cend(); ++
pos
)
125
{
126
G4cout
<< (*pos)->GetName() <<
" : "
<<
G4endl
127
<<
" Skin of logical volume "
128
<< (*pos)->GetLogicalVolume()->GetName()
129
<<
G4endl
;
130
}
131
}
132
G4cout
<<
G4endl
;
133
}
134
135
void
G4LogicalSkinSurface::CleanSurfaceTable
()
136
{
137
if
(
theSkinSurfaceTable
)
138
{
139
for
(
auto
pos
=
theSkinSurfaceTable
->cbegin();
140
pos
!=
theSkinSurfaceTable
->cend(); ++
pos
)
141
{
142
if
(*
pos
) {
delete
*
pos
; }
143
}
144
theSkinSurfaceTable
->clear();
145
}
146
return
;
147
}
pos
static const G4double pos
Definition:
G4ElectroNuclearCrossSection.cc:66
G4LogicalSkinSurface.hh
G4LogicalSkinSurfaceTable
std::vector< G4LogicalSkinSurface * > G4LogicalSkinSurfaceTable
Definition:
G4LogicalSkinSurface.hh:45
G4LogicalVolume.hh
G4bool
bool G4bool
Definition:
G4Types.hh:86
G4endl
#define G4endl
Definition:
G4ios.hh:57
G4cout
G4GLOB_DLL std::ostream G4cout
G4LogicalSkinSurface
Definition:
G4LogicalSkinSurface.hh:48
G4LogicalSkinSurface::GetSurface
static G4LogicalSkinSurface * GetSurface(const G4LogicalVolume *vol)
Definition:
G4LogicalSkinSurface.cc:101
G4LogicalSkinSurface::operator==
G4bool operator==(const G4LogicalSkinSurface &right) const
Definition:
G4LogicalSkinSurface.cc:67
G4LogicalSkinSurface::theSkinSurfaceTable
static G4LogicalSkinSurfaceTable * theSkinSurfaceTable
Definition:
G4LogicalSkinSurface.hh:82
G4LogicalSkinSurface::G4LogicalSkinSurface
G4LogicalSkinSurface(const G4String &name, G4LogicalVolume *vol, G4SurfaceProperty *surfaceProperty)
Definition:
G4LogicalSkinSurface.cc:43
G4LogicalSkinSurface::~G4LogicalSkinSurface
~G4LogicalSkinSurface()
Definition:
G4LogicalSkinSurface.cc:58
G4LogicalSkinSurface::DumpInfo
static void DumpInfo()
Definition:
G4LogicalSkinSurface.cc:116
G4LogicalSkinSurface::GetSurfaceTable
static const G4LogicalSkinSurfaceTable * GetSurfaceTable()
Definition:
G4LogicalSkinSurface.cc:82
G4LogicalSkinSurface::CleanSurfaceTable
static void CleanSurfaceTable()
Definition:
G4LogicalSkinSurface.cc:135
G4LogicalSkinSurface::GetNumberOfSkinSurfaces
static std::size_t GetNumberOfSkinSurfaces()
Definition:
G4LogicalSkinSurface.cc:91
G4LogicalSkinSurface::operator!=
G4bool operator!=(const G4LogicalSkinSurface &right) const
Definition:
G4LogicalSkinSurface.cc:73
G4LogicalSurface
Definition:
G4LogicalSurface.hh:65
G4LogicalVolume
Definition:
G4LogicalVolume.hh:182
G4String
Definition:
G4String.hh:62
G4SurfaceProperty
Definition:
G4SurfaceProperty.hh:72
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:76
Generated by
1.9.3