Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 <sstream>
46 
47 const G4String G4INCLXXInterfaceMessenger::theUIDirectory = "/process/had/inclxx/";
48 
50  theINCLXXInterfaceStore(anInterfaceStore)
51 {
52  // Create a directory for the INCL++ commands
53  theINCLXXDirectory = new G4UIdirectory(theUIDirectory);
54  theINCLXXDirectory->SetGuidance("Parameters for the INCL++ model");
55 
56  // This command controls whether nucleus-nucleus reactions should accurately
57  // describe the projectile or the target nucleus (default: projectile)
58  accurateNucleusCmd = new G4UIcmdWithAString((theUIDirectory + "accurateNucleus").data(),this);
59  accurateNucleusCmd->SetGuidance("Set which nucleus will be accurately described in nucleus-nucleus reactions.");
60  accurateNucleusCmd->SetGuidance(" projectile: accurate description of projectile-related quantities");
61  accurateNucleusCmd->SetGuidance(" target: accurate description of target-related quantities");
62  accurateNucleusCmd->SetGuidance(" Default: projectile");
63  accurateNucleusCmd->SetParameterName("AccurateNucleus",true);
64  accurateNucleusCmd->SetDefaultValue("projectile");
65 
66  // This command selects the maximum mass number of clusters to be produced in
67  // the INCL++ cascade
68  maxClusterMassCmd = new G4UIcmdWithAnInteger((theUIDirectory + "maxClusterMass").data(),this);
69  maxClusterMassCmd->SetGuidance("Set the maximum cluster mass.");
70  maxClusterMassCmd->SetGuidance(" The INCL++ cascade stage will produce clusters with mass up to the value of this parameter (included)");
71  maxClusterMassCmd->SetGuidance(" Allowed range: [2,12]");
72  maxClusterMassCmd->SetParameterName("MaxClusterMass",true);
73  maxClusterMassCmd->SetDefaultValue(8);
74  maxClusterMassCmd->SetRange("MaxClusterMass>=2 && MaxClusterMass<=12");
75 
76 }
77 
79  delete theINCLXXDirectory;
80  delete accurateNucleusCmd;
81  delete maxClusterMassCmd;
82 }
83 
85  if(command==accurateNucleusCmd) {
86  newValues.toLower();
87  if(newValues=="projectile") {
88  theINCLXXInterfaceStore->SetAccurateProjectile(true);
89  } else if(newValues=="target") {
90  theINCLXXInterfaceStore->SetAccurateProjectile(false);
91  }
92  } else if(command==maxClusterMassCmd) {
93  const G4int parameter = maxClusterMassCmd->GetNewIntValue(newValues);
94  theINCLXXInterfaceStore->SetMaxClusterMass(parameter);
95  }
96 }