Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // Authors: S. Meylan and C. Villagrasa (IRSN, 26 // Authors: S. Meylan and C. Villagrasa (IRSN, France) 27 // Models come from 27 // Models come from 28 // M. Bug et al, Rad. Phys and Chem. 130, 459- 28 // M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017) 29 // 29 // 30 30 31 #include "G4DNAPTBAugerModel.hh" 31 #include "G4DNAPTBAugerModel.hh" 32 #include "G4PhysicalConstants.hh" 32 #include "G4PhysicalConstants.hh" 33 #include "G4SystemOfUnits.hh" 33 #include "G4SystemOfUnits.hh" 34 #include "Randomize.hh" 34 #include "Randomize.hh" 35 #include "G4Electron.hh" 35 #include "G4Electron.hh" 36 36 37 #include "G4Material.hh" 37 #include "G4Material.hh" 38 38 39 using namespace std; 39 using namespace std; 40 40 41 G4DNAPTBAugerModel::G4DNAPTBAugerModel(const G 41 G4DNAPTBAugerModel::G4DNAPTBAugerModel(const G4String& modelAugerName): modelName(modelAugerName) 42 { 42 { 43 verboseLevel = 0; << 44 minElectronEnergy = 0.0; << 45 // To inform the user that the Auger model 43 // To inform the user that the Auger model is enabled 46 G4cout << modelName <<" is constructed" << 44 G4cout << modelName <<" is constructed" << G4endl; 47 } 45 } 48 46 49 G4DNAPTBAugerModel::~G4DNAPTBAugerModel() 47 G4DNAPTBAugerModel::~G4DNAPTBAugerModel() 50 { 48 { 51 if( verboseLevel>0 ) G4cout << modelName < 49 if( verboseLevel>0 ) G4cout << modelName <<" is deleted" << G4endl; 52 } 50 } 53 51 54 void G4DNAPTBAugerModel::Initialise() 52 void G4DNAPTBAugerModel::Initialise() 55 { 53 { 56 verboseLevel = 0; 54 verboseLevel = 0; 57 55 58 if( verboseLevel>0 ) 56 if( verboseLevel>0 ) 59 { 57 { 60 G4cout << "PTB Auger model is initiali 58 G4cout << "PTB Auger model is initialised " << G4endl; 61 } 59 } 62 60 63 } 61 } 64 62 65 //....oooOO0OOooo........oooOO0OOooo........oo 63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 66 64 67 void G4DNAPTBAugerModel::ComputeAugerEffect(st 65 void G4DNAPTBAugerModel::ComputeAugerEffect(std::vector<G4DynamicParticle*>* fvect, const G4String& materialNameIni, G4double bindingEnergy) 68 { 66 { 69 // Rename material if modified NIST materi 67 // Rename material if modified NIST material 70 // This is needed when material is obtaine 68 // This is needed when material is obtained from G4MaterialCutsCouple 71 G4String materialName = materialNameIni; 69 G4String materialName = materialNameIni; 72 if(materialName.find("_MODIFIED") != 0u){ << 70 if(materialName.find("_MODIFIED")){ 73 materialName = materialName.substr(0,m 71 materialName = materialName.substr(0,materialName.size()-9); 74 } 72 } 75 73 76 // check if there is a k-shell ionisation 74 // check if there is a k-shell ionisation and find the ionised atom 77 G4int atomId(0); 75 G4int atomId(0); 78 76 79 atomId = DetermineIonisedAtom(atomId, mate 77 atomId = DetermineIonisedAtom(atomId, materialName, bindingEnergy); 80 78 81 if(atomId!=0) 79 if(atomId!=0) 82 { 80 { 83 G4double kineticEnergy = CalculAugerEn 81 G4double kineticEnergy = CalculAugerEnergyFor(atomId); 84 82 85 if(kineticEnergy<0) 83 if(kineticEnergy<0) 86 { 84 { 87 G4cerr<<"************************* 85 G4cerr<<"**************************"<<G4endl; 88 G4cerr<<"FatalError. Auger kinetic 86 G4cerr<<"FatalError. Auger kineticEnergy: "<<kineticEnergy<<G4endl; 89 exit(EXIT_FAILURE); 87 exit(EXIT_FAILURE); 90 } 88 } 91 89 92 if(atomId==1 || atomId==2 || atomId==3 90 if(atomId==1 || atomId==2 || atomId==3) 93 { 91 { 94 GenerateAugerWithRandomDirection(f 92 GenerateAugerWithRandomDirection(fvect, kineticEnergy); 95 } 93 } 96 else if(atomId==4) 94 else if(atomId==4) 97 { 95 { 98 GenerateAugerWithRandomDirection(f 96 GenerateAugerWithRandomDirection(fvect, kineticEnergy); 99 GenerateAugerWithRandomDirection(f 97 GenerateAugerWithRandomDirection(fvect, kineticEnergy); 100 } 98 } 101 } 99 } 102 } 100 } 103 101 104 //....oooOO0OOooo........oooOO0OOooo........oo 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 103 106 G4int G4DNAPTBAugerModel::DetermineIonisedAtom 104 G4int G4DNAPTBAugerModel::DetermineIonisedAtom(G4int atomId, const G4String& materialName, G4double bindingEnergy) 107 { 105 { 108 if(materialName=="THF" || materialName=="b 106 if(materialName=="THF" || materialName=="backbone_THF"){ 109 if(bindingEnergy==305.07){ 107 if(bindingEnergy==305.07){ 110 atomId=1; //"carbon"; 108 atomId=1; //"carbon"; 111 } 109 } 112 else if(bindingEnergy==557.94){ 110 else if(bindingEnergy==557.94){ 113 atomId=2; //"oxygen"; 111 atomId=2; //"oxygen"; 114 } 112 } 115 } 113 } 116 else if(materialName=="PY" || materialName 114 else if(materialName=="PY" || materialName=="PU" 117 || materialName=="cytosine_PY" || 115 || materialName=="cytosine_PY" || materialName=="thymine_PY" 118 || materialName=="adenine_PU" || m 116 || materialName=="adenine_PU" || materialName=="guanine_PU" 119 ) 117 ) 120 { 118 { 121 if(bindingEnergy==307.52){ 119 if(bindingEnergy==307.52){ 122 atomId=1; //"carbon"; 120 atomId=1; //"carbon"; 123 } 121 } 124 else if(bindingEnergy==423.44){ 122 else if(bindingEnergy==423.44){ 125 atomId=4; //"nitrogen"; 123 atomId=4; //"nitrogen"; 126 } 124 } 127 } 125 } 128 else if(materialName=="TMP"|| materialName 126 else if(materialName=="TMP"|| materialName=="backbone_TMP"){ 129 if(bindingEnergy==209.59 || bindingEne 127 if(bindingEnergy==209.59 || bindingEnergy==152.4) 130 atomId=3; //"carbonTMP"; 128 atomId=3; //"carbonTMP"; 131 } 129 } 132 130 133 return atomId; 131 return atomId; 134 } 132 } 135 133 136 //....oooOO0OOooo........oooOO0OOooo........oo 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 137 135 138 G4double G4DNAPTBAugerModel::CalculAugerEnergy 136 G4double G4DNAPTBAugerModel::CalculAugerEnergyFor(G4int atomId) 139 { 137 { 140 G4double kineticEnergy; 138 G4double kineticEnergy; 141 139 142 if(atomId==2) // oxygen 140 if(atomId==2) // oxygen 143 { 141 { 144 kineticEnergy = 495*eV; 142 kineticEnergy = 495*eV; 145 } 143 } 146 else 144 else 147 { 145 { 148 G4double f1, f2, f3, g1, g2, Y; 146 G4double f1, f2, f3, g1, g2, Y; 149 147 150 Y = G4UniformRand(); 148 Y = G4UniformRand(); 151 149 152 if(atomId == 1){ // carbon 150 if(atomId == 1){ // carbon 153 f1 = -7.331e-2; 151 f1 = -7.331e-2; 154 f2 = -3.306e-5; 152 f2 = -3.306e-5; 155 f3 = 2.433e0; 153 f3 = 2.433e0; 156 g1 = 4.838e-1; 154 g1 = 4.838e-1; 157 g2 = 3.886e0; 155 g2 = 3.886e0; 158 } 156 } 159 else if(atomId == 4){ // nitrogen 157 else if(atomId == 4){ // nitrogen 160 f1 = -7.518e-2; 158 f1 = -7.518e-2; 161 f2 = 1.178e-4; 159 f2 = 1.178e-4; 162 f3 = 2.600e0; 160 f3 = 2.600e0; 163 g1 = 4.639e-1; 161 g1 = 4.639e-1; 164 g2 = 3.770e0; 162 g2 = 3.770e0; 165 } 163 } 166 else// if(atomId == 3) // carbon_TMP 164 else// if(atomId == 3) // carbon_TMP 167 { 165 { 168 f1 = -5.700e-2; 166 f1 = -5.700e-2; 169 f2 = 1.200e-4; 167 f2 = 1.200e-4; 170 f3 = 2.425e0; 168 f3 = 2.425e0; 171 g1 = 5.200e-1; 169 g1 = 5.200e-1; 172 g2 = 2.560e0; 170 g2 = 2.560e0; 173 } 171 } 174 172 175 kineticEnergy = pow(10, f1*pow( abs( l 173 kineticEnergy = pow(10, f1*pow( abs( log10(Y) ) , g1) + f2*pow( abs( log10(Y) ) , g2) + f3 )*eV; 176 } 174 } 177 175 178 return kineticEnergy; 176 return kineticEnergy; 179 } 177 } 180 178 181 //....oooOO0OOooo........oooOO0OOooo........oo 179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 182 180 183 void G4DNAPTBAugerModel::SetCutForAugerElectro 181 void G4DNAPTBAugerModel::SetCutForAugerElectrons(G4double cut) 184 { 182 { 185 minElectronEnergy = cut; 183 minElectronEnergy = cut; 186 } 184 } 187 185 188 //....oooOO0OOooo........oooOO0OOooo........oo 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 189 187 190 void G4DNAPTBAugerModel::GenerateAugerWithRand 188 void G4DNAPTBAugerModel::GenerateAugerWithRandomDirection(std::vector<G4DynamicParticle*>* fvect, G4double kineticEnergy) 191 { 189 { 192 // Isotropic angular distribution for th 190 // Isotropic angular distribution for the outcoming e- 193 G4double newcosTh = 1.-2.*G4UniformRand( 191 G4double newcosTh = 1.-2.*G4UniformRand(); 194 G4double newsinTh = std::sqrt(1.-newcos 192 G4double newsinTh = std::sqrt(1.-newcosTh*newcosTh); 195 G4double newPhi = twopi*G4UniformRand(); 193 G4double newPhi = twopi*G4UniformRand(); 196 194 197 G4double xDir = newsinTh*std::sin(newPh 195 G4double xDir = newsinTh*std::sin(newPhi); 198 G4double yDir = newsinTh*std::cos(newPhi 196 G4double yDir = newsinTh*std::cos(newPhi); 199 G4double zDir = newcosTh; 197 G4double zDir = newcosTh; 200 198 201 G4ThreeVector ElectronDirection(xDir,yDi 199 G4ThreeVector ElectronDirection(xDir,yDir,zDir); 202 200 203 // generation of new particle 201 // generation of new particle 204 auto dp = new G4DynamicParticle (G4Elec << 202 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(), ElectronDirection, kineticEnergy) ; 205 fvect->push_back(dp); 203 fvect->push_back(dp); 206 } 204 } 207 205