source: trunk/source/processes/electromagnetic/standard/src/G4ionIonisation.cc @ 846

Last change on this file since 846 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 7.6 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: G4ionIonisation.cc,v 1.45.2.2 2008/04/25 00:34:55 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-01-patch-02 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name:     G4ionIonisation
35//
36// Author:        Vladimir Ivanchenko
37//
38// Creation date: 07.05.2002
39//
40// Modifications:
41//
42// 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
43// 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
44// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
45// 18-04-03 Use IonFluctuations (V.Ivanchenko)
46// 03-08-03 Add effective charge (V.Ivanchenko)
47// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
48// 27-05-04 Set integral to be a default regime (V.Ivanchenko)
49// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
50// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
51// 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
52// 10-05-06 Add a possibility to download user data (V.Ivantchenko)
53// 13-05-06 Add data for light ion stopping in water (V.Ivantchenko)
54// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
55// 16-05-07 Add data for light ion stopping only for GenericIon (V.Ivantchenko)
56// 07-11-07 Fill non-ionizing energy loss (V.Ivantchenko)
57//
58//
59// -------------------------------------------------------------------
60//
61//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
62//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63
64#include "G4ionIonisation.hh"
65#include "G4Electron.hh"
66#include "G4Proton.hh"
67#include "G4GenericIon.hh"
68#include "G4BraggModel.hh"
69#include "G4BraggIonModel.hh"
70#include "G4BetheBlochModel.hh"
71#include "G4IonFluctuations.hh"
72#include "G4UnitsTable.hh"
73#include "G4LossTableManager.hh"
74#include "G4WaterStopping.hh"
75
76//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
77
78using namespace std;
79
80G4ionIonisation::G4ionIonisation(const G4String& name)
81  : G4VEnergyLossProcess(name),
82    theParticle(0),
83    theBaseParticle(0),
84    isInitialised(false),
85    stopDataActive(true),
86    nuclearStopping(true)
87{
88  SetLinearLossLimit(0.15);
89  SetStepFunction(0.1, 0.1*mm);
90  SetIntegral(true);
91  SetVerboseLevel(1);
92  corr = G4LossTableManager::Instance()->EmCorrections();
93}
94
95//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
96
97G4ionIonisation::~G4ionIonisation()
98{}
99
100//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
101
102void G4ionIonisation::InitialiseEnergyLossProcess(
103                      const G4ParticleDefinition* part,
104                      const G4ParticleDefinition* bpart)
105{
106  if(isInitialised) return;
107
108  theParticle = part;
109
110  if(part == bpart || part == G4GenericIon::GenericIon()) theBaseParticle = 0;
111  else if(bpart == 0) theBaseParticle = G4GenericIon::GenericIon();
112  else                theBaseParticle = bpart;
113
114  SetBaseParticle(theBaseParticle);
115  SetSecondaryParticle(G4Electron::Electron());
116
117  if(theBaseParticle) baseMass = theBaseParticle->GetPDGMass();
118  else                baseMass = theParticle->GetPDGMass();
119 
120  if (!EmModel(1)) SetEmModel(new G4BraggIonModel(),1);
121  EmModel(1)->SetLowEnergyLimit(100*eV);
122  eth = 2.0*MeV; 
123  EmModel(1)->SetHighEnergyLimit(eth);
124  if (!FluctModel()) SetFluctModel(new G4IonFluctuations());
125  AddEmModel(1, EmModel(1), FluctModel());
126
127  if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 
128  EmModel(2)->SetLowEnergyLimit(eth);
129  EmModel(2)->SetHighEnergyLimit(100*TeV);
130  AddEmModel(2, EmModel(2), FluctModel());   
131
132  // Add ion stoping tables for Generic Ion
133  if(part == G4GenericIon::GenericIon()) {
134    G4WaterStopping  ws(corr);
135    effCharge = corr->GetIonEffectiveCharge(EmModel(1));
136  } else {
137    effCharge = corr->GetIonEffectiveCharge(0);
138  }
139
140  isInitialised = true;
141}
142
143//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
144
145void G4ionIonisation::PrintInfo()
146{
147  if(EmModel(1) && EmModel(2))
148    G4cout << "      Scaling relation is used from proton dE/dx and range."
149           << "\n      Delta cross sections and sampling from " 
150           << EmModel(2)->GetName() << " model for scaled energy > "
151           << eth/MeV << " MeV"
152           << "\n      Parametrisation from "
153           << EmModel(1)->GetName() << " for protons below."
154           << " NuclearStopping= " << nuclearStopping
155           << G4endl;   
156  if (stopDataActive)
157    G4cout << "\n      Stopping Power data for " 
158           << corr->GetNumberOfStoppingVectors()
159           << " ion/material pairs are used."
160           << G4endl;
161}
162
163//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
164
165void G4ionIonisation::AddStoppingData(G4int Z, G4int A,
166                                      const G4String& mname,
167                                      G4PhysicsVector& dVector)
168{
169  corr->AddStoppingData(Z, A, mname, dVector);
170}
171
172//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
173
174void G4ionIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
175                                           const G4DynamicParticle* dp,
176                                           G4double& eloss,
177                                           G4double& s)
178{
179  const G4ParticleDefinition* part = dp->GetDefinition();
180  const G4Material* mat = couple->GetMaterial();
181  if(eloss < preKinEnergy) {
182    //    G4cout << "e= " << preKinEnergy << " ratio= " << massRatio << " eth= " << eth<<  G4endl;
183    if(preKinEnergy*massRatio > eth)
184      eloss += s*corr->HighOrderCorrections(part,mat,preKinEnergy);
185    else {
186
187      if(stopDataActive)
188        eloss *= corr->EffectiveChargeCorrection(part,mat,preKinEnergy);
189
190    }
191    fParticleChange.SetProposedCharge(effCharge->EffectiveCharge(part,
192                                      mat,preKinEnergy-eloss));
193  }
194  if(nuclearStopping && preKinEnergy*massRatio < 50.*eth*charge2) {
195    G4double nloss = s*corr->NuclearDEDX(part,mat,preKinEnergy - eloss*0.5);
196    eloss += nloss;
197    //  G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy
198    //     << " de= " << eloss << " NIEL= " << nloss << G4endl;
199    fParticleChange.ProposeNonIonizingEnergyDeposit(nloss);
200  }
201}
202
203//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.