Geant4  10.02.p03
G4EmDNAPhysics_option2.cc
Go to the documentation of this file.
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 // $Id: G4EmDNAPhysics_option2.cc 82360 2014-06-17 15:16:30Z gcosmo $
27 
28 // SI: This constructor uses speedup options of DNA models
29 
30 #include "G4EmDNAPhysics_option2.hh"
31 
32 #include "G4SystemOfUnits.hh"
33 
35 
36 // *** Processes and models for Geant4-DNA
37 
38 #include "G4DNAElastic.hh"
41 
42 #include "G4DNAExcitation.hh"
43 #include "G4DNAAttachment.hh"
44 #include "G4DNAVibExcitation.hh"
45 #include "G4DNAIonisation.hh"
46 #include "G4DNAChargeDecrease.hh"
47 #include "G4DNAChargeIncrease.hh"
48 
49 // particles
50 
51 #include "G4Electron.hh"
52 #include "G4Proton.hh"
53 #include "G4GenericIon.hh"
54 
55 // Warning : the following is needed in order to use EM Physics builders
56 // e+
57 #include "G4Positron.hh"
58 #include "G4eMultipleScattering.hh"
59 #include "G4eIonisation.hh"
60 #include "G4eBremsstrahlung.hh"
61 #include "G4eplusAnnihilation.hh"
62 // gamma
63 #include "G4Gamma.hh"
64 #include "G4PhotoElectricEffect.hh"
65 #include "G4LivermorePhotoElectricModel.hh"
66 #include "G4ComptonScattering.hh"
68 #include "G4GammaConversion.hh"
70 #include "G4RayleighScattering.hh"
72 
73 #include "G4EmParameters.hh"
74 // end of warning
75 
76 #include "G4LossTableManager.hh"
77 #include "G4UAtomicDeexcitation.hh"
78 #include "G4PhysicsListHelper.hh"
79 #include "G4BuilderType.hh"
80 
81 // factory
83 //
84 G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
85 
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
89 G4EmDNAPhysics_option2::G4EmDNAPhysics_option2(G4int ver)
90  : G4VPhysicsConstructor("G4EmDNAPhysics_option2"), verbose(ver)
91 {
94 }
95 
96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97 
98 G4EmDNAPhysics_option2::G4EmDNAPhysics_option2(G4int ver, const G4String&)
99  : G4VPhysicsConstructor("G4EmDNAPhysics_option2"), verbose(ver)
100 {
103 }
104 
105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
106 
107 G4EmDNAPhysics_option2::~G4EmDNAPhysics_option2()
108 {}
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
112 void G4EmDNAPhysics_option2::ConstructParticle()
113 {
114 // bosons
115  G4Gamma::Gamma();
116 
117 // leptons
120 
121 // baryons
123 
125 
126  G4DNAGenericIonsManager * genericIonsManager;
127  genericIonsManager=G4DNAGenericIonsManager::Instance();
128  genericIonsManager->GetIon("alpha++");
129  genericIonsManager->GetIon("alpha+");
130  genericIonsManager->GetIon("helium");
131  genericIonsManager->GetIon("hydrogen");
132 
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136 
137 void G4EmDNAPhysics_option2::ConstructProcess()
138 {
139  if(verbose > 1) {
140  G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
141  }
143 
144  auto myParticleIterator=GetParticleIterator();
145  myParticleIterator->reset();
146  while( (*myParticleIterator)() )
147  {
148  G4ParticleDefinition* particle = myParticleIterator->value();
149  G4String particleName = particle->GetParticleName();
150 
151  if (particleName == "e-") {
152 
153  // *** Elastic scattering (two alternative models available) ***
154 
155  G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
156  theDNAElasticProcess->SetEmModel(new G4DNAChampionElasticModel());
157 
158  // or alternative model
159  //theDNAElasticProcess->SetEmModel(new G4DNAScreenedRutherfordElasticModel());
160 
161  ph->RegisterProcess(theDNAElasticProcess, particle);
162 
163  // *** Excitation ***
164  ph->RegisterProcess(new G4DNAExcitation("e-_G4DNAExcitation"), particle);
165 
166  // *** Ionisation ***
167  //ph->RegisterProcess(new G4DNAIonisation("e-_G4DNAIonisation"), particle);
168  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("e-_G4DNAIonisation");
169  theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel());
170  ((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel()))->SelectFasterComputation(true);
171  ph->RegisterProcess(theDNAIonisationProcess, particle);
172 
173  // *** Vibrational excitation ***
174  ph->RegisterProcess(new G4DNAVibExcitation("e-_G4DNAVibExcitation"), particle);
175 
176  // *** Attachment ***
177  ph->RegisterProcess(new G4DNAAttachment("e-_G4DNAAttachment"), particle);
178 
179  } else if ( particleName == "proton" ) {
180 
181  ph->RegisterProcess(new G4DNAExcitation("proton_G4DNAExcitation"), particle);
182 
183  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("proton_G4DNAIonisation");
184 
185  G4VEmModel* mod1;
187  mod1->SetLowEnergyLimit(0*eV);
188  mod1->SetHighEnergyLimit(500*keV);
189 
190  G4VEmModel* mod2;
191  mod2= new G4DNABornIonisationModel();
192  mod2->SetLowEnergyLimit(500*keV);
193  mod2->SetHighEnergyLimit(100*MeV);
194 
195  theDNAIonisationProcess->SetEmModel(mod1,1);
196  theDNAIonisationProcess->SetEmModel(mod2,2);
197  ((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(2)))->SelectFasterComputation(true);
198 
199  ph->RegisterProcess(theDNAIonisationProcess, particle);
200 
201  ph->RegisterProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"), particle);
202 
203  } else if ( particleName == "hydrogen" ) {
204 
205  ph->RegisterProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"), particle);
206 
207  //ph->RegisterProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"), particle);
208  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("hydrogen_G4DNAIonisation");
209  theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
210  ph->RegisterProcess(theDNAIonisationProcess, particle);
211 
212  ph->RegisterProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"), particle);
213 
214  } else if ( particleName == "alpha" ) {
215 
216  ph->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), particle);
217 
218  //ph->RegisterProcess(new G4DNAIonisation("alpha_G4DNAIonisation"), particle);
219  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha_G4DNAIonisation");
220  theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
221  ph->RegisterProcess(theDNAIonisationProcess, particle);
222 
223  ph->RegisterProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"), particle);
224 
225  } else if ( particleName == "alpha+" ) {
226 
227  ph->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), particle);
228 
229  //ph->RegisterProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"), particle);
230  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("alpha+_G4DNAIonisation");
231  theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
232  ph->RegisterProcess(theDNAIonisationProcess, particle);
233 
234  ph->RegisterProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"), particle);
235  ph->RegisterProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"), particle);
236 
237  } else if ( particleName == "helium" ) {
238 
239  ph->RegisterProcess(new G4DNAExcitation("helium_G4DNAExcitation"), particle);
240 
241  //ph->RegisterProcess(new G4DNAIonisation("helium_G4DNAIonisation"), particle);
242  G4DNAIonisation* theDNAIonisationProcess = new G4DNAIonisation("helium_G4DNAIonisation");
243  theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationExtendedModel());
244  ph->RegisterProcess(theDNAIonisationProcess, particle);
245 
246  ph->RegisterProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"), particle);
247 
248  } else if ( particleName == "GenericIon" ) {
249  ph->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), particle);
250 
251  }
252 
253  // Warning : the following particles and processes are needed by EM Physics builders
254  // They are taken from the default Livermore Physics list
255  // These particles are currently not handled by Geant4-DNA
256 
257  // e+
258 
259  else if (particleName == "e+") {
260 
261  // Identical to G4EmStandardPhysics_option3
262 
265  G4eIonisation* eIoni = new G4eIonisation();
266  eIoni->SetStepFunction(0.2, 100*um);
267 
268  ph->RegisterProcess(msc, particle);
269  ph->RegisterProcess(eIoni, particle);
270  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
271  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
272 
273  } else if (particleName == "gamma") {
274 
275  G4double LivermoreHighEnergyLimit = GeV;
276 
277  G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
278  G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
279  new G4LivermorePhotoElectricModel();
280  theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
281  thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
282  ph->RegisterProcess(thePhotoElectricEffect, particle);
283 
284  G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
285  G4LivermoreComptonModel* theLivermoreComptonModel =
287  theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
288  theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
289  ph->RegisterProcess(theComptonScattering, particle);
290 
291  G4GammaConversion* theGammaConversion = new G4GammaConversion();
292  G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
294  theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
295  theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
296  ph->RegisterProcess(theGammaConversion, particle);
297 
298  G4RayleighScattering* theRayleigh = new G4RayleighScattering();
299  G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
300  theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
301  theRayleigh->AddEmModel(0, theRayleighModel);
302  ph->RegisterProcess(theRayleigh, particle);
303  }
304 
305  // Warning : end of particles and processes are needed by EM Physics builders
306 
307  }
308 
309  // Deexcitation
310  //
313  de->SetFluo(true);
314 }
315 
316 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
static const double MeV
Definition: G4SIunits.hh:211
#define G4DNABornIonisationModel
static G4LossTableManager * Instance()
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2)
void SetStepFunction(G4double v1, G4double v2)
int G4int
Definition: G4Types.hh:78
G4VEmModel * EmModel(G4int index=1) const
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:725
void SetEmModel(G4VEmModel *, G4int index=1)
const G4String & GetParticleName() const
const G4String & GetPhysicsName() const
G4GLOB_DLL std::ostream G4cout
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4Proton * Proton()
Definition: G4Proton.cc:93
static const double GeV
Definition: G4SIunits.hh:214
static G4DNAGenericIonsManager * Instance(void)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static const double eV
Definition: G4SIunits.hh:212
static G4Positron * Positron()
Definition: G4Positron.cc:94
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4EmParameters * Instance()
static const double um
Definition: G4SIunits.hh:112
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
static const double keV
Definition: G4SIunits.hh:213
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:732
void SetAtomDeexcitation(G4VAtomDeexcitation *)
void SetStepLimitType(G4MscStepLimitType val)
G4ParticleDefinition * GetIon(const G4String &name)