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

Last change on this file since 968 was 961, checked in by garnier, 17 years ago

update processes

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