Geant4 11.2.2
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
44{
45 theB = ab;
46 aDir1 = new G4UIdirectory("/physics_lists/", false);
47 aDir1->SetGuidance("commands for physics list configuration.");
48
49 // general stuff.
50 aDir2 = new G4UIdirectory("/physics_lists/em/", false);
51 aDir2->SetGuidance("Extra EM processes configuration.");
52
53 // command for synchrotron radiation.
54 theSynch = new G4UIcmdWithABool("/physics_lists/em/SyncRadiation",this);
55 theSynch->SetGuidance("Switching on/off synchrotron radiation.");
57 theSynch->SetToBeBroadcasted(false);
58
59 // command for synchrotron radiation.
60 theSynchAll = new G4UIcmdWithABool("/physics_lists/em/SyncRadiationAll",this);
61 theSynchAll->SetGuidance("Switching on/off synchrotron radiation for all charged.");
63 theSynchAll->SetToBeBroadcasted(false);
64
65 // command for gamma nuclear physics.
66 theGN = new G4UIcmdWithABool("/physics_lists/em/GammaNuclear",this);
67 theGN->SetGuidance("Switching on gamma nuclear physics.");
69 theGN->SetToBeBroadcasted(false);
70
71 // command for gamma nuclear physics.
72 theXS = new G4UIcmdWithABool("/physics_lists/em/UseGammaNuclearXS",this);
73 theXS->SetGuidance("Use XS gamma nuclear cross section.");
75 theXS->SetToBeBroadcasted(false);
76
77 // command for lend gamma nuclear physics.
78 theGLENDN = new G4UIcmdWithABool("/physics_lists/em/LENDGammaNuclear",this);
79 theGLENDN->SetGuidance("Switching on LEND gamma nuclear physics.");
81 theGLENDN->SetToBeBroadcasted(false);
82
83 theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
84 theEN->SetGuidance("Switching on e+- nuclear physics.");
86 theEN->SetToBeBroadcasted(false);
87
88 // command for muon nuclear physics.
89 theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
90 theMUN->SetGuidance("Switching on muon nuclear physics.");
92 theMUN->SetToBeBroadcasted(false);
93
94 theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
95 theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
97 theGMM->SetToBeBroadcasted(false);
98
99 theMMM = new G4UIcmdWithABool("/physics_lists/em/MuonToMuons",this);
100 theMMM->SetGuidance("Switching on muon pair production by muons.");
102 theMMM->SetToBeBroadcasted(false);
103
104 thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
105 thePMM->SetGuidance("Switching on positron conversion to muon pair.");
107 thePMM->SetToBeBroadcasted(false);
108
109 thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
110 thePH->SetGuidance("Switching on positron conversion to hadrons.");
112 thePH->SetToBeBroadcasted(false);
113
114 theGMM1 = new G4UIcmdWithADouble("/physics_lists/em/GammaToMuonsFactor",this);
115 theGMM1->SetGuidance("Factor for gamma conversion to muon pair.");
117 theGMM1->SetToBeBroadcasted(false);
118
119 thePMM1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToMuonsFactor",this);
120 thePMM1->SetGuidance("Factor for positron conversion to muon pair.");
122 thePMM1->SetToBeBroadcasted(false);
123
124 thePH1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToHadronsFactor",this);
125 thePH1->SetGuidance("Factor for positron conversion to hadrons.");
127 thePH1->SetToBeBroadcasted(false);
128
129 theGNlowe = new G4UIcmdWithADoubleAndUnit("/physics_lists/em/GammaNuclearLEModelLimit",this);
130 theGNlowe->SetGuidance("Upper energy limit for low-energy gamma-nuclear model");
131 theGNlowe->SetParameterName("emin",true);
132 theGNlowe->SetUnitCategory("Energy");
134 theGNlowe->SetToBeBroadcasted(false);
135}
136
138{
139 delete theSynch;
140 delete theSynchAll;
141 delete theGN;
142 delete theGLENDN;
143 delete theEN;
144 delete theMUN;
145 delete theGMM;
146 delete theMMM;
147 delete thePMM;
148 delete thePH;
149
150 delete theGMM1;
151 delete thePMM1;
152 delete thePH1;
153 delete theGNlowe;
154 delete theXS;
155
156 delete aDir1;
157 delete aDir2;
158}
159
161{
162 if (aComm==theSynch)
163 theB->Synch(theSynch->GetNewBoolValue(aS));
164 else if (aComm==theSynchAll)
165 theB->SynchAll(theSynchAll->GetNewBoolValue(aS));
166 else if (aComm==theGN)
167 theB->GammaNuclear(theGN->GetNewBoolValue(aS));
168 else if (aComm==theGLENDN)
169 theB->LENDGammaNuclear(theGLENDN->GetNewBoolValue(aS));
170 else if (aComm==theEN)
171 theB->ElectroNuclear(theEN->GetNewBoolValue(aS));
172 else if (aComm==theMUN)
173 theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
174 else if (aComm==theGMM)
175 theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
176 else if (aComm==theMMM)
177 theB->MuonToMuMu(theMMM->GetNewBoolValue(aS));
178 else if (aComm==thePMM)
179 theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
180 else if (aComm==thePH)
181 theB->PositronToHadrons(thePH->GetNewBoolValue(aS));
182 else if (aComm==theXS)
183 theB->SetUseGammaNuclearXS(theXS->GetNewBoolValue(aS));
184 else if (aComm==theGMM1)
185 theB->GammaToMuMuFactor(theGMM1->GetNewDoubleValue(aS));
186 else if (aComm==thePMM1)
187 theB->PositronToMuMuFactor(thePMM1->GetNewDoubleValue(aS));
188 else if (aComm==thePH1)
190 else if (aComm==theGNlowe)
191 theB->GammaNuclearLEModelLimit(theGNlowe->GetNewDoubleValue(aS));
192}
@ G4State_PreInit
void Synch(G4bool val)
void SynchAll(G4bool val)
void ElectroNuclear(G4bool val)
void LENDGammaNuclear(G4bool val)
void SetUseGammaNuclearXS(G4bool val)
void GammaToMuMuFactor(G4double val)
void PositronToHadronsFactor(G4double val)
void GammaToMuMu(G4bool val)
void GammaNuclearLEModelLimit(G4double val)
void PositronToHadrons(G4bool val)
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)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)