Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4VModularPhysicsList.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// GEANT 4 class header file
32//
33// Class Description:
34// This class is a subclass of G4VUserPhysicsList.
35// The user should register his/her physics constructors
36// by using
37// G4VModularPhysicsList::RegsiterPhysics()
38// to construt particles and processes.
39//
40// Only one physics constructor can be registered for each "physics_type".
41// Physics constructors with same "physics_type" can be replaced by
42// G4VModularPhysicsList::ReplacePhysics() method
43//
44// ------------------------------------------------------------
45// History
46// - first version 12 Nov 2000 by H.Kurashige
47// - Add ReplacePhysics 14 Mar 2011 by H.Kurashige
48//
49// ------------------------------------------------------------
50#ifndef G4VModularPhysicsList_h
51#define G4VModularPhysicsList_h 1
52
53#include "globals.hh"
54#include "G4ios.hh"
55#include <vector>
56
57#include "G4VUserPhysicsList.hh"
59
61{
62 public:
64 virtual ~G4VModularPhysicsList();
65
66 protected:
67 // hide copy constructor and assignment operator
70
71 public: // with description
72 // This method will be invoked in the Construct() method.
73 // each particle type will be instantiated
74 virtual void ConstructParticle();
75
76 // This method will be invoked in the Construct() method.
77 // each physics process will be instantiated and
78 // registered to the process manager of each particle type
79 virtual void ConstructProcess();
80
81 public: // with description
82 // Register Physics Constructor
84
85 const G4VPhysicsConstructor* GetPhysics(G4int index) const;
86 const G4VPhysicsConstructor* GetPhysics(const G4String& name) const;
87 const G4VPhysicsConstructor* GetPhysicsWithType(G4int physics_type) const;
88
89 // Replace Physics Constructor
90 // The existing physics constructor with same physics_type as one of
91 // the given physics constructor is replaced
92 // (existing physics will be deleted)
93 // If any corresponding physics constructor is found,
94 // the given physics constructor is just added
96
97 // Remove Physics Constructor from the list
99 void RemovePhysics(G4int type);
100 void RemovePhysics(const G4String& name);
101
102 /////////////////////////////////////
103 public: // with description
104 void SetVerboseLevel(G4int value);
105 G4int GetVerboseLevel() const;
106 // set/get controle flag for output message
107 // 0: Silent
108 // 1: Warning message
109 // 2: More
110 // given verbose level is set to all physics constructors
111
112 protected: // with description
113 // vector of pointers to G4VPhysicsConstructor
114 typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVector;
117};
118
119
120
121inline
123{
124 return verboseLevel;
125}
126
127
128#endif
int G4int
Definition: G4Types.hh:66
void SetVerboseLevel(G4int value)
G4VModularPhysicsList & operator=(const G4VModularPhysicsList &)
void RegisterPhysics(G4VPhysicsConstructor *)
G4PhysConstVector * physicsVector
void RemovePhysics(G4VPhysicsConstructor *)
const G4VPhysicsConstructor * GetPhysicsWithType(G4int physics_type) const
void ReplacePhysics(G4VPhysicsConstructor *)
std::vector< G4VPhysicsConstructor * > G4PhysConstVector
const G4VPhysicsConstructor * GetPhysics(G4int index) const