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

Last change on this file since 1316 was 1315, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

  • Property svn:executable set to *
File size: 6.5 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//
[1192]26// $Id: G4FinalStateChargeIncrease.cc,v 1.7 2009/06/11 15:47:08 mantero Exp $
[1315]27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
[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;
[1055]37
38 G4cout << G4endl;
39 G4cout << "*******************************************************************************" << G4endl;
40 G4cout << "*******************************************************************************" << G4endl;
41 G4cout << " The class 4FinalStateChargeIncrease is NOT SUPPORTED ANYMORE. " << G4endl;
42 G4cout << " It will be REMOVED with the next major release of Geant4. " << G4endl;
43 G4cout << " Please consult: https://twiki.cern.ch/twiki/bin/view/Geant4/LoweProcesses" << G4endl;
44 G4cout << "*******************************************************************************" << G4endl;
45 G4cout << "*******************************************************************************" << G4endl;
46 G4cout << G4endl;
[819]47}
48
[961]49//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[819]50
51G4FinalStateChargeIncrease::~G4FinalStateChargeIncrease()
52{}
53
[961]54//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[819]55
56const G4FinalStateProduct& G4FinalStateChargeIncrease::GenerateFinalState(const G4Track& track, const G4Step& /* step */)
57{
58 product.Clear();
59
[1055]60 //SI - Added protection against total energy deposit
61 product.DoNotDepositEnergy();
62 //
[819]63 product.KillPrimaryParticle();
64 product.AddEnergyDeposit(0.);
[1055]65
[819]66 G4ParticleDefinition* definition = track.GetDefinition();
67
68 G4double inK = track.GetDynamicParticle()->GetKineticEnergy();
69
70 G4int finalStateIndex = cross.RandomSelect(inK,definition);
71
72 G4int n = NumberOfFinalStates(track.GetDefinition(),finalStateIndex);
73 G4double outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex);
74
75 G4DNAGenericIonsManager* instance;
76 instance = G4DNAGenericIonsManager::Instance();
77
78 G4double electronK;
79 if (definition == instance->GetIon("hydrogen")) electronK = inK*electron_mass_c2/proton_mass_c2;
80 else electronK = inK*electron_mass_c2/(3728*MeV);
81
82 if (outK<0)
[961]83 {
84 G4String message;
85 message="G4FinalStateChargeIncrease - Final kinetic energy is below 0! Process ";
86 }
[819]87
88 product.AddSecondary(new G4DynamicParticle(OutgoingParticleDefinition(definition,finalStateIndex),
89 track.GetDynamicParticle()->GetMomentumDirection(),
90 outK));
91
92 n = n - 1;
93
94 while (n>0)
[961]95 {
96 n--;
97 product.AddSecondary
[819]98 (new G4DynamicParticle(G4Electron::Electron(), track.GetDynamicParticle()->GetMomentumDirection(), electronK));
[961]99 }
[819]100
101 return product;
102}
103
[961]104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105
[819]106G4int G4FinalStateChargeIncrease::NumberOfFinalStates(G4ParticleDefinition* particleDefinition,
107 G4int finalStateIndex )
108
109{
110 G4DNAGenericIonsManager* instance;
111 instance = G4DNAGenericIonsManager::Instance();
112 if (particleDefinition == instance->GetIon("hydrogen")) return 2;
113 if (particleDefinition == instance->GetIon("alpha+")) return 2;
114
115 if (particleDefinition == instance->GetIon("helium"))
[961]116 { if (finalStateIndex==0) return 2;
117 return 3;
118 }
[819]119 return 0;
120}
121
[961]122//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[819]123
124G4ParticleDefinition* G4FinalStateChargeIncrease::OutgoingParticleDefinition (G4ParticleDefinition* particleDefinition,
125 G4int finalStateIndex)
126{
127 G4DNAGenericIonsManager * instance(G4DNAGenericIonsManager::Instance());
128 if (particleDefinition == instance->GetIon("hydrogen")) return G4Proton::Proton();
129 if (particleDefinition == instance->GetIon("alpha+")) return instance->GetIon("alpha++");
130
131 if (particleDefinition == instance->GetIon("alpha+")) return instance->GetIon("helium");
132 {
133 if (finalStateIndex==0) return instance->GetIon("alpha+");
134 return instance->GetIon("alpha++");
135 }
136 return 0;
137}
138
139//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
140
141G4double G4FinalStateChargeIncrease::IncomingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition,
142 G4int finalStateIndex )
143{
144 G4DNAGenericIonsManager * instance(G4DNAGenericIonsManager::Instance());
145 if(particleDefinition == instance->GetIon("hydrogen")) return 13.6*eV;
146
147 if(particleDefinition == instance->GetIon("alpha+"))
[961]148 {
[819]149 // Binding energy for He+ -> He++ + e- 54.509 eV
150 // Binding energy for He -> He+ + e- 24.587 eV
151 return 54.509*eV;
[961]152 }
[819]153
154 if(particleDefinition == instance->GetIon("helium"))
[961]155 {
[819]156 // Binding energy for He+ -> He++ + e- 54.509 eV
157 // Binding energy for He -> He+ + e- 24.587 eV
158
159 if (finalStateIndex==0) return 24.587*eV;
160 return (54.509 + 24.587)*eV;
[961]161 }
[819]162
163 return 0;
164}
Note: See TracBrowser for help on using the repository browser.