Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4INCLXXInterfaceMessenger Class Reference

#include <G4INCLXXInterfaceMessenger.hh>

Inheritance diagram for G4INCLXXInterfaceMessenger:
G4UImessenger

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, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
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, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 57 of file G4INCLXXInterfaceMessenger.hh.

Constructor & Destructor Documentation

G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger ( G4INCLXXInterfaceStore anInterfaceStore)

Definition at line 50 of file G4INCLXXInterfaceMessenger.cc.

References python.hepunit::MeV, G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcommand::SetRange(), and G4UIcmdWithADoubleAndUnit::SetUnitCategory().

50  :
51  theINCLXXInterfaceStore(anInterfaceStore)
52 {
53  // Create a directory for the INCL++ commands
54  theINCLXXDirectory = new G4UIdirectory(theUIDirectory);
55  theINCLXXDirectory->SetGuidance("Parameters for the INCL++ model");
56 
57  // This command controls whether nucleus-nucleus reactions should accurately
58  // describe the projectile or the target nucleus (default: projectile)
59  accurateNucleusCmd = new G4UIcmdWithAString((theUIDirectory + "accurateNucleus").data(),this);
60  accurateNucleusCmd->SetGuidance("Set which nucleus will be accurately described in nucleus-nucleus reactions.");
61  accurateNucleusCmd->SetGuidance(" projectile: accurate description of projectile-related quantities");
62  accurateNucleusCmd->SetGuidance(" target: accurate description of target-related quantities");
63  accurateNucleusCmd->SetGuidance(" Default: projectile");
64  accurateNucleusCmd->SetParameterName("AccurateNucleus",true);
65  accurateNucleusCmd->SetDefaultValue("projectile");
66 
67  // This command selects the maximum mass number of clusters to be produced in
68  // the INCL++ cascade
69  maxClusterMassCmd = new G4UIcmdWithAnInteger((theUIDirectory + "maxClusterMass").data(),this);
70  maxClusterMassCmd->SetGuidance("Set the maximum cluster mass.");
71  maxClusterMassCmd->SetGuidance(" The INCL++ cascade stage will produce clusters with mass up to the value of this parameter (included)");
72  maxClusterMassCmd->SetGuidance(" Allowed range: [2,12]");
73  maxClusterMassCmd->SetParameterName("MaxClusterMass",true);
74  maxClusterMassCmd->SetDefaultValue(8);
75  maxClusterMassCmd->SetRange("MaxClusterMass>=2 && MaxClusterMass<=12");
76 
77  // This command sets the energy below which PreCoumpound will be used
78  cascadeMinEnergyPerNucleonCmd = new G4UIcmdWithADoubleAndUnit((theUIDirectory + "cascadeMinEnergyPerNucleon").data(),this);
79  cascadeMinEnergyPerNucleonCmd->SetGuidance("Set the minimum energy per nucleon at which cascade will be used.");
80  cascadeMinEnergyPerNucleonCmd->SetGuidance(" INCL++ will rely on PreCompound for reactions induced by projectiles slower than the given energy (per nucleon, where applicable)");
81  cascadeMinEnergyPerNucleonCmd->SetParameterName("cascadeMinEnergyPerNucleon",true);
82  cascadeMinEnergyPerNucleonCmd->SetDefaultValue(1.*MeV);
83  cascadeMinEnergyPerNucleonCmd->SetRange("cascadeMinEnergyPerNucleon>=0");
84  cascadeMinEnergyPerNucleonCmd->SetUnitCategory("Energy");
85 
86 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(const char *defVal)
void SetDefaultValue(G4int defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
const XML_Char const XML_Char * data
G4INCLXXInterfaceMessenger::~G4INCLXXInterfaceMessenger ( )

Definition at line 88 of file G4INCLXXInterfaceMessenger.cc.

88  {
89  delete theINCLXXDirectory;
90  delete accurateNucleusCmd;
91  delete maxClusterMassCmd;
92  delete cascadeMinEnergyPerNucleonCmd;
93 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 95 of file G4INCLXXInterfaceMessenger.cc.

References G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), G4INCLXXInterfaceStore::SetAccurateProjectile(), G4INCLXXInterfaceStore::SetCascadeMinEnergyPerNucleon(), G4INCLXXInterfaceStore::SetMaxClusterMass(), and G4String::toLower().

95  {
96  if(command==accurateNucleusCmd) {
97  newValues.toLower();
98  if(newValues=="projectile") {
99  theINCLXXInterfaceStore->SetAccurateProjectile(true);
100  } else if(newValues=="target") {
101  theINCLXXInterfaceStore->SetAccurateProjectile(false);
102  }
103  } else if(command==maxClusterMassCmd) {
104  const G4int parameter = maxClusterMassCmd->GetNewIntValue(newValues);
105  theINCLXXInterfaceStore->SetMaxClusterMass(parameter);
106  } else if(command==cascadeMinEnergyPerNucleonCmd) {
107  const G4double parameter = cascadeMinEnergyPerNucleonCmd->GetNewDoubleValue(newValues);
108  theINCLXXInterfaceStore->SetCascadeMinEnergyPerNucleon(parameter);
109  }
110 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
int G4int
Definition: G4Types.hh:78
void SetAccurateProjectile(const G4bool b)
Setter for accurateProjectile.
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy)
Setter for cascadeMinEnergyPerNucleon.
void toLower()
double G4double
Definition: G4Types.hh:76
void SetMaxClusterMass(const G4int aMass)
Setter for the maximum cluster mass.

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