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

Last change on this file since 1036 was 1007, checked in by garnier, 17 years ago

update to geant4.9.2

File size: 3.3 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//
[961]26// $Id: G4ionGasIonisation.cc,v 1.14 2008/09/12 16:26:34 vnivanch Exp $
[1007]27// GEANT4 tag $Name: geant4-09-02 $
[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{
60}
61
62//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63
64G4ionGasIonisation::~G4ionGasIonisation()
65{}
66
[961]67/*
[819]68//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
69
70G4double G4ionGasIonisation::SampleChargeAfterStep(G4double qeff, G4double xeff)
71{
72 // qeff - equilibrium charge
73 // xeff - effective number of collisions
74 // q - current charge
[961]75 G4double q = G4double(currentIonZ);
76 if(qeff > q) {
77 if(G4UniformRand() < qeff - q) currentIonZ++;
78 } else {
79 if(G4UniformRand() < q - qeff) currentIonZ--;
80 }
81
82 q = eplus*currentIonZ;
[819]83 if(verboseLevel > 1) G4cout << "G4ionGasIonisation: Q1= " << currentIonZ
84 << " Qeff= " << qeff/eplus << " Neff= " << xeff
85 << G4endl;
86 return q;
87}
[961]88*/
[819]89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.