source: trunk/source/processes/electromagnetic/standard/include/G4BohrFluctuations.hh @ 991

Last change on this file since 991 was 991, checked in by garnier, 15 years ago

update

File size: 4.1 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: G4BohrFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-02 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class header file
32//
33//
34// File name:     G4BohrFluctuations
35//
36// Author:        Vladimir Ivanchenko
37//
38// Creation date: 02.04.2003
39//
40// Modifications:
41//
42// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
43//
44// Class Description:
45//
46// Implementation of Gaussion energy loss Fluctuations
47
48// -------------------------------------------------------------------
49//
50
51#ifndef G4BohrFluctuations_h
52#define G4BohrFluctuations_h 1
53
54
55#include "G4VEmFluctuationModel.hh"
56#include "G4Material.hh"
57#include "G4DynamicParticle.hh"
58
59class G4BohrFluctuations : public G4VEmFluctuationModel
60{
61
62public:
63
64  G4BohrFluctuations(const G4String& nam = "BohrFluc");
65
66  virtual ~G4BohrFluctuations();
67
68  G4double SampleFluctuations(const G4Material*,
69                              const G4DynamicParticle*,
70                                    G4double&,
71                                    G4double&,
72                                    G4double&);
73
74  G4double Dispersion(    const G4Material*,
75                          const G4DynamicParticle*,
76                                G4double&,
77                                G4double&);
78
79  void InitialiseMe(const G4ParticleDefinition*);
80
81protected:
82
83private:
84
85  // hide assignment operator
86  G4BohrFluctuations & operator=(const  G4BohrFluctuations &right);
87  G4BohrFluctuations(const  G4BohrFluctuations&);
88
89  const G4ParticleDefinition* particle;
90
91  G4double particleMass;
92  G4double chargeSquare;
93
94  G4double minNumberInteractionsBohr;
95  G4double minFraction;
96  G4double xmin;
97  G4double minLoss;
98  // cash
99  G4double kineticEnergy;
100  G4double beta2;
101};
102
103//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
104
105
106inline G4double G4BohrFluctuations::Dispersion(
107                          const G4Material* material,
108                          const G4DynamicParticle* dp,
109                                G4double& tmax,
110                                G4double& length)
111{
112  if(!particle) InitialiseMe(dp->GetDefinition());
113
114  G4double electronDensity = material->GetElectronDensity();
115  kineticEnergy = dp->GetKineticEnergy();
116  G4double etot = kineticEnergy + particleMass;
117  beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
118  G4double siga  = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
119                 * electronDensity * chargeSquare;
120
121  return siga;
122}
123
124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
125
126#endif
127
Note: See TracBrowser for help on using the repository browser.