Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VPhysicsConstructor Class Referenceabstract

#include <G4VPhysicsConstructor.hh>

+ Inheritance diagram for G4VPhysicsConstructor:

Public Member Functions

 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
virtual void ConstructParticle ()=0
 
virtual void ConstructProcess ()=0
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
G4int GetInstanceID () const
 
virtual void TerminateWorker ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Static Public Member Functions

static const G4VPCManagerGetSubInstanceManager ()
 

Protected Types

using PhysicsBuilder_V = G4VPCData::PhysicsBuilders_V
 

Protected Member Functions

G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
PhysicsBuilder_V GetBuilders () const
 
void AddBuilder (G4PhysicsBuilderInterface *bld)
 

Protected Attributes

G4int verboseLevel = 0
 
G4String namePhysics = ""
 
G4int typePhysics = 0
 
G4ParticleTabletheParticleTable = nullptr
 
G4int g4vpcInstanceID = 0
 

Static Protected Attributes

static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 108 of file G4VPhysicsConstructor.hh.

Member Typedef Documentation

◆ PhysicsBuilder_V

Constructor & Destructor Documentation

◆ G4VPhysicsConstructor() [1/2]

G4VPhysicsConstructor::G4VPhysicsConstructor ( const G4String name = "")

Definition at line 48 of file G4VPhysicsConstructor.cc.

49 : namePhysics(name)
50{
52 // pointer to the particle table
54}
static G4ParticleTable * GetParticleTable()
static G4RUN_DLL G4VPCManager subInstanceManager
G4ParticleTable * theParticleTable
G4int CreateSubInstance()

◆ G4VPhysicsConstructor() [2/2]

G4VPhysicsConstructor::G4VPhysicsConstructor ( const G4String name,
G4int  physics_type 
)

Definition at line 57 of file G4VPhysicsConstructor.cc.

58 : namePhysics(name)
59 , typePhysics(type)
60{
62 // pointer to the particle table
64 // aParticleIterator = theParticleTable->GetIterator();
65
66 if(type < 0)
67 typePhysics = 0;
68}

◆ ~G4VPhysicsConstructor()

G4VPhysicsConstructor::~G4VPhysicsConstructor ( )
virtual

Definition at line 71 of file G4VPhysicsConstructor.cc.

72{
73 // Master/Sequential needs to cleanup too
75}

Member Function Documentation

◆ AddBuilder()

◆ ConstructParticle()

◆ ConstructProcess()

virtual void G4VPhysicsConstructor::ConstructProcess ( )
pure virtual

◆ GetBuilders()

G4VPhysicsConstructor::PhysicsBuilder_V G4VPhysicsConstructor::GetBuilders ( ) const
protected

Definition at line 86 of file G4VPhysicsConstructor.cc.

87{
88 const auto& tls = *((subInstanceManager.offset[g4vpcInstanceID])._builders);
89 PhysicsBuilder_V copy(tls.size());
90 G4int i = 0;
91 for(const auto& el : tls)
92 {
93 copy[i++] = el;
94 }
95 return copy;
96}
int G4int
Definition: G4Types.hh:85
G4VPCData::PhysicsBuilders_V PhysicsBuilder_V
void copy(G4double dst[], const G4double src[], std::size_t size=G4FieldTrack::ncompSVEC)
Definition: G4FieldUtils.cc:98

◆ GetInstanceID()

G4int G4VPhysicsConstructor::GetInstanceID ( ) const
inline

◆ GetParticleIterator()

◆ GetPhysicsName()

const G4String & G4VPhysicsConstructor::GetPhysicsName ( ) const
inline

◆ GetPhysicsType()

G4int G4VPhysicsConstructor::GetPhysicsType ( ) const
inline

◆ GetSubInstanceManager()

const G4VPCManager & G4VPhysicsConstructor::GetSubInstanceManager ( )
inlinestatic

Definition at line 213 of file G4VPhysicsConstructor.hh.

214{
215 return subInstanceManager;
216}

Referenced by G4PhysicsListWorkspace::G4PhysicsListWorkspace().

◆ GetVerboseLevel()

◆ RegisterProcess()

G4bool G4VPhysicsConstructor::RegisterProcess ( G4VProcess process,
G4ParticleDefinition particle 
)
inlineprotected

Definition at line 206 of file G4VPhysicsConstructor.hh.

208{
210 ->RegisterProcess(process, particle);
211}
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()

Referenced by G4MuonicAtomDecayPhysics::ConstructProcess(), G4RadioactiveDecayPhysics::ConstructProcess(), and G4EmDNAChemistry_option2::ConstructProcess().

◆ SetPhysicsName()

void G4VPhysicsConstructor::SetPhysicsName ( const G4String name = "")
inline

Definition at line 186 of file G4VPhysicsConstructor.hh.

187{
189}
const char * name(G4int ptype)

◆ SetPhysicsType()

◆ SetVerboseLevel()

◆ TerminateWorker()

void G4VPhysicsConstructor::TerminateWorker ( )
virtual

Definition at line 105 of file G4VPhysicsConstructor.cc.

106{
107 if(subInstanceManager.offset[g4vpcInstanceID]._builders != nullptr)
108 {
109 std::for_each(subInstanceManager.offset[g4vpcInstanceID]._builders->begin(),
110 subInstanceManager.offset[g4vpcInstanceID]._builders->end(),
111 [](PhysicsBuilder_V::value_type bld) { delete bld; });
112 subInstanceManager.offset[g4vpcInstanceID]._builders->clear();
113 }
114}

Referenced by ~G4VPhysicsConstructor().

Member Data Documentation

◆ g4vpcInstanceID

G4int G4VPhysicsConstructor::g4vpcInstanceID = 0
protected

◆ namePhysics

G4String G4VPhysicsConstructor::namePhysics = ""
protected

◆ subInstanceManager

G4VPCManager G4VPhysicsConstructor::subInstanceManager
staticprotected

◆ theParticleTable

G4ParticleTable* G4VPhysicsConstructor::theParticleTable = nullptr
protected

Definition at line 169 of file G4VPhysicsConstructor.hh.

Referenced by G4VPhysicsConstructor().

◆ typePhysics

G4int G4VPhysicsConstructor::typePhysics = 0
protected

Definition at line 167 of file G4VPhysicsConstructor.hh.

Referenced by G4VPhysicsConstructor(), GetPhysicsType(), and SetPhysicsType().

◆ verboseLevel


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