G4ionIonisation.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$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class file
00031 //
00032 //
00033 // File name:     G4ionIonisation
00034 //
00035 // Author:        Vladimir Ivanchenko
00036 //
00037 // Creation date: 07.05.2002
00038 //
00039 // Modifications:
00040 //
00041 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
00042 // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
00043 // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
00044 // 18-04-03 Use IonFluctuations (V.Ivanchenko)
00045 // 03-08-03 Add effective charge (V.Ivanchenko)
00046 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
00047 // 27-05-04 Set integral to be a default regime (V.Ivanchenko)
00048 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
00049 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
00050 // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
00051 // 10-05-06 Add a possibility to download user data (V.Ivantchenko)
00052 // 13-05-06 Add data for light ion stopping in water (V.Ivantchenko)
00053 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
00054 // 16-05-07 Add data for light ion stopping only for GenericIon (V.Ivantchenko)
00055 // 07-11-07 Fill non-ionizing energy loss (V.Ivantchenko)
00056 // 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI)
00057 //
00058 //
00059 // -------------------------------------------------------------------
00060 //
00061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00062 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00063 
00064 #include "G4ionIonisation.hh"
00065 #include "G4PhysicalConstants.hh"
00066 #include "G4SystemOfUnits.hh"
00067 #include "G4Electron.hh"
00068 #include "G4Proton.hh"
00069 #include "G4GenericIon.hh"
00070 #include "G4BraggModel.hh"
00071 #include "G4BraggIonModel.hh"
00072 #include "G4BetheBlochModel.hh"
00073 #include "G4UnitsTable.hh"
00074 #include "G4LossTableManager.hh"
00075 #include "G4WaterStopping.hh"
00076 #include "G4EmCorrections.hh"
00077 #include "G4IonFluctuations.hh"
00078 
00079 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00080 
00081 using namespace std;
00082 
00083 G4ionIonisation::G4ionIonisation(const G4String& name)
00084   : G4VEnergyLossProcess(name),
00085     theParticle(0),
00086     isInitialised(false),
00087     stopDataActive(true)
00088 {
00089   SetLinearLossLimit(0.02);
00090   SetStepFunction(0.1, 0.01*mm);
00091   SetProcessSubType(fIonisation);
00092   SetSecondaryParticle(G4Electron::Electron());
00093   corr = G4LossTableManager::Instance()->EmCorrections();
00094   eth = 2*MeV;
00095 }
00096 
00097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00098 
00099 G4ionIonisation::~G4ionIonisation()
00100 {}
00101 
00102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00103 
00104 G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
00105 {
00106   return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&
00107           p.GetParticleType() == "nucleus");
00108 }
00109 
00110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00111 
00112 G4double G4ionIonisation::MinPrimaryEnergy(const G4ParticleDefinition* p, 
00113                                            const G4Material*, 
00114                                            G4double cut)
00115 {
00116   return 
00117     p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);
00118 }
00119 
00120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00121 
00122 void G4ionIonisation::InitialiseEnergyLossProcess(
00123                       const G4ParticleDefinition* part,
00124                       const G4ParticleDefinition* bpart)
00125 {
00126   const G4ParticleDefinition* ion = G4GenericIon::GenericIon();
00127 
00128   if(!isInitialised) {
00129 
00130     theParticle = part;
00131 
00132     // define base particle
00133     const G4ParticleDefinition* theBaseParticle = 0;
00134 
00135     if(part == ion)     { theBaseParticle = 0; }
00136     else if(bpart == 0) { theBaseParticle = ion; }
00137     else                { theBaseParticle = bpart; }
00138 
00139     SetBaseParticle(theBaseParticle);
00140 
00141     if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); }
00142     EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
00143 
00144     // model limit defined for protons
00145     eth = (EmModel(1)->HighEnergyLimit())*part->GetPDGMass()/proton_mass_c2;
00146     EmModel(1)->SetHighEnergyLimit(eth);
00147 
00148     if (!FluctModel()) { SetFluctModel(new G4IonFluctuations()); }
00149     AddEmModel(1, EmModel(1), FluctModel());
00150 
00151     if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }  
00152     EmModel(2)->SetLowEnergyLimit(eth);
00153     EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
00154     AddEmModel(2, EmModel(2), FluctModel());    
00155 
00156     // Add ion stoping tables for Generic Ion
00157     if(part == ion) {
00158       G4WaterStopping  ws(corr);
00159       corr->SetIonisationModels(EmModel(1),EmModel(2));
00160     }
00161     isInitialised = true;
00162   }
00163   // reinitialisation of corrections for the new run
00164   if(part == ion) { corr->InitialiseForNewRun(); }
00165 }
00166 
00167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00168 
00169 void G4ionIonisation::PrintInfo()
00170 {
00171   if (stopDataActive && G4GenericIon::GenericIon() == theParticle) {
00172     G4cout << "      Stopping Power data for " 
00173            << corr->GetNumberOfStoppingVectors()
00174            << " ion/material pairs "
00175            << G4endl;
00176   }
00177 }
00178 
00179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00180 
00181 void G4ionIonisation::AddStoppingData(G4int Z, G4int A,
00182                                       const G4String& mname,
00183                                       G4PhysicsVector* dVector)
00184 {
00185   corr->AddStoppingData(Z, A, mname, dVector);
00186 }
00187 
00188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

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