Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VModularPhysicsList Class Reference

#include <G4VModularPhysicsList.hh>

Inherits G4VUserPhysicsList.

Inherited by B3PhysicsList, B3PhysicsList, BrachyPhysicsList, ExExChPhysicsList, ExUCNPhysicsList, F04PhysicsList, F05PhysicsList, F06PhysicsList, G4HumanPhantomPhysicsList, GammaKnifePhysicsList, GammaRayTelPhysicsList, HadrontherapyPhysicsList, IORTPhysicsList, LXePhysicsList, ML2PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, pyG4VModularPhysicsList::CB_G4VModularPhysicsList, QBBC, QPhysicsList, UltraPhysicsList, WLSPhysicsList, and XrayFluoPhysicsList.

Collaboration diagram for G4VModularPhysicsList:

Public Member Functions

 G4VModularPhysicsList ()
 
virtual ~G4VModularPhysicsList ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
void RegisterPhysics (G4VPhysicsConstructor *)
 
const G4VPhysicsConstructorGetPhysics (G4int index) const
 
const G4VPhysicsConstructorGetPhysics (const G4String &name) const
 
const G4VPhysicsConstructorGetPhysicsWithType (G4int physics_type) const
 
void ReplacePhysics (G4VPhysicsConstructor *)
 
void RemovePhysics (G4VPhysicsConstructor *)
 
void RemovePhysics (G4int type)
 
void RemovePhysics (const G4String &name)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 
- Public Member Functions inherited from G4VUserPhysicsList
 G4VUserPhysicsList ()
 
virtual ~G4VUserPhysicsList ()
 
 G4VUserPhysicsList (const G4VUserPhysicsList &)
 
G4VUserPhysicsListoperator= (const G4VUserPhysicsList &)
 
void Construct ()
 
void UseCoupledTransportation (G4bool vl=true)
 
virtual void SetCuts ()
 
void SetDefaultCutValue (G4double newCutValue)
 
G4double GetDefaultCutValue () const
 
void BuildPhysicsTable ()
 
void PreparePhysicsTable (G4ParticleDefinition *)
 
void BuildPhysicsTable (G4ParticleDefinition *)
 
G4bool StorePhysicsTable (const G4String &directory=".")
 
G4bool IsPhysicsTableRetrieved () const
 
G4bool IsStoredInAscii () const
 
const G4StringGetPhysicsTableDirectory () const
 
void SetPhysicsTableRetrieved (const G4String &directory="")
 
void SetStoredInAscii ()
 
void ResetPhysicsTableRetrieved ()
 
void ResetStoredInAscii ()
 
void DumpList () const
 
void DumpCutValuesTable (G4int flag=1)
 
void DumpCutValuesTableIfRequested ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void SetCutsWithDefault ()
 
void SetCutValue (G4double aCut, const G4String &pname)
 
G4double GetCutValue (const G4String &pname) const
 
void SetCutValue (G4double aCut, const G4String &pname, const G4String &rname)
 
