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.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/dna/dsbandrepair/src/UserChoosingDNASolvationModel.cc (Version 11.3.0) and /examples/advanced/dna/dsbandrepair/src/UserChoosingDNASolvationModel.cc (Version 2.0)


  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 /// \file UserChoosingDNASolvationModel.cc        
 28 /// \brief Implementation of the UserChoosingD    
 29                                                   
 30 #include "UserChoosingDNASolvationModel.hh"       
 31 #include "G4PhysicalConstants.hh"                 
 32 #include "G4SystemOfUnits.hh"                     
 33 #include "G4DNAWaterExcitationStructure.hh"       
 34 #include "G4ParticleChangeForGamma.hh"            
 35 #include "G4NistManager.hh"                       
 36 #include "G4DNAChemistryManager.hh"               
 37 #include "G4DNAMolecularMaterial.hh"              
 38 #include "G4TransportationManager.hh"             
 39 #include "G4ITNavigator.hh"                       
 40 #include "G4Navigator.hh"                         
 41 #include "G4Electron.hh"                          
 42 #include "G4EmParameters.hh"                      
 43                                                   
 44 //....oooOO0OOooo........oooOO0OOooo........oo    
 45                                                   
 46 template<typename MODEL>                          
 47 UserTDNAOneStepThermalizationModel<MODEL>::       
 48 UserTDNAOneStepThermalizationModel(const G4Par    
 49 G4TDNAOneStepThermalizationModel<MODEL>(0,nam)    
 50 {                                                 
 51     G4cout << "Calling SampleSecondaries() of     
 52 }                                                 
 53                                                   
 54 //....oooOO0OOooo........oooOO0OOooo........oo    
 55                                                   
 56 template<typename MODEL>                          
 57 void UserTDNAOneStepThermalizationModel<MODEL>    
 58 SampleSecondaries(std::vector<G4DynamicParticl    
 59                   const G4MaterialCutsCouple*,    
 60                   const G4DynamicParticle* par    
 61                   G4double tmin,                  
 62                   G4double maxEnergy)             
 63 {                                                 
 64     G4TDNAOneStepThermalizationModel<MODEL>::S    
 65                                                   
 66     if (G4DNAChemistryManager::IsActivated())     
 67     G4double k = particle->GetKineticEnergy();    
 68     G4double highE = G4TDNAOneStepThermalizati    
 69     if (k <= highE){                              
 70         G4ThreeVector displacement(0,0,0);        
 71         G4TDNAOneStepThermalizationModel<MODEL    
 72                                                   
 73         auto _ParticleChangeForGamma=G4TDNAOne    
 74         const G4Track * theIncomingTrack =_Par    
 75                                                   
 76         G4ThreeVector finalPosition(theIncomin    
 77         this->fpNavigator->SetWorldVolume(theI    
 78                                                   
 79         G4double displacementMag = displacemen    
 80         G4double safety = DBL_MAX;                
 81         G4ThreeVector direction = displacement    
 82                                                   
 83         G4double mag_displacement = displaceme    
 84         G4ThreeVector displacement_direction =    
 85                                                   
 86                                                   
 87         this->fpNavigator->ResetHierarchyAndLo    
 88                                             di    
 89                                             *(    
 90                                             th    
 91         this->fpNavigator->ComputeStep(theInco    
 92                                 displacement/d    
 93                                 displacementMa    
 94                                 safety);          
 95                                                   
 96         if(safety <= displacementMag){            
 97             finalPosition = theIncomingTrack->    
 98         }                                         
 99         G4DNAChemistryManager::Instance()->Cre    
100         _ParticleChangeForGamma->SetProposedKi    
101     }                                             
102                                                   
103 }                                                 
104                                                   
105 //....oooOO0OOooo........oooOO0OOooo........oo    
106                                                   
107 G4VEmModel* UserChoosingDNASolvationModel::Use    
108 {                                                 
109     G4String modelNamePrefix("DNAOneStepTherma    
110                                                   
111     if(penetrationModel == "Terrisol1990")        
112     {                                             
113         return new UserTDNAOneStepThermalizati    
114         (G4Electron::Definition(), modelNamePr    
115     }                                             
116     else if(penetrationModel == "Meesungnoen20    
117     {                                             
118         return new UserTDNAOneStepThermalizati    
119         (G4Electron::Definition(), modelNamePr    
120     }                                             
121     else if(penetrationModel == "Meesungnoen20    
122     {                                             
123         return new UserTDNAOneStepThermalizati    
124         (G4Electron::Definition(), modelNamePr    
125     }                                             
126     else if(penetrationModel == "Kreipl2009")     
127     {                                             
128         return new UserTDNAOneStepThermalizati    
129         (G4Electron::Definition(), modelNamePr    
130     }                                             
131     else if(penetrationModel == "Ritchie1994")    
132     {                                             
133         return new UserTDNAOneStepThermalizati    
134         (G4Electron::Definition(), modelNamePr    
135     }                                             
136     else                                          
137     {                                             
138         G4ExceptionDescription description;       
139         description << penetrationModel + " is    
140         G4Exception("UserChoosingDNASolvationM    
141                     "INVALID_ARGUMENT",           
142                     FatalErrorInArgument,         
143                     description,                  
144                     "Options are: Terrisol1990    
145     }                                             
146     return nullptr;                               
147 }                                                 
148                                                   
149 //....oooOO0OOooo........oooOO0OOooo........oo    
150                                                   
151 G4VEmModel* UserChoosingDNASolvationModel::Use    
152 {                                                 
153     auto dnaSubType = G4EmParameters::Instance    
154                                                   
155     switch(dnaSubType)                            
156     {                                             
157     case fRitchie1994eSolvation:                  
158         return UserCreate("Ritchie1994");         
159     case fTerrisol1990eSolvation:                 
160         return UserCreate("Terrisol1990");        
161     case fKreipl2009eSolvation:                   
162         return UserCreate("Kreipl2009");          
163     case fMeesungnoensolid2002eSolvation:         
164         return UserCreate("Meesungnoen2002_amo    
165     case fMeesungnoen2002eSolvation:              
166     case fDNAUnknownModel:                        
167         return UserCreate("Meesungnoen2002");     
168     default:                                      
169         G4ExceptionDescription msg;               
170         msg<<"The solvation parameter stored i    
171             <<"Supported types are: fRitchie19    
172             <<"fMeesungnoen2002eSolvation.";      
173         G4Exception("UserChoosingDNASolvationM    
174                     "DnaSubType",                 
175                     FatalErrorInArgument,msg);    
176     }                                             
177                                                   
178     return nullptr;                               
179 }                                                 
180                                                   
181 //....oooOO0OOooo........oooOO0OOooo........oo