G4IonParametrisedLossModel.icc

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 // $Id$
00027 //
00028 // ===========================================================================
00029 // GEANT4 class
00030 //
00031 // Class:                G4IonParametrisedLossModel
00032 //
00033 // Base class:           G4VEmModel (utils)
00034 // 
00035 // Author:               Anton Lechner (Anton.Lechner@cern.ch)
00036 //
00037 // First implementation: 10. 11. 2008
00038 //
00039 // Modifications: 03. 02. 2009 - Bug fix iterators (AL)
00040 //                11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler)
00041 //                               and modified method to add/remove tables
00042 //                               (tables are now built in initialisation phase),
00043 //                               Minor bug fix in ComputeDEDXPerVolume (AL)
00044 //                20. 11. 2009 - Added set-method for energy loss limit (AL)
00045 //                04. 11. 2010 - Moved virtual methods to the source (VI)
00046 //
00047 // Class description:
00048 //    Model for computing the energy loss of ions by employing a 
00049 //    parameterisation of dE/dx tables (default ICRU 73 tables). For 
00050 //    ion-material combinations and/or projectile energies not covered 
00051 //    by this model, the G4BraggIonModel and G4BetheBloch models are
00052 //    employed.
00053 //
00054 // Comments:
00055 //
00056 // =========================================================================== 
00057 
00058 inline G4double G4IonParametrisedLossModel::DeltaRayMeanEnergyTransferRate(
00059                                       const G4Material* material,
00060                                       const G4ParticleDefinition* particle,
00061                                       G4double kineticEnergy,
00062                                       G4double cutEnergy) {
00063 
00064   // ############## Mean energy transferred to delta-rays ###################
00065   // Computes the mean energy transfered to delta-rays per unit length,
00066   // considering only delta-rays with energies above the energy threshold 
00067   // (energy cut)
00068   //
00069   // The mean energy transfer rate is derived by using the differential
00070   // cross section given in the references below.
00071   //
00072   // See Geant4 physics reference manual (version 9.1), section 9.1.3
00073   // 
00074   // Ref.: W.M. Yao et al, Jour. of Phys. G 33 (2006) 1.
00075   //       B. Rossi, High energy particles, New York, NY: Prentice-Hall (1952).
00076   //
00077   // (Implementation adapted from G4BraggIonModel)
00078 
00079 
00080   //   *** Variables:
00081   //   kineticEnergy = kinetic energy of projectile
00082   //   totEnergy     = total energy of projectile, i.e. kinetic energy
00083   //                   plus rest energy (Mc^2)
00084   //   betaSquared   = beta of projectile squared, calculated as
00085   //                      beta^2 = 1 - 1 / (E/Mc^2)^2
00086   //                             = T * ( E + Mc^2 ) / E^2
00087   //                   where T = kineticEnergy, E = totEnergy
00088   //   cutEnergy     = energy threshold for secondary particle production
00089   //                   i.e. energy cut, below which energy transfered to 
00090   //                   electrons is treated as continuous loss of projectile
00091   //   maxKinEnergy  = maximum energy transferable to secondary electrons
00092   //   meanRate      = mean kinetic energy of delta ray (per unit length) 
00093   //                   (above cutEnergy)  
00094 
00095   G4double meanRate = 0.0;
00096 
00097   G4double maxKinEnergy = MaxSecondaryEnergy(particle, kineticEnergy);
00098 
00099   if (cutEnergy < maxKinEnergy) {
00100 
00101     G4double totalEnergy  = kineticEnergy + cacheMass;
00102     G4double betaSquared  = kineticEnergy * 
00103                   (totalEnergy + cacheMass) / (totalEnergy * totalEnergy);
00104 
00105     G4double cutMaxEnergyRatio = cutEnergy / maxKinEnergy;
00106 
00107     meanRate = 
00108         (- std::log(cutMaxEnergyRatio) - (1.0 - cutMaxEnergyRatio) * betaSquared) * 
00109         CLHEP::twopi_mc2_rcl2 * 
00110         (material->GetTotNbOfElectPerVolume()) / betaSquared;
00111 
00112     meanRate *= GetChargeSquareRatio(particle, material, kineticEnergy);
00113   }
00114   
00115   return meanRate;
00116 }
00117 
00118 inline
00119 void G4IonParametrisedLossModel::UpdateCache(
00120                              const G4ParticleDefinition* particle) {
00121 
00122   cacheParticle = particle;
00123   cacheMass = particle -> GetPDGMass();
00124   cacheElecMassRatio = CLHEP::electron_mass_c2 / cacheMass;
00125   G4double q = particle -> GetPDGCharge() / CLHEP::eplus;
00126   cacheChargeSquare = q * q;
00127 }
00128 
00129 inline
00130 LossTableList::iterator G4IonParametrisedLossModel::IsApplicable(
00131                     const G4ParticleDefinition* particle,  // Projectile (ion) 
00132                     const G4Material* material) {          // Target material
00133 
00134   LossTableList::iterator iter = lossTableList.end();
00135   LossTableList::iterator iterTables = lossTableList.begin();
00136   LossTableList::iterator iterTables_end = lossTableList.end();
00137 
00138   for(;iterTables != iterTables_end; iterTables++) {
00139       G4bool isApplicable = (*iterTables) -> 
00140                        IsApplicable(particle, material);
00141       if(isApplicable) {
00142          iter = iterTables;
00143          break;
00144       }
00145   }
00146 
00147   return iter;
00148 }
00149 
00150 
00151 inline
00152 void G4IonParametrisedLossModel::SetEnergyLossLimit(
00153                                             G4double ionEnergyLossLimit) {
00154 
00155   if(ionEnergyLossLimit > 0 && ionEnergyLossLimit <=1) {
00156 
00157      energyLossLimit = ionEnergyLossLimit;
00158   }
00159 }

Generated on Mon May 27 17:48:40 2013 for Geant4 by  doxygen 1.4.7