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: G4eBremsstrahlung 00034 // 00035 // Author: Michel Maire 00036 // 00037 // Creation date: 26.06.1996 00038 // 00039 // Modifications: 00040 // 00041 // 26-09-96 extension of the total crosssection above 100 GeV, M.Maire 00042 // 1-10-96 new type G4OrderedTable; ComputePartialSumSigma(), M.Maire 00043 // 16-10-96 DoIt() call to the non static GetEnergyCuts(), L.Urban 00044 // 13-12-96 Sign corrected in grejmax and greject 00045 // error definition of screenvar, L.Urban 00046 // 20-03-97 new energy loss+ionisation+brems scheme, L.Urban 00047 // 07-04-98 remove 'tracking cut' of the diffracted particle, MMa 00048 // 13-08-98 new methods SetBining() PrintInfo() 00049 // 03-03-99 Bug fixed in LPM effect, L.Urban 00050 // 10-02-00 modifications , new e.m. structure, L.Urban 00051 // 07-08-00 new cross section/en.loss parametrisation, LPM flag , L.Urban 00052 // 21-09-00 corrections in the LPM implementation, L.Urban 00053 // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation 00054 // 09-08-01 new methods Store/Retrieve PhysicsTable (mma) 00055 // 17-09-01 migration of Materials to pure STL (mma) 00056 // 21-09-01 completion of RetrievePhysicsTable() (mma) 00057 // 29-10-01 all static functions no more inlined (mma) 00058 // 08-11-01 particleMass becomes a local variable 00059 // 30-04-02 V.Ivanchenko update to new design 00060 // 23-12-02 Change interface in order to move to cut per region (VI) 00061 // 26-12-02 Secondary production moved to derived classes (VI) 00062 // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko) 00063 // 08-08-03 STD substitute standard (V.Ivanchenko) 00064 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) 00065 // 04-11-04 add gamma threshold (V.Ivanchenko) 00066 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) 00067 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 00068 // 22-05-06 Use gammaThreshold from manager (V.Ivantchenko) 00069 // 15-01-07 use SetEmModel() from G4VEnergyLossProcess (mma) 00070 // use RelEmModel above 1GeV (AS & VI) 00071 // 13-11-08 reenable LPM switch (A.Schaelicke) 00072 // ------------------------------------------------------------------- 00073 // 00074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00076 00077 #include "G4eBremsstrahlung.hh" 00078 #include "G4SystemOfUnits.hh" 00079 #include "G4Gamma.hh" 00080 #include "G4eBremsstrahlungModel.hh" 00081 #include "G4SeltzerBergerModel.hh" 00082 #include "G4eBremsstrahlungRelModel.hh" 00083 #include "G4UnitsTable.hh" 00084 #include "G4LossTableManager.hh" 00085 00086 #include "G4ProductionCutsTable.hh" 00087 #include "G4MaterialCutsCouple.hh" 00088 00089 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00090 00091 using namespace std; 00092 00093 G4eBremsstrahlung::G4eBremsstrahlung(const G4String& name): 00094 G4VEnergyLossProcess(name), 00095 isInitialised(false) 00096 { 00097 SetProcessSubType(fBremsstrahlung); 00098 SetSecondaryParticle(G4Gamma::Gamma()); 00099 SetIonisation(false); 00100 } 00101 00102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00103 00104 G4eBremsstrahlung::~G4eBremsstrahlung() 00105 {} 00106 00107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00108 00109 G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) 00110 { 00111 return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); 00112 } 00113 00114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00115 00116 void 00117 G4eBremsstrahlung::InitialiseEnergyLossProcess(const G4ParticleDefinition*, 00118 const G4ParticleDefinition*) 00119 { 00120 if(!isInitialised) { 00121 00122 // if (!EmModel(1)) { SetEmModel(new G4eBremsstrahlungModel(), 1); } 00123 if (!EmModel(1)) { SetEmModel(new G4SeltzerBergerModel(), 1); } 00124 if (!EmModel(2)) { SetEmModel(new G4eBremsstrahlungRelModel(), 2); } 00125 00126 G4double energyLimit = 1*GeV; 00127 00128 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 00129 EmModel(1)->SetHighEnergyLimit(energyLimit); 00130 EmModel(2)->SetLowEnergyLimit(energyLimit); 00131 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); 00132 00133 G4VEmFluctuationModel* fm = 0; 00134 AddEmModel(1, EmModel(1), fm); 00135 AddEmModel(2, EmModel(2), fm); 00136 isInitialised = true; 00137 } 00138 G4LossTableManager* man = G4LossTableManager::Instance(); 00139 G4double eth = man->BremsstrahlungTh(); 00140 EmModel(1)->SetSecondaryThreshold(eth); 00141 EmModel(2)->SetSecondaryThreshold(eth); 00142 00143 // Only high energy model LMP flag is ON/OFF 00144 EmModel(1)->SetLPMFlag(false); 00145 EmModel(2)->SetLPMFlag(man->LPMFlag()); 00146 } 00147 00148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 00149 00150 void G4eBremsstrahlung::PrintInfo() 00151 { 00152 if(EmModel(1)) { 00153 G4LossTableManager* man = G4LossTableManager::Instance(); 00154 G4double eth = man->BremsstrahlungTh(); 00155 G4cout << " LPM flag: " << man->LPMFlag() << " for E > " 00156 << EmModel(1)->HighEnergyLimit()/GeV << " GeV"; 00157 if(eth < DBL_MAX) { 00158 G4cout << ", HighEnergyThreshold(GeV)= " << eth/GeV; 00159 } 00160 G4cout << G4endl; 00161 } 00162 } 00163 00164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....