Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:11

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // -------------------------------------------------------------------
0028 //
0029 // GEANT4 Class file
0030 //
0031 //
0032 // File name:     G4eIonisationSpectrum
0033 //
0034 // Author:        V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
0035 // 
0036 // Creation date: 27 September 2001
0037 //
0038 // Modifications: 
0039 // 10.10.01 MGP             Revision to improve code quality and 
0040 //                          consistency with design
0041 // 29.11.01  V.Ivanchenko   Parametrisation is updated
0042 // 30.05.02  VI             Add inline functions
0043 //
0044 // -------------------------------------------------------------------
0045 
0046 // Class Description: 
0047 // Provides various integration over delta-electron spectrum for e- 
0048 // ionisation process. Spectrum is parametrised accourding to 
0049 // EEDL database, details are described in the Physics Reference Manual
0050 // Further documentation available from http://www.ge.infn.it/geant4/lowE
0051 
0052 // -------------------------------------------------------------------
0053 
0054 #ifndef G4EIONISATIONSPECTRUM_HH
0055 #define G4EIONISATIONSPECTRUM_HH 1
0056 
0057 #include "G4VEnergySpectrum.hh"
0058 #include "G4eIonisationParameters.hh"
0059  
0060 //class G4eIonisationParameters;
0061 class G4DataVector;
0062 
0063 class G4eIonisationSpectrum : public G4VEnergySpectrum
0064 {
0065 
0066 public:
0067 
0068   G4eIonisationSpectrum();
0069 
0070   ~G4eIonisationSpectrum();
0071 
0072   G4double Probability(G4int Z, G4double tMin, G4double tMax, 
0073                G4double kineticEnergy, G4int shell,
0074                const G4ParticleDefinition* pd=0) const;
0075 
0076   G4double AverageEnergy(G4int Z, G4double tMin, G4double tMax,
0077              G4double kineticEnergy, G4int shell,
0078              const G4ParticleDefinition* pd=0) const;
0079 
0080   G4double SampleEnergy(G4int Z, G4double tMin, G4double tMax,
0081             G4double kineticEnergy, G4int shell,
0082             const G4ParticleDefinition* pd=0) const;
0083 
0084   G4double MaxEnergyOfSecondaries(G4double kineticEnergy,
0085                                   G4int Z = 0,
0086                   const G4ParticleDefinition* pd=0) const;
0087 
0088   G4double Excitation(G4int Z, G4double e) const;
0089   
0090   void PrintData() const;
0091 
0092 protected:
0093 
0094 private:
0095 
0096   G4double IntSpectrum(G4double xMin, G4double xMax,
0097                          const G4DataVector& p) const; 
0098   
0099   G4double AverageValue(G4double xMin, G4double xMax,
0100             const G4DataVector& p) const; 
0101   
0102   G4double Function(G4double x, const G4DataVector& p) const; 
0103   
0104   // Hide copy constructor and assignment operator 
0105   G4eIonisationSpectrum(const  G4eIonisationSpectrum&);
0106   G4eIonisationSpectrum & operator = (const G4eIonisationSpectrum &right);
0107   
0108 private:
0109   
0110   G4eIonisationParameters* theParam;
0111   G4double                 lowestE;
0112   G4double                 factor;
0113   G4int                    iMax;            
0114   G4int                    verbose;
0115 };
0116 
0117 
0118 inline G4double G4eIonisationSpectrum::Function(G4double x, 
0119                           const G4DataVector& p) const
0120 {
0121   G4double f = 1.0 - p[0] - p[iMax]*x 
0122              + x*x*(1.0 - p[iMax] + (1.0/(1.0 - x) - p[iMax])/(1.0 - x))
0123              + 0.5*p[0]/x;
0124 
0125   return f;
0126 } 
0127 
0128 inline G4double G4eIonisationSpectrum::Excitation(G4int Z, G4double e) const 
0129 {
0130   return theParam->Excitation(Z, e);
0131 }
0132 
0133 
0134 #endif