Geant4-11
G4EmMessenger.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//
27//---------------------------------------------------------------------------
28//
29// ClassName: G4EmMessenger
30//
31// Author: 2002 J.P. Wellisch
32//
33// Modified:
34// 09.11.2005 V.Ivanchenko edit to provide a standard
35// 19.06.2006 V.Ivanchenko add mu-nuclear process
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4EmMessenger.hh"
41#include "G4EmExtraPhysics.hh"
42
43
44//A. Dotti (8Jun2013): This class does not need changes for MT
45// Note that in general "physics" realated commands should not
46// be executed by threads, but this is a special case. Actually the command
47// executes a building of processes if it was not build before, thus we need
48// all threads to process commands.
49// The logic of thread-private objects is in G4EmExtraPhysics class
50
52{
53 theB = ab;
54 aDir1 = new G4UIdirectory("/physics_lists/");
55 aDir1->SetGuidance("commands related to the physics simulation engine.");
56
57 // general stuff.
58 aDir2 = new G4UIdirectory("/physics_lists/em/");
59 aDir2->SetGuidance("tailoring the processes");
60
61 // command for synchrotron radiation.
62 theSynch = new G4UIcmdWithABool("/physics_lists/em/SyncRadiation",this);
63 theSynch->SetGuidance("Switching on/off synchrotron radiation.");
65
66 // command for synchrotron radiation.
67 theSynchAll = new G4UIcmdWithABool("/physics_lists/em/SyncRadiationAll",this);
68 theSynchAll->SetGuidance("Switching on/off synchrotron radiation for all charged.");
70
71 // command for gamma nuclear physics.
72 theGN = new G4UIcmdWithABool("/physics_lists/em/GammaNuclear",this);
73 theGN->SetGuidance("Switching on gamma nuclear physics.");
75
76 // command for gamma nuclear physics.
77 theXS = new G4UIcmdWithABool("/physics_lists/em/UseGammaNuclearXS",this);
78 theXS->SetGuidance("Use XS gamma nuclear cross section.");
80
81 // command for lend gamma nuclear physics.
82 theGLENDN = new G4UIcmdWithABool("/physics_lists/em/LENDGammaNuclear",this);
83 theGLENDN->SetGuidance("Switching on LEND gamma nuclear physics.");
85
86 theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
87 theEN->SetGuidance("Switching on e+- nuclear physics.");
89
90 // command for muon nuclear physics.
91 theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
92 theMUN->SetGuidance("Switching on muon nuclear physics.");
94
95 theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
96 theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
98
99 thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
100 thePMM->SetGuidance("Switching on positron conversion to muon pair.");
102
103 thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
104 thePH->SetGuidance("Switching on positron conversion to hadrons.");
106
107 theNu = new G4UIcmdWithABool("/physics_lists/em/NeutrinoActivation",this);
108 theNu->SetGuidance("Activation of neutrino processes");
110
111 theNuETX = new G4UIcmdWithABool("/physics_lists/em/NuETotXscActivation",this);
112 theNuETX->SetGuidance("Activation of neutrino processes");
114
115 theGMM1 = new G4UIcmdWithADouble("/physics_lists/em/GammaToMuonsFactor",this);
116 theGMM1->SetGuidance("Factor for gamma conversion to muon pair.");
118
119 thePMM1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToMuonsFactor",this);
120 thePMM1->SetGuidance("Factor for positron conversion to muon pair.");
122
123 thePH1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToHadronsFactor",this);
124 thePH1->SetGuidance("Factor for positron conversion to hadrons.");
126
127 theNuEleCcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleCcBias",this);
128 theNuEleCcBF->SetGuidance("Neutrino-electron cc-current bias factor");
130
131 theNuEleNcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleNcBias",this);
132 theNuEleNcBF->SetGuidance("Neutrino-electron nc-current bias factor");
134
135 theNuNucleusBF = new G4UIcmdWithADouble("/physics_lists/em/NuNucleusBias",this);
136 theNuNucleusBF->SetGuidance("Neutrino-nucleus bias factor");
138
139 theGNlowe = new G4UIcmdWithADoubleAndUnit("/physics_lists/em/GammaNuclearLEModelLimit",this);
140 theGNlowe->SetGuidance("Upper energy limit for low-energy model");
141 theGNlowe->SetParameterName("emin",true);
142 theGNlowe->SetUnitCategory("Energy");
144
145 theNuDN = new G4UIcmdWithAString("/physics_lists/em/NuDetectorName",this);
146 theNuDN->SetGuidance("Set neutrino detector name");
148}
149
151{
152 delete theSynch;
153 delete theSynchAll;
154 delete theGN;
155 delete theGLENDN;
156 delete theEN;
157 delete theMUN;
158 delete theGMM;
159 delete thePMM;
160 delete thePH;
161 delete theNu;
162 delete theNuETX;
163
164 delete theGMM1;
165 delete thePMM1;
166 delete thePH1;
167 delete theNuEleCcBF;
168 delete theNuEleNcBF;
169 delete theNuNucleusBF;
170 delete theNuDN;
171 delete theGNlowe;
172 delete theXS;
173
174 delete aDir1;
175 delete aDir2;
176}
177
179{
180 if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
182 if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
185 if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
186 if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
192
196
201
202 if(aComm==theNuDN) theB->SetNuDetectorName(aS);
203}
@ G4State_PreInit
static const G4double ab
void SetNuNucleusBias(G4double bf)
void Synch(G4bool val)
void SynchAll(G4bool val)
void NuETotXscActivated(G4bool val)
void NeutrinoActivated(G4bool val)
void ElectroNuclear(G4bool val)
void LENDGammaNuclear(G4bool val)
void SetUseGammaNuclearXS(G4bool val)
void GammaToMuMuFactor(G4double val)
void SetNuEleNcBias(G4double bf)
void PositronToHadronsFactor(G4double val)
void GammaToMuMu(G4bool val)
void GammaNuclearLEModelLimit(G4double val)
void SetNuEleCcBias(G4double bf)
void PositronToHadrons(G4bool val)
void SetNuDetectorName(const G4String &dn)
void PositronToMuMu(G4bool val)
void GammaNuclear(G4bool val)
void MuonNuclear(G4bool val)
void PositronToMuMuFactor(G4double val)
G4UIcmdWithABool * theNuETX
G4UIcmdWithAString * theNuDN
G4UIcmdWithABool * theGLENDN
G4UIcmdWithABool * theXS
G4UIcmdWithADouble * theNuEleCcBF
G4UIcmdWithADouble * theNuNucleusBF
G4UIcmdWithABool * theSynchAll
G4UIcmdWithABool * theMUN
virtual ~G4EmMessenger()
G4UIcmdWithABool * theNu
G4UIcmdWithADouble * theNuEleNcBF
void SetNewValue(G4UIcommand *aComm, G4String aS)
G4UIcmdWithABool * thePH
G4UIcmdWithADouble * thePMM1
G4UIdirectory * aDir1
G4UIdirectory * aDir2
G4UIcmdWithABool * theGN
G4UIcmdWithABool * theEN
G4UIcmdWithABool * thePMM
G4EmExtraPhysics * theB
G4UIcmdWithADoubleAndUnit * theGNlowe
G4UIcmdWithADouble * thePH1
G4UIcmdWithADouble * theGMM1
G4EmMessenger(G4EmExtraPhysics *af)
G4UIcmdWithABool * theGMM
G4UIcmdWithABool * theSynch
static G4bool GetNewBoolValue(const char *paramString)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:288