Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AdjointPhysicsMessenger.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 // $Id: G4AdjointPhysicsMessenger.cc 71233 2013-06-12 13:16:05Z gcosmo $
30 //
32 // Class Name: G4AdjointPhysicsMessenger
33 // Author: L. Desorgher
34 // Organisation: SpaceIT GmbH
35 // Contract: ESA contract 21435/08/NL/AT
36 // Customer: ESA/ESTEC
38 
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
43 #include "G4UIdirectory.hh"
44 #include "G4UIcmdWithABool.hh"
45 #include "G4UIcmdWithAnInteger.hh"
47 #include "G4UIcmdWithADouble.hh"
49 #include "G4UIcmdWithAString.hh"
50 #include "G4UnitsTable.hh"
51 #include "G4AdjointPhysicsList.hh"
53 
54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55 
57  G4AdjointPhysicsList* pPhysicsList)
58 : G4UImessenger(),
59  fPhysicsList(pPhysicsList),
60  fPhysicsDir(0),
61  fUsepIonisationCmd(0),
62  fUseBremCmd(0),
63  fUseComptonCmd(0),
64  fUseMSCmd(0),
65  fUsePEEffectCmd(0),
66  fUseGammaConversionCmd(0),
67  fUseEgainFluctuationCmd(0),
68  fSetEminAdjModelsCmd(0),
69  fSetEmaxAdjModelsCmd(0)
70 {
71  fPhysicsDir = new G4UIdirectory("/adjoint_physics/");
72 
73  fPhysicsDir->SetGuidance(
74  "Definition of adjoint and forward physics processes");
75  //-------
76  fUsepIonisationCmd = new G4UIcmdWithABool(
77  "/adjoint_physics/UseProtonIonisation",this);
78  fUsepIonisationCmd->SetGuidance(
79  "If true (false) the proton ionisation is (not) considered");
80  fUsepIonisationCmd->AvailableForStates(G4State_PreInit);
81 
82  fUseBremCmd = new G4UIcmdWithABool("/adjoint_physics/UseBremsstrahlung",this);
83  fUseBremCmd->SetGuidance(
84  "If true (false) the bremsstrahlung process is (not) considered");
85  fUseBremCmd->AvailableForStates(G4State_PreInit);
86 
87  fUseComptonCmd = new G4UIcmdWithABool("/adjoint_physics/UseCompton",this);
88  fUseComptonCmd->SetGuidance(
89  "If true (false) the Compton scattering is (not) considered");
90  fUseComptonCmd->AvailableForStates(G4State_PreInit);
91 
92  fUseMSCmd = new G4UIcmdWithABool("/adjoint_physics/UseMS",this);
93  fUseMSCmd->SetGuidance(
94  "If true (false) the continuous multiple scattering is (not) considered");
96 
97  fUseEgainFluctuationCmd = new G4UIcmdWithABool(
98  "/adjoint_physics/UseEgainElossFluctuation",this);
99  fUseEgainFluctuationCmd->SetGuidance(
100  "Switch on/off the fluctation for continuous energy gain/loss");
101  fUseEgainFluctuationCmd->AvailableForStates(G4State_PreInit);
102 
103  fUsePEEffectCmd = new G4UIcmdWithABool("/adjoint_physics/UsePEEffect",this);
104  fUsePEEffectCmd->AvailableForStates(G4State_PreInit);
105  fUsePEEffectCmd->SetGuidance(
106  "If true (false) the photo electric effect is (not) considered");
107 
108  fUseGammaConversionCmd = new G4UIcmdWithABool(
109  "/adjoint_physics/UseGammaConversion",this);
110  fUseGammaConversionCmd->AvailableForStates(G4State_PreInit);
111  fUseGammaConversionCmd->SetGuidance(
112  "If true the fwd gamma pair conversion is considered");
113 
114  fSetEminAdjModelsCmd = new G4UIcmdWithADoubleAndUnit(
115  "/adjoint_physics/SetEminForAdjointModels",this);
116  fSetEminAdjModelsCmd->SetGuidance(
117  "Set the minimum energy of the adjoint models");
118  fSetEminAdjModelsCmd->SetParameterName("Emin",false);
119  fSetEminAdjModelsCmd->SetUnitCategory("Energy");
120  fSetEminAdjModelsCmd->AvailableForStates(G4State_PreInit);
121 
122  fSetEmaxAdjModelsCmd = new G4UIcmdWithADoubleAndUnit(
123  "/adjoint_physics/SetEmaxForAdjointModels",this);
124  fSetEmaxAdjModelsCmd->SetGuidance(
125  "Set the minimum energy of the adjoint models.");
126  fSetEmaxAdjModelsCmd->SetParameterName("Emax",false);
127  fSetEmaxAdjModelsCmd->SetUnitCategory("Energy");
128  fSetEmaxAdjModelsCmd->AvailableForStates(G4State_PreInit);
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
135  delete fUsepIonisationCmd;
136  delete fUseBremCmd;
137  delete fUseComptonCmd;
138  delete fUseMSCmd;
139  delete fUsePEEffectCmd;
140  delete fUseGammaConversionCmd;
141  delete fUseEgainFluctuationCmd;
142  delete fSetEminAdjModelsCmd;
143  delete fSetEmaxAdjModelsCmd;
144 }
145 
146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
147 
149  G4String newValue)
150 {
151  if ( command==fUsepIonisationCmd){
152  fPhysicsList->SetUseProtonIonisation(
153  fUsepIonisationCmd->GetNewBoolValue(newValue));
154 
155  }
156  else if ( command==fUseBremCmd){
157  fPhysicsList->SetUseBrem(fUseBremCmd->GetNewBoolValue(newValue));
158  }
159  else if ( command==fUseComptonCmd){
160  fPhysicsList->SetUseCompton(fUseComptonCmd->GetNewBoolValue(newValue));
161  }
162  else if ( command==fUseMSCmd){
163  fPhysicsList->SetUseMS(fUseMSCmd->GetNewBoolValue(newValue));
164  }
165  else if ( command==fUsePEEffectCmd){
166  fPhysicsList->SetUsePEEffect(fUsePEEffectCmd->GetNewBoolValue(newValue));
167  }
168  else if ( command==fUseGammaConversionCmd){
169  fPhysicsList->SetUseGammaConversion(
170  fUseGammaConversionCmd->GetNewBoolValue(newValue));
171  }
172  else if ( command==fUseEgainFluctuationCmd){
173  fPhysicsList->SetUseEgainFluctuation(
174  fUseEgainFluctuationCmd->GetNewBoolValue(newValue));
175  }
176 
177  else if ( command== fSetEminAdjModelsCmd){
178  fPhysicsList->SetEminAdjModels(
179  fSetEminAdjModelsCmd->GetNewDoubleValue(newValue));
180  }
181  else if ( command== fSetEmaxAdjModelsCmd){
182  fPhysicsList->SetEmaxAdjModels(
183  fSetEmaxAdjModelsCmd->GetNewDoubleValue(newValue));
184  }
185 }
186 
187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
188 
void SetUseGammaConversion(bool aBool)
G4AdjointPhysicsMessenger(G4AdjointPhysicsList *)
void SetUnitCategory(const char *unitCategory)
void SetEmaxAdjModels(G4double aVal)
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
void SetUseProtonIonisation(bool aBool)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetEminAdjModels(G4double aVal)
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
Definition of the G4AdjointPhysicsList class.
void SetUseCompton(bool aBool)
virtual void SetNewValue(G4UIcommand *, G4String)
void SetUsePEEffect(bool aBool)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUseEgainFluctuation(bool aBool)
Definition of the G4AdjointPhysicsMessenger class.
void SetUseBrem(bool aBool)