Geant4 9.6.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 (G4VPhysicalVolume *worldvolume, const G4String &particlename, G4VIStore &istore, const G4VImportanceAlgorithm *ialg, G4bool paraflag)
 
virtual ~G4ImportanceConfigurator ()
 
virtual void Configure (G4VSamplerConfigurator *preConf)
 
virtual const G4VTrackTerminatorGetTrackTerminator () const
 
- Public Member Functions inherited from G4VSamplerConfigurator
 G4VSamplerConfigurator ()
 
virtual ~G4VSamplerConfigurator ()
 
virtual void Configure (G4VSamplerConfigurator *preConf)=0
 
virtual const G4VTrackTerminatorGetTrackTerminator () const =0
 

Detailed Description

Definition at line 52 of file G4ImportanceConfigurator.hh.

Constructor & Destructor Documentation

◆ G4ImportanceConfigurator()

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

Definition at line 41 of file G4ImportanceConfigurator.cc.

46 : fWorld(worldvolume),
47 fPlacer(particlename),
48 fIStore(istore),
49 fDeleteIalg( ( ! ialg) ),
50 fIalgorithm(( (fDeleteIalg) ?
51 new G4ImportanceAlgorithm : ialg)),
52 fImportanceProcess(0),
53 paraflag(para)
54{
55}

◆ ~G4ImportanceConfigurator()

G4ImportanceConfigurator::~G4ImportanceConfigurator ( )
virtual

Definition at line 57 of file G4ImportanceConfigurator.cc.

58{
59 if (fImportanceProcess)
60 {
61 fPlacer.RemoveProcess(fImportanceProcess);
62 delete fImportanceProcess;
63 }
64 if (fDeleteIalg)
65 {
66 delete fIalgorithm;
67 }
68}
virtual void RemoveProcess(G4VProcess *process)

Member Function Documentation

◆ Configure()

void G4ImportanceConfigurator::Configure ( G4VSamplerConfigurator preConf)
virtual

Implements G4VSamplerConfigurator.

Definition at line 71 of file G4ImportanceConfigurator.cc.

72{
73 G4cout << " entering importance configure, paraflag " << paraflag << G4endl;
74 const G4VTrackTerminator *terminator = 0;
75 if (preConf)
76 {
77 terminator = preConf->GetTrackTerminator();
78 };
79
80 G4cout << " creating importance process, paraflag is: " << paraflag << G4endl;
81 fImportanceProcess =
82 new G4ImportanceProcess(*fIalgorithm,
83 fIStore,
84 terminator,"ImportanceProcess",paraflag);
85 if (!fImportanceProcess)
86 {
87 G4Exception("G4ImportanceConfigurator::Configure()",
88 "FatalError", FatalException,
89 "Failed allocation of G4ImportanceProcess !");
90 }
91
92 if(paraflag) fImportanceProcess->SetParallelWorld(fWorld);
93
94 fPlacer.AddProcessAsSecondDoIt(fImportanceProcess);
95}
@ FatalException
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void SetParallelWorld(G4String parallelWorldName)
virtual void AddProcessAsSecondDoIt(G4VProcess *process)
virtual const G4VTrackTerminator * GetTrackTerminator() const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetTrackTerminator()

const G4VTrackTerminator * G4ImportanceConfigurator::GetTrackTerminator ( ) const
virtual

Implements G4VSamplerConfigurator.

Definition at line 97 of file G4ImportanceConfigurator.cc.

99{
100 return fImportanceProcess;
101}

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