G4RToEConvForElectron.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //
00030 // --------------------------------------------------------------
00031 //      GEANT 4 class implementation file/  History:
00032 //    5 Oct. 2002, H.Kuirashige : Structure created based on object model
00033 // --------------------------------------------------------------
00034 
00035 #include "G4RToEConvForElectron.hh"
00036 #include "G4ParticleDefinition.hh"
00037 #include "G4ParticleTable.hh"
00038 #include "G4Material.hh"
00039 #include "G4PhysicsLogVector.hh"
00040 
00041 #include "G4ios.hh"
00042 #include "G4PhysicalConstants.hh"
00043 #include "G4SystemOfUnits.hh"
00044 
00045 G4RToEConvForElectron::G4RToEConvForElectron() : G4VRangeToEnergyConverter()
00046 {    
00047   theParticle =  G4ParticleTable::GetParticleTable()->FindParticle("e-");
00048   if (theParticle ==0) {
00049 #ifdef G4VERBOSE
00050     if (GetVerboseLevel()>0) {
00051       G4cout << " G4RToEConvForElectron::G4RToEConvForElectron() ";
00052       G4cout << " Electron is not defined !!" << G4endl;
00053     }
00054 #endif
00055   } 
00056 }
00057 
00058 G4RToEConvForElectron::~G4RToEConvForElectron()
00059 { 
00060 }
00061 
00062 
00063 // **********************************************************************
00064 // ************************* ComputeLoss ********************************
00065 // **********************************************************************
00066 G4double G4RToEConvForElectron::ComputeLoss(G4double AtomicNumber,
00067                                             G4double KineticEnergy) const
00068 {
00069   static G4double Z;  
00070   static G4double taul, ionpot, ionpotlog;
00071   const  G4double cbr1=0.02, cbr2=-5.7e-5, cbr3=1., cbr4=0.072;
00072   const  G4double Tlow=10.*keV, Thigh=1.*GeV;
00073   static G4double bremfactor= 0.1 ;
00074 
00075   static G4double Mass= theParticle->GetPDGMass();
00076 
00077   //  calculate dE/dx for electrons
00078   if( std::fabs(AtomicNumber-Z)>0.1 ) {
00079     Z = AtomicNumber;
00080     taul = Tlow/Mass;
00081     ionpot = 1.6e-5*MeV*std::exp(0.9*std::log(Z))/Mass;
00082     ionpotlog = std::log(ionpot);
00083   } 
00084 
00085 
00086   G4double tau = KineticEnergy/Mass;
00087   G4double dEdx;
00088 
00089   if(tau<taul) {
00090     G4double t1 = taul+1.;
00091     G4double t2 = taul+2.;
00092     G4double tsq = taul*taul;
00093     G4double beta2 = taul*t2/(t1*t1);
00094     G4double f = 1.-beta2+std::log(tsq/2.)
00095                   +(0.5+0.25*tsq+(1.+2.*taul)*std::log(0.5))/(t1*t1);
00096     dEdx = (std::log(2.*taul+4.)-2.*ionpotlog+f)/beta2;
00097     dEdx = twopi_mc2_rcl2*Z*dEdx;
00098     G4double clow = dEdx*std::sqrt(taul);
00099     dEdx = clow/std::sqrt(KineticEnergy/Mass);
00100 
00101   } else {
00102     G4double t1 = tau+1.;
00103     G4double t2 = tau+2.;
00104     G4double tsq = tau*tau;
00105     G4double beta2 = tau*t2/(t1*t1);
00106     G4double f = 1.-beta2+std::log(tsq/2.)
00107                    +(0.5+0.25*tsq+(1.+2.*tau)*std::log(0.5))/(t1*t1);
00108     dEdx = (std::log(2.*tau+4.)-2.*ionpotlog+f)/beta2;
00109     dEdx = twopi_mc2_rcl2*Z*dEdx;
00110 
00111     // loss from bremsstrahlung follows
00112     G4double cbrem = (cbr1+cbr2*Z)
00113                        *(cbr3+cbr4*std::log(KineticEnergy/Thigh));
00114     cbrem = Z*(Z+1.)*cbrem*tau/beta2;
00115 
00116     cbrem *= bremfactor ;
00117 
00118     dEdx += twopi_mc2_rcl2*cbrem;
00119   }
00120 
00121   return dEdx;
00122 }

Generated on Mon May 27 17:49:46 2013 for Geant4 by  doxygen 1.4.7