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 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/inclxx/interface/src/G4INCLXXInterfaceMessenger.cc (Version 11.3.0) and /processes/hadronic/models/inclxx/interface/src/G4INCLXXInterfaceMessenger.cc (Version 9.6.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // INCL++ intra-nuclear cascade model              26 // INCL++ intra-nuclear cascade model
 27 // Alain Boudard, CEA-Saclay, France           <<  27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
 28 // Joseph Cugnon, University of Liege, Belgium <<  28 // Davide Mancusi, CEA
 29 // Jean-Christophe David, CEA-Saclay, France   <<  29 // Alain Boudard, CEA
 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H <<  30 // Sylvie Leray, CEA
 31 // Sylvie Leray, CEA-Saclay, France            <<  31 // Joseph Cugnon, University of Liege
 32 // Davide Mancusi, CEA-Saclay, France          << 
 33 //                                                 32 //
 34 #define INCLXX_IN_GEANT4_MODE 1                    33 #define INCLXX_IN_GEANT4_MODE 1
 35                                                    34 
 36 #include "globals.hh"                              35 #include "globals.hh"
 37                                                    36 
 38 /** \file G4INCLXXInterfaceMessenger.cc            37 /** \file G4INCLXXInterfaceMessenger.cc
 39  * \brief Messenger class for the Geant4 INCL+     38  * \brief Messenger class for the Geant4 INCL++ interface.
 40  *                                                 39  *
 41  * \date 26th April 2012                           40  * \date 26th April 2012
 42  * \author Davide Mancusi                          41  * \author Davide Mancusi
 43  */                                                42  */
 44                                                    43 
 45 #include "G4INCLXXInterfaceMessenger.hh"           44 #include "G4INCLXXInterfaceMessenger.hh"
 46 #include "G4SystemOfUnits.hh"                  << 
 47 #include <sstream>                                 45 #include <sstream>
 48                                                    46 
 49 const G4String G4INCLXXInterfaceMessenger::the     47 const G4String G4INCLXXInterfaceMessenger::theUIDirectory = "/process/had/inclxx/";
 50                                                    48 
 51 G4INCLXXInterfaceMessenger::G4INCLXXInterfaceM     49 G4INCLXXInterfaceMessenger::G4INCLXXInterfaceMessenger(G4INCLXXInterfaceStore *anInterfaceStore) :
 52   theINCLXXInterfaceStore(anInterfaceStore)        50   theINCLXXInterfaceStore(anInterfaceStore)
 53 {                                                  51 {
 54   // Create a directory for the INCL++ command     52   // Create a directory for the INCL++ commands
 55   theINCLXXDirectory = new G4UIdirectory(theUI     53   theINCLXXDirectory = new G4UIdirectory(theUIDirectory);
 56   theINCLXXDirectory->SetGuidance("Parameters      54   theINCLXXDirectory->SetGuidance("Parameters for the INCL++ model");
 57                                                    55 
 58   // This command controls whether nucleus-nuc     56   // This command controls whether nucleus-nucleus reactions should accurately
 59   // describe the projectile or the target nuc     57   // describe the projectile or the target nucleus (default: projectile)
 60   accurateNucleusCmd = new G4UIcmdWithAString(     58   accurateNucleusCmd = new G4UIcmdWithAString((theUIDirectory + "accurateNucleus").data(),this);
 61   accurateNucleusCmd->SetGuidance("Set which n     59   accurateNucleusCmd->SetGuidance("Set which nucleus will be accurately described in nucleus-nucleus reactions.");
 62   accurateNucleusCmd->SetGuidance(" projectile     60   accurateNucleusCmd->SetGuidance(" projectile: accurate description of projectile-related quantities");
 63   accurateNucleusCmd->SetGuidance(" target: ac     61   accurateNucleusCmd->SetGuidance(" target: accurate description of target-related quantities");
 64   accurateNucleusCmd->SetGuidance(" Default: p     62   accurateNucleusCmd->SetGuidance(" Default: projectile");
 65   accurateNucleusCmd->SetParameterName("Accura     63   accurateNucleusCmd->SetParameterName("AccurateNucleus",true);
 66   accurateNucleusCmd->SetDefaultValue("project     64   accurateNucleusCmd->SetDefaultValue("projectile");
 67   accurateNucleusCmd->AvailableForStates(G4Sta << 
 68                                                    65 
 69   // This command selects the maximum mass num     66   // This command selects the maximum mass number of clusters to be produced in
 70   // the INCL++ cascade                            67   // the INCL++ cascade
 71   maxClusterMassCmd = new G4UIcmdWithAnInteger     68   maxClusterMassCmd = new G4UIcmdWithAnInteger((theUIDirectory + "maxClusterMass").data(),this);
 72   maxClusterMassCmd->SetGuidance("Set the maxi     69   maxClusterMassCmd->SetGuidance("Set the maximum cluster mass.");
 73   maxClusterMassCmd->SetGuidance(" The INCL++      70   maxClusterMassCmd->SetGuidance(" The INCL++ cascade stage will produce clusters with mass up to the value of this parameter (included)");
 74   maxClusterMassCmd->SetGuidance(" Allowed ran     71   maxClusterMassCmd->SetGuidance(" Allowed range: [2,12]");
 75   maxClusterMassCmd->SetParameterName("MaxClus     72   maxClusterMassCmd->SetParameterName("MaxClusterMass",true);
 76   maxClusterMassCmd->SetDefaultValue(8);           73   maxClusterMassCmd->SetDefaultValue(8);
 77   maxClusterMassCmd->SetRange("MaxClusterMass>     74   maxClusterMassCmd->SetRange("MaxClusterMass>=2 && MaxClusterMass<=12");
 78   maxClusterMassCmd->AvailableForStates(G4Stat << 
 79                                                    75 
 80   // This command sets the energy below which  << 
 81   cascadeMinEnergyPerNucleonCmd = new G4UIcmdW << 
 82   cascadeMinEnergyPerNucleonCmd->SetGuidance(" << 
 83   cascadeMinEnergyPerNucleonCmd->SetGuidance(" << 
 84   cascadeMinEnergyPerNucleonCmd->SetParameterN << 
 85   cascadeMinEnergyPerNucleonCmd->SetDefaultVal << 
 86   cascadeMinEnergyPerNucleonCmd->SetRange("cas << 
 87   cascadeMinEnergyPerNucleonCmd->SetUnitCatego << 
 88   cascadeMinEnergyPerNucleonCmd->AvailableForS << 
 89                                                << 
 90   // This command allows the user to set sever << 
 91   inclPhysicsCmd = new G4UIcmdWithAString((the << 
 92   inclPhysicsCmd->SetGuidance("Set a global co << 
 93   inclPhysicsCmd->SetGuidance(" default: defau << 
 94   inclPhysicsCmd->SetGuidance(" incl42: try to << 
 95   inclPhysicsCmd->SetParameterName("type", fal << 
 96   inclPhysicsCmd->AvailableForStates(G4State_P << 
 97                                                << 
 98   // This command allows the user to change th << 
 99   // with INCL++                               << 
100   useAblaCmd = new G4UIcommand((theUIDirectory << 
101   useAblaCmd->SetGuidance("Use ABLA++ as de-ex << 
102   useAblaCmd->AvailableForStates(G4State_Idle) << 
103 }                                                  76 }
104                                                    77 
105 G4INCLXXInterfaceMessenger::~G4INCLXXInterface     78 G4INCLXXInterfaceMessenger::~G4INCLXXInterfaceMessenger() {
106   delete theINCLXXDirectory;                       79   delete theINCLXXDirectory;
107   delete accurateNucleusCmd;                       80   delete accurateNucleusCmd;
108   delete maxClusterMassCmd;                        81   delete maxClusterMassCmd;
109   delete cascadeMinEnergyPerNucleonCmd;        << 
110   delete inclPhysicsCmd;                       << 
111   delete useAblaCmd;                           << 
112 }                                                  82 }
113                                                    83 
114 void G4INCLXXInterfaceMessenger::SetNewValue(G     84 void G4INCLXXInterfaceMessenger::SetNewValue(G4UIcommand *command, G4String newValues) {
115   if(command==accurateNucleusCmd) {                85   if(command==accurateNucleusCmd) {
116     G4StrUtil::to_lower(newValues);            <<  86     newValues.toLower();
117     if(newValues=="projectile") {                  87     if(newValues=="projectile") {
118       theINCLXXInterfaceStore->SetAccurateProj     88       theINCLXXInterfaceStore->SetAccurateProjectile(true);
119     } else if(newValues=="target") {               89     } else if(newValues=="target") {
120       theINCLXXInterfaceStore->SetAccurateProj     90       theINCLXXInterfaceStore->SetAccurateProjectile(false);
121     }                                              91     }
122   } else if(command==maxClusterMassCmd) {          92   } else if(command==maxClusterMassCmd) {
123     const G4int parameter = maxClusterMassCmd-     93     const G4int parameter = maxClusterMassCmd->GetNewIntValue(newValues);
124     theINCLXXInterfaceStore->SetMaxClusterMass     94     theINCLXXInterfaceStore->SetMaxClusterMass(parameter);
125   } else if(command==cascadeMinEnergyPerNucleo << 
126     const G4double parameter = cascadeMinEnerg << 
127     theINCLXXInterfaceStore->SetCascadeMinEner << 
128   } else if(command==inclPhysicsCmd) {         << 
129     theINCLXXInterfaceStore->SetINCLPhysics(ne << 
130   } else if(command==useAblaCmd) {             << 
131     theINCLXXInterfaceStore->UseAblaDeExcitati << 
132   }                                                95   }
133 }                                                  96 }
134                                                    97