Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4EmMessenger.cc
이 파일의 문서화 페이지로 가기
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 // $Id: G4EmMessenger.cc 66704 2013-01-10 18:20:17Z gunter $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: G4EmMessenger
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 09.11.2005 V.Ivanchenko edit to provide a standard
36 // 19.06.2006 V.Ivanchenko add mu-nuclear process
37 //
38 //----------------------------------------------------------------------------
39 //
40 
41 #include "G4EmMessenger.hh"
42 #include "G4EmExtraPhysics.hh"
43 
44 
45 //A. Dotti (8Jun2013): This class does not need changes for MT
46 // Note that in general "physics" realated commands should not
47 // be executed by threads, but this is a special case. Actually the command
48 // executes a building of processes if it was not build before, thus we need
49 // all threads to process commands.
50 // The logic of thread-private objects is in G4EmExtraPhysics class
51 
53 {
54  theB = ab;
55  aDir1 = new G4UIdirectory("/physics_lists/");
56  aDir1->SetGuidance("commands related to the physics simulation engine.");
57 
58  // general stuff.
59  aDir2 = new G4UIdirectory("/physics_lists/em/");
60  aDir2->SetGuidance("tailoring the processes");
61 
62  // command for synchrotron radiation.
63  theSynch = new G4UIcmdWithABool("/physics_lists/em/SyncRadiation",this);
64  theSynch->SetGuidance("Switching on/off synchrotron radiation.");
66 
67  // command for synchrotron radiation.
68  theSynchAll = new G4UIcmdWithABool("/physics_lists/em/SyncRadiationAll",this);
69  theSynchAll->SetGuidance("Switching on/off synchrotron radiation for all charged.");
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 
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 
82  theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
83  theEN->SetGuidance("Switching on e+- nuclear physics.");
85 
86  // command for muon nuclear physics.
87  theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
88  theMUN->SetGuidance("Switching on muon nuclear physics.");
90 
91  theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
92  theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
94 
95  thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
96  thePMM->SetGuidance("Switching on positron conversion to muon pair.");
98 
99  thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
100  thePH->SetGuidance("Switching on positron conversion to hadrons.");
102 
103  theNu = new G4UIcmdWithABool("/physics_lists/em/NeutrinoActivation",this);
104  theNu->SetGuidance("Activation of neutrino processes");
106 
107  theGMM1 = new G4UIcmdWithADouble("/physics_lists/em/GammaToMuonsFactor",this);
108  theGMM1->SetGuidance("Factor for gamma conversion to muon pair.");
110 
111  thePMM1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToMuonsFactor",this);
112  thePMM1->SetGuidance("Factor for positron conversion to muon pair.");
114 
115  thePH1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToHadronsFactor",this);
116  thePH1->SetGuidance("Factor for positron conversion to hadrons.");
118 
119  theNuEleCcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleCcBias",this);
120  theNuEleCcBF->SetGuidance("Neutrino-electron cc-current bias factor");
122 
123  theNuEleNcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleNcBias",this);
124  theNuEleNcBF->SetGuidance("Neutrino-electron nc-current bias factor");
126 
127  theNuNucleusBF = new G4UIcmdWithADouble("/physics_lists/em/NuNucleusBias",this);
128  theNuNucleusBF->SetGuidance("Neutrino-nucleus bias factor");
130 
131  theNuDN = new G4UIcmdWithAString("/physics_lists/em/NuDetectorName",this);
132  theNuDN->SetGuidance("Set neutrino detector name");
134 }
135 
137 {
138  delete theSynch;
139  delete theSynchAll;
140  delete theGN;
141  delete theGLENDN;
142  delete theEN;
143  delete theMUN;
144  delete theGMM;
145  delete thePMM;
146  delete thePH;
147  delete theNu;
148 
149  delete theGMM1;
150  delete thePMM1;
151  delete thePH1;
152  delete theNuEleCcBF;
153  delete theNuEleNcBF;
154  delete theNuNucleusBF;
155 
156  delete aDir1;
157  delete aDir2;
158 }
159 
161 {
162  if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
164  if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
166  if(aComm==theEN) theB->ElectroNuclear(theEN->GetNewBoolValue(aS));
167  if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
168  if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
169  if(aComm==thePMM) theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
172 
176 
180 
181  if(aComm==theNuDN) theB->SetNuDetectorName(aS);
182 }
G4UIdirectory * aDir2
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void ElectroNuclear(G4bool val)
void SetNuDetectorName(const G4String &dn)
void GammaToMuMu(G4bool val)
G4UIcmdWithABool * theSynchAll
void PositronToMuMuFactor(G4double val)
G4UIcmdWithABool * theSynch
G4EmMessenger(G4EmExtraPhysics *af)
G4UIdirectory * aDir1
void SetNuEleNcBias(G4double bf)
G4UIcmdWithADouble * thePH1
G4EmExtraPhysics * theB
G4UIcmdWithABool * thePMM
void NeutrinoActivated(G4bool val)
static G4double GetNewDoubleValue(const char *paramString)
void PositronToHadronsFactor(G4double val)
void GammaNuclear(G4bool val)
G4UIcmdWithAString * theNuDN
static G4bool GetNewBoolValue(const char *paramString)
G4UIcmdWithABool * theGLENDN
void PositronToHadrons(G4bool val)
static const G4double ab
G4UIcmdWithADouble * theNuNucleusBF
G4UIcmdWithADouble * theNuEleCcBF
void SetNewValue(G4UIcommand *aComm, G4String aS)
virtual ~G4EmMessenger()
G4UIcmdWithADouble * theGMM1
void SynchAll(G4bool val)
G4UIcmdWithABool * theNu
void Synch(G4bool val)
void LENDGammaNuclear(G4bool val)
G4UIcmdWithADouble * theNuEleNcBF
void SetNuEleCcBias(G4double bf)
G4UIcmdWithABool * thePH
G4UIcmdWithABool * theMUN
G4UIcmdWithADouble * thePMM1
G4UIcmdWithABool * theEN
void MuonNuclear(G4bool val)
void SetNuNucleusBias(G4double bf)
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:242
void PositronToMuMu(G4bool val)
void GammaToMuMuFactor(G4double val)
G4UIcmdWithABool * theGN
G4UIcmdWithABool * theGMM