[807] | 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 | // $Id: Em10PhysicsListMessenger.cc,v 1.9 2006/06/29 16:38:52 gunter Exp $ |
---|
[1337] | 28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[807] | 29 | // |
---|
| 30 | // |
---|
| 31 | // |
---|
| 32 | /////////////////////////////////////////////////////////////////////// |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | #include "Em10PhysicsListMessenger.hh" |
---|
| 37 | |
---|
| 38 | #include "Em10PhysicsList.hh" |
---|
| 39 | #include "G4UIcmdWithoutParameter.hh" |
---|
| 40 | #include "G4UIcmdWithADouble.hh" |
---|
| 41 | #include "G4UIcmdWithADoubleAndUnit.hh" |
---|
| 42 | #include "G4UIcmdWithAString.hh" |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | ////////////////////////////////////////////////////////////////////////////// |
---|
| 46 | // |
---|
| 47 | // |
---|
| 48 | |
---|
| 49 | Em10PhysicsListMessenger::Em10PhysicsListMessenger(Em10PhysicsList* List) |
---|
| 50 | :Em10List(List) |
---|
| 51 | { |
---|
| 52 | cutGCmd = new G4UIcmdWithADoubleAndUnit("/calor/cutG",this); |
---|
| 53 | cutGCmd->SetGuidance("Set cut values by RANGE for Gamma."); |
---|
| 54 | cutGCmd->SetParameterName("range",true); |
---|
| 55 | cutGCmd->SetDefaultValue(1.); |
---|
| 56 | cutGCmd->SetDefaultUnit("mm"); |
---|
| 57 | cutGCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 58 | |
---|
| 59 | cutECmd = new G4UIcmdWithADoubleAndUnit("/calor/cutE",this); |
---|
| 60 | cutECmd->SetGuidance("Set cut values by RANGE for e- e+."); |
---|
| 61 | cutECmd->SetParameterName("range",true); |
---|
| 62 | cutECmd->SetDefaultValue(1.); |
---|
| 63 | cutECmd->SetDefaultUnit("mm"); |
---|
| 64 | cutECmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 65 | |
---|
| 66 | setMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/step/setMaxStep",this); |
---|
| 67 | setMaxStepCmd->SetGuidance("Set max. step length in the detector"); |
---|
| 68 | setMaxStepCmd->SetParameterName("mxStep",true); |
---|
| 69 | setMaxStepCmd->SetDefaultUnit("mm"); |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | ElectronCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setElectronCut",this); |
---|
| 73 | ElectronCutCmd->SetGuidance("Set electron cut in mm for vertex region"); |
---|
| 74 | ElectronCutCmd->SetParameterName("ElectronCut",false,false); |
---|
| 75 | ElectronCutCmd->SetDefaultUnit("mm"); |
---|
| 76 | ElectronCutCmd->SetRange("ElectronCut>0."); |
---|
| 77 | ElectronCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | PositronCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setPositronCut",this); |
---|
| 81 | PositronCutCmd->SetGuidance("Set positron cut in mm for vertex region"); |
---|
| 82 | PositronCutCmd->SetParameterName("PositronCut",false,false); |
---|
| 83 | PositronCutCmd->SetDefaultUnit("mm"); |
---|
| 84 | PositronCutCmd->SetRange("PositronCut>0."); |
---|
| 85 | PositronCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | GammaCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setGammaCut",this); |
---|
| 89 | GammaCutCmd->SetGuidance("Set gamma cut in mm for vertex region"); |
---|
| 90 | GammaCutCmd->SetParameterName("GammaCut",false,false); |
---|
| 91 | GammaCutCmd->SetDefaultUnit("mm"); |
---|
| 92 | GammaCutCmd->SetRange("GammaCut>0."); |
---|
| 93 | GammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 94 | |
---|
| 95 | RadiatorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setRadiatorCuts",this); |
---|
| 96 | RadiatorCutCmd->SetGuidance("Set radiator cut in mm for vertex region"); |
---|
| 97 | RadiatorCutCmd->SetParameterName("RadiatorCuts",false,false); |
---|
| 98 | RadiatorCutCmd->SetDefaultUnit("mm"); |
---|
| 99 | RadiatorCutCmd->SetRange("RadiatorCuts > 0."); |
---|
| 100 | RadiatorCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 101 | |
---|
| 102 | DetectorCutCmd = new G4UIcmdWithADoubleAndUnit("/emphyslist/setDetectorCuts",this); |
---|
| 103 | DetectorCutCmd->SetGuidance("Set radiator cut in mm for vertex region"); |
---|
| 104 | DetectorCutCmd->SetParameterName("DetectorCuts",false,false); |
---|
| 105 | DetectorCutCmd->SetDefaultUnit("mm"); |
---|
| 106 | DetectorCutCmd->SetRange("DetectorCuts > 0."); |
---|
| 107 | DetectorCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 108 | |
---|
| 109 | XTRModelCmd = new G4UIcmdWithAString("/emphyslist/setXTRModel",this); |
---|
| 110 | XTRModelCmd->SetGuidance("Set XTR model"); |
---|
| 111 | XTRModelCmd->SetParameterName("XTRModel",false); |
---|
| 112 | XTRModelCmd->AvailableForStates(G4State_PreInit,G4State_Idle); |
---|
| 113 | |
---|
| 114 | } |
---|
| 115 | |
---|
| 116 | ///////////////////////////////////////////////////////////////////////////// |
---|
| 117 | |
---|
| 118 | Em10PhysicsListMessenger::~Em10PhysicsListMessenger() |
---|
| 119 | { |
---|
| 120 | delete cutGCmd; |
---|
| 121 | delete cutECmd; |
---|
| 122 | |
---|
| 123 | delete setMaxStepCmd; |
---|
| 124 | |
---|
| 125 | delete ElectronCutCmd; |
---|
| 126 | delete PositronCutCmd; |
---|
| 127 | delete GammaCutCmd; |
---|
| 128 | delete XTRModelCmd; |
---|
| 129 | } |
---|
| 130 | |
---|
| 131 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 132 | |
---|
| 133 | void Em10PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue) |
---|
| 134 | { |
---|
| 135 | if(command == cutGCmd) |
---|
| 136 | { Em10List->SetGammaCut(cutGCmd->GetNewDoubleValue(newValue));} |
---|
| 137 | if(command == cutECmd) |
---|
| 138 | { Em10List->SetElectronCut(eCmd->GetNewDoubleValue(newValue));} |
---|
| 139 | if(command == setMaxStepCmd) |
---|
| 140 | { Em10List->SetMaxStep(setMaxStepCmd->GetNewDoubleValue(newValue));} |
---|
| 141 | |
---|
| 142 | if( command == ElectronCutCmd ) |
---|
| 143 | { |
---|
| 144 | Em10List->SetRegElectronCut(ElectronCutCmd->GetNewDoubleValue(newValue)); |
---|
| 145 | } |
---|
| 146 | if( command == PositronCutCmd ) |
---|
| 147 | { |
---|
| 148 | Em10List->SetRegPositronCut(PositronCutCmd->GetNewDoubleValue(newValue)); |
---|
| 149 | } |
---|
| 150 | if( command == GammaCutCmd ) |
---|
| 151 | { |
---|
| 152 | Em10List->SetRegGammaCut(GammaCutCmd->GetNewDoubleValue(newValue)); |
---|
| 153 | } |
---|
| 154 | if( command == RadiatorCutCmd ) |
---|
| 155 | { |
---|
| 156 | Em10List->SetRadiatorCuts(); |
---|
| 157 | } |
---|
| 158 | if( command == DetectorCutCmd ) |
---|
| 159 | { |
---|
| 160 | Em10List->SetDetectorCuts(); |
---|
| 161 | } |
---|
| 162 | if( command == XTRModelCmd ) |
---|
| 163 | { |
---|
| 164 | Em10List->SetXTRModel(newValue); |
---|
| 165 | } |
---|
| 166 | } |
---|
| 167 | |
---|
| 168 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 169 | |
---|