Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
parameterisation
include
G4GlobalFastSimulationManager.hh
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
// $Id$
28
//
29
//
30
//---------------------------------------------------------------
31
//
32
// G4GlobalFastSimulationManager.hh
33
//
34
// Description:
35
// A singleton class which manages the Fast Simulation managers
36
// attached to envelopes.
37
//
38
// History:
39
// June 98: Verderi && MoraDeFreitas - "G4ParallelWorld" becomes
40
// "G4FlavoredParallelWorld"; some method name changes;
41
// GetFlavoredWorldForThis now returns a
42
// G4FlavoredParallelWorld pointer.
43
// Feb 98: Verderi && MoraDeFreitas - First Implementation.
44
//
45
//---------------------------------------------------------------
46
47
#ifndef G4GlobalFastSimulationManager_hh
48
#define G4GlobalFastSimulationManager_hh
49
50
#include "
globals.hh
"
51
#include "
G4FastSimulationVector.hh
"
52
53
#include "
G4VGlobalFastSimulationManager.hh
"
54
#include "
G4FastSimulationManager.hh
"
55
#include "
G4FastSimulationManagerProcess.hh
"
56
57
58
class
G4FastSimulationMessenger
;
59
60
enum
listType
{
61
NAMES_ONLY
,
62
MODELS
,
63
ISAPPLICABLE
64
};
65
66
67
// Class Description:
68
// This a singleton class which provides the management of the G4FastSimulationManager
69
// objects and some ghost facilities.
70
//
71
// You can get access to it by:
72
//
73
// #include "G4GlobalFastSimulationManager.hh"
74
// ...
75
// ...
76
// G4GlobalFastSimulationManager* globalFSM;
77
// globalFSM = G4GlobalFastSimulationManager::getGlobalFastSimulationManager();
78
// ...
79
// ...
80
//
81
// Presently, you will mainly need to use the GlobalFastSimulationManager if you use ghost
82
// geometries.
83
//
84
85
class
G4GlobalFastSimulationManager
86
{
87
88
public
:
// With description
89
90
static
G4GlobalFastSimulationManager
*
GetGlobalFastSimulationManager
();
91
// Provides a global access to the GlobalFastSimulationManager
92
static
G4GlobalFastSimulationManager
*
GetInstance
();
93
// Same as GetGlobalFastSimulationManager()
94
95
G4VFastSimulationModel
*
GetFastSimulationModel
(
const
G4String
& modelName,
96
const
G4VFastSimulationModel
* previousFound = 0)
const
;
97
// Iterative fetch of G4VFastSimulationModel objects by name:
98
// o returns the G4VFastSimulationModel* of model with name modelName;
99
// o returns 0 if no model found;
100
// o usage:
101
// myModel = gblManager->GetFastSimulationModel("MyModel");
102
// o note for the case of several models having the same name:
103
// - to get the first "MyModel" model:
104
// myModel1 = gblManager->GetFastSimulationModel("MyModel", 0);
105
// - to get the next one:
106
// myModel2 = gblManager->GetFastSimulationModel("MyModel", myModel1);
107
// - and so on.
108
// - When gblManager->GetFastSimulationModel("MyModel", myModel_n)
109
// returns a null pointer, no extra model with name "MyModel" exist.
110
111
112
public
:
// Without description
113
114
// Destructor
115
~G4GlobalFastSimulationManager
();
116
117
//
118
// G4FastSimulationManager(Process)'s management, no intended for general use.
119
//
120
// Methods for a G4FastSimulationManager to register itself
121
//
122
void
AddFastSimulationManager
(
G4FastSimulationManager
*);
123
void
RemoveFastSimulationManager
(
G4FastSimulationManager
*);
124
//
125
// G4FastSimulationManagerProcess bookeeping:
126
//
127
void
AddFSMP
(
G4FastSimulationManagerProcess
*);
128
void
RemoveFSMP
(
G4FastSimulationManagerProcess
*);
129
130
131
// Flag that the Parameterisation must be closed.
132
void
FastSimulationNeedsToBeClosed
();
133
134
135
public
:
// With description
136
void
ShowSetup
();
137
// Show the fast simulation setup : world(s), region(s), model(s) and links between them.
138
// Requires the geometry to be closed.
139
140
141
public
:
// Without description
142
143
void
ListEnvelopes
(
const
G4String
& aName =
"all"
,
144
listType
aListType =
NAMES_ONLY
);
145
void
ListEnvelopes
(
const
G4ParticleDefinition
* );
146
147
void
ActivateFastSimulationModel
(
const
G4String
&);
148
void
InActivateFastSimulationModel
(
const
G4String
&);
149
150
151
152
private
:
153
// Private construtor insures singleton class
154
G4GlobalFastSimulationManager
();
155
156
// recursive display of regions, models, etc...
157
void
DisplayRegion(
G4Region
* motherRegion,
G4int
depth, std::vector<G4ParticleDefinition*>& particles)
const
;
158
159
// The single instance.
160
static
G4GlobalFastSimulationManager
* fGlobalFastSimulationManager;
161
G4FastSimulationMessenger
* fTheFastSimulationMessenger;
162
G4FastSimulationVector <G4FastSimulationManager>
ManagedManagers;
163
G4FastSimulationVector <G4FastSimulationManagerProcess>
fFSMPVector;
164
};
165
166
#endif
167
// end of #ifndef G4GlobalFastSimulationManager_hh
Generated on Sat May 25 2013 14:34:11 for Geant4 by
1.8.4