Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // >> 23 // $Id: G4eBremsstrahlung.cc,v 1.42 2005/04/08 12:39:58 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-08-00 $ 26 // 25 // 27 // ------------------------------------------- 26 // ------------------------------------------------------------------- 28 // 27 // 29 // GEANT4 Class file 28 // GEANT4 Class file 30 // 29 // 31 // 30 // 32 // File name: G4eBremsstrahlung 31 // File name: G4eBremsstrahlung 33 // 32 // 34 // Author: Michel Maire 33 // Author: Michel Maire 35 // 34 // 36 // Creation date: 26.06.1996 35 // Creation date: 26.06.1996 37 // 36 // 38 // Modified by Michel Maire, Vladimir Ivanchen << 37 // Modifications: >> 38 // >> 39 // 26-09-96 extension of the total crosssection above 100 GeV, M.Maire >> 40 // 1-10-96 new type G4OrderedTable; ComputePartialSumSigma(), M.Maire >> 41 // 16-10-96 DoIt() call to the non static GetEnergyCuts(), L.Urban >> 42 // 13-12-96 Sign corrected in grejmax and greject >> 43 // error definition of screenvar, L.Urban >> 44 // 20-03-97 new energy loss+ionisation+brems scheme, L.Urban >> 45 // 07-04-98 remove 'tracking cut' of the diffracted particle, MMa >> 46 // 13-08-98 new methods SetBining() PrintInfo() >> 47 // 03-03-99 Bug fixed in LPM effect, L.Urban >> 48 // 10-02-00 modifications , new e.m. structure, L.Urban >> 49 // 07-08-00 new cross section/en.loss parametrisation, LPM flag , L.Urban >> 50 // 21-09-00 corrections in the LPM implementation, L.Urban >> 51 // 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation >> 52 // 09-08-01 new methods Store/Retrieve PhysicsTable (mma) >> 53 // 17-09-01 migration of Materials to pure STL (mma) >> 54 // 21-09-01 completion of RetrievePhysicsTable() (mma) >> 55 // 29-10-01 all static functions no more inlined (mma) >> 56 // 08-11-01 particleMass becomes a local variable >> 57 // 30-04-02 V.Ivanchenko update to new design >> 58 // 23-12-02 Change interface in order to move to cut per region (VI) >> 59 // 26-12-02 Secondary production moved to derived classes (VI) >> 60 // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko) >> 61 // 08-08-03 STD substitute standard (V.Ivanchenko) >> 62 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) >> 63 // 04-11-04 add gamma threshold (V.Ivanchenko) >> 64 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) >> 65 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 39 // 66 // 40 // ------------------------------------------- 67 // ------------------------------------------------------------------- 41 // 68 // 42 //....oooOO0OOooo........oooOO0OOooo........oo 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 43 //....oooOO0OOooo........oooOO0OOooo........oo 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 44 71 45 #include "G4eBremsstrahlung.hh" 72 #include "G4eBremsstrahlung.hh" 46 #include "G4SystemOfUnits.hh" << 47 #include "G4Gamma.hh" 73 #include "G4Gamma.hh" 48 #include "G4SeltzerBergerModel.hh" << 74 #include "G4eBremsstrahlungModel.hh" 49 #include "G4eBremsstrahlungRelModel.hh" << 75 #include "G4UniversalFluctuation.hh" 50 #include "G4UnitsTable.hh" 76 #include "G4UnitsTable.hh" 51 #include "G4LossTableManager.hh" << 52 77 53 #include "G4ProductionCutsTable.hh" 78 #include "G4ProductionCutsTable.hh" 54 #include "G4MaterialCutsCouple.hh" 79 #include "G4MaterialCutsCouple.hh" 55 #include "G4EmParameters.hh" << 56 80 57 //....oooOO0OOooo........oooOO0OOooo........oo 81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 58 82 59 using namespace std; 83 using namespace std; 60 84 61 G4eBremsstrahlung::G4eBremsstrahlung(const G4S << 85 G4eBremsstrahlung::G4eBremsstrahlung(const G4String& name, G4double thresh): 62 G4VEnergyLossProcess(name) << 86 G4VEnergyLossProcess(name), >> 87 gammaThreshold(thresh), >> 88 isInitialised(false) 63 { 89 { 64 SetProcessSubType(fBremsstrahlung); << 90 SetDEDXBinning(120); 65 SetSecondaryParticle(G4Gamma::Gamma()); << 91 SetLambdaBinning(120); 66 SetIonisation(false); << 92 SetMinKinEnergy(0.1*keV); 67 SetCrossSectionType(fEmTwoPeaks); << 93 SetMaxKinEnergy(100.0*TeV); 68 } << 69 << 70 //....oooOO0OOooo........oooOO0OOooo........oo << 71 94 72 G4eBremsstrahlung::~G4eBremsstrahlung() = defa << 95 } 73 96 74 //....oooOO0OOooo........oooOO0OOooo........oo 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 75 98 76 G4bool G4eBremsstrahlung::IsApplicable(const G << 99 G4eBremsstrahlung::~G4eBremsstrahlung() 77 { << 100 {} 78 return (&p == G4Electron::Electron() || &p = << 79 } << 80 101 81 //....oooOO0OOooo........oooOO0OOooo........oo 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 82 103 83 void << 104 void G4eBremsstrahlung::InitialiseEnergyLossProcess(const G4ParticleDefinition* p, 84 G4eBremsstrahlung::InitialiseEnergyLossProcess << 105 const G4ParticleDefinition*) 85 const G4ParticleDefinition*) << 86 { 106 { 87 if(!isInitialised) { 107 if(!isInitialised) { 88 G4EmParameters* param = G4EmParameters::In << 89 << 90 G4double emax = param->MaxKinEnergy(); << 91 G4VEmFluctuationModel* fm = nullptr; << 92 << 93 if (nullptr == EmModel(0)) { SetEmModel(ne << 94 G4double energyLimit = std::min(EmModel(0) << 95 EmModel(0)->SetHighEnergyLimit(energyLimit << 96 EmModel(0)->SetSecondaryThreshold(param->B << 97 AddEmModel(1, EmModel(0), fm); << 98 << 99 if(emax > energyLimit) { << 100 if (nullptr == EmModel(1)) { << 101 SetEmModel(new G4eBremsstrahlungRelModel()); << 102 } << 103 EmModel(1)->SetLowEnergyLimit(energyLimi << 104 EmModel(1)->SetHighEnergyLimit(emax); << 105 EmModel(1)->SetSecondaryThreshold(param- << 106 AddEmModel(1, EmModel(1), fm); << 107 } << 108 isInitialised = true; 108 isInitialised = true; >> 109 particle = p; >> 110 SetSecondaryParticle(G4Gamma::Gamma()); >> 111 SetIonisation(false); >> 112 >> 113 //G4VEmFluctuationModel* fm = 0; >> 114 G4VEmFluctuationModel* fm = new G4UniversalFluctuation(); >> 115 >> 116 G4VEmModel* em = new G4eBremsstrahlungModel(); >> 117 em->SetLowEnergyLimit(0.1*keV); >> 118 em->SetHighEnergyLimit(100.0*TeV); >> 119 AddEmModel(1, em, fm); 109 } 120 } 110 } 121 } 111 122 112 //....oooOO0OOooo........oooOO0OOooo........oo 123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 124 114 void G4eBremsstrahlung::StreamProcessInfo(std: << 125 void G4eBremsstrahlung::PrintInfo() 115 { << 116 if(nullptr != EmModel(0)) { << 117 G4EmParameters* param = G4EmParameters::In << 118 G4double eth = param->BremsstrahlungTh(); << 119 out << " LPM flag: " << param->LPM() << 120 << EmModel(0)->HighEnergyLimit()/GeV << " Ge << 121 if(eth < DBL_MAX) { << 122 out << ", VertexHighEnergyTh(GeV)= " << << 123 } << 124 out << G4endl; << 125 } << 126 } << 127 << 128 //....oooOO0OOooo........oooOO0OOooo........oo << 129 << 130 void G4eBremsstrahlung::ProcessDescription(std << 131 { 126 { 132 out << " Bremsstrahlung"; << 127 G4cout << " Total cross sections from a parametrisation" 133 G4VEnergyLossProcess::ProcessDescription(out << 128 << " based on the EEDL data library. " >> 129 << G4endl >> 130 << " Good description from 1 KeV to 100 GeV, " >> 131 << "log scale extrapolation above 100 GeV." >> 132 << G4endl; 134 } 133 } 135 134 136 //....oooOO0OOooo........oooOO0OOooo........oo 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 137 136