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: G4MuIonisation.cc,v 1.51 2005/10/02 16:39:50 maire Exp $ >> 24 // GEANT4 tag $Name: geant4-08-00 $ >> 25 // 26 // ------------------------------------------- 26 // ------------------------------------------------------------------- 27 // 27 // 28 // GEANT4 Class file 28 // GEANT4 Class file 29 // 29 // 30 // 30 // 31 // File name: G4MuIonisation 31 // File name: G4MuIonisation 32 // 32 // 33 // Author: Laszlo Urban 33 // Author: Laszlo Urban 34 // 34 // 35 // Creation date: 30.09.1997 35 // Creation date: 30.09.1997 36 // 36 // 37 // Modifications: 37 // Modifications: 38 // 38 // 39 // 08-04-98 remove 'tracking cut' of the ioniz 39 // 08-04-98 remove 'tracking cut' of the ionizing particle (mma) 40 // 26-10-98 new stuff from R.Kokoulin + cleanu 40 // 26-10-98 new stuff from R.Kokoulin + cleanup , L.Urban 41 // 10-02-00 modifications , new e.m. structure 41 // 10-02-00 modifications , new e.m. structure, L.Urban 42 // 23-03-01 R.Kokoulin's correction is comment 42 // 23-03-01 R.Kokoulin's correction is commented out, L.Urban 43 // 29-05-01 V.Ivanchenko minor changes to prov 43 // 29-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation 44 // 10-08-01 new methods Store/Retrieve Physics 44 // 10-08-01 new methods Store/Retrieve PhysicsTable (mma) 45 // 28-08-01 new function ComputeRestrictedMean 45 // 28-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma) 46 // 17-09-01 migration of Materials to pure STL 46 // 17-09-01 migration of Materials to pure STL (mma) 47 // 26-09-01 completion of RetrievePhysicsTable 47 // 26-09-01 completion of RetrievePhysicsTable (mma) 48 // 29-10-01 all static functions no more inlin 48 // 29-10-01 all static functions no more inlined (mma) 49 // 07-11-01 correction(Tmax+xsection computati 49 // 07-11-01 correction(Tmax+xsection computation) L.Urban 50 // 08-11-01 particleMass becomes a local varia 50 // 08-11-01 particleMass becomes a local variable (mma) 51 // 10-05-02 V.Ivanchenko update to new design 51 // 10-05-02 V.Ivanchenko update to new design 52 // 04-12-02 V.Ivanchenko the low energy limit 52 // 04-12-02 V.Ivanchenko the low energy limit for Kokoulin model to 10 GeV 53 // 23-12-02 Change interface in order to move 53 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko) 54 // 26-12-02 Secondary production moved to deri 54 // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko) 55 // 13-02-03 SubCutoff regime is assigned to a 55 // 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko) 56 // 23-05-03 Define default integral + BohrFluc 56 // 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko) 57 // 03-06-03 Add SetIntegral method to choose f 57 // 03-06-03 Add SetIntegral method to choose fluctuation model (V.Ivanchenko) 58 // 03-06-03 Fix initialisation problem for STD 58 // 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko) 59 // 04-08-03 Set integral=false to be default ( 59 // 04-08-03 Set integral=false to be default (V.Ivanchenko) 60 // 08-08-03 STD substitute standard (V.Ivanch 60 // 08-08-03 STD substitute standard (V.Ivanchenko) 61 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossPro 61 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) 62 // 10-02-04 Calculation of radiative correctio << 62 // 10-02-04 Calculation of radiative corrections using R.Kokoulin model (V.Ivanchenko) 63 // 27-05-04 Set integral to be a default regim 63 // 27-05-04 Set integral to be a default regime (V.Ivanchenko) 64 // 17-08-04 Utilise mu+ tables for mu- (V.Ivan 64 // 17-08-04 Utilise mu+ tables for mu- (V.Ivanchenko) 65 // 08-11-04 Migration to new interface of Stor 65 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) 66 // 08-04-05 Major optimisation of internal int 66 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 67 // 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma) 67 // 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma) 68 // 02-09-05 SetStepLimits(0.2, 1*mm) (V.Ivantc 68 // 02-09-05 SetStepLimits(0.2, 1*mm) (V.Ivantchenko) 69 // 12-08-05 SetStepLimits(0.2, 0.1*mm) + integ 69 // 12-08-05 SetStepLimits(0.2, 0.1*mm) + integral off (V.Ivantchenko) 70 // 10-01-06 SetStepLimits -> SetStepFunction ( << 71 // 70 // 72 // ------------------------------------------- 71 // ------------------------------------------------------------------- 73 // 72 // 74 //....oooOO0OOooo........oooOO0OOooo........oo 73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 75 //....oooOO0OOooo........oooOO0OOooo........oo 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 76 75 77 #include "G4MuIonisation.hh" 76 #include "G4MuIonisation.hh" 78 #include "G4PhysicalConstants.hh" << 79 #include "G4SystemOfUnits.hh" << 80 #include "G4Electron.hh" 77 #include "G4Electron.hh" >> 78 #include "G4MuonPlus.hh" >> 79 #include "G4MuonMinus.hh" 81 #include "G4BraggModel.hh" 80 #include "G4BraggModel.hh" 82 #include "G4BetheBlochModel.hh" 81 #include "G4BetheBlochModel.hh" 83 #include "G4MuBetheBlochModel.hh" 82 #include "G4MuBetheBlochModel.hh" 84 #include "G4EmStandUtil.hh" << 83 #include "G4UniversalFluctuation.hh" 85 #include "G4ICRU73QOModel.hh" << 84 #include "G4BohrFluctuations.hh" 86 #include "G4EmParameters.hh" << 85 #include "G4UnitsTable.hh" 87 86 88 //....oooOO0OOooo........oooOO0OOooo........oo 87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 89 88 >> 89 using namespace std; >> 90 90 G4MuIonisation::G4MuIonisation(const G4String& 91 G4MuIonisation::G4MuIonisation(const G4String& name) 91 : G4VEnergyLossProcess(name) << 92 : G4VEnergyLossProcess(name), >> 93 theParticle(0), >> 94 theBaseParticle(0), >> 95 isInitialised(false) 92 { 96 { 93 SetProcessSubType(fIonisation); << 97 SetDEDXBinning(120); 94 SetSecondaryParticle(G4Electron::Electron()) << 98 SetLambdaBinning(120); >> 99 SetMinKinEnergy(0.1*keV); >> 100 SetMaxKinEnergy(100.0*TeV); 95 } 101 } 96 102 97 //....oooOO0OOooo........oooOO0OOooo........oo 103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 104 99 G4bool G4MuIonisation::IsApplicable(const G4Pa << 105 G4MuIonisation::~G4MuIonisation() 100 { << 106 {} 101 return (p.GetPDGCharge() != 0.0); << 102 } << 103 107 104 //....oooOO0OOooo........oooOO0OOooo........oo 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 109 106 G4double G4MuIonisation::MinPrimaryEnergy(cons << 110 void G4MuIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* part, 107 const G4Material*, << 111 const G4ParticleDefinition* bpart) 108 G4double cut) << 109 { << 110 G4double x = 0.5*cut/CLHEP::electron_mass_c2 << 111 G4double gam = x*ratio + std::sqrt((1. + x)* << 112 return mass*(gam - 1.0); << 113 } << 114 << 115 //....oooOO0OOooo........oooOO0OOooo........oo << 116 << 117 void << 118 G4MuIonisation::InitialiseEnergyLossProcess(co << 119 co << 120 { 112 { 121 if(!isInitialised) { 113 if(!isInitialised) { 122 114 123 theParticle = part; 115 theParticle = part; 124 theBaseParticle = bpart; 116 theBaseParticle = bpart; 125 117 126 mass = theParticle->GetPDGMass(); 118 mass = theParticle->GetPDGMass(); 127 ratio = CLHEP::electron_mass_c2/mass; << 119 SetSecondaryParticle(G4Electron::Electron()); 128 G4double q = theParticle->GetPDGCharge(); << 120 >> 121 flucModel = new G4UniversalFluctuation(); 129 122 130 G4EmParameters* param = G4EmParameters::In << 123 G4VEmModel* em = new G4BraggModel(); 131 G4double elow = 0.2*CLHEP::MeV; << 124 em->SetLowEnergyLimit(0.1*keV); 132 G4double emax = param->MaxKinEnergy(); << 125 em->SetHighEnergyLimit(0.2*MeV); 133 << 126 AddEmModel(1, em, flucModel); 134 // Bragg peak model << 127 G4VEmModel* em1 = new G4BetheBlochModel(); 135 if (nullptr == EmModel(0)) { << 128 em1->SetLowEnergyLimit(0.2*MeV); 136 if(q > 0.0) { SetEmModel(new G4BraggMode << 129 em1->SetHighEnergyLimit(1.0*GeV); 137 else { SetEmModel(new G4ICRU73QOM << 130 AddEmModel(2, em1, flucModel); 138 } << 131 G4VEmModel* em2 = new G4MuBetheBlochModel(); 139 EmModel(0)->SetLowEnergyLimit(param->MinKi << 132 em2->SetLowEnergyLimit(1.0*GeV); 140 EmModel(0)->SetHighEnergyLimit(elow); << 133 em2->SetHighEnergyLimit(100.0*TeV); 141 << 134 AddEmModel(3, em2, flucModel); 142 // fluctuation model << 143 if (nullptr == FluctModel()) { << 144 SetFluctModel(G4EmStandUtil::ModelOfFluc << 145 } << 146 AddEmModel(1, EmModel(0), FluctModel()); << 147 << 148 // high energy model << 149 if (nullptr == EmModel(1)) { SetEmModel(ne << 150 EmModel(1)->SetLowEnergyLimit(elow); << 151 EmModel(1)->SetHighEnergyLimit(emax); << 152 AddEmModel(1, EmModel(1), FluctModel()); << 153 135 >> 136 SetStepLimits(0.2, 1*mm); >> 137 SetIntegral(true); >> 138 >> 139 ratio = electron_mass_c2/mass; 154 isInitialised = true; 140 isInitialised = true; 155 } 141 } 156 } 142 } 157 143 158 //....oooOO0OOooo........oooOO0OOooo........oo 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 159 145 160 void G4MuIonisation::ProcessDescription(std::o << 146 void G4MuIonisation::PrintInfo() 161 { 147 { 162 out << " Muon ionisation"; << 148 G4cout << " Bether-Bloch model for E > 0.2 MeV, " 163 G4VEnergyLossProcess::ProcessDescription(out << 149 << "parametrisation of Bragg peak below, " >> 150 << G4endl; >> 151 G4cout << " radiative corrections for E > 1 GeV" << G4endl; 164 } 152 } 165 153 166 //....oooOO0OOooo........oooOO0OOooo........oo 154 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 155 >> 156 >> 157 >> 158 167 159