void SetParticleCuts (G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
 
void SetParticleCuts (G4double cut, const G4String &particleName, G4Region *region=0)
 
void SetCutsForRegion (G4double aCut, const G4String &rname)
 
void ResetCuts ()
 obsolete methods More...
 
void SetApplyCuts (G4bool value, const G4String &name)
 
G4bool GetApplyCuts (const G4String &name) const
 
void RemoveProcessManager ()
 
void AddProcessManager (G4ParticleDefinition *newParticle, G4ProcessManager *newManager=0)
 
void CheckParticleList ()
 
void DisableCheckParticleList ()
 
G4int GetInstanceID () const
 
void InitializeWorker ()
 

Static Public Member Functions

static const G4VMPLManagerGetSubInstanceManager ()
 
- Static Public Member Functions inherited from G4VUserPhysicsList
static const G4VUPLManagerGetSubInstanceManager ()
 

Protected Types

typedef
G4VMPLData::G4PhysConstVectorData 
G4PhysConstVector
 

Protected Member Functions

 G4VModularPhysicsList (const G4VModularPhysicsList &)
 
G4VModularPhysicsListoperator= (const G4VModularPhysicsList &)
 
- Protected Member Functions inherited from G4VUserPhysicsList
void AddTransportation ()
 
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
void BuildIntegralPhysicsTable (G4VProcess *, G4ParticleDefinition *)
 
virtual void RetrievePhysicsTable (G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
 
void InitializeProcessManager ()
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 

Protected Attributes

G4int verboseLevel
 
G4int g4vmplInstanceID
 
- Protected Attributes inherited from G4VUserPhysicsList
G4ParticleTabletheParticleTable
 
G4int verboseLevel
 
G4double defaultCutValue
 
G4bool isSetDefaultCutValue
 
G4ProductionCutsTablefCutsTable
 
G4bool fRetrievePhysicsTable
 
G4bool fStoredInAscii
 
G4bool fIsCheckedForRetrievePhysicsTable
 
G4bool fIsRestoredCutValues
 
G4String directoryPhysicsTable
 
G4bool fDisableCheckParticleList
 
G4int g4vuplInstanceID
 

Static Protected Attributes

static G4RUN_DLL G4VMPLManager G4VMPLsubInstanceManager
 
- Static Protected Attributes inherited from G4VUserPhysicsList
static G4RUN_DLL G4VUPLManager subInstanceManager
 

Detailed Description

Definition at line 90 of file G4VModularPhysicsList.hh.

Member Typedef Documentation

Constructor & Destructor Documentation

G4VModularPhysicsList::G4VModularPhysicsList ( )

Definition at line 52 of file G4VModularPhysicsList.cc.

Here is the call graph for this function:

G4VModularPhysicsList::~G4VModularPhysicsList ( )
virtual

Definition at line 59 of file G4VModularPhysicsList.cc.

60 {
61  G4PhysConstVector::iterator itr;
62  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
63  delete (*itr);
64  }
65  G4MT_physicsVector->clear();
66  delete G4MT_physicsVector;
67 }
#define G4MT_physicsVector
G4VModularPhysicsList::G4VModularPhysicsList ( const G4VModularPhysicsList right)
protected

Definition at line 69 of file G4VModularPhysicsList.cc.

Here is the call graph for this function:

Member Function Documentation

void G4VModularPhysicsList::ConstructProcess ( void  )
virtual

Implements G4VUserPhysicsList.

Reimplemented in ExExChPhysicsList, PhysicsList, WLSPhysicsList, ML2PhysicsList, PhysicsList, IORTPhysicsList, PhysicsList, PhysicsList, F04PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, UltraPhysicsList, GammaRayTelPhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, HadrontherapyPhysicsList, PhysicsList, PhysicsList, XrayFluoPhysicsList, G4HumanPhantomPhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, PhysicsList, F05PhysicsList, F06PhysicsList, PhysicsList, PhysicsList, GammaKnifePhysicsList, PhysicsList, BrachyPhysicsList, ExUCNPhysicsList, and PhysicsList.

Definition at line 129 of file G4VModularPhysicsList.cc.

130 {
131  G4AutoLock l(&constructProcessMutex); //Protection to be removed (A.Dotti)
133 
134  G4PhysConstVector::iterator itr;
135  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
136  (*itr)->ConstructProcess();
137  }
138 }
#define G4MT_physicsVector

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4VModularPhysicsList::GetInstanceID ( ) const
inline

Definition at line 162 of file G4VModularPhysicsList.hh.

163 {
164  return g4vmplInstanceID;
165 }

Here is the caller graph for this function:

const G4VPhysicsConstructor * G4VModularPhysicsList::GetPhysics ( G4int  index) const

Definition at line 347 of file G4VModularPhysicsList.cc.

348 {
349  G4int i;
350  G4PhysConstVector::iterator itr= G4MT_physicsVector->begin();
351  for (i=0; i<idx && itr!= G4MT_physicsVector->end() ; ++i) ++itr;
352  if (itr!= G4MT_physicsVector->end()) return (*itr);
353  else return 0;
354 }
int G4int
Definition: G4Types.hh:78
#define G4MT_physicsVector

