Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ImportanceConfigurator Class Reference

#include <G4ImportanceConfigurator.hh>

+ Inheritance diagram for G4ImportanceConfigurator:

Public Member Functions

 G4ImportanceConfigurator (const G4VPhysicalVolume *worldvolume, const G4String &particlename, G4VIStore &istore, const G4VImportanceAlgorithm *ialg, G4bool paraflag)
 
 G4ImportanceConfigurator (const G4String &worldvolumeName, const G4String &particlename, G4VIStore &istore, const G4VImportanceAlgorithm *ialg, G4bool paraflag)
 
virtual ~G4ImportanceConfigurator ()
 
 G4ImportanceConfigurator (const G4ImportanceConfigurator &)=delete
 
G4ImportanceConfiguratoroperator= (const G4ImportanceConfigurator &)=delete
 
virtual void Configure (G4VSamplerConfigurator *preConf)
 
virtual const G4VTrackTerminatorGetTrackTerminator () const
 
void SetWorldName (const G4String &Name)
 
- Public Member Functions inherited from G4VSamplerConfigurator
 G4VSamplerConfigurator ()
 
virtual ~G4VSamplerConfigurator ()
 

Detailed Description

Definition at line 48 of file G4ImportanceConfigurator.hh.

Constructor & Destructor Documentation

◆ G4ImportanceConfigurator() [1/3]

G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4VPhysicalVolume * worldvolume,
const G4String & particlename,
G4VIStore & istore,
const G4VImportanceAlgorithm * ialg,
G4bool paraflag )

Definition at line 47 of file G4ImportanceConfigurator.cc.

52 : fWorld(worldvolume),
53 fWorldName(worldvolume->GetName()),
54 fPlacer(particlename),
55 fIStore(istore),
56 fDeleteIalg( ( ! ialg) ),
57 fIalgorithm(( (fDeleteIalg == true) ? new G4ImportanceAlgorithm : ialg )),
58 paraflag(para)
59{;}
const G4String & GetName() const

Referenced by G4ImportanceConfigurator(), and operator=().

◆ G4ImportanceConfigurator() [2/3]

G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4String & worldvolumeName,
const G4String & particlename,
G4VIStore & istore,
const G4VImportanceAlgorithm * ialg,
G4bool paraflag )

Definition at line 61 of file G4ImportanceConfigurator.cc.

66: fWorldName(worldvolumeName),
67 fPlacer(particlename),
68 fIStore(istore),
69 fDeleteIalg( ( ! ialg) ),
70 fIalgorithm(( (fDeleteIalg == true) ? new G4ImportanceAlgorithm : ialg )),
71 paraflag(para)
72{
75}
G4VPhysicalVolume * GetWorldVolume() const
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const

◆ ~G4ImportanceConfigurator()

G4ImportanceConfigurator::~G4ImportanceConfigurator ( )
virtual

Definition at line 77 of file G4ImportanceConfigurator.cc.

78{
79 if (fImportanceProcess)
80 {
81 fPlacer.RemoveProcess(fImportanceProcess);
82 delete fImportanceProcess;
83 }
84 if (fDeleteIalg)
85 {
86 delete fIalgorithm;
87 }
88}

◆ G4ImportanceConfigurator() [3/3]

G4ImportanceConfigurator::G4ImportanceConfigurator ( const G4ImportanceConfigurator & )
delete

Member Function Documentation

◆ Configure()

void G4ImportanceConfigurator::Configure ( G4VSamplerConfigurator * preConf)
virtual

Implements G4VSamplerConfigurator.

Definition at line 91 of file G4ImportanceConfigurator.cc.

92{
93 G4cout << "G4ImportanceConfigurator:: entering importance configure, paraflag " << paraflag << G4endl;
94 const G4VTrackTerminator *terminator = 0;
95 if (preConf)
96 {
97 terminator = preConf->GetTrackTerminator();
98 }
99
100#ifdef G4MULTITHREADED
101 G4AutoLock l(&BiasConfigMutex);
102#endif
103 fImportanceProcess =
104 new G4ImportanceProcess(*fIalgorithm,
105 fIStore,
106 terminator,"ImportanceProcess",paraflag);
107
108 if (!fImportanceProcess)
109 {
110 G4Exception("G4ImportanceConfigurator::Configure()",
111 "FatalError", FatalException,
112 "Failed allocation of G4ImportanceProcess !");
113 }
114
115 if(paraflag) fImportanceProcess->SetParallelWorld(fWorld->GetName());
116#ifdef G4MULTITHREADED
117 l.unlock();
118#endif
119 fPlacer.AddProcessAsSecondDoIt(fImportanceProcess);
120}
G4TemplateAutoLock< G4Mutex > G4AutoLock
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
virtual const G4VTrackTerminator * GetTrackTerminator() const =0

◆ GetTrackTerminator()

const G4VTrackTerminator * G4ImportanceConfigurator::GetTrackTerminator ( ) const
virtual

Implements G4VSamplerConfigurator.

Definition at line 123 of file G4ImportanceConfigurator.cc.

124{
125 return fImportanceProcess;
126}

◆ operator=()

G4ImportanceConfigurator & G4ImportanceConfigurator::operator= ( const G4ImportanceConfigurator & )
delete

◆ SetWorldName()

void G4ImportanceConfigurator::SetWorldName ( const G4String & Name)

Definition at line 128 of file G4ImportanceConfigurator.cc.

129{
130 G4cout << " G4ImportanceConfigurator:: setting world name: " << name << G4endl;
131 fWorldName = name;
132}
const char * name(G4int ptype)

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