Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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//A. Dotti (8Jun2013): This class does not need changes for MT
44// Note that in general "physics" realated commands should not
45// be executed by threads, but this is a special case. Actually the command
46// executes a building of processes if it was not build before, thus we need
47// all threads to process commands.
48// The logic of thread-private objects is in G4EmExtraPhysics class
49
51{
52 theB = ab;
53 aDir1 = new G4UIdirectory("/physics_lists/", false);
54 aDir1->SetGuidance("commands related to the physics simulation engine.");
55
56 // general stuff.
57 aDir2 = new G4UIdirectory("/physics_lists/em/", false);
58 aDir2->SetGuidance("tailoring the processes");
59
60 // command for synchrotron radiation.
61 theSynch = new G4UIcmdWithABool("/physics_lists/em/SyncRadiation",this);
62 theSynch->SetGuidance("Switching on/off synchrotron radiation.");
64 theSynch->SetToBeBroadcasted(false);
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 theSynchAll->SetToBeBroadcasted(false);
71
72 // command for gamma nuclear physics.
73 theGN = new G4UIcmdWithABool("/physics_lists/em/GammaNuclear",this);
74 theGN->SetGuidance("Switching on gamma nuclear physics.");
76 theGN->SetToBeBroadcasted(false);
77
78 // command for gamma nuclear physics.
79 theXS = new G4UIcmdWithABool("/physics_lists/em/UseGammaNuclearXS",this);
80 theXS->SetGuidance("Use XS gamma nuclear cross section.");
82 theXS->SetToBeBroadcasted(false);
83
84 // command for lend gamma nuclear physics.
85 theGLENDN = new G4UIcmdWithABool("/physics_lists/em/LENDGammaNuclear",this);
86 theGLENDN->SetGuidance("Switching on LEND gamma nuclear physics.");
88 theGLENDN->SetToBeBroadcasted(false);
89
90 theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
91 theEN->SetGuidance("Switching on e+- nuclear physics.");
93 theEN->SetToBeBroadcasted(false);
94
95 // command for muon nuclear physics.
96 theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
97 theMUN->SetGuidance("Switching on muon nuclear physics.");
99 theMUN->SetToBeBroadcasted(false);
100
101 theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
102 theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
104 theGMM->SetToBeBroadcasted(false);
105
106 theMMM = new G4UIcmdWithABool("/physics_lists/em/MuonToMuons",this);
107 theMMM->SetGuidance("Switching on muon pair production by muons.");
109 theMMM->SetToBeBroadcasted(false);
110
111 thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
112 thePMM->SetGuidance("Switching on positron conversion to muon pair.");
114 thePMM->SetToBeBroadcasted(false);
115
116 thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
117 thePH->SetGuidance("Switching on positron conversion to hadrons.");
119 thePH->SetToBeBroadcasted(false);
120
121 theNu = new G4UIcmdWithABool("/physics_lists/em/NeutrinoActivation",this);
122 theNu->SetGuidance("Activation of neutrino processes");
124 theNu->SetToBeBroadcasted(false);
125
126 theNuETX = new G4UIcmdWithABool("/physics_lists/em/NuETotXscActivation",this);
127 theNuETX->SetGuidance("Activation of neutrino processes");
129 theNuETX->SetToBeBroadcasted(false);
130
131 theGMM1 = new G4UIcmdWithADouble("/physics_lists/em/GammaToMuonsFactor",this);
132 theGMM1->SetGuidance("Factor for gamma conversion to muon pair.");
134 theGMM1->SetToBeBroadcasted(false);
135
136 thePMM1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToMuonsFactor",this);
137 thePMM1->SetGuidance("Factor for positron conversion to muon pair.");
139 thePMM1->SetToBeBroadcasted(false);
140
141 thePH1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToHadronsFactor",this);
142 thePH1->SetGuidance("Factor for positron conversion to hadrons.");
144 thePH1->SetToBeBroadcasted(false);
145
146 theNuEleCcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleCcBias",this);
147 theNuEleCcBF->SetGuidance("Neutrino-electron cc-current bias factor");
148 theNuEleCcBF->AvailableForStates(G4State_PreInit);
149 theNuEleCcBF->SetToBeBroadcasted(false);
150
151 theNuEleNcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleNcBias",this);
152 theNuEleNcBF->SetGuidance("Neutrino-electron nc-current bias factor");
153 theNuEleNcBF->AvailableForStates(G4State_PreInit);
154 theNuEleNcBF->SetToBeBroadcasted(false);
155
156 theNuNucleusBF = new G4UIcmdWithADouble("/physics_lists/em/NuNucleusBias",this);
157 theNuNucleusBF->SetGuidance("Neutrino-nucleus bias factor");
158 theNuNucleusBF->AvailableForStates(G4State_PreInit);
159 theNuNucleusBF->SetToBeBroadcasted(false);
160
161 theGNlowe = new G4UIcmdWithADoubleAndUnit("/physics_lists/em/GammaNuclearLEModelLimit",this);
162 theGNlowe->SetGuidance("Upper energy limit for low-energy model");
163 theGNlowe->SetParameterName("emin",true);
164 theGNlowe->SetUnitCategory("Energy");
166 theGNlowe->SetToBeBroadcasted(false);
167
168 theNuDN = new G4UIcmdWithAString("/physics_lists/em/NuDetectorName",this);
169 theNuDN->SetGuidance("Set neutrino detector name");
171 theNuDN->SetToBeBroadcasted(false);
172}
173
175{
176 delete theSynch;
177 delete theSynchAll;
178 delete theGN;
179 delete theGLENDN;
180 delete theEN;
181 delete theMUN;
182 delete theGMM;
183 delete theMMM;
184 delete thePMM;
185 delete thePH;
186 delete theNu;
187 delete theNuETX;
188
189 delete theGMM1;
190 delete thePMM1;
191 delete thePH1;
192 delete theNuEleCcBF;
193 delete theNuEleNcBF;
194 delete theNuNucleusBF;
195 delete theNuDN;
196 delete theGNlowe;
197 delete theXS;
198
199 delete aDir1;
200 delete aDir2;
201}
202
204{
205 if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
206 if(aComm==theSynchAll) theB->SynchAll(theSynchAll->GetNewBoolValue(aS));
207 if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
208 if(aComm==theGLENDN) theB->LENDGammaNuclear(theGLENDN->GetNewBoolValue(aS));
209 if(aComm==theEN) theB->ElectroNuclear(theEN->GetNewBoolValue(aS));
210 if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
211 if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
212 if(aComm==theMMM) theB->MuonToMuMu(theMMM->GetNewBoolValue(aS));
213 if(aComm==thePMM) theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
214 if(aComm==thePH) theB->PositronToHadrons(thePH->GetNewBoolValue(aS));
215 if(aComm==theNu) theB->NeutrinoActivated(theNu->GetNewBoolValue(aS));
216 if(aComm==theNuETX) theB->NuETotXscActivated(theNuETX->GetNewBoolValue(aS));
217 if(aComm==theXS) theB->SetUseGammaNuclearXS(theXS->GetNewBoolValue(aS));
218
219 if(aComm==theGMM1) theB->GammaToMuMuFactor(theGMM1->GetNewDoubleValue(aS));
220 if(aComm==thePMM1) theB->PositronToMuMuFactor(thePMM1->GetNewDoubleValue(aS));
221 if(aComm==thePH1) theB->PositronToHadronsFactor(thePH1->GetNewDoubleValue(aS));
222
223 if(aComm==theNuEleCcBF) theB->SetNuEleCcBias(theNuEleCcBF->GetNewDoubleValue(aS));
224 if(aComm==theNuEleNcBF) theB->SetNuEleNcBias(theNuEleNcBF->GetNewDoubleValue(aS));
225 if(aComm==theNuNucleusBF) theB->SetNuNucleusBias(theNuNucleusBF->GetNewDoubleValue(aS));
226 if(aComm==theGNlowe) theB->GammaNuclearLEModelLimit(theGNlowe->GetNewDoubleValue(aS));
227
228 if(aComm==theNuDN) theB->SetNuDetectorName(aS);
229}
@ G4State_PreInit
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)
void MuonToMuMu(G4bool val)
void SetNewValue(G4UIcommand *aComm, G4String aS) override
~G4EmMessenger() override
G4EmMessenger(G4EmExtraPhysics *af)
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 SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:172
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:157
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:287