Geant4  10.01.p01
Em10PhysicsListMessenger.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 //
28 //
29 //
30 // $Id: Em10PhysicsListMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
31 //
32 //
33 //
35 
36 
37 
39 
40 #include "Em10PhysicsList.hh"
42 #include "G4UIcmdWithADouble.hh"
44 #include "G4UIcmdWithAString.hh"
45 
46 
48 //
49 //
50 
52 :G4UImessenger(),Em10List(List)
53 {
54  cutGCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutG",this);
55  cutGCmd->SetGuidance("Set cut values by RANGE for Gamma.");
56  cutGCmd->SetParameterName("range",true);
58  cutGCmd->SetDefaultUnit("mm");
60 
61  cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this);
62  cutECmd->SetGuidance("Set cut values by RANGE for e- e+.");
63  cutECmd->SetParameterName("range",true);
65  cutECmd->SetDefaultUnit("mm");
67 
68  setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this);
69  setMaxStepCmd->SetGuidance("Set max. step length in the detector");
70  setMaxStepCmd->SetParameterName("mxStep",true);
72 
73 
74  ElectronCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setElectronCut",this);
75  ElectronCutCmd->SetGuidance("Set electron cut in mm for vertex region");
76  ElectronCutCmd->SetParameterName("ElectronCut",false,false);
78  ElectronCutCmd->SetRange("ElectronCut>0.");
80 
81 
82  PositronCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setPositronCut",this);
83  PositronCutCmd->SetGuidance("Set positron cut in mm for vertex region");
84  PositronCutCmd->SetParameterName("PositronCut",false,false);
86  PositronCutCmd->SetRange("PositronCut>0.");
88 
89 
90  GammaCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setGammaCut",this);
91  GammaCutCmd->SetGuidance("Set gamma cut in mm for vertex region");
92  GammaCutCmd->SetParameterName("GammaCut",false,false);
94  GammaCutCmd->SetRange("GammaCut>0.");
96 
97  RadiatorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setRadiatorCuts",this);
98  RadiatorCutCmd->SetGuidance("Set radiator cut in mm for vertex region");
99  RadiatorCutCmd->SetParameterName("RadiatorCuts",false,false);
101  RadiatorCutCmd->SetRange("RadiatorCuts > 0.");
103 
104  DetectorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setDetectorCuts",this);
105  DetectorCutCmd->SetGuidance("Set radiator cut in mm for vertex region");
106  DetectorCutCmd->SetParameterName("DetectorCuts",false,false);
108  DetectorCutCmd->SetRange("DetectorCuts > 0.");
110 
111  XTRModelCmd = new G4UIcmdWithAString("/emphyslist/setXTRModel",this);
112  XTRModelCmd->SetGuidance("Set XTR model");
113  XTRModelCmd->SetParameterName("XTRModel",false);
115 
116 }
117 
119 
121 {
122  delete cutGCmd;
123  delete cutECmd;
124 
125  delete setMaxStepCmd;
126 
127  delete ElectronCutCmd;
128  delete PositronCutCmd;
129  delete GammaCutCmd;
130  delete XTRModelCmd;
131 }
132 
134 
136 {
137  if(command == cutGCmd)
139  if(command == cutECmd)
141  if(command == setMaxStepCmd)
143 
144  if( command == ElectronCutCmd )
145  {
147  }
148  if( command == PositronCutCmd )
149  {
151  }
152  if( command == GammaCutCmd )
153  {
155  }
156  if( command == RadiatorCutCmd )
157  {
159  }
160  if( command == DetectorCutCmd )
161  {
163  }
164  if( command == XTRModelCmd )
165  {
166  Em10List->SetXTRModel(newValue);
167  }
168 }
169 
170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
171 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithADoubleAndUnit * ElectronCutCmd
G4UIcmdWithADoubleAndUnit * DetectorCutCmd
void SetMaxStep(G4double)
static G4double GetNewDoubleValue(const char *paramString)
void SetNewValue(G4UIcommand *, G4String)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * cutGCmd
G4UIcmdWithADoubleAndUnit * setMaxStepCmd
void SetGammaCut(G4double)
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetRegPositronCut(G4double cut)
G4UIcmdWithADoubleAndUnit * GammaCutCmd
G4UIcmdWithADoubleAndUnit * cutECmd
Definition of the Em10PhysicsListMessenger class.
void SetDefaultUnit(const char *defUnit)
void SetElectronCut(G4double)
Em10PhysicsListMessenger(Em10PhysicsList *)
G4UIcmdWithADoubleAndUnit * eCmd
void SetRegElectronCut(G4double cut)
G4UIcmdWithADoubleAndUnit * RadiatorCutCmd
G4UIcmdWithADoubleAndUnit * PositronCutCmd
Definition of the Em10PhysicsList class.
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetRegGammaCut(G4double cut)
void SetXTRModel(G4String m)