Geant4  10.03
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 // $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 muon nuclear physics.
78  theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
79  theMUN->SetGuidance("Switching on muon nuclear physics.");
81 
82  theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
83  theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
85 
86  thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
87  thePMM->SetGuidance("Switching on positron conversion to muon pair.");
89 
90  thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
91  thePH->SetGuidance("Switching on positron conversion to hadrons.");
93 }
94 
96 {
97  delete theSynch;
98  delete theSynchAll;
99  delete theGN;
100  delete theMUN;
101  delete theGMM;
102  delete thePMM;
103  delete thePH;
104  delete aDir1;
105  delete aDir2;
106 }
107 
109 {
110  if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
112  if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
113  if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
114  if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
115  if(aComm==thePMM) theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
117 }
void SetNewValue(G4UIcommand *aComm, G4String aS)
void MuonNuclear(G4bool val)
G4UIcmdWithABool * theGMM
G4UIcmdWithABool * theMUN
G4UIcmdWithABool * thePH
G4UIdirectory * aDir2
G4UIcmdWithABool * theSynch
static G4bool GetNewBoolValue(const char *paramString)
virtual ~G4EmMessenger()
G4UIdirectory * aDir1
G4UIcmdWithABool * thePMM
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void GammaToMuMu(G4bool val)
G4EmMessenger(G4EmExtraPhysics *af)
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void PositronToMuMu(G4bool val)
static const G4double ab
void SynchAll(G4bool val)
void PositronToHadrons(G4bool val)
G4UIcmdWithABool * theGN
void GammaNuclear(G4bool val)
void Synch(G4bool val)
G4EmExtraPhysics * theB
G4UIcmdWithABool * theSynchAll