source: trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStatePsCreationChampion.cc @ 1315

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

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

File size: 4.1 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: G4FinalStatePsCreationChampion.cc,v 1.2 2009/06/10 13:32:36 mantero Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
28// -------------------------------------------------------------------
29
30#include "G4FinalStatePsCreationChampion.hh"
31
32//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
33
34G4FinalStatePsCreationChampion::G4FinalStatePsCreationChampion()
35{
36  lowEnergyLimit = 10. * eV;
37  highEnergyLimit = 5. * keV;
38
39  G4ParticleDefinition* positronDef = G4Positron::PositronDefinition();
40
41  if (positronDef == 0) G4Exception("G4FinalStatePsCreationChampion constructor: positron is not defined");
42}
43
44//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45
46G4FinalStatePsCreationChampion::~G4FinalStatePsCreationChampion()
47{}
48
49//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
50
51const G4FinalStateProduct& G4FinalStatePsCreationChampion::GenerateFinalState(const G4Track& track, const G4Step& /* step */)
52{
53  product.Clear();
54
55  const G4DynamicParticle* particle = track.GetDynamicParticle();
56
57  G4double k = particle->GetKineticEnergy();
58
59  if (k > lowEnergyLimit && k < highEnergyLimit)
60  {
61      G4ParticleDefinition* definition = particle->GetDefinition();
62      G4ParticleMomentum primaryDirection = particle->GetMomentumDirection();
63
64      G4int positroniumState = cross.RandomSelectState(k,definition);
65     
66      G4int ionizationShell = cross.RandomSelectShell(k,definition,positroniumState);
67       
68      G4double bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
69     
70      G4double creationEnergy = 13.6*eV/(2*(positroniumState+1)*(positroniumState+1)) ; // Ry = 13.6 * eV;
71     
72      G4double secondaryKinetic = k + creationEnergy - bindingEnergy; 
73
74      product.KillPrimaryParticle();
75      product.AddEnergyDeposit(bindingEnergy-creationEnergy);
76
77      G4DNAGenericIonsManager * instance(G4DNAGenericIonsManager::Instance());
78     
79      if (secondaryKinetic<0) 
80      {
81        G4cout << "***** WARNING in G4FinalStatePsCreationChampion: Ps secondaryKinetic < 0 --> set to zero " << G4endl; 
82        secondaryKinetic=0; 
83      }
84     
85      if (positroniumState == 0) 
86      product.AddSecondary
87       (new G4DynamicParticle(instance->GetIon("Ps-1s"),track.GetDynamicParticle()->GetMomentumDirection(),secondaryKinetic));
88     
89      if (positroniumState == 1) 
90      product.AddSecondary
91      (new G4DynamicParticle(instance->GetIon("Ps-2s"),track.GetDynamicParticle()->GetMomentumDirection(),secondaryKinetic));
92
93  }
94 
95  return product;
96}
97
Note: See TracBrowser for help on using the repository browser.