Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParticleHPMessenger.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//
28
29#include "G4UIdirectory.hh"
30#include "G4UIcmdWithAString.hh"
32
34:manager(man)
35{
36 ParticleHPDir = new G4UIdirectory( "/process/had/particle_hp/" );
37 ParticleHPDir->SetGuidance( "UI commands of ParticleHP" );
38
39 PhotoEvaCmd = new G4UIcmdWithAString("/process/had/particle_hp/use_photo_evaporation",this);
40 PhotoEvaCmd->SetGuidance(" Force the use of the Photon Evaporation model, instead of the neutron capture final state data.");
41 PhotoEvaCmd->SetParameterName("choice",false);
42 PhotoEvaCmd->SetCandidates("true false");
44
45 SkipMissingCmd = new G4UIcmdWithAString("/process/had/particle_hp/skip_missing_isotopes",this);
46 SkipMissingCmd->SetGuidance("Use only exact isotope data files, instead of allowing nearby isotope files to be used.");
47 SkipMissingCmd->SetGuidance("In this case if the exact file is not available, the cross section will be set to zero.");
48 SkipMissingCmd->SetParameterName("choice",false);
49 SkipMissingCmd->SetCandidates("true false");
51
52 NeglectDopplerCmd = new G4UIcmdWithAString("/process/had/particle_hp/neglect_Doppler_broadening",this);
53 NeglectDopplerCmd->SetGuidance("Switch off the Doppler broadening due to the thermal motion of the target nucleus.");
54 NeglectDopplerCmd->SetGuidance("This option provides a significant CPU performance advantage.");
55 NeglectDopplerCmd->SetParameterName("choice",false);
56 NeglectDopplerCmd->SetCandidates("true false");
58
59 DoNotAdjustFSCmd = new G4UIcmdWithAString("/process/had/particle_hp/do_not_adjust_final_state",this);
60 DoNotAdjustFSCmd->SetGuidance("Disable to adjust final state for getting better conservation.");
61 DoNotAdjustFSCmd->SetParameterName("choice",false);
62 DoNotAdjustFSCmd->SetCandidates("true false");
64
65 ProduceFissionFragementCmd = new G4UIcmdWithAString("/process/had/particle_hp/produce_fission_fragment",this);
66 ProduceFissionFragementCmd->SetGuidance("Enable to generate fission fragments.");
67 ProduceFissionFragementCmd->SetParameterName("choice",false);
68 ProduceFissionFragementCmd->SetCandidates("true false");
69 ProduceFissionFragementCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
70
71 WendtFissionModelCmd = new G4UIcmdWithAString("/process/had/particle_hp/use_Wendt_fission_model",this);
72 WendtFissionModelCmd->SetGuidance("Enable use of Wendt fission model.");
73 WendtFissionModelCmd->SetParameterName("choice",false);
74 WendtFissionModelCmd->SetCandidates("true false");
75 WendtFissionModelCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
76
77 NRESP71Cmd = new G4UIcmdWithAString("/process/had/particle_hp/use_NRESP71_model",this);
78 NRESP71Cmd->SetGuidance("Enable to use NRESP71 model for n on C reaction");
79 NRESP71Cmd->SetParameterName("choice",false);
80 NRESP71Cmd->SetCandidates("true false");
82
83 VerboseCmd = new G4UIcmdWithAnInteger("/process/had/particle_hp/verbose",this);
84 VerboseCmd->SetGuidance("Set Verbose level of ParticleHP package");
85 VerboseCmd->SetParameterName("verbose_level",true);
86 VerboseCmd->SetDefaultValue(1);
87 VerboseCmd->SetRange("verbose_level >=0");
89}
90
92{
93 delete ParticleHPDir;
94 delete PhotoEvaCmd;
95 delete SkipMissingCmd;
96 delete NeglectDopplerCmd;
97 delete DoNotAdjustFSCmd;
98 delete ProduceFissionFragementCmd;
99 delete WendtFissionModelCmd;
100 delete NRESP71Cmd;
101 delete VerboseCmd;
102}
103
105{
106 G4bool bValue=false;
107 if ( newValue == "true" ) bValue=true;
108
109 if ( command == PhotoEvaCmd ) {
110 manager->SetUseOnlyPhotoEvaporation( bValue );
111 }
112 if ( command == SkipMissingCmd) {
113 manager->SetSkipMissingIsotopes( bValue );
114 }
115 if ( command == NeglectDopplerCmd ) {
116 manager->SetNeglectDoppler( bValue );
117 }
118 if ( command == DoNotAdjustFSCmd ) {
119 manager->SetDoNotAdjustFinalState( bValue );
120 }
121 if ( command == ProduceFissionFragementCmd ) {
122 manager->SetProduceFissionFragments( bValue );
123 }
124 if ( command == WendtFissionModelCmd ) {
125 manager->SetUseWendtFissionModel( bValue );
126 // Make sure both fission fragment models are not active at same time
127 if ( bValue ) manager->SetProduceFissionFragments( false );
128 }
129 if ( command == NRESP71Cmd ) {
130 manager->SetUseNRESP71Model( bValue );
131 }
132 if ( command == VerboseCmd ) {
133 manager->SetVerboseLevel( VerboseCmd->ConvertToInt( newValue ) );
134 }
135}
136
@ G4State_Idle
@ G4State_PreInit
bool G4bool
Definition: G4Types.hh:86
void SetUseNRESP71Model(G4bool val)
void SetNeglectDoppler(G4bool val)
void SetProduceFissionFragments(G4bool val)
void SetSkipMissingIsotopes(G4bool val)
void SetDoNotAdjustFinalState(G4bool val)
void SetUseWendtFissionModel(G4bool val)
void SetUseOnlyPhotoEvaporation(G4bool val)
void SetNewValue(G4UIcommand *, G4String)
G4ParticleHPMessenger(G4ParticleHPManager *)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
static G4int ConvertToInt(const char *st)
Definition: G4UIcommand.cc:543
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:273