source: trunk/source/processes/electromagnetic/standard/src/G4ionGasIonisation.cc@ 1199

Last change on this file since 1199 was 1196, checked in by garnier, 16 years ago

update CVS release candidate geant4.9.3.01

File size: 3.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//
[1196]26// $Id: G4ionGasIonisation.cc,v 1.15 2009/11/10 11:50:30 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-03-cand-01 $
[819]28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class file
32//
33//
34// File name: G4ionGasIonisation
35//
36// Author: Vladimir Ivanchenko
37//
38// Creation date: 23.07.2007
39//
40// Modifications:
41//
42//
43// -------------------------------------------------------------------
44//
45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
47
48#include "G4ionGasIonisation.hh"
49#include "G4Electron.hh"
50#include "G4Proton.hh"
51#include "G4GenericIon.hh"
52
53//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
54
55using namespace std;
56
57G4ionGasIonisation::G4ionGasIonisation(const G4String& name)
[961]58 : G4ionIonisation(name)
[819]59{
[1196]60 G4cout << G4endl;
61 G4cout << "!!! G4ionGasIonisation class is obsolete and may be removed for the next major Geant4 release !!!" << G4endl;
62 G4cout << "!!! Please use G4ionIonisation for ions !!!" << G4endl;
63 G4cout << G4endl;
[819]64}
65
66//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
67
68G4ionGasIonisation::~G4ionGasIonisation()
69{}
70
[961]71/*
[819]72//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
73
74G4double G4ionGasIonisation::SampleChargeAfterStep(G4double qeff, G4double xeff)
75{
76 // qeff - equilibrium charge
77 // xeff - effective number of collisions
78 // q - current charge
[961]79 G4double q = G4double(currentIonZ);
80 if(qeff > q) {
81 if(G4UniformRand() < qeff - q) currentIonZ++;
82 } else {
83 if(G4UniformRand() < q - qeff) currentIonZ--;
84 }
85
86 q = eplus*currentIonZ;
[819]87 if(verboseLevel > 1) G4cout << "G4ionGasIonisation: Q1= " << currentIonZ
88 << " Qeff= " << qeff/eplus << " Neff= " << xeff
89 << G4endl;
90 return q;
91}
[961]92*/
[819]93//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.