ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EmMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 //
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 lend gamma nuclear physics.
77  theGLENDN = new G4UIcmdWithABool("/physics_lists/em/LENDGammaNuclear",this);
78  theGLENDN->SetGuidance("Switching on LEND gamma nuclear physics.");
80 
81  theEN = new G4UIcmdWithABool("/physics_lists/em/ElectroNuclear",this);
82  theEN->SetGuidance("Switching on e+- nuclear physics.");
84 
85  // command for muon nuclear physics.
86  theMUN = new G4UIcmdWithABool("/physics_lists/em/MuonNuclear",this);
87  theMUN->SetGuidance("Switching on muon nuclear physics.");
89 
90  theGMM = new G4UIcmdWithABool("/physics_lists/em/GammaToMuons",this);
91  theGMM->SetGuidance("Switching on gamma conversion to muon pair.");
93 
94  thePMM = new G4UIcmdWithABool("/physics_lists/em/PositronToMuons",this);
95  thePMM->SetGuidance("Switching on positron conversion to muon pair.");
97 
98  thePH = new G4UIcmdWithABool("/physics_lists/em/PositronToHadrons",this);
99  thePH->SetGuidance("Switching on positron conversion to hadrons.");
101 
102  theNu = new G4UIcmdWithABool("/physics_lists/em/NeutrinoActivation",this);
103  theNu->SetGuidance("Activation of neutrino processes");
105 
106  theNuETX = new G4UIcmdWithABool("/physics_lists/em/NuETotXscActivation",this);
107  theNuETX->SetGuidance("Activation of neutrino processes");
109 
110  theGMM1 = new G4UIcmdWithADouble("/physics_lists/em/GammaToMuonsFactor",this);
111  theGMM1->SetGuidance("Factor for gamma conversion to muon pair.");
113 
114  thePMM1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToMuonsFactor",this);
115  thePMM1->SetGuidance("Factor for positron conversion to muon pair.");
117 
118  thePH1 = new G4UIcmdWithADouble("/physics_lists/em/PositronToHadronsFactor",this);
119  thePH1->SetGuidance("Factor for positron conversion to hadrons.");
121 
122  theNuEleCcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleCcBias",this);
123  theNuEleCcBF->SetGuidance("Neutrino-electron cc-current bias factor");
125 
126  theNuEleNcBF = new G4UIcmdWithADouble("/physics_lists/em/NuEleNcBias",this);
127  theNuEleNcBF->SetGuidance("Neutrino-electron nc-current bias factor");
129 
130  theNuNucleusBF = new G4UIcmdWithADouble("/physics_lists/em/NuNucleusBias",this);
131  theNuNucleusBF->SetGuidance("Neutrino-nucleus bias factor");
133 
134  theNuDN = new G4UIcmdWithAString("/physics_lists/em/NuDetectorName",this);
135  theNuDN->SetGuidance("Set neutrino detector name");
137 }
138 
140 {
141  delete theSynch;
142  delete theSynchAll;
143  delete theGN;
144  delete theGLENDN;
145  delete theEN;
146  delete theMUN;
147  delete theGMM;
148  delete thePMM;
149  delete thePH;
150  delete theNu;
151  delete theNuETX;
152 
153  delete theGMM1;
154  delete thePMM1;
155  delete thePH1;
156  delete theNuEleCcBF;
157  delete theNuEleNcBF;
158  delete theNuNucleusBF;
159  delete theNuDN;
160 
161  delete aDir1;
162  delete aDir2;
163 }
164 
166 {
167  if(aComm==theSynch) theB->Synch(theSynch->GetNewBoolValue(aS));
169  if(aComm==theGN) theB->GammaNuclear(theGN->GetNewBoolValue(aS));
171  if(aComm==theEN) theB->ElectroNuclear(theEN->GetNewBoolValue(aS));
172  if(aComm==theMUN) theB->MuonNuclear(theMUN->GetNewBoolValue(aS));
173  if(aComm==theGMM) theB->GammaToMuMu(theGMM->GetNewBoolValue(aS));
174  if(aComm==thePMM) theB->PositronToMuMu(thePMM->GetNewBoolValue(aS));
178 
182 
186 
187  if(aComm==theNuDN) theB->SetNuDetectorName(aS);
188 }