Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 #include "DamageModelMessenger.hh" 28 29 #include "DamageModel.hh" 30 31 #include "G4UIcmdWith3VectorAndUnit.hh" 32 #include "G4UIcmdWithABool.hh" 33 #include "G4UIcmdWithADouble.hh" 34 #include "G4UIcmdWithADoubleAndUnit.hh" 35 #include "G4UIcmdWithAString.hh" 36 #include "G4UIcmdWithAnInteger.hh" 37 #include "G4UIcmdWithoutParameter.hh" 38 #include "G4UIdirectory.hh" 39 40 //....oooOO0OOooo........oooOO0OOooo........oo 41 42 DamageModelMessenger::DamageModelMessenger(Dam 43 : fpDamageModel(damageModel), 44 fpDamageDirectory(nullptr), 45 fpIntEnergyLower(nullptr), 46 fpIntEnergyUpper(nullptr), 47 fpOHBaseChance(nullptr), 48 fpOHStrandChance(nullptr), 49 fpOHInductionChance(nullptr), 50 fpHBaseChance(nullptr), 51 fpHStrandChance(nullptr), 52 fpHInductionChance(nullptr), 53 fpEaqBaseChance(nullptr), 54 fpEaqStrandChance(nullptr), 55 fpEaqInductionChance(nullptr) 56 { 57 fpDamageDirectory = new G4UIdirectory("/dnad 58 fpDamageDirectory->SetGuidance("Damage Model 59 60 fpIntEnergyLower = new G4UIcmdWithADoubleAnd 61 fpIntEnergyLower->SetGuidance("Minimum Energ 62 fpIntEnergyLower->SetGuidance("Chance grows 63 fpIntEnergyLower->SetParameterName("Energy", 64 65 fpIntEnergyUpper = new G4UIcmdWithADoubleAnd 66 fpIntEnergyUpper->SetGuidance("Energy requir 67 fpIntEnergyUpper->SetParameterName("Energy", 68 69 // OH 70 71 fpOHBaseChance = new G4UIcmdWithADouble("/dn 72 fpOHBaseChance->SetGuidance("Chance [0,1] of 73 fpOHBaseChance->SetParameterName("Energy", f 74 75 fpOHStrandChance = new G4UIcmdWithADouble("/ 76 fpOHStrandChance->SetGuidance("Chance [0,1] 77 fpOHStrandChance->SetParameterName("Energy", 78 79 fpOHInductionChance = new G4UIcmdWithADouble 80 fpOHInductionChance->SetGuidance("Chance [0, 81 fpOHInductionChance->SetParameterName("Energ 82 83 // H 84 85 fpHBaseChance = new G4UIcmdWithADouble("/dna 86 fpHBaseChance->SetGuidance("Chance [0,1] of 87 fpHBaseChance->SetParameterName("Energy", fa 88 89 fpHStrandChance = new G4UIcmdWithADouble("/d 90 fpHStrandChance->SetGuidance("Chance [0,1] o 91 fpHStrandChance->SetParameterName("Energy", 92 93 fpHInductionChance = new G4UIcmdWithADouble( 94 fpHInductionChance->SetGuidance("Chance [0,1 95 fpHInductionChance->SetParameterName("Energy 96 97 // E_aq 98 99 fpEaqBaseChance = new G4UIcmdWithADouble("/d 100 fpEaqBaseChance->SetGuidance("Chance [0,1] o 101 fpEaqBaseChance->SetParameterName("Energy", 102 103 fpEaqStrandChance = new G4UIcmdWithADouble(" 104 fpEaqStrandChance->SetGuidance("Chance [0,1] 105 fpEaqStrandChance->SetParameterName("Energy" 106 107 fpEaqInductionChance = new G4UIcmdWithADoubl 108 fpEaqInductionChance->SetGuidance("Chance [0 109 fpEaqInductionChance->SetParameterName("Ener 110 } 111 112 //....oooOO0OOooo........oooOO0OOooo........oo 113 114 DamageModelMessenger::~DamageModelMessenger() 115 { 116 // interaction model 117 delete fpOHStrandChance; 118 delete fpOHInductionChance; 119 delete fpOHBaseChance; 120 delete fpHStrandChance; 121 delete fpHInductionChance; 122 delete fpHBaseChance; 123 delete fpEaqStrandChance; 124 delete fpEaqInductionChance; 125 delete fpEaqBaseChance; 126 delete fpIntEnergyLower; 127 delete fpIntEnergyUpper; 128 delete fpIntRangeDirect; 129 delete fpDamageDirectory; 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oo 133 134 void DamageModelMessenger::SetNewValue(G4UIcom 135 { 136 if (command == fpIntEnergyUpper) { 137 fpDamageModel->SetDirectDamageUpper(G4UIcm 138 } 139 else if (command == fpIntEnergyLower) { 140 fpDamageModel->SetDirectDamageLower(G4UIcm 141 } 142 else if (command == fpOHBaseChance) { 143 fpDamageModel->SetIndirectOHBaseChance(G4U 144 } 145 else if (command == fpOHStrandChance) { 146 fpDamageModel->SetIndirectOHStrandChance(G 147 } 148 else if (command == fpOHInductionChance) { 149 fpDamageModel->SetInductionOHChance(G4UIcm 150 } 151 else if (command == fpHBaseChance) { 152 fpDamageModel->SetIndirectHBaseChance(G4UI 153 } 154 else if (command == fpHStrandChance) { 155 fpDamageModel->SetIndirectHStrandChance(G4 156 } 157 else if (command == fpHInductionChance) { 158 fpDamageModel->SetInductionHChance(G4UIcmd 159 } 160 else if (command == fpEaqBaseChance) { 161 fpDamageModel->SetIndirectEaqBaseChance(G4 162 } 163 else if (command == fpEaqStrandChance) { 164 fpDamageModel->SetIndirectEaqStrandChance( 165 } 166 else if (command == fpEaqInductionChance) { 167 fpDamageModel->SetInductionEaqChance(G4UIc 168 } 169 } 170 //....oooOO0OOooo........oooOO0OOooo........oo 171