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.37 2003/11/12 16:23:42 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-06-00-patch-01 $ 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) 39 // 63 // 40 // ------------------------------------------- 64 // ------------------------------------------------------------------- 41 // 65 // 42 //....oooOO0OOooo........oooOO0OOooo........oo 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 43 //....oooOO0OOooo........oooOO0OOooo........oo 67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 44 68 45 #include "G4eBremsstrahlung.hh" 69 #include "G4eBremsstrahlung.hh" 46 #include "G4SystemOfUnits.hh" << 47 #include "G4Gamma.hh" 70 #include "G4Gamma.hh" 48 #include "G4SeltzerBergerModel.hh" << 71 #include "G4eBremsstrahlungModel.hh" 49 #include "G4eBremsstrahlungRelModel.hh" << 72 #include "G4UniversalFluctuation.hh" 50 #include "G4UnitsTable.hh" 73 #include "G4UnitsTable.hh" 51 #include "G4LossTableManager.hh" << 52 74 53 #include "G4ProductionCutsTable.hh" 75 #include "G4ProductionCutsTable.hh" 54 #include "G4MaterialCutsCouple.hh" 76 #include "G4MaterialCutsCouple.hh" 55 #include "G4EmParameters.hh" << 56 77 57 //....oooOO0OOooo........oooOO0OOooo........oo 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 58 79 59 using namespace std; << 80 G4eBremsstrahlung::G4eBremsstrahlung(const G4String& name) 60 << 81 : G4VEnergyLossProcess(name) 61 G4eBremsstrahlung::G4eBremsstrahlung(const G4S << 62 G4VEnergyLossProcess(name) << 63 { 82 { 64 SetProcessSubType(fBremsstrahlung); << 83 InitialiseProcess(); 65 SetSecondaryParticle(G4Gamma::Gamma()); << 66 SetIonisation(false); << 67 SetCrossSectionType(fEmTwoPeaks); << 68 } 84 } 69 85 70 //....oooOO0OOooo........oooOO0OOooo........oo 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 71 87 72 G4eBremsstrahlung::~G4eBremsstrahlung() = defa << 88 G4eBremsstrahlung::~G4eBremsstrahlung() 73 << 89 {} 74 //....oooOO0OOooo........oooOO0OOooo........oo << 75 << 76 G4bool G4eBremsstrahlung::IsApplicable(const G << 77 { << 78 return (&p == G4Electron::Electron() || &p = << 79 } << 80 90 81 //....oooOO0OOooo........oooOO0OOooo........oo 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 82 92 83 void << 93 void G4eBremsstrahlung::InitialiseProcess() 84 G4eBremsstrahlung::InitialiseEnergyLossProcess << 85 const G4ParticleDefinition*) << 86 { 94 { 87 if(!isInitialised) { << 95 SetSecondaryParticle(G4Gamma::Gamma()); 88 G4EmParameters* param = G4EmParameters::In << 89 << 90 G4double emax = param->MaxKinEnergy(); << 91 G4VEmFluctuationModel* fm = nullptr; << 92 96 93 if (nullptr == EmModel(0)) { SetEmModel(ne << 97 SetDEDXBinning(120); 94 G4double energyLimit = std::min(EmModel(0) << 98 SetLambdaBinning(120); 95 EmModel(0)->SetHighEnergyLimit(energyLimit << 99 SetMinKinEnergy(0.1*keV); 96 EmModel(0)->SetSecondaryThreshold(param->B << 100 SetMaxKinEnergy(100.0*TeV); 97 AddEmModel(1, EmModel(0), fm); << 101 98 << 102 //G4VEmFluctuationModel* fm = 0; 99 if(emax > energyLimit) { << 103 G4VEmFluctuationModel* fm = new G4UniversalFluctuation(); 100 if (nullptr == EmModel(1)) { << 104 101 SetEmModel(new G4eBremsstrahlungRelModel()); << 105 G4VEmModel* em = new G4eBremsstrahlungModel(); 102 } << 106 em->SetLowEnergyLimit(0.1*keV); 103 EmModel(1)->SetLowEnergyLimit(energyLimi << 107 em->SetHighEnergyLimit(100.0*TeV); 104 EmModel(1)->SetHighEnergyLimit(emax); << 108 AddEmModel(1, em, fm); 105 EmModel(1)->SetSecondaryThreshold(param- << 106 AddEmModel(1, EmModel(1), fm); << 107 } << 108 isInitialised = true; << 109 } << 110 } 109 } 111 110 112 //....oooOO0OOooo........oooOO0OOooo........oo 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 112 114 void G4eBremsstrahlung::StreamProcessInfo(std: << 113 void G4eBremsstrahlung::PrintInfoDefinition() 115 { 114 { 116 if(nullptr != EmModel(0)) { << 115 G4VEnergyLossProcess::PrintInfoDefinition(); 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 116 130 void G4eBremsstrahlung::ProcessDescription(std << 117 G4cout << " Total cross sections from a parametrisation" 131 { << 118 << " based on the EEDL data library. " 132 out << " Bremsstrahlung"; << 119 << G4endl 133 G4VEnergyLossProcess::ProcessDescription(out << 120 << " Good description from 1 KeV to 100 GeV, " >> 121 << "log scale extrapolation above 100 GeV." >> 122 << G4endl; 134 } 123 } 135 124 136 //....oooOO0OOooo........oooOO0OOooo........oo 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 137 126