ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DNAIonisation.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4DNAIonisation.cc
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 
27 #include "G4DNAIonisation.hh"
29 #include "G4SystemOfUnits.hh"
30 
31 //SEB
32 #include "G4GenericIon.hh"
33 #include "G4Positron.hh"
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
37 using namespace std;
38 
40  G4ProcessType type) :
41  G4VEmProcess(processName, type), isInitialised(false)
42 {
44 }
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
49 {
50 }
51 
52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
53 
55 {
58 
59  return (&p == G4Electron::Electron() || &p == G4Positron::Positron()
60  || &p == G4Proton::Proton() || &p == instance->GetIon("hydrogen")
61  || &p == instance->GetIon("alpha++")
62  || &p == instance->GetIon("alpha+")
63  || &p == instance->GetIon("helium")
64  //SEB
65  //|| &p == instance->GetIon("carbon")
66  //|| &p == instance->GetIon("nitrogen")
67  //|| &p == instance->GetIon("oxygen")
68  //|| &p == instance->GetIon("iron")
70 }
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
73 
75 {
76  if(!isInitialised)
77  {
78  isInitialised = true;
79  SetBuildTableFlag(false);
80 
82 
83  if(name == "e-")
84  {
85  if(!EmModel())
86  {
89  SetEmModel(born);
90  born->SetLowEnergyLimit(11. * eV);
91  born->SetHighEnergyLimit(1. * MeV);
92  }
93  AddEmModel(1, EmModel());
94  }
95  else if(name == "e+")
96  {
97  if(!EmModel())
98  {
99  G4LEPTSIonisationModel* lepts =
101  SetEmModel(lepts);
102  lepts->SetLowEnergyLimit(1. * eV);
103  lepts->SetHighEnergyLimit(1. * MeV);
104  }
105  AddEmModel(1, EmModel());
106  }
107 
108  if(name == "proton")
109  {
110  if(!EmModel(0)) // MK : Is this a reliable test ? VI: it is useful
111  {
114  rudd->SetLowEnergyLimit(0 * eV);
115  rudd->SetHighEnergyLimit(500 * keV);
116  SetEmModel(rudd);
117 
120  born->SetLowEnergyLimit(500 * keV);
121  born->SetHighEnergyLimit(100 * MeV);
122  SetEmModel(born);
123  }
124 
125  AddEmModel(1, EmModel());
126  if(EmModel(1)) AddEmModel(2, EmModel(1));
127  }
128 
129  if(name == "hydrogen")
130  {
131  if(!EmModel())
132  {
135  SetEmModel(rudd);
136  rudd->SetLowEnergyLimit(0 * eV);
137  rudd->SetHighEnergyLimit(100 * MeV);
138  }
139  AddEmModel(1, EmModel());
140  }
141 
142  if(name == "alpha" || name == "alpha+" || name == "helium")
143  {
144  if(!EmModel())
145  {
148  SetEmModel(rudd);
149  rudd->SetLowEnergyLimit(0 * keV);
150  rudd->SetHighEnergyLimit(400 * MeV);
151  }
152  AddEmModel(1, EmModel());
153  }
154 
155  // Extension to HZE proposed by Z. Francis
156 
157  //SEB
158  if(/*name == "carbon" || name == "nitrogen" || name == "oxygen" || name == "iron" ||*/
159  name == "GenericIon")
160  //
161  {
162  if(!EmModel())
163  {
166  SetEmModel(ruddExt);
167  ruddExt->SetLowEnergyLimit(0 * keV);
168  //SEB: 1e6*MeV by default - updated in model class
169  //EmModel()->SetHighEnergyLimit(p->GetAtomicMass()*1e6*MeV);
170  ruddExt->SetHighEnergyLimit(1e6 * MeV);
171  }
172  AddEmModel(1, EmModel());
173  }
174  }
175 }
176 
177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
178 
180 {
181  if(EmModel(1))
182  {
183  G4cout << " Total cross sections computed from " << EmModel(0)->GetName()
184  << " and " << EmModel(1)->GetName() << " models" << G4endl;
185  }
186  else
187  {
188  G4cout << " Total cross sections computed from "
189  << EmModel()->GetName()
190  << G4endl;
191  }
192 }
193 
194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......