Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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$
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 
45 {
46  theB = ab;
47  aDir1 = new G4UIdirectory("/physics_engine/");
48  aDir1->SetGuidance("commands related to the physics simulation engine.");
49 
50  // general stuff.
51  aDir2 = new G4UIdirectory("/physics_engine/tailor/");
52  aDir2->SetGuidance("tailoring the processes");
53 
54  // command for synchrotron radiation.
55  theSynch = new G4UIcmdWithAString("/physics_engine/tailor/SyncRadiation",this);
56  theSynch->SetGuidance("Switching on/off synchrotron radiation.");
57  theSynch->SetParameterName("status",false);
58  theSynch->SetCandidates("on off");
59  theSynch->SetDefaultValue("off");
61 
62  // command for gamma nuclear physics.
63  theGN = new G4UIcmdWithAString("/physics_engine/tailor/GammaNuclear",this);
64  theGN->SetGuidance("Switching on gamma nuclear physics.");
65  theGN->SetParameterName("status",false);
66  theGN->SetCandidates("on off");
67  theGN->SetDefaultValue("on");
69 
70  // command for muon nuclear physics.
71  theMUN = new G4UIcmdWithAString("/physics_engine/tailor/MuonNuclear",this);
72  theMUN->SetGuidance("Switching on muon nuclear physics.");
73  theMUN->SetParameterName("status",false);
74  theMUN->SetCandidates("on off");
75  theMUN->SetDefaultValue("off");
77 }
78 
80 {
81  delete theSynch;
82  delete theGN;
83  delete theMUN;
84  delete aDir1;
85  delete aDir2;
86 }
87 
89 {
90  if(aComm==theSynch) theB->Synch(aS);
91  if(aComm==theGN) theB->GammaNuclear(aS);
92  if(aComm==theMUN) theB->MuonNuclear(aS);
93 }