Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // >> 26 // $Id: G4GammaConversion.cc,v 1.27 2006/09/14 10:27:19 maire Exp $ >> 27 // GEANT4 tag $Name: geant4-09-00 $ 26 // 28 // 27 // 29 // 28 //------------------ G4GammaConversion physics 30 //------------------ G4GammaConversion physics process ------------------------- 29 // by Michel Maire, 24 May 1 31 // by Michel Maire, 24 May 1996 30 // 32 // 31 // Modified by Michel Maire and Vladimir Ivanc << 33 // 11-06-96 Added SelectRandomAtom() method, M.Maire 32 // << 34 // 21-06-96 SetCuts implementation, M.Maire >> 35 // 24-06-96 simplification in ComputeCrossSectionPerAtom, M.Maire >> 36 // 24-06-96 in DoIt : change the particleType stuff, M.Maire >> 37 // 25-06-96 modification in the generation of the teta angle, M.Maire >> 38 // 16-09-96 minors optimisations in DoIt. Thanks to P.Urban >> 39 // dynamical array PartialSumSigma >> 40 // 13-12-96 fast sampling of epsil below 2 MeV, L.Urban >> 41 // 14-01-97 crossection table + meanfreepath table. >> 42 // PartialSumSigma removed, M.Maire >> 43 // 14-01-97 in DoIt the positron is always created, even with Ekine=0, >> 44 // for further annihilation, M.Maire >> 45 // 14-03-97 new Physics scheme for geant4alpha, M.Maire >> 46 // 28-03-97 protection in BuildPhysicsTable, M.Maire >> 47 // 19-06-97 correction in ComputeCrossSectionPerAtom, L.Urban >> 48 // 04-06-98 in DoIt, secondary production condition: >> 49 // range>std::min(threshold,safety) >> 50 // 13-08-98 new methods SetBining() PrintInfo() >> 51 // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation >> 52 // 11-07-01 PostStepDoIt - sampling epsil: power(rndm,0.333333) >> 53 // 13-07-01 DoIt: suppression of production cut for the (e-,e+) (mma) >> 54 // 06-08-01 new methods Store/Retrieve PhysicsTable (mma) >> 55 // 06-08-01 BuildThePhysicsTable() called from constructor (mma) >> 56 // 17-09-01 migration of Materials to pure STL (mma) >> 57 // 20-09-01 DoIt: fminimalEnergy = 1*eV (mma) >> 58 // 01-10-01 come back to BuildPhysicsTable(const G4ParticleDefinition&) >> 59 // 11-01-02 ComputeCrossSection: correction of extrapolation below EnergyLimit >> 60 // 21-03-02 DoIt: correction of the e+e- angular distribution (bug 363) mma >> 61 // 08-11-04 Remove of Store/Retrieve tables (V.Ivantchenko) >> 62 // 19-04-05 Migrate to model interface and inherit >> 63 // from G4VEmProcess (V.Ivanchenko) >> 64 // 04-05-05, Make class to be default (V.Ivanchenko) >> 65 // 09-08-06, add SetModel(G4VEmModel*) (mma) >> 66 // 12-09-06, move SetModel(G4VEmModel*) in G4VEmProcess (mma) 33 // ------------------------------------------- 67 // ----------------------------------------------------------------------------- 34 68 35 #include "G4GammaConversion.hh" 69 #include "G4GammaConversion.hh" 36 #include "G4PhysicalConstants.hh" << 70 #include "G4BetheHeitlerModel.hh" 37 #include "G4SystemOfUnits.hh" << 38 #include "G4PairProductionRelModel.hh" << 39 #include "G4Electron.hh" 71 #include "G4Electron.hh" 40 #include "G4EmParameters.hh" << 41 72 42 //....oooOO0OOooo........oooOO0OOooo........oo 73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 43 74 >> 75 using namespace std; >> 76 44 G4GammaConversion::G4GammaConversion(const G4S 77 G4GammaConversion::G4GammaConversion(const G4String& processName, 45 G4ProcessType type):G4VEmProcess (processNam << 78 G4ProcessType type):G4VEmProcess (processName, type), >> 79 isInitialised(false) 46 { 80 { 47 SetMinKinEnergy(2.0*CLHEP::electron_mass_c2) << 81 SetLambdaBinning(100); 48 SetProcessSubType(fGammaConversion); << 82 SetMinKinEnergy(2.0*electron_mass_c2); 49 SetStartFromNullFlag(true); << 83 SetMaxKinEnergy(100.0*GeV); 50 SetBuildTableFlag(true); << 51 SetSecondaryParticle(G4Electron::Electron()) << 52 SetLambdaBinning(220); << 53 } 84 } 54 85 55 //....oooOO0OOooo........oooOO0OOooo........oo 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 56 87 57 G4GammaConversion::~G4GammaConversion() = defa << 88 G4GammaConversion::~G4GammaConversion() 58 << 89 {} 59 //....oooOO0OOooo........oooOO0OOooo........oo << 60 << 61 G4bool G4GammaConversion::IsApplicable(const G << 62 { << 63 return (&p == G4Gamma::Gamma()); << 64 } << 65 90 66 //....oooOO0OOooo........oooOO0OOooo........oo 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 67 92 68 void G4GammaConversion::InitialiseProcess(cons 93 void G4GammaConversion::InitialiseProcess(const G4ParticleDefinition*) 69 { 94 { 70 if(!isInitialised) { 95 if(!isInitialised) { 71 isInitialised = true; 96 isInitialised = true; 72 G4EmParameters* param = G4EmParameters::In << 97 SetBuildTableFlag(true); 73 G4double emin = std::max(param->MinKinEner << 98 SetSecondaryParticle(G4Electron::Electron()); 74 G4double emax = param->MaxKinEnergy(); << 99 G4double emin = max(MinKinEnergy(), 2.0*electron_mass_c2); 75 << 76 SetMinKinEnergy(emin); 100 SetMinKinEnergy(emin); 77 << 101 G4double emax = MaxKinEnergy(); 78 if(nullptr == EmModel(0)) { SetEmModel(new << 102 if(!Model()) SetModel(new G4BetheHeitlerModel); 79 EmModel(0)->SetLowEnergyLimit(emin); << 103 Model()->SetLowEnergyLimit(emin); 80 EmModel(0)->SetHighEnergyLimit(emax); << 104 Model()->SetHighEnergyLimit(emax); 81 AddEmModel(1, EmModel(0)); << 105 AddEmModel(1, Model()); 82 } 106 } 83 } 107 } 84 108 85 //....oooOO0OOooo........oooOO0OOooo........oo << 86 << 87 G4double G4GammaConversion::MinPrimaryEnergy(c << 88 const G4Material*) << 89 { << 90 return 2*CLHEP::electron_mass_c2; << 91 } << 92 << 93 //....oooOO0OOooo........oooOO0OOooo........oo 109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 94 110 95 void G4GammaConversion::ProcessDescription(std << 111 void G4GammaConversion::PrintInfo() 96 { 112 { 97 out << " Gamma conversion"; << 113 G4cout 98 G4VEmProcess::ProcessDescription(out); << 114 << " Total cross sections has a good parametrisation" 99 } << 115 << " from 1.5 MeV to 100 GeV for all Z;" >> 116 << "\n sampling secondary e+e- according " >> 117 << Model()->GetName() << " model" >> 118 << G4endl; >> 119 } 100 120 101 //....oooOO0OOooo........oooOO0OOooo........oo << 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 102 122