G4eIonisation.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:     G4eIonisation
00034 //
00035 // Author:        Laszlo Urban
00036 //
00037 // Creation date: 20.03.1997
00038 //
00039 // Modifications:
00040 //
00041 // 07-04-98 remove 'tracking cut' of the ionizing particle, mma
00042 // 04-09-98 new methods SetBining() PrintInfo()
00043 // 07-09-98 Cleanup
00044 // 02-02-99 correction inDoIt , L.Urban
00045 // 10-02-00 modifications , new e.m. structure, L.Urban
00046 // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
00047 // 09-08-01 new methods Store/Retrieve PhysicsTable (mma)
00048 // 13-08-01 new function ComputeRestrictedMeandEdx()  (mma)
00049 // 17-09-01 migration of Materials to pure STL (mma)
00050 // 21-09-01 completion of RetrievePhysicsTable() (mma)
00051 // 29-10-01 all static functions no more inlined (mma)
00052 // 07-11-01 particleMass and Charge become local variables
00053 // 26-03-02 change access to cuts in BuildLossTables (V.Ivanchenko)
00054 // 30-04-02 V.Ivanchenko update to new design
00055 // 23-12-02 Change interface in order to move to cut per region (VI)
00056 // 26-12-02 Secondary production moved to derived classes (VI)
00057 // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
00058 // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko)
00059 // 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko)
00060 // 08-08-03 STD substitute standard  (V.Ivanchenko)
00061 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
00062 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
00063 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
00064 // 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma)
00065 // 02-09-05 Return SetStepLimits(1, 1*mm) (V.Ivantchenko)
00066 // 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
00067 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
00068 //
00069 // -------------------------------------------------------------------
00070 //
00071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00072 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00073 
00074 #include "G4eIonisation.hh"
00075 #include "G4Electron.hh"
00076 #include "G4MollerBhabhaModel.hh"
00077 #include "G4UniversalFluctuation.hh"
00078 #include "G4BohrFluctuations.hh"
00079 #include "G4UnitsTable.hh"
00080 
00081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00082 
00083 using namespace std;
00084 
00085 G4eIonisation::G4eIonisation(const G4String& name)
00086   : G4VEnergyLossProcess(name),
00087     theElectron(G4Electron::Electron()),
00088     isElectron(true),
00089     isInitialised(false)
00090 {
00091   //  SetStepFunction(0.2, 1*mm);
00092   SetProcessSubType(fIonisation);
00093   SetSecondaryParticle(theElectron);
00094 }
00095 
00096 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00097 
00098 G4eIonisation::~G4eIonisation()
00099 {}
00100 
00101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00102 
00103 G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
00104                                          const G4Material*,
00105                                          G4double cut)
00106 {
00107   G4double x = cut;
00108   if(isElectron) x += cut;
00109   return x;
00110 }
00111 
00112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00113 
00114 G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p)
00115 {
00116   return (&p == theElectron || &p == G4Positron::Positron());
00117 }
00118 
00119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00120 
00121 void G4eIonisation::InitialiseEnergyLossProcess(
00122                     const G4ParticleDefinition* part,
00123                     const G4ParticleDefinition*)
00124 {
00125   if(!isInitialised) {
00126     if(part != theElectron) { isElectron = false; }
00127     if (!EmModel()) { SetEmModel(new G4MollerBhabhaModel()); }
00128     EmModel()->SetLowEnergyLimit (MinKinEnergy());
00129     EmModel()->SetHighEnergyLimit(MaxKinEnergy());
00130     if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
00131                 
00132     AddEmModel(1, EmModel(), FluctModel());
00133     isInitialised = true;
00134   }
00135 }
00136 
00137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00138 
00139 void G4eIonisation::PrintInfo()
00140 {}
00141 
00142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

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