51 : fParticleName(particlename),
52 fWorld(parallelworld),
53 fImportanceConfigurator(0),
56 fWeightCutOffConfigurator(0),
58 fWeightWindowConfigurator(0),
72 if (fImportanceConfigurator)
74 delete fImportanceConfigurator;
75 fImportanceConfigurator = 0;
77 if (fWeightWindowConfigurator)
79 delete fWeightWindowConfigurator;
80 fWeightWindowConfigurator = 0;
87 if (fWeightCutOffConfigurator)
89 delete fWeightCutOffConfigurator;
90 fWeightCutOffConfigurator = 0;
98 fConfigurators.clear();
99 fIsConfigured =
false;
107 G4cout <<
"WARNING - G4GeometrySampler::IsConfigured()"
108 <<
" Some initalization exists, use ClearSampling()"
109 <<
" before a new initialization !" <<
G4endl;
143 fImportanceConfigurator =
146 G4cout <<
" creating importance configurator " <<
G4endl;
148 if (!fImportanceConfigurator)
150 G4Exception(
"G4GeometrySampler::PrepareImportanceSampling()",
152 "Failed allocation of G4ImportanceConfigurator !");
171 fWeightCutOffConfigurator =
179 if (!fWeightCutOffConfigurator)
181 G4Exception(
"G4GeometrySampler::PrepareWeightRoulett()",
183 "Failed allocation of G4WeightCutOffConfigurator !");
197 fWeightWindowConfigurator =
201 placeOfAction, paraflag);
209 fIsConfigured =
true;
217 if (fImportanceConfigurator)
219 G4cout <<
" importance configurator push_back " <<
G4endl;
220 fConfigurators.push_back(fImportanceConfigurator);
223 if (fWeightWindowConfigurator)
225 G4cout <<
" weight window configurator push_back " <<
G4endl;
226 fConfigurators.push_back(fWeightWindowConfigurator);
233 for (G4Configurators::iterator it = fConfigurators.begin();
234 it != fConfigurators.end(); it++)
244 if (fWeightCutOffConfigurator)
261 fParticleName = particlename;
G4DLLIMPORT std::ostream G4cout
void SetParticle(const G4String &particlename)
void SetParallel(G4bool paraflag)
virtual void PrepareWeightRoulett(G4double wsurvive, G4double wlimit, G4double isource)
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()
G4GeometrySampler(G4VPhysicalVolume *worldvolume, const G4String &particlename)
virtual void Configure(G4VSamplerConfigurator *preConf)=0
virtual void Configure(G4VSamplerConfigurator *preConf)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)