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
visualization
modeling
src
G4TrajectoryModelFactories.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
//
27
// Jane Tinslay, John Allison, Joseph Perl October 2005
28
29
#include "
G4ModelCompoundCommandsT.hh
"
30
#include "
G4ModelCommandsT.hh
"
31
#include "
G4ModelCommandUtils.hh
"
32
#include "
G4TrajectoryDrawByAttribute.hh
"
33
#include "
G4TrajectoryDrawByCharge.hh
"
34
#include "
G4TrajectoryDrawByOriginVolume.hh
"
35
#include "
G4TrajectoryDrawByParticleID.hh
"
36
#include "
G4TrajectoryDrawByEncounteredVolume.hh
"
37
#include "
G4TrajectoryGenericDrawer.hh
"
38
#include "
G4TrajectoryModelFactories.hh
"
39
#include "
G4VisTrajContext.hh
"
40
41
// Draw by attribute
42
G4TrajectoryDrawByAttributeFactory::G4TrajectoryDrawByAttributeFactory
()
43
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"drawByAttribute"
)
44
{}
45
46
G4TrajectoryDrawByAttributeFactory::~G4TrajectoryDrawByAttributeFactory
() {}
47
48
ModelAndMessengers
49
G4TrajectoryDrawByAttributeFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
50
{
51
Messengers
messengers;
52
53
// Create default context and model
54
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
55
56
G4TrajectoryDrawByAttribute
* model =
new
G4TrajectoryDrawByAttribute
(
name
,
context
);
57
58
// Create messengers for default context configuration
59
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
60
61
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryDrawByAttribute>
(model, placement));
62
messengers.push_back(
new
G4ModelCmdSetString<G4TrajectoryDrawByAttribute>
(model, placement,
"setAttribute"
));
63
messengers.push_back(
new
G4ModelCmdAddIntervalContext<G4TrajectoryDrawByAttribute>
(model, placement,
"addInterval"
));
64
messengers.push_back(
new
G4ModelCmdAddValueContext<G4TrajectoryDrawByAttribute>
(model, placement,
"addValue"
));
65
66
return
ModelAndMessengers
(model, messengers);
67
}
68
69
G4TrajectoryGenericDrawerFactory::G4TrajectoryGenericDrawerFactory
()
70
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"generic"
)
71
{}
72
73
G4TrajectoryGenericDrawerFactory::~G4TrajectoryGenericDrawerFactory
() {}
74
75
ModelAndMessengers
76
G4TrajectoryGenericDrawerFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
77
{
78
Messengers
messengers;
79
80
// Create default context and model
81
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
82
G4TrajectoryGenericDrawer
* model =
new
G4TrajectoryGenericDrawer
(
name
,
context
);
83
84
// Create messengers for default context configuration
85
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
86
87
// Verbose command
88
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryGenericDrawer>
(model, placement));
89
90
return
ModelAndMessengers
(model, messengers);
91
}
92
93
// drawByCharge
94
G4TrajectoryDrawByChargeFactory::G4TrajectoryDrawByChargeFactory
()
95
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"drawByCharge"
)
96
{}
97
98
G4TrajectoryDrawByChargeFactory::~G4TrajectoryDrawByChargeFactory
() {}
99
100
ModelAndMessengers
101
G4TrajectoryDrawByChargeFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
102
{
103
Messengers
messengers;
104
105
// Create default context and model
106
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
107
G4TrajectoryDrawByCharge
* model =
new
G4TrajectoryDrawByCharge
(
name
,
context
);
108
109
// Create messengers for default context configuration
110
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
111
112
// Create messengers for drawer
113
messengers.push_back(
new
G4ModelCmdSetStringColour<G4TrajectoryDrawByCharge>
(model, placement));
114
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryDrawByCharge>
(model, placement));
115
116
return
ModelAndMessengers
(model, messengers);
117
}
118
119
//Draw by particle ID
120
G4TrajectoryDrawByParticleIDFactory::G4TrajectoryDrawByParticleIDFactory
()
121
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"drawByParticleID"
)
122
{}
123
124
G4TrajectoryDrawByParticleIDFactory::~G4TrajectoryDrawByParticleIDFactory
() {}
125
126
ModelAndMessengers
127
G4TrajectoryDrawByParticleIDFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
128
{
129
Messengers
messengers;
130
131
// Create default context and model
132
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
133
G4TrajectoryDrawByParticleID
* model =
new
G4TrajectoryDrawByParticleID
(
name
,
context
);
134
135
// Create messengers for default context configuration
136
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
137
138
// Create messengers for drawer
139
messengers.push_back(
new
G4ModelCmdSetStringColour<G4TrajectoryDrawByParticleID>
(model, placement));
140
messengers.push_back(
new
G4ModelCmdSetDefaultColour<G4TrajectoryDrawByParticleID>
(model, placement));
141
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryDrawByParticleID>
(model, placement));
142
143
return
ModelAndMessengers
(model, messengers);
144
}
145
146
//Draw by origin volume
147
G4TrajectoryDrawByOriginVolumeFactory::G4TrajectoryDrawByOriginVolumeFactory
()
148
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"drawByOriginVolume"
)
149
{}
150
151
G4TrajectoryDrawByOriginVolumeFactory::~G4TrajectoryDrawByOriginVolumeFactory
() {}
152
153
ModelAndMessengers
154
G4TrajectoryDrawByOriginVolumeFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
155
{
156
Messengers
messengers;
157
158
// Create default context and model
159
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
160
G4TrajectoryDrawByOriginVolume
* model =
new
G4TrajectoryDrawByOriginVolume
(
name
,
context
);
161
162
// Create messengers for default context configuration
163
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
164
165
// Create messengers for drawer
166
messengers.push_back(
new
G4ModelCmdSetStringColour<G4TrajectoryDrawByOriginVolume>
(model, placement));
167
messengers.push_back(
new
G4ModelCmdSetDefaultColour<G4TrajectoryDrawByOriginVolume>
(model, placement));
168
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryDrawByOriginVolume>
(model, placement));
169
170
return
ModelAndMessengers
(model, messengers);
171
}
172
173
//Draw by encountered volume
174
G4TrajectoryDrawByEncounteredVolumeFactory::G4TrajectoryDrawByEncounteredVolumeFactory
()
175
:
G4VModelFactory
<
G4VTrajectoryModel
>(
"drawByEncounteredVolume"
)
176
{}
177
178
G4TrajectoryDrawByEncounteredVolumeFactory::~G4TrajectoryDrawByEncounteredVolumeFactory
() {}
179
180
ModelAndMessengers
181
G4TrajectoryDrawByEncounteredVolumeFactory::Create
(
const
G4String
& placement,
const
G4String
&
name
)
182
{
183
Messengers
messengers;
184
185
// Create default context and model
186
G4VisTrajContext
*
context
=
new
G4VisTrajContext
(
"default"
);
187
G4TrajectoryDrawByEncounteredVolume
* model =
new
G4TrajectoryDrawByEncounteredVolume
(
name
,
context
);
188
189
// Create messengers for default context configuration
190
G4ModelCommandUtils::AddContextMsgrs
(
context
, messengers, placement+
"/"
+
name
);
191
192
// Create messengers for drawer
193
messengers.push_back(
new
G4ModelCmdSetStringColour<G4TrajectoryDrawByEncounteredVolume>
(model, placement));
194
messengers.push_back(
new
G4ModelCmdSetDefaultColour<G4TrajectoryDrawByEncounteredVolume>
(model, placement));
195
messengers.push_back(
new
G4ModelCmdVerbose<G4TrajectoryDrawByEncounteredVolume>
(model, placement));
196
197
return
ModelAndMessengers
(model, messengers);
198
}
G4ModelCommandUtils.hh
G4ModelCommandsT.hh
G4ModelCompoundCommandsT.hh
G4TrajectoryDrawByAttribute.hh
G4TrajectoryDrawByCharge.hh
G4TrajectoryDrawByEncounteredVolume.hh
G4TrajectoryDrawByOriginVolume.hh
G4TrajectoryDrawByParticleID.hh
G4TrajectoryGenericDrawer.hh
G4TrajectoryModelFactories.hh
G4VisTrajContext.hh
G4ModelCmdAddIntervalContext
Definition:
G4ModelCompoundCommandsT.hh:42
G4ModelCmdAddValueContext
Definition:
G4ModelCompoundCommandsT.hh:92
G4ModelCmdSetDefaultColour
Definition:
G4ModelCommandsT.hh:63
G4ModelCmdSetStringColour
Definition:
G4ModelCommandsT.hh:42
G4ModelCmdSetString
Definition:
G4ModelCommandsT.hh:850
G4ModelCmdVerbose
Definition:
G4ModelCommandsT.hh:180
G4String
Definition:
G4String.hh:62
G4TrajectoryDrawByAttributeFactory::G4TrajectoryDrawByAttributeFactory
G4TrajectoryDrawByAttributeFactory()
Definition:
G4TrajectoryModelFactories.cc:42
G4TrajectoryDrawByAttributeFactory::~G4TrajectoryDrawByAttributeFactory
virtual ~G4TrajectoryDrawByAttributeFactory()
Definition:
G4TrajectoryModelFactories.cc:46
G4TrajectoryDrawByAttributeFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:49
G4TrajectoryDrawByAttribute
Definition:
G4TrajectoryDrawByAttribute.hh:41
G4TrajectoryDrawByChargeFactory::G4TrajectoryDrawByChargeFactory
G4TrajectoryDrawByChargeFactory()
Definition:
G4TrajectoryModelFactories.cc:94
G4TrajectoryDrawByChargeFactory::~G4TrajectoryDrawByChargeFactory
virtual ~G4TrajectoryDrawByChargeFactory()
Definition:
G4TrajectoryModelFactories.cc:98
G4TrajectoryDrawByChargeFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:101
G4TrajectoryDrawByCharge
Definition:
G4TrajectoryDrawByCharge.hh:42
G4TrajectoryDrawByEncounteredVolumeFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:181
G4TrajectoryDrawByEncounteredVolumeFactory::G4TrajectoryDrawByEncounteredVolumeFactory
G4TrajectoryDrawByEncounteredVolumeFactory()
Definition:
G4TrajectoryModelFactories.cc:174
G4TrajectoryDrawByEncounteredVolumeFactory::~G4TrajectoryDrawByEncounteredVolumeFactory
virtual ~G4TrajectoryDrawByEncounteredVolumeFactory()
Definition:
G4TrajectoryModelFactories.cc:178
G4TrajectoryDrawByEncounteredVolume
Definition:
G4TrajectoryDrawByEncounteredVolume.hh:43
G4TrajectoryDrawByOriginVolumeFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:154
G4TrajectoryDrawByOriginVolumeFactory::G4TrajectoryDrawByOriginVolumeFactory
G4TrajectoryDrawByOriginVolumeFactory()
Definition:
G4TrajectoryModelFactories.cc:147
G4TrajectoryDrawByOriginVolumeFactory::~G4TrajectoryDrawByOriginVolumeFactory
virtual ~G4TrajectoryDrawByOriginVolumeFactory()
Definition:
G4TrajectoryModelFactories.cc:151
G4TrajectoryDrawByOriginVolume
Definition:
G4TrajectoryDrawByOriginVolume.hh:42
G4TrajectoryDrawByParticleIDFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:127
G4TrajectoryDrawByParticleIDFactory::~G4TrajectoryDrawByParticleIDFactory
virtual ~G4TrajectoryDrawByParticleIDFactory()
Definition:
G4TrajectoryModelFactories.cc:124
G4TrajectoryDrawByParticleIDFactory::G4TrajectoryDrawByParticleIDFactory
G4TrajectoryDrawByParticleIDFactory()
Definition:
G4TrajectoryModelFactories.cc:120
G4TrajectoryDrawByParticleID
Definition:
G4TrajectoryDrawByParticleID.hh:43
G4TrajectoryGenericDrawerFactory::Create
ModelAndMessengers Create(const G4String &placement, const G4String &name)
Definition:
G4TrajectoryModelFactories.cc:76
G4TrajectoryGenericDrawerFactory::G4TrajectoryGenericDrawerFactory
G4TrajectoryGenericDrawerFactory()
Definition:
G4TrajectoryModelFactories.cc:69
G4TrajectoryGenericDrawerFactory::~G4TrajectoryGenericDrawerFactory
virtual ~G4TrajectoryGenericDrawerFactory()
Definition:
G4TrajectoryModelFactories.cc:73
G4TrajectoryGenericDrawer
Definition:
G4TrajectoryGenericDrawer.hh:40
G4VModelFactory
Definition:
G4VModelFactory.hh:46
G4VModelFactory< G4VTrajectoryModel >::Messengers
std::vector< G4UImessenger * > Messengers
Definition:
G4VModelFactory.hh:50
G4VModelFactory< G4VTrajectoryModel >::ModelAndMessengers
std::pair< G4VTrajectoryModel *, Messengers > ModelAndMessengers
Definition:
G4VModelFactory.hh:51
G4VTrajectoryModel
Definition:
G4VTrajectoryModel.hh:43
G4VisTrajContext
Definition:
G4VisTrajContext.hh:35
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:76
G4ModelCommandUtils::AddContextMsgrs
void AddContextMsgrs(G4VisTrajContext *context, std::vector< G4UImessenger * > &messengers, const G4String &placement)
Definition:
G4ModelCommandUtils.hh:41
anonymous_namespace{G4TrajectoryModelFactories.hh}::ModelAndMessengers
std::pair< G4VTrajectoryModel *, Messengers > ModelAndMessengers
Definition:
G4TrajectoryModelFactories.hh:42
g4zmq.context
context
Definition:
g4zmq.py:11
Generated by
1.9.3