Here is the caller graph for this function:

const G4VPhysicsConstructor * G4VModularPhysicsList::GetPhysics ( const G4String name) const

Definition at line 356 of file G4VModularPhysicsList.cc.

357 {
358  G4PhysConstVector::iterator itr;
359  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
360  if ( name == (*itr)->GetPhysicsName()) break;
361  }
362  if (itr!= G4MT_physicsVector->end()) return (*itr);
363  else return 0;
364 }
#define G4MT_physicsVector
const G4VPhysicsConstructor * G4VModularPhysicsList::GetPhysicsWithType ( G4int  physics_type) const

Definition at line 366 of file G4VModularPhysicsList.cc.

367 {
368  G4PhysConstVector::iterator itr;
369  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
370  if ( pType == (*itr)->GetPhysicsType()) break;
371  }
372  if (itr!= G4MT_physicsVector->end()) return (*itr);
373  else return 0;
374 }
#define G4MT_physicsVector
const G4VMPLManager & G4VModularPhysicsList::GetSubInstanceManager ( )
inlinestatic

Definition at line 168 of file G4VModularPhysicsList.hh.

169 {
171 }
static G4RUN_DLL G4VMPLManager G4VMPLsubInstanceManager

Here is the caller graph for this function:

G4int G4VModularPhysicsList::GetVerboseLevel ( ) const
inline

Definition at line 156 of file G4VModularPhysicsList.hh.

157 {
158  return verboseLevel;
159 }

Here is the caller graph for this function:

G4VModularPhysicsList & G4VModularPhysicsList::operator= ( const G4VModularPhysicsList right)
protected

Definition at line 75 of file G4VModularPhysicsList.cc.

76 {
77  if (this != &right) {
85  //fDisplayThreshold = static_cast<const G4VUserPhysicsList&>(right).GetSubInstanceManager().offset[right.GetInstanceID()]._fDisplayThreshold;
86  (this->subInstanceManager.offset[this->g4vuplInstanceID])._fDisplayThreshold=
87  static_cast<const G4VUserPhysicsList&>(right).GetSubInstanceManager().offset[right.GetInstanceID()]._fDisplayThreshold;
88  //fIsPhysicsTableBuilt = static_cast<const G4VUserPhysicsList&>(right).GetSubInstanceManager().offset[right.GetInstanceID()]._fIsPhysicsTableBuilt;
89  (this->subInstanceManager.offset[this->g4vuplInstanceID])._fDisplayThreshold=
90  static_cast<const G4VUserPhysicsList&>(right).GetSubInstanceManager().offset[right.GetInstanceID()]._fIsPhysicsTableBuilt;
91  //fDisplayThreshold = right.fDisplayThreshold;
93  verboseLevel = right.verboseLevel;
94 
95  if(G4MT_physicsVector !=0) {
96  G4PhysConstVector::iterator itr;
97  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
98  delete (*itr);
99  }
100  G4MT_physicsVector->clear();
101  delete G4MT_physicsVector;
102  }
104  }
105  return *this;
106 }
G4bool fIsCheckedForRetrievePhysicsTable
G4RUN_DLL G4ThreadLocalStatic T * offset
static G4RUN_DLL G4VMPLManager G4VMPLsubInstanceManager
#define G4MT_physicsVector
static G4RUN_DLL G4VUPLManager subInstanceManager
G4int CreateSubInstance()

Here is the call graph for this function:

void G4VModularPhysicsList::RegisterPhysics ( G4VPhysicsConstructor fPhysics)

Definition at line 142 of file G4VModularPhysicsList.cc.

