58 : theAdjointRunManager(pAdjointRunManager)
68 "Control of the adjoint or reverse monte carlo simulation");
74 beamOnCmd =
new G4UIcommand(
"/adjoint/start_run",
this);
76 beamOnCmd->
SetGuidance(
"Default number of events to be processed is 1.");
99 DefineSpherExtSourceCmd =
100 new G4UIcommand(
"/adjoint/DefineSphericalExtSource",
this);
101 DefineSpherExtSourceCmd->
SetGuidance(
"Define a spherical external source.");
111 DefineSpherExtSourceCenteredOnAVolumeCmd =
112 new G4UIcommand(
"/adjoint/DefineSphericalExtSourceCenteredOnAVolume",
this);
113 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetGuidance(
114 "Define a spherical external source with the center located at the center "
117 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(phys_vol_name_par);
118 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(radius_par);
119 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(unit_par);
122 "/adjoint/DefineExtSourceOnExtSurfaceOfAVolume",
this);
123 DefineExtSourceOnAVolumeExtSurfaceCmd->
SetGuidance(
124 "Set the external source on the external surface of a physical volume");
128 setExtSourceEMaxCmd =
131 "Set the maximum energy of the external source");
139 DefineSpherAdjSourceCmd =
140 new G4UIcommand(
"/adjoint/DefineSphericalAdjSource",
this);
141 DefineSpherAdjSourceCmd->
SetGuidance(
"Define a spherical adjoint source.");
148 DefineSpherAdjSourceCenteredOnAVolumeCmd =
149 new G4UIcommand(
"/adjoint/DefineSphericalAdjSourceCenteredOnAVolume",
this);
150 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetGuidance(
151 "Define a spherical adjoint source with the center located at the center "
154 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(phys_vol_name_par);
155 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(radius_par);
156 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(unit_par);
159 "/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume",
this);
160 DefineAdjSourceOnAVolumeExtSurfaceCmd->
SetGuidance(
161 "Set the adjoint source on the external surface of physical volume");
165 setAdjSourceEminCmd =
168 "Set the minimum energy of the adjoint source");
173 setAdjSourceEmaxCmd =
176 "Set the maximum energy of the adjoint source");
181 ConsiderParticleAsPrimaryCmd =
184 "Set the selected particle as primary");
186 ConsiderParticleAsPrimaryCmd->
SetCandidates(
"e- gamma proton ion");
188 NeglectParticleAsPrimaryCmd =
191 "Remove the selected particle from the list of primaries");
193 NeglectParticleAsPrimaryCmd->
SetCandidates(
"e- gamma proton ion");
195 setNbOfPrimaryFwdGammasPerEventCmd =
198 "Set the nb of primary fwd gamm generated on the adjoint source");
203 setNbOfPrimaryAdjGammasPerEventCmd =
206 "Set the nb of primary fwd gamm generated on the adjoint source");
212 "/adjoint/SetNbOfPrimaryAdjElectronsPerEvent",
this);
213 setNbOfPrimaryAdjElectronsPerEventCmd->
SetGuidance(
214 "Set the nb of primary fwd gamm generated on the adjoint source");
215 setNbOfPrimaryAdjElectronsPerEventCmd->
SetParameterName(
"Nb_gammas",
false);
284 if(command == beamOnCmd)
287 const char* nv = (
const char*) newValue;
288 std::istringstream is(nv);
302 else if(command == ConsiderParticleAsPrimaryCmd)
306 else if(command == NeglectParticleAsPrimaryCmd)
315 if(command == DefineSpherExtSourceCmd)
319 const char* nv = (
const char*) newValue;
320 std::istringstream is(nv);
321 is >> x >> y >> z >> r >> unit;
329 else if(command == DefineSpherExtSourceCenteredOnAVolumeCmd)
333 const char* nv = (
const char*) newValue;
334 std::istringstream is(nv);
335 is >> vol_name >> r >> unit;
340 else if(command == DefineExtSourceOnAVolumeExtSurfaceCmd)
344 else if(command == setExtSourceEMaxCmd)
349 else if(command == DefineSpherAdjSourceCmd)
353 const char* nv = (
const char*) newValue;
354 std::istringstream is(nv);
355 is >> x >> y >> z >> r >> unit;
364 else if(command == DefineSpherAdjSourceCenteredOnAVolumeCmd)
368 const char* nv = (
const char*) newValue;
369 std::istringstream is(nv);
370 is >> vol_name >> r >> unit;
375 else if(command == DefineAdjSourceOnAVolumeExtSurfaceCmd)
379 else if(command == setAdjSourceEminCmd)
384 else if(command == setAdjSourceEmaxCmd)
389 else if(command == setNbOfPrimaryFwdGammasPerEventCmd)
394 else if(command == setNbOfPrimaryAdjGammasPerEventCmd)
399 else if(command == setNbOfPrimaryAdjElectronsPerEventCmd)
CLHEP::Hep3Vector G4ThreeVector
G4bool DefineAdjointSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4bool DefineExtSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
void RunAdjointSimulation(G4int nb_evt)
G4bool DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
void SetNbAdjointPrimaryGammasPerEvent(G4int)
void ConsiderParticleAsPrimary(const G4String &particle_name)
void SetExtSourceEmax(G4double Emax)
void SetAdjointSourceEmax(G4double Emax)
void SetAdjointSourceEmin(G4double Emin)
void NeglectParticleAsPrimary(const G4String &particle_name)
G4bool DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
void SetNbAdjointPrimaryElectronsPerEvent(G4int)
void SetNbOfPrimaryFwdGammasPerEvent(G4int)
G4bool DefineSphericalExtSource(G4double radius, G4ThreeVector pos)
G4bool DefineSphericalAdjointSource(G4double radius, G4ThreeVector pos)
G4AdjointSimMessenger(G4AdjointSimManager *)
void SetNewValue(G4UIcommand *, G4String)
static G4RunManager * GetRunManager()
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
void SetDefaultValue(const char *theDefaultValue)
void SetParameterRange(const char *theRange)
static G4double GetValueOf(const G4String &)