source: trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionExcitationMillerGreen.cc @ 1050

Last change on this file since 1050 was 1007, checked in by garnier, 15 years ago

update to geant4.9.2

File size: 6.0 KB
Line 
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: G4CrossSectionExcitationMillerGreen.cc,v 1.4 2008/07/14 20:47:34 sincerti Exp $
27// GEANT4 tag $Name: geant4-09-02 $
28
29#include "G4CrossSectionExcitationMillerGreen.hh"
30
31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33G4CrossSectionExcitationMillerGreen::G4CrossSectionExcitationMillerGreen()
34{
35  lowEnergyLimitDefault = 10 * eV;
36  highEnergyLimitDefault = 10 * MeV;
37
38  G4DNAGenericIonsManager *instance;
39  instance = G4DNAGenericIonsManager::Instance();
40  G4ParticleDefinition* protonDef = G4Proton::ProtonDefinition();
41  G4ParticleDefinition* alphaPlusPlusDef = instance->GetIon("alpha++");
42  G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+");
43  G4ParticleDefinition* heliumDef = instance->GetIon("helium");
44
45  G4String proton;
46  G4String alphaPlusPlus;
47  G4String alphaPlus;
48  G4String helium;
49
50  if (protonDef != 0)
51  {
52    proton = protonDef->GetParticleName();
53    lowEnergyLimit[proton] = 10. * eV;
54    highEnergyLimit[proton] = 500. * keV;
55  }
56  else
57  {
58    G4Exception("G4CrossSectionExcitationMillerGreen Constructor: proton is not defined");
59  }
60
61  if (alphaPlusPlusDef != 0)
62  {
63    alphaPlusPlus = alphaPlusPlusDef->GetParticleName();
64    lowEnergyLimit[alphaPlusPlus] = 1. * keV;
65    highEnergyLimit[alphaPlusPlus] = 10. * MeV;
66  }
67  else
68  {
69      G4Exception("G4CrossSectionExcitationMillerGreen Constructor: alphaPlusPlus is not defined");
70  }
71
72  if (alphaPlusDef != 0)
73  {
74    alphaPlus = alphaPlusDef->GetParticleName();
75    lowEnergyLimit[alphaPlus] = 1. * keV;
76    highEnergyLimit[alphaPlus] = 10. * MeV;
77  }
78  else
79  {
80    G4Exception("G4CrossSectionExcitationMillerGreen Constructor: alphaPlus is not defined");
81  }
82
83  if (heliumDef != 0)
84  {
85    helium = heliumDef->GetParticleName();
86    lowEnergyLimit[helium] = 1. * keV;
87    highEnergyLimit[helium] = 10. * MeV;
88  }
89  else
90  {
91    G4Exception("G4CrossSectionExcitationMillerGreen Constructor: helium is not defined");
92  }
93   
94}
95
96//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97
98G4CrossSectionExcitationMillerGreen::~G4CrossSectionExcitationMillerGreen()
99{}
100 
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103G4double G4CrossSectionExcitationMillerGreen::CrossSection(const G4Track& track)
104{
105  G4DNAGenericIonsManager *instance;
106  instance = G4DNAGenericIonsManager::Instance();
107
108  if (
109      track.GetDefinition() != G4Proton::ProtonDefinition()
110      &&
111      track.GetDefinition() != instance->GetIon("alpha++")
112      &&
113      track.GetDefinition() != instance->GetIon("alpha+")
114      &&
115      track.GetDefinition() != instance->GetIon("helium")
116      )
117           
118    G4Exception("G4CrossSectionMillerGreen: attempting to calculate cross section for wrong particle");
119
120  G4double lowLim = lowEnergyLimitDefault;
121  G4double highLim = highEnergyLimitDefault;
122
123  const G4DynamicParticle* particle = track.GetDynamicParticle();
124  G4double k = particle->GetKineticEnergy();
125
126  const G4String& particleName = particle->GetDefinition()->GetParticleName();
127
128  std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
129  pos1 = lowEnergyLimit.find(particleName);
130
131  if (pos1 != lowEnergyLimit.end())
132  {
133    lowLim = pos1->second;
134  }
135
136  std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
137  pos2 = highEnergyLimit.find(particleName);
138
139  if (pos2 != highEnergyLimit.end())
140  {
141    highLim = pos2->second;
142  }
143
144  const G4ParticleDefinition* particleDefinition = track.GetDefinition();
145
146  G4double crossSection(0.);
147 
148  if (k >= lowLim && k <= highLim)
149  {
150    crossSection = partialCrossSection.Sum(k,particleDefinition);
151    G4DNAGenericIonsManager *instance;
152    instance = G4DNAGenericIonsManager::Instance();
153
154    // add ONE or TWO electron-water excitation for alpha+ and helium
155 
156    if ( particleDefinition == instance->GetIon("alpha+") 
157         ||
158         particleDefinition == instance->GetIon("helium")
159       ) 
160    {
161          G4CrossSectionExcitationEmfietzoglouPartial * excitationXS = 
162            new G4CrossSectionExcitationEmfietzoglouPartial();
163
164          G4double sigmaExcitation=0;
165          if (k*0.511/3728 > 7.4*eV && k*0.511/3728 < 10*keV) sigmaExcitation = excitationXS->Sum(k*0.511/3728);
166       
167          if ( particleDefinition == instance->GetIon("alpha+") ) 
168            crossSection = crossSection +  sigmaExcitation ;
169         
170          if ( particleDefinition == instance->GetIon("helium") ) 
171            crossSection = crossSection + 2*sigmaExcitation ;
172         
173          delete excitationXS;
174    }     
175  }
176     
177  return crossSection;
178}
179
Note: See TracBrowser for help on using the repository browser.