143 {
145  G4ApplicationState currentState = stateManager->GetCurrentState();
146  if(!(currentState==G4State_PreInit)){
147  G4Exception("G4VModularPhysicsList::RegisterPhysics",
148  "Run0201", JustWarning,
149  "Geant4 kernel is not PreInit state : Method ignored.");
150  return;
151  }
152 
153  G4String pName = fPhysics->GetPhysicsName();
154  G4int pType = fPhysics->GetPhysicsType();
155  // If physics_type is equal to 0,
156  // following duplication check is omitted
157  // This is TEMPORAL treatment.
158  if (pType == 0) {
159  G4MT_physicsVector->push_back(fPhysics);
160 #ifdef G4VERBOSE
161  if (verboseLevel >1){
162  G4cout << "G4VModularPhysicsList::RegisterPhysics: "
163  << pName << "with type : " << pType
164  << " is added"
165  << G4endl;
166  }
167 #endif
168  return;
169  }
170 
171  // Check if physics with the physics_type same as one of given physics
172  G4PhysConstVector::iterator itr;
173  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
174  if ( pType == (*itr)->GetPhysicsType()) break;
175  }
176  if (itr!= G4MT_physicsVector->end()) {
177 #ifdef G4VERBOSE
178  if (verboseLevel >0){
179  G4cout << "G4VModularPhysicsList::RegisterPhysics: "
180  << "a physics with given type already exists "
181  << G4endl;
182  G4cout << " Type = " << pType << " : "
183  << " existing physics is " << (*itr)->GetPhysicsName()
184  << G4endl;
185  G4cout << pName << " can not be registered "<<G4endl;
186  }
187 #endif
188  G4String comment ="Duplicate type for ";
189  comment += pName;
190  G4Exception("G4VModularPhysicsList::RegisterPhysics",
191  "Run0202", JustWarning, comment);
192  return;
193  }
194 
195  // register
196  G4MT_physicsVector->push_back(fPhysics);
197 
198 }
int G4int
Definition: G4Types.hh:78
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
const G4String & GetPhysicsName() const
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4MT_physicsVector
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VModularPhysicsList::RemovePhysics ( G4VPhysicsConstructor fPhysics)

Definition at line 288 of file G4VModularPhysicsList.cc.

289 {
291  G4ApplicationState currentState = stateManager->GetCurrentState();
292  if(!(currentState==G4State_PreInit)){
293  G4Exception("G4VModularPhysicsList::RemovePhysics",
294  "Run0205", JustWarning,
295  "Geant4 kernel is not PreInit state : Method ignored.");
296  return;
297  }
298 
299  for (G4PhysConstVector::iterator itr = G4MT_physicsVector->begin();
300  itr!= G4MT_physicsVector->end();) {
301  if ( fPhysics == (*itr)) {
302  G4String pName = (*itr)->GetPhysicsName();
303 #ifdef G4VERBOSE
304  if (verboseLevel > 0 ){
305  G4cout << "G4VModularPhysicsList::RemovePhysics: "
306  << pName << " is removed"
307  << G4endl;
308  }
309 #endif
310  G4MT_physicsVector->erase(itr);
311  break;
312  } else {
313  itr++;
314  }
315  }
316 }
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4MT_physicsVector
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

void G4VModularPhysicsList::RemovePhysics ( G4int  type)

Definition at line 258 of file G4VModularPhysicsList.cc.

259 {
261  G4ApplicationState currentState = stateManager->GetCurrentState();
262  if(!(currentState==G4State_PreInit)){
263  G4Exception("G4VModularPhysicsList::RemovePhysics",
264  "Run0204", JustWarning,
265  "Geant4 kernel is not PreInit state : Method ignored.");
266  return;
267  }
268 
269  for (G4PhysConstVector::iterator itr = G4MT_physicsVector->begin();
270  itr!= G4MT_physicsVector->end();) {
271  if ( pType == (*itr)->GetPhysicsType()) {
272  G4String pName = (*itr)->GetPhysicsName();
273 #ifdef G4VERBOSE
274  if (verboseLevel > 0){
275  G4cout << "G4VModularPhysicsList::RemovePhysics: "
276  << pName << " is removed"
277  << G4endl;
278  }
279 #endif
280  G4MT_physicsVector->erase(itr);
281  break;
282  } else {
283  itr++;
284  }
285  }
286 }
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4MT_physicsVector
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

void G4VModularPhysicsList::RemovePhysics ( const G4String name)

Definition at line 317 of file G4VModularPhysicsList.cc.

