Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLXXInterfaceMessenger Class Reference

#include <G4INCLXXInterfaceMessenger.hh>

+ Inheritance diagram for G4INCLXXInterfaceMessenger:

Public Member Functions

 G4INCLXXInterfaceMessenger (G4INCLXXInterfaceStore *anInterfaceStore)
 
 ~G4INCLXXInterfaceMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 58 of file G4INCLXXInterfaceMessenger.hh.

Constructor & Destructor Documentation

◆ G4INCLXXInterfaceMessenger()

G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger ( G4INCLXXInterfaceStore anInterfaceStore)

Definition at line 51 of file G4INCLXXInterfaceMessenger.cc.

51 :
52 theINCLXXInterfaceStore(anInterfaceStore)
53{
54 // Create a directory for the INCL++ commands
55 theINCLXXDirectory = new G4UIdirectory(theUIDirectory);
56 theINCLXXDirectory->SetGuidance("Parameters for the INCL++ model");
57
58 // This command controls whether nucleus-nucleus reactions should accurately
59 // describe the projectile or the target nucleus (default: projectile)
60 accurateNucleusCmd = new G4UIcmdWithAString((theUIDirectory + "accurateNucleus").data(),this);
61 accurateNucleusCmd->SetGuidance("Set which nucleus will be accurately described in nucleus-nucleus reactions.");
62 accurateNucleusCmd->SetGuidance(" projectile: accurate description of projectile-related quantities");
63 accurateNucleusCmd->SetGuidance(" target: accurate description of target-related quantities");
64 accurateNucleusCmd->SetGuidance(" Default: projectile");
65 accurateNucleusCmd->SetParameterName("AccurateNucleus",true);
66 accurateNucleusCmd->SetDefaultValue("projectile");
67
68 // This command selects the maximum mass number of clusters to be produced in
69 // the INCL++ cascade
70 maxClusterMassCmd = new G4UIcmdWithAnInteger((theUIDirectory + "maxClusterMass").data(),this);
71 maxClusterMassCmd->SetGuidance("Set the maximum cluster mass.");
72 maxClusterMassCmd->SetGuidance(" The INCL++ cascade stage will produce clusters with mass up to the value of this parameter (included)");
73 maxClusterMassCmd->SetGuidance(" Allowed range: [2,12]");
74 maxClusterMassCmd->SetParameterName("MaxClusterMass",true);
75 maxClusterMassCmd->SetDefaultValue(8);
76 maxClusterMassCmd->SetRange("MaxClusterMass>=2 && MaxClusterMass<=12");
77
78}
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120

◆ ~G4INCLXXInterfaceMessenger()

G4INCLXXInterfaceMessenger::~G4INCLXXInterfaceMessenger ( )

Definition at line 80 of file G4INCLXXInterfaceMessenger.cc.

80 {
81 delete theINCLXXDirectory;
82 delete accurateNucleusCmd;
83 delete maxClusterMassCmd;
84}

Member Function Documentation

◆ SetNewValue()

void G4INCLXXInterfaceMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 86 of file G4INCLXXInterfaceMessenger.cc.

86 {
87 if(command==accurateNucleusCmd) {
88 newValues.toLower();
89 if(newValues=="projectile") {
90 theINCLXXInterfaceStore->SetAccurateProjectile(true);
91 } else if(newValues=="target") {
92 theINCLXXInterfaceStore->SetAccurateProjectile(false);
93 }
94 } else if(command==maxClusterMassCmd) {
95 const G4int parameter = maxClusterMassCmd->GetNewIntValue(newValues);
96 theINCLXXInterfaceStore->SetMaxClusterMass(parameter);
97 }
98}
int G4int
Definition: G4Types.hh:66
void SetAccurateProjectile(const G4bool b)
Setter for accurateProjectile.
void SetMaxClusterMass(const G4int aMass)
Setter for theMaxClusterMass.
void toLower()
static G4int GetNewIntValue(const char *paramString)

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