source: trunk/source/processes/electromagnetic/standard/src/G4alphaIonisation.cc @ 1316

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

update geant4.9.3 tag

File size: 5.4 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: G4alphaIonisation.cc,v 1.1 2009/11/10 11:50:30 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name:     G4alphaIonisation
35//
36// Author:        Vladimir Ivanchenko
37//
38// Creation date: 28.10.2009 created from G4ionIonisation
39//
40// Modifications:
41//
42//
43//
44// -------------------------------------------------------------------
45//
46//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
47//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
48
49#include "G4alphaIonisation.hh"
50#include "G4Electron.hh"
51#include "G4Alpha.hh"
52#include "G4BraggIonModel.hh"
53#include "G4BetheBlochModel.hh"
54#include "G4UnitsTable.hh"
55#include "G4LossTableManager.hh"
56#include "G4IonFluctuations.hh"
57#include "G4UniversalFluctuation.hh"
58
59//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60
61using namespace std;
62
63G4alphaIonisation::G4alphaIonisation(const G4String& name)
64  : G4VEnergyLossProcess(name),
65    theParticle(0),
66    isInitialised(false),
67    nuclearStopping(true)
68{
69  //  SetLinearLossLimit(0.15);
70  SetStepFunction(0.2, 0.1*mm);
71  //  SetIntegral(true);
72  SetProcessSubType(fIonisation);
73  //  SetVerboseLevel(1);
74  mass = 0.0;
75  ratio = 0.0;
76}
77
78//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79
80G4alphaIonisation::~G4alphaIonisation()
81{}
82
83//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
84
85G4bool G4alphaIonisation::IsApplicable(const G4ParticleDefinition& p)
86{
87  return (p.GetPDGCharge() == 2*eplus);
88}
89
90//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
91
92G4double G4alphaIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 
93                                             const G4Material*, 
94                                             G4double cut)
95{
96  G4double x = 0.5*cut/electron_mass_c2;
97  G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
98  return mass*(g - 1.0);
99}
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
102
103void G4alphaIonisation::InitialiseEnergyLossProcess(
104                      const G4ParticleDefinition* part,
105                      const G4ParticleDefinition* bpart)
106{
107  if(!isInitialised) {
108
109    theParticle = part;
110    G4String pname = part->GetParticleName();
111
112    // define base particle
113    const G4ParticleDefinition* theBaseParticle = 0;
114    if(bpart == 0) { 
115      if(pname != "alpha") { theBaseParticle = G4Alpha::Alpha(); }
116    } else { theBaseParticle = bpart; }
117
118    mass  = part->GetPDGMass();
119    ratio = electron_mass_c2/mass;
120
121    SetBaseParticle(theBaseParticle);
122    SetSecondaryParticle(G4Electron::Electron());
123
124    if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1);
125    EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
126
127    // model limit defined for alpha
128    eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
129    EmModel(1)->SetHighEnergyLimit(eth);
130
131    if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
132    AddEmModel(1, EmModel(1), new G4IonFluctuations());
133
134    if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 
135    EmModel(2)->SetLowEnergyLimit(eth);
136    EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
137    AddEmModel(2, EmModel(2), FluctModel());   
138
139    isInitialised = true;
140  }
141  // reinitialisation of corrections for the new run
142  EmModel(1)->ActivateNuclearStopping(nuclearStopping);
143  EmModel(2)->ActivateNuclearStopping(nuclearStopping);
144}
145
146//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
147
148void G4alphaIonisation::PrintInfo()
149{
150  if (G4Alpha::Alpha() == theParticle) {
151    if(EmModel(1) && EmModel(2)) {
152      G4cout << "      NuclearStopping= " << nuclearStopping
153             << G4endl;
154    }
155  }
156}
157
158//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.