| 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.7 2009/06/11 15:47:08 mantero Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-03-cand-01 $
|
|---|
| 28 |
|
|---|
| 29 | #include "G4FinalStateChargeIncrease.hh"
|
|---|
| 30 |
|
|---|
| 31 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 32 |
|
|---|
| 33 | G4FinalStateChargeIncrease::G4FinalStateChargeIncrease()
|
|---|
| 34 | {
|
|---|
| 35 | lowEnergyLimit = 1 * keV;
|
|---|
| 36 | highEnergyLimit = 10 * MeV;
|
|---|
| 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;
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 50 |
|
|---|
| 51 | G4FinalStateChargeIncrease::~G4FinalStateChargeIncrease()
|
|---|
| 52 | {}
|
|---|
| 53 |
|
|---|
| 54 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 55 |
|
|---|
| 56 | const G4FinalStateProduct& G4FinalStateChargeIncrease::GenerateFinalState(const G4Track& track, const G4Step& /* step */)
|
|---|
| 57 | {
|
|---|
| 58 | product.Clear();
|
|---|
| 59 |
|
|---|
| 60 | //SI - Added protection against total energy deposit
|
|---|
| 61 | product.DoNotDepositEnergy();
|
|---|
| 62 | //
|
|---|
| 63 | product.KillPrimaryParticle();
|
|---|
| 64 | product.AddEnergyDeposit(0.);
|
|---|
| 65 |
|
|---|
| 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)
|
|---|
| 83 | {
|
|---|
| 84 | G4String message;
|
|---|
| 85 | message="G4FinalStateChargeIncrease - Final kinetic energy is below 0! Process ";
|
|---|
| 86 | }
|
|---|
| 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)
|
|---|
| 95 | {
|
|---|
| 96 | n--;
|
|---|
| 97 | product.AddSecondary
|
|---|
| 98 | (new G4DynamicParticle(G4Electron::Electron(), track.GetDynamicParticle()->GetMomentumDirection(), electronK));
|
|---|
| 99 | }
|
|---|
| 100 |
|
|---|
| 101 | return product;
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 105 |
|
|---|
| 106 | G4int 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"))
|
|---|
| 116 | { if (finalStateIndex==0) return 2;
|
|---|
| 117 | return 3;
|
|---|
| 118 | }
|
|---|
| 119 | return 0;
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|
| 122 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|---|
| 123 |
|
|---|
| 124 | G4ParticleDefinition* 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 |
|
|---|
| 141 | G4double 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+"))
|
|---|
| 148 | {
|
|---|
| 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;
|
|---|
| 152 | }
|
|---|
| 153 |
|
|---|
| 154 | if(particleDefinition == instance->GetIon("helium"))
|
|---|
| 155 | {
|
|---|
| 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;
|
|---|
| 161 | }
|
|---|
| 162 |
|
|---|
| 163 | return 0;
|
|---|
| 164 | }
|
|---|