[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
[1230] | 27 | // $Id: PhysListEmStandard.cc,v 1.13 2009/11/13 16:01:10 maire Exp $ |
---|
| 28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
[807] | 29 | // |
---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 31 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 32 | |
---|
| 33 | #include "PhysListEmStandard.hh" |
---|
| 34 | #include "G4ParticleDefinition.hh" |
---|
| 35 | #include "G4ProcessManager.hh" |
---|
| 36 | |
---|
| 37 | #include "G4ComptonScattering.hh" |
---|
| 38 | #include "G4GammaConversion.hh" |
---|
| 39 | #include "G4PhotoElectricEffect.hh" |
---|
| 40 | |
---|
[1230] | 41 | #include "G4eMultipleScattering.hh" |
---|
| 42 | #include "G4UrbanMscModel93.hh" |
---|
[807] | 43 | #include "G4eIonisation.hh" |
---|
| 44 | #include "G4eBremsstrahlung.hh" |
---|
| 45 | #include "G4eplusAnnihilation.hh" |
---|
| 46 | |
---|
[1230] | 47 | #include "G4MuMultipleScattering.hh" |
---|
[807] | 48 | #include "G4MuIonisation.hh" |
---|
| 49 | #include "G4MuBremsstrahlung.hh" |
---|
| 50 | #include "G4MuPairProduction.hh" |
---|
| 51 | |
---|
[1230] | 52 | #include "G4hMultipleScattering.hh" |
---|
[807] | 53 | #include "G4hIonisation.hh" |
---|
[1230] | 54 | #include "G4hBremsstrahlung.hh" |
---|
| 55 | #include "G4hPairProduction.hh" |
---|
| 56 | |
---|
[807] | 57 | #include "G4ionIonisation.hh" |
---|
| 58 | |
---|
| 59 | #include "G4EmProcessOptions.hh" |
---|
| 60 | #include "G4MscStepLimitType.hh" |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 64 | |
---|
| 65 | PhysListEmStandard::PhysListEmStandard(const G4String& name) |
---|
| 66 | : G4VPhysicsConstructor(name) |
---|
| 67 | {} |
---|
| 68 | |
---|
| 69 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 70 | |
---|
| 71 | PhysListEmStandard::~PhysListEmStandard() |
---|
| 72 | {} |
---|
| 73 | |
---|
| 74 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 75 | |
---|
| 76 | void PhysListEmStandard::ConstructProcess() |
---|
| 77 | { |
---|
| 78 | // Add standard EM Processes |
---|
| 79 | |
---|
| 80 | theParticleIterator->reset(); |
---|
| 81 | while( (*theParticleIterator)() ){ |
---|
| 82 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 83 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 84 | G4String particleName = particle->GetParticleName(); |
---|
| 85 | |
---|
| 86 | if (particleName == "gamma") { |
---|
| 87 | // gamma |
---|
| 88 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 89 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 90 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 91 | |
---|
| 92 | } else if (particleName == "e-") { |
---|
| 93 | //electron |
---|
[1230] | 94 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 95 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 96 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 97 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 98 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
[807] | 99 | |
---|
| 100 | } else if (particleName == "e+") { |
---|
| 101 | //positron |
---|
[1230] | 102 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 103 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 104 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 105 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 106 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
| 107 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
[807] | 108 | |
---|
| 109 | } else if( particleName == "mu+" || |
---|
| 110 | particleName == "mu-" ) { |
---|
| 111 | //muon |
---|
[1230] | 112 | pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1); |
---|
| 113 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
| 114 | pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); |
---|
| 115 | pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); |
---|
| 116 | |
---|
| 117 | } else if( particleName == "proton" || |
---|
| 118 | particleName == "pi-" || |
---|
| 119 | particleName == "pi+" ) { |
---|
| 120 | //proton |
---|
| 121 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 122 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 123 | pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); |
---|
| 124 | pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); |
---|
[807] | 125 | |
---|
[1230] | 126 | } else if( particleName == "alpha" || |
---|
| 127 | particleName == "He3" || |
---|
| 128 | particleName == "GenericIon" ) { |
---|
| 129 | //Ions |
---|
| 130 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 131 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
[807] | 132 | |
---|
| 133 | } else if ((!particle->IsShortLived()) && |
---|
| 134 | (particle->GetPDGCharge() != 0.0) && |
---|
| 135 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
| 136 | //all others charged particles except geantino |
---|
[1230] | 137 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 138 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
[807] | 139 | } |
---|
| 140 | } |
---|
[1230] | 141 | |
---|
[807] | 142 | // Em options |
---|
| 143 | // |
---|
[1230] | 144 | // Main options and setting parameters are shown here. |
---|
| 145 | // Several of them have default values. |
---|
| 146 | // |
---|
[807] | 147 | G4EmProcessOptions emOptions; |
---|
[1230] | 148 | |
---|
| 149 | //physics tables |
---|
[807] | 150 | // |
---|
[1230] | 151 | emOptions.SetMinEnergy(100*eV); //default |
---|
| 152 | emOptions.SetMaxEnergy(100*TeV); //default |
---|
| 153 | emOptions.SetDEDXBinning(12*20); //default=12*7 |
---|
| 154 | emOptions.SetLambdaBinning(12*20); //default=12*7 |
---|
| 155 | emOptions.SetSplineFlag(true); //default |
---|
| 156 | |
---|
| 157 | //multiple coulomb scattering |
---|
| 158 | // |
---|
| 159 | emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety |
---|
| 160 | emOptions.SetMscRangeFactor(0.04); //default |
---|
| 161 | emOptions.SetMscGeomFactor (2.5); //default |
---|
| 162 | emOptions.SetSkin(3.); //default |
---|
| 163 | |
---|
[807] | 164 | //energy loss |
---|
| 165 | // |
---|
[1230] | 166 | emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm) |
---|
| 167 | emOptions.SetLinearLossLimit(1.e-2); //default |
---|
[807] | 168 | |
---|
| 169 | //ionization |
---|
| 170 | // |
---|
[1230] | 171 | emOptions.SetSubCutoff(false); //default=false |
---|
[807] | 172 | } |
---|
| 173 | |
---|
| 174 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 175 | |
---|