Geant4  10.00.p03
G4INCLXXInterfaceMessenger.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // INCL++ intra-nuclear cascade model
27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
45 #include "G4SystemOfUnits.hh"
46 #include <sstream>
47 
48 const G4String G4INCLXXInterfaceMessenger::theUIDirectory = "/process/had/inclxx/";
49 
51  theINCLXXInterfaceStore(anInterfaceStore)
52 {
53  // Create a directory for the INCL++ commands
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);
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);
83  cascadeMinEnergyPerNucleonCmd->SetRange("cascadeMinEnergyPerNucleon>=0");
85 
86 }
87 
89  delete theINCLXXDirectory;
90  delete accurateNucleusCmd;
91  delete maxClusterMassCmd;
93 }
94 
96  if(command==accurateNucleusCmd) {
97  newValues.toLower();
98  if(newValues=="projectile") {
100  } else if(newValues=="target") {
102  }
103  } else if(command==maxClusterMassCmd) {
104  const G4int parameter = maxClusterMassCmd->GetNewIntValue(newValues);
106  } else if(command==cascadeMinEnergyPerNucleonCmd) {
107  const G4double parameter = cascadeMinEnergyPerNucleonCmd->GetNewDoubleValue(newValues);
109  }
110 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static const double MeV
Definition: G4SIunits.hh:193
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
int G4int
Definition: G4Types.hh:78
void SetAccurateProjectile(const G4bool b)
Setter for accurateProjectile.
Singleton class for configuring the INCL++ Geant4 interface.
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetCascadeMinEnergyPerNucleon(const G4double anEnergy)
Setter for cascadeMinEnergyPerNucleon.
G4INCLXXInterfaceMessenger(G4INCLXXInterfaceStore *anInterfaceStore)
void toLower()
G4UIcmdWithADoubleAndUnit * cascadeMinEnergyPerNucleonCmd
void SetDefaultValue(const char *defVal)
Messenger class for the Geant4 INCL++ interface.
void SetDefaultValue(G4int defVal)
G4INCLXXInterfaceStore * theINCLXXInterfaceStore
double G4double
Definition: G4Types.hh:76
void SetMaxClusterMass(const G4int aMass)
Setter for the maximum cluster mass.
G4UIcmdWithAnInteger * maxClusterMassCmd
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNewValue(G4UIcommand *command, G4String newValues)