51 : fParticleName(particlename),
53 fImportanceConfigurator(0),
56 fWeightCutOffConfigurator(0),
58 fWeightWindowConfigurator(0),
70 : fParticleName(particlename),
71 fWorldName(worldName),
72 fImportanceConfigurator(0),
75 fWeightCutOffConfigurator(0),
77 fWeightWindowConfigurator(0),
95 if (fImportanceConfigurator)
97 delete fImportanceConfigurator;
98 fImportanceConfigurator = 0;
100 if (fWeightWindowConfigurator)
102 delete fWeightWindowConfigurator;
103 fWeightWindowConfigurator = 0;
110 if (fWeightCutOffConfigurator)
112 delete fWeightCutOffConfigurator;
113 fWeightCutOffConfigurator = 0;
121 fConfigurators.clear();
122 fIsConfigured =
false;
130 G4cout <<
"WARNING - G4GeometrySampler::IsConfigured()"
131 <<
" Some initialization exists, use ClearSampling()"
132 <<
" before a new initialization !" <<
G4endl;
162 G4cout <<
"G4GeometrySampler:: preparing importance sampling WorldName is " << fWorldName <<
G4endl;
166 fImportanceConfigurator =
171 if (!fImportanceConfigurator)
173 G4Exception(
"G4GeometrySampler::PrepareImportanceSampling()",
175 "Failed allocation of G4ImportanceConfigurator !");
185 G4cout <<
"G4GeometrySampler:: preparing weight roulette" <<
G4endl;
194 fWeightCutOffConfigurator =
202 if (!fWeightCutOffConfigurator)
204 G4Exception(
"G4GeometrySampler::PrepareWeightRoulett()",
206 "Failed allocation of G4WeightCutOffConfigurator !");
216 G4cout <<
"G4GeometrySampler:: preparing weight window" <<
G4endl;
220 fWeightWindowConfigurator =
224 placeOfAction, paraflag);
238 fIsConfigured =
true;
246 if (fImportanceConfigurator)
248 fConfigurators.push_back(fImportanceConfigurator);
250 if (fWeightWindowConfigurator)
252 fConfigurators.push_back(fWeightWindowConfigurator);
277#ifdef G4MULTITHREADED
278 G4cout <<
" make sure AddProcess() is invoked for biasing!!! " <<
G4endl;
291 for (G4Configurators::iterator it = fConfigurators.begin();
292 it != fConfigurators.end(); it++)
299 if (fWeightCutOffConfigurator)
319 fParticleName = particlename;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
void SetParticle(const G4String &particlename)
void SetParallel(G4bool paraflag)
virtual void PrepareWeightRoulett(G4double wsurvive, G4double wlimit, G4double isource)
void SetWorld(const G4VPhysicalVolume *world)
virtual G4bool IsConfigured() const
virtual void ClearSampling()
virtual void PrepareWeightWindow(G4VWeightWindowStore *wwstore, G4VWeightWindowAlgorithm *wwAlg, G4PlaceOfAction placeOfAction)
virtual void PrepareImportanceSampling(G4VIStore *istore, const G4VImportanceAlgorithm *ialg)
virtual ~G4GeometrySampler()
virtual void AddProcess()
G4GeometrySampler(G4VPhysicalVolume *worldvolume, const G4String &particlename)
void SetWorldName(const G4String &Name)
G4VPhysicalVolume * GetWorldVolume() const
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
virtual const G4VPhysicalVolume & GetWorldVolume() const =0
virtual void Configure(G4VSamplerConfigurator *preConf)=0
virtual const G4VPhysicalVolume & GetWorldVolume() const =0
virtual void Configure(G4VSamplerConfigurator *preConf)