318 {
320  G4ApplicationState currentState = stateManager->GetCurrentState();
321  if(!(currentState==G4State_PreInit)){
322  G4Exception("G4VModularPhysicsList::RemovePhysics",
323  "Run0206", JustWarning,
324  "Geant4 kernel is not PreInit state : Method ignored.");
325  return;
326  }
327 
328  for (G4PhysConstVector::iterator itr = G4MT_physicsVector->begin();
329  itr!= G4MT_physicsVector->end();) {
330  G4String pName = (*itr)->GetPhysicsName();
331  if ( name == pName) {
332 #ifdef G4VERBOSE
333  if (verboseLevel > 0){
334  G4cout << "G4VModularPhysicsList::RemovePhysics: "
335  << pName << " is removed"
336  << G4endl;
337  }
338 #endif
339  G4MT_physicsVector->erase(itr);
340  break;
341  } else {
342  itr++;
343  }
344  }
345 }
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4MT_physicsVector
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

void G4VModularPhysicsList::ReplacePhysics ( G4VPhysicsConstructor fPhysics)

Definition at line 200 of file G4VModularPhysicsList.cc.

201 {
203  G4ApplicationState currentState = stateManager->GetCurrentState();
204  if(!(currentState==G4State_PreInit)){
205  G4Exception("G4VModularPhysicsList::ReplacePhysics",
206  "Run0203", JustWarning,
207  "Geant4 kernel is not PreInit state : Method ignored.");
208  return;
209  }
210 
211  G4String pName = fPhysics->GetPhysicsName();
212  G4int pType = fPhysics->GetPhysicsType();
213  // If physics_type is equal to 0,
214  // duplication check is omitted and just added.
215  // This is TEMPORAL treatment.
216  if (pType == 0) {
217  // register
218  G4MT_physicsVector->push_back(fPhysics);
219 #ifdef G4VERBOSE
220  if (verboseLevel >0){
221  G4cout << "G4VModularPhysicsList::ReplacePhysics: "
222  << pName << "with type : " << pType
223  << " is added"
224  << G4endl;
225  }
226 #endif
227  return;
228  }
229 
230  // Check if physics with the physics_type same as one of given physics
231  G4PhysConstVector::iterator itr= G4MT_physicsVector->begin();
232  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
233  if ( pType == (*itr)->GetPhysicsType()) break;
234  }
235  if (itr == G4MT_physicsVector->end()) {
236  // register
237  G4MT_physicsVector->push_back(fPhysics);
238  } else {
239 #ifdef G4VERBOSE
240  if (verboseLevel >0){
241  G4cout << "G4VModularPhysicsList::ReplacePhysics: "
242  << (*itr)->GetPhysicsName() << "with type : " << pType
243  << " is replaces with " << pName
244  << G4endl;
245  }
246 #endif
247 
248  // delete exsiting one
249  delete (*itr);
250  // replace with given one
251  (*itr) = fPhysics;
252 
253  }
254 
255  return;
256 }
int G4int
Definition: G4Types.hh:78
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
const G4String & GetPhysicsName() const
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4MT_physicsVector
#define G4endl
Definition: G4ios.hh:61
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VModularPhysicsList::SetVerboseLevel ( G4int  value)

Definition at line 377 of file G4VModularPhysicsList.cc.

378 {
380 
381  // Loop over constructors
382  G4PhysConstVector::iterator itr;
383  for (itr = G4MT_physicsVector->begin(); itr!= G4MT_physicsVector->end(); ++itr) {
384  (*itr)->SetVerboseLevel(verboseLevel);
385  }
386 
387 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
#define G4MT_physicsVector

Here is the caller graph for this function:

Member Data Documentation

G4int G4VModularPhysicsList::g4vmplInstanceID
protected

Definition at line 148 of file G4VModularPhysicsList.hh.

G4VMPLManager G4VModularPhysicsList::G4VMPLsubInstanceManager
staticprotected

Definition at line 149 of file G4VModularPhysicsList.hh.

G4int G4VModularPhysicsList::verboseLevel
protected

Definition at line 146 of file G4VModularPhysicsList.hh.


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