52 : theAdjointRunManager(pAdjointRunManager)
55 AdjointSimDir->
SetGuidance(
"Control of the adjoint or reverse monte carlo simulation");
60 beamOnCmd =
new G4UIcommand(
"/adjoint/start_run",
this);
62 beamOnCmd->
SetGuidance(
"Default number of events to be processed is 1.");
84 DefineSpherExtSourceCmd =
new G4UIcommand(
"/adjoint/DefineSphericalExtSource",
this);
85 DefineSpherExtSourceCmd->
SetGuidance(
"Define a spherical external source.");
94 DefineSpherExtSourceCenteredOnAVolumeCmd=
new G4UIcommand(
"/adjoint/DefineSphericalExtSourceCenteredOnAVolume",
this);
95 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetGuidance(
"Define a spherical external source with the center located at the center of a physical volume");
96 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(phys_vol_name_par);
97 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(radius_par);
98 DefineSpherExtSourceCenteredOnAVolumeCmd->
SetParameter(unit_par);
100 DefineExtSourceOnAVolumeExtSurfaceCmd=
new G4UIcmdWithAString(
"/adjoint/DefineExtSourceOnExtSurfaceOfAVolume",
this);
101 DefineExtSourceOnAVolumeExtSurfaceCmd->
SetGuidance(
"Set the external source on the external surface of a physical volume");
102 DefineExtSourceOnAVolumeExtSurfaceCmd->
SetParameterName(
"phys_vol_name",
false);
105 setExtSourceEMaxCmd->
SetGuidance(
"Set the maximum energy of the external source");
113 DefineSpherAdjSourceCmd =
new G4UIcommand(
"/adjoint/DefineSphericalAdjSource",
this);
114 DefineSpherAdjSourceCmd->
SetGuidance(
"Define a spherical adjoint source.");
121 DefineSpherAdjSourceCenteredOnAVolumeCmd=
new G4UIcommand(
"/adjoint/DefineSphericalAdjSourceCenteredOnAVolume",
this);
122 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetGuidance(
"Define a spherical adjoint source with the center located at the center of a physical volume");
123 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(phys_vol_name_par);
124 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(radius_par);
125 DefineSpherAdjSourceCenteredOnAVolumeCmd->
SetParameter(unit_par);
127 DefineAdjSourceOnAVolumeExtSurfaceCmd=
new G4UIcmdWithAString(
"/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume",
this);
128 DefineAdjSourceOnAVolumeExtSurfaceCmd->
SetGuidance(
"Set the adjoint source on the external surface of physical volume");
129 DefineAdjSourceOnAVolumeExtSurfaceCmd->
SetParameterName(
"phys_vol_name",
false);
132 setAdjSourceEminCmd->
SetGuidance(
"Set the minimum energy of the adjoint source");
138 setAdjSourceEmaxCmd->
SetGuidance(
"Set the maximum energy of the adjoint source");
143 ConsiderParticleAsPrimaryCmd =
new G4UIcmdWithAString(
"/adjoint/ConsiderAsPrimary",
this);
144 ConsiderParticleAsPrimaryCmd->
SetGuidance(
"Set the selected particle as primary");
146 ConsiderParticleAsPrimaryCmd->
SetCandidates(
"e- gamma proton ion");
148 NeglectParticleAsPrimaryCmd=
new G4UIcmdWithAString(
"/adjoint/NeglectAsPrimary",
this);
149 NeglectParticleAsPrimaryCmd->
SetGuidance(
"Remove the selected particle from the lits of primaries");
151 NeglectParticleAsPrimaryCmd->
SetCandidates(
"e- gamma proton ion");
167 if( command==beamOnCmd )
170 const char* nv = (
const char*)newValue;
171 std::istringstream is(nv);
175 else if ( command==DefineSpherExtSourceCmd){
179 const char* nv = (
const char*)newValue;
180 std::istringstream is(nv);
181 is >> x>>y>>z>>r>>unit;
189 else if ( command==DefineSpherExtSourceCenteredOnAVolumeCmd){
193 const char* nv = (
const char*)newValue;
194 std::istringstream is(nv);
195 is >>vol_name>>r>>unit;
199 else if ( command==DefineExtSourceOnAVolumeExtSurfaceCmd){
202 else if ( command== setExtSourceEMaxCmd){
206 else if ( command==DefineSpherAdjSourceCmd){
210 const char* nv = (
const char*)newValue;
211 std::istringstream is(nv);
212 is >> x>>y>>z>>r>>unit;
220 else if ( command==DefineSpherAdjSourceCenteredOnAVolumeCmd){
224 const char* nv = (
const char*)newValue;
225 std::istringstream is(nv);
226 is >>vol_name>>r>>unit;
230 else if ( command==DefineAdjSourceOnAVolumeExtSurfaceCmd){
234 else if ( command== setAdjSourceEminCmd){
238 else if ( command== setAdjSourceEmaxCmd){
242 else if ( command==ConsiderParticleAsPrimaryCmd){
246 else if ( command==NeglectParticleAsPrimaryCmd){
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 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)
G4bool DefineSphericalExtSource(G4double radius, G4ThreeVector pos)
G4bool DefineSphericalAdjointSource(G4double radius, G4ThreeVector pos)
G4AdjointSimMessenger(G4AdjointSimManager *)
void SetNewValue(G4UIcommand *, G4String)
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 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 &)