Warning, file /geant4/examples/advanced/dna/moleculardna/src/DamageModelMessenger.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "DamageModelMessenger.hh"
0028
0029 #include "DamageModel.hh"
0030
0031 #include "G4UIcmdWith3VectorAndUnit.hh"
0032 #include "G4UIcmdWithABool.hh"
0033 #include "G4UIcmdWithADouble.hh"
0034 #include "G4UIcmdWithADoubleAndUnit.hh"
0035 #include "G4UIcmdWithAString.hh"
0036 #include "G4UIcmdWithAnInteger.hh"
0037 #include "G4UIcmdWithoutParameter.hh"
0038 #include "G4UIdirectory.hh"
0039
0040
0041
0042 DamageModelMessenger::DamageModelMessenger(DamageModel* damageModel)
0043 : fpDamageModel(damageModel),
0044 fpDamageDirectory(nullptr),
0045 fpIntEnergyLower(nullptr),
0046 fpIntEnergyUpper(nullptr),
0047 fpOHBaseChance(nullptr),
0048 fpOHStrandChance(nullptr),
0049 fpOHInductionChance(nullptr),
0050 fpHBaseChance(nullptr),
0051 fpHStrandChance(nullptr),
0052 fpHInductionChance(nullptr),
0053 fpEaqBaseChance(nullptr),
0054 fpEaqStrandChance(nullptr),
0055 fpEaqInductionChance(nullptr)
0056 {
0057 fpDamageDirectory = new G4UIdirectory("/dnadamage/");
0058 fpDamageDirectory->SetGuidance("Damage Model Parameters");
0059
0060 fpIntEnergyLower = new G4UIcmdWithADoubleAndUnit("/dnadamage/directDamageLower", this);
0061 fpIntEnergyLower->SetGuidance("Minimum Energy required for an SSB");
0062 fpIntEnergyLower->SetGuidance("Chance grows linearly until it reaches the upper value");
0063 fpIntEnergyLower->SetParameterName("Energy", false);
0064
0065 fpIntEnergyUpper = new G4UIcmdWithADoubleAndUnit("/dnadamage/directDamageUpper", this);
0066 fpIntEnergyUpper->SetGuidance("Energy required for an SSB to definitely occur");
0067 fpIntEnergyUpper->SetParameterName("Energy", false);
0068
0069
0070
0071 fpOHBaseChance = new G4UIcmdWithADouble("/dnadamage/indirectOHBaseChance", this);
0072 fpOHBaseChance->SetGuidance("Chance [0,1] of a OH damaging a base");
0073 fpOHBaseChance->SetParameterName("Energy", false);
0074
0075 fpOHStrandChance = new G4UIcmdWithADouble("/dnadamage/indirectOHStrandChance", this);
0076 fpOHStrandChance->SetGuidance("Chance [0,1] of a OH damaging sugar-phosphate");
0077 fpOHStrandChance->SetParameterName("Energy", false);
0078
0079 fpOHInductionChance = new G4UIcmdWithADouble("/dnadamage/inductionOHChance", this);
0080 fpOHInductionChance->SetGuidance("Chance [0,1] of a Base + OH -> strand break");
0081 fpOHInductionChance->SetParameterName("Energy", false);
0082
0083
0084
0085 fpHBaseChance = new G4UIcmdWithADouble("/dnadamage/indirectHBaseChance", this);
0086 fpHBaseChance->SetGuidance("Chance [0,1] of a H damaging a base");
0087 fpHBaseChance->SetParameterName("Energy", false);
0088
0089 fpHStrandChance = new G4UIcmdWithADouble("/dnadamage/indirectHStrandChance", this);
0090 fpHStrandChance->SetGuidance("Chance [0,1] of a H damaging sugar-phosphate");
0091 fpHStrandChance->SetParameterName("Energy", false);
0092
0093 fpHInductionChance = new G4UIcmdWithADouble("/dnadamage/inductionHChance", this);
0094 fpHInductionChance->SetGuidance("Chance [0,1] of a Base + H -> strand break");
0095 fpHInductionChance->SetParameterName("Energy", false);
0096
0097
0098
0099 fpEaqBaseChance = new G4UIcmdWithADouble("/dnadamage/indirectEaqBaseChance", this);
0100 fpEaqBaseChance->SetGuidance("Chance [0,1] of a Eaq damaging a base");
0101 fpEaqBaseChance->SetParameterName("Energy", false);
0102
0103 fpEaqStrandChance = new G4UIcmdWithADouble("/dnadamage/indirectEaqStrandChance", this);
0104 fpEaqStrandChance->SetGuidance("Chance [0,1] of a Eaq damaging sugar-phosphate");
0105 fpEaqStrandChance->SetParameterName("Energy", false);
0106
0107 fpEaqInductionChance = new G4UIcmdWithADouble("/dnadamage/inductionEaqChance", this);
0108 fpEaqInductionChance->SetGuidance("Chance [0,1] of a Base + Eaq -> strand break");
0109 fpEaqInductionChance->SetParameterName("Energy", false);
0110 }
0111
0112
0113
0114 DamageModelMessenger::~DamageModelMessenger()
0115 {
0116
0117 delete fpOHStrandChance;
0118 delete fpOHInductionChance;
0119 delete fpOHBaseChance;
0120 delete fpHStrandChance;
0121 delete fpHInductionChance;
0122 delete fpHBaseChance;
0123 delete fpEaqStrandChance;
0124 delete fpEaqInductionChance;
0125 delete fpEaqBaseChance;
0126 delete fpIntEnergyLower;
0127 delete fpIntEnergyUpper;
0128 delete fpIntRangeDirect;
0129 delete fpDamageDirectory;
0130 }
0131
0132
0133
0134 void DamageModelMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
0135 {
0136 if (command == fpIntEnergyUpper) {
0137 fpDamageModel->SetDirectDamageUpper(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(newValue));
0138 }
0139 else if (command == fpIntEnergyLower) {
0140 fpDamageModel->SetDirectDamageLower(G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(newValue));
0141 }
0142 else if (command == fpOHBaseChance) {
0143 fpDamageModel->SetIndirectOHBaseChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0144 }
0145 else if (command == fpOHStrandChance) {
0146 fpDamageModel->SetIndirectOHStrandChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0147 }
0148 else if (command == fpOHInductionChance) {
0149 fpDamageModel->SetInductionOHChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0150 }
0151 else if (command == fpHBaseChance) {
0152 fpDamageModel->SetIndirectHBaseChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0153 }
0154 else if (command == fpHStrandChance) {
0155 fpDamageModel->SetIndirectHStrandChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0156 }
0157 else if (command == fpHInductionChance) {
0158 fpDamageModel->SetInductionHChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0159 }
0160 else if (command == fpEaqBaseChance) {
0161 fpDamageModel->SetIndirectEaqBaseChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0162 }
0163 else if (command == fpEaqStrandChance) {
0164 fpDamageModel->SetIndirectEaqStrandChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0165 }
0166 else if (command == fpEaqInductionChance) {
0167 fpDamageModel->SetInductionEaqChance(G4UIcmdWithADouble::GetNewDoubleValue(newValue));
0168 }
0169 }
0170