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

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

update to geant4.9.2

  • Property svn:executable set to *
File size: 5.7 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: G4FinalStateChargeIncrease.cc,v 1.3 2008/07/14 20:47:34 sincerti Exp $
27// GEANT4 tag $Name: geant4-09-02 $
28
29#include "G4FinalStateChargeIncrease.hh"
30
31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33G4FinalStateChargeIncrease::G4FinalStateChargeIncrease()
34{
35  lowEnergyLimit = 1 * keV;
36  highEnergyLimit = 10 * MeV;
37}
38
39//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40
41G4FinalStateChargeIncrease::~G4FinalStateChargeIncrease()
42{}
43 
44//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
46const G4FinalStateProduct& G4FinalStateChargeIncrease::GenerateFinalState(const G4Track& track, const G4Step& /* step */)
47{
48  product.Clear();
49
50  product.KillPrimaryParticle();
51  product.AddEnergyDeposit(0.);
52  G4ParticleDefinition* definition = track.GetDefinition();
53 
54  G4double inK = track.GetDynamicParticle()->GetKineticEnergy();
55 
56  G4int finalStateIndex = cross.RandomSelect(inK,definition);
57
58  G4int n = NumberOfFinalStates(track.GetDefinition(),finalStateIndex);
59  G4double outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex);
60
61  G4DNAGenericIonsManager* instance;
62  instance = G4DNAGenericIonsManager::Instance();
63
64  G4double electronK;
65  if (definition == instance->GetIon("hydrogen")) electronK = inK*electron_mass_c2/proton_mass_c2;
66  else electronK = inK*electron_mass_c2/(3728*MeV);
67 
68  if (outK<0)
69  {
70    G4String message;
71    message="G4FinalStateChargeIncrease - Final kinetic energy is below 0! Process ";
72  }
73 
74  product.AddSecondary(new G4DynamicParticle(OutgoingParticleDefinition(definition,finalStateIndex), 
75                                             track.GetDynamicParticle()->GetMomentumDirection(), 
76                                             outK));
77
78  n = n - 1;
79 
80  while (n>0)
81  {
82    n--;
83    product.AddSecondary
84        (new G4DynamicParticle(G4Electron::Electron(), track.GetDynamicParticle()->GetMomentumDirection(), electronK));
85  }
86       
87  return product;
88}
89
90//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91
92G4int G4FinalStateChargeIncrease::NumberOfFinalStates(G4ParticleDefinition* particleDefinition, 
93                                                      G4int finalStateIndex )
94 
95{
96  G4DNAGenericIonsManager* instance;
97  instance = G4DNAGenericIonsManager::Instance();
98  if (particleDefinition == instance->GetIon("hydrogen")) return 2;
99  if (particleDefinition == instance->GetIon("alpha+")) return 2;
100 
101  if (particleDefinition == instance->GetIon("helium")) 
102  {    if (finalStateIndex==0) return 2;
103       return 3;
104  }
105  return 0;
106}
107
108//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109
110G4ParticleDefinition*  G4FinalStateChargeIncrease::OutgoingParticleDefinition (G4ParticleDefinition* particleDefinition, 
111                                                                               G4int finalStateIndex) 
112{
113  G4DNAGenericIonsManager * instance(G4DNAGenericIonsManager::Instance());
114  if (particleDefinition == instance->GetIon("hydrogen")) return G4Proton::Proton(); 
115  if (particleDefinition == instance->GetIon("alpha+")) return instance->GetIon("alpha++");
116
117  if (particleDefinition == instance->GetIon("alpha+")) return instance->GetIon("helium");
118  {
119    if (finalStateIndex==0) return instance->GetIon("alpha+"); 
120    return instance->GetIon("alpha++");
121  }
122  return 0;
123}
124 
125//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
126
127G4double G4FinalStateChargeIncrease::IncomingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, 
128                                                                           G4int finalStateIndex )
129{
130  G4DNAGenericIonsManager * instance(G4DNAGenericIonsManager::Instance());
131  if(particleDefinition == instance->GetIon("hydrogen")) return 13.6*eV;
132 
133  if(particleDefinition == instance->GetIon("alpha+"))
134  {
135      // Binding energy for    He+ -> He++ + e-    54.509 eV
136      // Binding energy for    He  -> He+  + e-    24.587 eV
137      return 54.509*eV;
138  }
139   
140  if(particleDefinition == instance->GetIon("helium"))
141  {
142      // Binding energy for    He+ -> He++ + e-    54.509 eV
143      // Binding energy for    He  -> He+  + e-    24.587 eV
144
145      if (finalStateIndex==0) return 24.587*eV;
146      return (54.509 + 24.587)*eV;
147  } 
148
149  return 0;
150}
Note: See TracBrowser for help on using the repository browser.