source: trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh @ 825

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

import all except CVS

File size: 5.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: G4BetheBlochModel.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-01-patch-02 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class header file
32//
33//
34// File name:     G4BetheBlochModel
35//
36// Author:        Vladimir Ivanchenko on base of Laszlo Urban code
37//
38// Creation date: 03.01.2002
39//
40// Modifications:
41//
42// 23-12-02 V.Ivanchenko change interface in order to moveto cut per region
43// 24-01-03 Make models region aware (V.Ivanchenko)
44// 13-02-03 Add name (V.Ivanchenko)
45// 12-11-03 Fix for GenericIons (V.Ivanchenko)
46// 24-03-05 Add G4EmCorrections (V.Ivanchenko)
47// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
48// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
49// 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
50
51//
52// Class Description:
53//
54// Implementation of Bethe-Bloch model of energy loss and
55// delta-electron production by heavy charged particles
56
57// -------------------------------------------------------------------
58//
59
60#ifndef G4BetheBlochModel_h
61#define G4BetheBlochModel_h 1
62
63#include "G4VEmModel.hh"
64
65class G4EmCorrections;
66class G4ParticleChangeForLoss;
67
68class G4BetheBlochModel : public G4VEmModel
69{
70
71public:
72
73  G4BetheBlochModel(const G4ParticleDefinition* p = 0,
74                    const G4String& nam = "BetheBloch");
75
76  virtual ~G4BetheBlochModel();
77
78  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
79
80  G4double MinEnergyCut(const G4ParticleDefinition*,
81                        const G4MaterialCutsCouple*);
82                       
83  virtual G4double ComputeCrossSectionPerElectron(
84                                 const G4ParticleDefinition*,
85                                 G4double kineticEnergy,
86                                 G4double cutEnergy,
87                                 G4double maxEnergy);
88                                 
89  virtual G4double ComputeCrossSectionPerAtom(
90                                 const G4ParticleDefinition*,
91                                 G4double kineticEnergy,
92                                 G4double Z, G4double A,
93                                 G4double cutEnergy,
94                                 G4double maxEnergy);
95                                                                 
96  virtual G4double CrossSectionPerVolume(const G4Material*,
97                                 const G4ParticleDefinition*,
98                                 G4double kineticEnergy,
99                                 G4double cutEnergy,
100                                 G4double maxEnergy);
101                                 
102  virtual G4double ComputeDEDXPerVolume(const G4Material*,
103                                        const G4ParticleDefinition*,
104                                        G4double kineticEnergy,
105                                        G4double cutEnergy);
106
107  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
108                                 const G4MaterialCutsCouple*,
109                                 const G4DynamicParticle*,
110                                 G4double tmin,
111                                 G4double maxEnergy);
112
113protected:
114
115  G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
116                              G4double kinEnergy);
117
118private:
119
120  void SetParticle(const G4ParticleDefinition* p);
121
122  // hide assignment operator
123  G4BetheBlochModel & operator=(const  G4BetheBlochModel &right);
124  G4BetheBlochModel(const  G4BetheBlochModel&);
125
126  const G4ParticleDefinition* particle;
127  G4ParticleDefinition*       theElectron;
128  G4EmCorrections*            corr;
129  G4ParticleChangeForLoss*    fParticleChange;
130
131  G4double mass;
132  G4double tlimit;
133  G4double spin;
134  G4double chargeSquare;
135  G4double ratio;
136  G4double twoln10;
137  G4double bg2lim;
138  G4double taulim;
139  G4bool   isIon;
140};
141
142//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
143
144inline G4double G4BetheBlochModel::MaxSecondaryEnergy(
145          const G4ParticleDefinition* pd,
146                G4double kinEnergy) 
147{
148  if(isIon) SetParticle(pd);
149  G4double tau  = kinEnergy/mass;
150  G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
151                  (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
152  return std::min(tmax,tlimit);
153}
154
155//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
156
157inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
158{
159  if(particle != p) {
160    particle = p;
161    mass = particle->GetPDGMass();
162    spin = particle->GetPDGSpin();
163    G4double q = particle->GetPDGCharge()/eplus;
164    chargeSquare = q*q;
165    ratio = electron_mass_c2/mass;
166    if(mass > 120.*MeV) tlimit = 51.2*GeV*std::pow(proton_mass_c2/mass,0.66667);
167  }
168}
169
170//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
171
172#endif
Note: See TracBrowser for help on using the repository browser.