Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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$
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 :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);
57  cutGCmd->SetDefaultValue(1.);
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);
64  cutECmd->SetDefaultValue(1.);
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);
71  setMaxStepCmd->SetDefaultUnit("mm");
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);
77  ElectronCutCmd->SetDefaultUnit("mm");
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);
85  PositronCutCmd->SetDefaultUnit("mm");
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);
93  GammaCutCmd->SetDefaultUnit("mm");
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);
100  RadiatorCutCmd->SetDefaultUnit("mm");
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);
107  DetectorCutCmd->SetDefaultUnit("mm");
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)
138  { Em10List->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));}
139  if(command == cutECmd)
140  { Em10List->SetElectronCut(eCmd->GetNewDoubleValue(newValue));}
141  if(command == setMaxStepCmd)
142  { Em10List->SetMaxStep(setMaxStepCmd->GetNewDoubleValue(newValue));}
143 
144  if( command == ElectronCutCmd )
145  {
146  Em10List->SetRegElectronCut(ElectronCutCmd->GetNewDoubleValue(newValue));
147  }
148  if( command == PositronCutCmd )
149  {
150  Em10List->SetRegPositronCut(PositronCutCmd->GetNewDoubleValue(newValue));
151  }
152  if( command == GammaCutCmd )
153  {
154  Em10List->SetRegGammaCut(GammaCutCmd->GetNewDoubleValue(newValue));
155  }
156  if( command == RadiatorCutCmd )
157  {
158  Em10List->SetRadiatorCuts();
159  }
160  if( command == DetectorCutCmd )
161  {
162  Em10List->SetDetectorCuts();
163  }
164  if( command == XTRModelCmd )
165  {
166  Em10List->SetXTRModel(newValue);
167  }
168 }
169 
170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
171