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: G4mplIonisation.cc 66996 2013-01-29 14:50:52Z gcosmo $ 00027 // 00028 // ------------------------------------------------------------------- 00029 // 00030 // GEANT4 Class file 00031 // 00032 // 00033 // File name: G4mplIonisation 00034 // 00035 // Author: Vladimir Ivanchenko 00036 // 00037 // Creation date: 25.08.2005 00038 // 00039 // Modifications: 00040 // 00041 // 00042 // ------------------------------------------------------------------- 00043 // 00044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00045 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00046 00047 #include "G4mplIonisation.hh" 00048 #include "G4PhysicalConstants.hh" 00049 #include "G4SystemOfUnits.hh" 00050 #include "G4Electron.hh" 00051 #include "G4mplIonisationModel.hh" 00052 #include "G4mplIonisationWithDeltaModel.hh" 00053 #include "G4LossTableManager.hh" 00054 00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00056 00057 using namespace std; 00058 00059 G4mplIonisation::G4mplIonisation(G4double mCharge, const G4String& name) 00060 : G4VEnergyLossProcess(name), 00061 magneticCharge(mCharge), 00062 isInitialised(false) 00063 { 00064 // By default classical magnetic charge is used 00065 if(magneticCharge == 0.0) { magneticCharge = eplus*0.5/fine_structure_const; } 00066 00067 SetVerboseLevel(0); 00068 SetProcessSubType(fIonisation); 00069 SetStepFunction(0.2, 1*mm); 00070 SetSecondaryParticle(G4Electron::Electron()); 00071 } 00072 00073 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00074 00075 G4mplIonisation::~G4mplIonisation() 00076 {} 00077 00078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00079 00080 G4bool G4mplIonisation::IsApplicable(const G4ParticleDefinition&) 00081 { 00082 return true; 00083 } 00084 00085 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00086 00087 void G4mplIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* p, 00088 const G4ParticleDefinition*) 00089 { 00090 if(isInitialised) { return; } 00091 00092 SetBaseParticle(0); 00093 00094 // monopole model is responsible both for energy loss and fluctuations 00095 G4mplIonisationWithDeltaModel* ion = 00096 new G4mplIonisationWithDeltaModel(magneticCharge,"PAI"); 00097 ion->SetParticle(p); 00098 00099 // define size of dedx and range tables 00100 G4double emin = std::min(MinKinEnergy(),ion->LowEnergyLimit()); 00101 G4double emax = std::max(MaxKinEnergy(),ion->HighEnergyLimit()); 00102 G4int bin = G4lrint(G4LossTableManager::Instance()->GetNumberOfBinsPerDecade() 00103 *std::log10(emax/emin)); 00104 ion->SetLowEnergyLimit(emin); 00105 ion->SetHighEnergyLimit(emax); 00106 SetMinKinEnergy(emin); 00107 SetMaxKinEnergy(emax); 00108 SetDEDXBinning(bin); 00109 00110 AddEmModel(1,ion,ion); 00111 00112 isInitialised = true; 00113 } 00114 00115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00116 00117 void G4mplIonisation::PrintInfo() 00118 { 00119 G4cout << " No delta-electron production, only dE/dx" 00120 << G4endl; 00121 } 00122 00123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....