G4hhIonisation.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 // $Id: G4hhIonisation.cc 66996 2013-01-29 14:50:52Z gcosmo $
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class file
00031 //
00032 //
00033 // File name:     G4hhIonisation
00034 //
00035 // Author:        Vladimir Ivanchenko
00036 //
00037 // Creation date: 30.09.2005
00038 //
00039 // Modifications:
00040 // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
00041 // 27-10-06 Add maxKinEnergy (V.Ivantchenko)
00042 //
00043 //
00044 // -------------------------------------------------------------------
00045 //
00046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00048 
00049 #include "G4hhIonisation.hh"
00050 #include "G4PhysicalConstants.hh"
00051 #include "G4SystemOfUnits.hh"
00052 #include "G4BraggNoDeltaModel.hh"
00053 #include "G4BetheBlochNoDeltaModel.hh"
00054 #include "G4ICRU73NoDeltaModel.hh"
00055 #include "G4UniversalFluctuation.hh"
00056 #include "G4BohrFluctuations.hh"
00057 #include "G4IonFluctuations.hh"
00058 #include "G4UnitsTable.hh"
00059 #include "G4Electron.hh"
00060 #include "G4LossTableManager.hh"
00061 
00062 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00063 
00064 G4hhIonisation::G4hhIonisation(const G4String& name)
00065   : G4VEnergyLossProcess(name),
00066     theParticle(0),
00067     theBaseParticle(0),
00068     isInitialised(false)
00069 {
00070   SetStepFunction(0.1, 0.1*mm);
00071   SetVerboseLevel(1);
00072   SetProcessSubType(fIonisation);
00073   mass = 0.0;
00074   ratio = 0.0;
00075   flucModel = 0;
00076 }
00077 
00078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00079 
00080 G4hhIonisation::~G4hhIonisation()
00081 {}
00082 
00083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00084 
00085 G4bool G4hhIonisation::IsApplicable(const G4ParticleDefinition& p)
00086 {
00087   return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 100.0*MeV &&
00088          !p.IsShortLived());
00089 }
00090 
00091 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00092 
00093 G4double G4hhIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
00094                                           const G4Material*,
00095                                           G4double cut)
00096 {
00097   G4double x = 0.5*cut/electron_mass_c2;
00098   G4double y = electron_mass_c2/mass;
00099   G4double gam = x*y + std::sqrt((1. + x)*(1. + x*y*y));
00100   return mass*(gam - 1.0);
00101 }
00102 
00103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00104 
00105 void G4hhIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* part,
00106                                                  const G4ParticleDefinition* bpart)
00107 {
00108   if(isInitialised) { return; }
00109 
00110   theParticle = part;
00111   if(bpart) { 
00112     G4cout << "G4hhIonisation::InitialiseEnergyLossProcess WARNING: no "
00113            << "base particle should be defined for the process "
00114            << GetProcessName() << G4endl; 
00115   }
00116   SetBaseParticle(0);
00117   SetSecondaryParticle(G4Electron::Electron());
00118   mass  = theParticle->GetPDGMass();
00119   ratio = electron_mass_c2/mass;
00120   G4double eth = 2*MeV*mass/proton_mass_c2;
00121   flucModel = new G4IonFluctuations();
00122 
00123   G4double emin = std::min(MinKinEnergy(), 0.1*eth);
00124   G4double emax = std::max(MaxKinEnergy(), 100*eth);
00125 
00126   SetMinKinEnergy(emin);
00127   SetMaxKinEnergy(emax);
00128   G4int bin = G4lrint(G4LossTableManager::Instance()->GetNumberOfBinsPerDecade()
00129                       *std::log10(emax/emin));
00130   SetDEDXBinning(bin);
00131 
00132   G4VEmModel* em = 0; 
00133   if(part->GetPDGCharge() > 0.0) { em = new G4BraggNoDeltaModel(); }
00134   else { em = new G4ICRU73NoDeltaModel(); }
00135   em->SetLowEnergyLimit(emin);
00136   em->SetHighEnergyLimit(eth);
00137   AddEmModel(1, em, flucModel);
00138 
00139   em = new G4BetheBlochNoDeltaModel();
00140   em->SetLowEnergyLimit(eth);
00141   em->SetHighEnergyLimit(emax);
00142   AddEmModel(1, em, flucModel);
00143 
00144   if(verboseLevel>1) {
00145     G4cout << "G4hhIonisation is initialised" << G4endl;
00146   }
00147   isInitialised = true;
00148 }
00149 
00150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00151 
00152 void G4hhIonisation::PrintInfo()
00153 {
00154   G4cout << "      Delta-ray will not be produced; "
00155          << G4endl;
00156 }
00157 
00158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

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