[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 | // |
---|
[1230] | 26 | // $Id: PhysListEmStandard.cc,v 1.23 2009/11/13 17:01:44 maire Exp $ |
---|
[1337] | 27 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[807] | 28 | // |
---|
| 29 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 31 | |
---|
| 32 | #include "PhysListEmStandard.hh" |
---|
| 33 | #include "G4ParticleDefinition.hh" |
---|
| 34 | #include "G4ProcessManager.hh" |
---|
| 35 | |
---|
| 36 | #include "G4ComptonScattering.hh" |
---|
| 37 | #include "G4GammaConversion.hh" |
---|
| 38 | #include "G4PhotoElectricEffect.hh" |
---|
| 39 | |
---|
[1230] | 40 | #include "G4eMultipleScattering.hh" |
---|
| 41 | #include "G4UrbanMscModel93.hh" |
---|
[807] | 42 | #include "G4eIonisation.hh" |
---|
| 43 | #include "G4eBremsstrahlung.hh" |
---|
| 44 | #include "G4eplusAnnihilation.hh" |
---|
| 45 | |
---|
[1230] | 46 | #include "G4MuMultipleScattering.hh" |
---|
[807] | 47 | #include "G4MuIonisation.hh" |
---|
| 48 | #include "G4MuBremsstrahlung.hh" |
---|
| 49 | #include "G4MuPairProduction.hh" |
---|
| 50 | |
---|
[1230] | 51 | #include "G4hMultipleScattering.hh" |
---|
[807] | 52 | #include "G4hIonisation.hh" |
---|
[1230] | 53 | #include "G4hBremsstrahlung.hh" |
---|
| 54 | #include "G4hPairProduction.hh" |
---|
| 55 | |
---|
[807] | 56 | #include "G4ionIonisation.hh" |
---|
| 57 | |
---|
| 58 | #include "G4EmProcessOptions.hh" |
---|
| 59 | #include "G4MscStepLimitType.hh" |
---|
| 60 | |
---|
| 61 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 62 | |
---|
| 63 | PhysListEmStandard::PhysListEmStandard(const G4String& name) |
---|
| 64 | : G4VPhysicsConstructor(name) |
---|
| 65 | {} |
---|
| 66 | |
---|
| 67 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 68 | |
---|
| 69 | PhysListEmStandard::~PhysListEmStandard() |
---|
| 70 | {} |
---|
| 71 | |
---|
| 72 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 73 | |
---|
| 74 | void PhysListEmStandard::ConstructProcess() |
---|
| 75 | { |
---|
| 76 | // Add standard EM Processes |
---|
| 77 | |
---|
| 78 | theParticleIterator->reset(); |
---|
| 79 | while( (*theParticleIterator)() ){ |
---|
| 80 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 81 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 82 | G4String particleName = particle->GetParticleName(); |
---|
| 83 | |
---|
| 84 | if (particleName == "gamma") { |
---|
| 85 | // gamma |
---|
| 86 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 87 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 88 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 89 | |
---|
| 90 | } else if (particleName == "e-") { |
---|
| 91 | //electron |
---|
[1230] | 92 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 93 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 94 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 95 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 96 | pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, 3); |
---|
[807] | 97 | |
---|
| 98 | } else if (particleName == "e+") { |
---|
| 99 | //positron |
---|
[1230] | 100 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 101 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 102 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 103 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 104 | pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, 3); |
---|
| 105 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
[807] | 106 | |
---|
[1230] | 107 | } else if( particleName == "mu-" || |
---|
| 108 | particleName == "mu+" ) { |
---|
[807] | 109 | //muon |
---|
[1230] | 110 | pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1); |
---|
| 111 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
| 112 | pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); |
---|
| 113 | pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); |
---|
| 114 | |
---|
| 115 | } else if( particleName == "proton" || |
---|
| 116 | particleName == "pi-" || |
---|
| 117 | particleName == "pi+" ) { |
---|
| 118 | //proton |
---|
| 119 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 120 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 121 | pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); |
---|
| 122 | pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); |
---|
[807] | 123 | |
---|
| 124 | } else if( particleName == "alpha" || |
---|
| 125 | particleName == "He3" || |
---|
[1230] | 126 | particleName == "GenericIon" ) { |
---|
| 127 | //Ions |
---|
| 128 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 129 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
[807] | 130 | |
---|
| 131 | } else if ((!particle->IsShortLived()) && |
---|
| 132 | (particle->GetPDGCharge() != 0.0) && |
---|
| 133 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
| 134 | //all others charged particles except geantino |
---|
[1230] | 135 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 136 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
[807] | 137 | } |
---|
| 138 | } |
---|
| 139 | |
---|
| 140 | // Em options |
---|
| 141 | // |
---|
[1230] | 142 | // Main options and setting parameters are shown here. |
---|
| 143 | // Several of them have default values. |
---|
| 144 | // |
---|
[807] | 145 | G4EmProcessOptions emOptions; |
---|
[1230] | 146 | |
---|
| 147 | //physics tables |
---|
[807] | 148 | // |
---|
[1230] | 149 | emOptions.SetMinEnergy(100*eV); //default |
---|
| 150 | emOptions.SetMaxEnergy(100*TeV); //default |
---|
| 151 | emOptions.SetDEDXBinning(12*20); //default=12*7 |
---|
| 152 | emOptions.SetLambdaBinning(12*20); //default=12*7 |
---|
| 153 | emOptions.SetSplineFlag(true); //default |
---|
| 154 | |
---|
| 155 | //multiple coulomb scattering |
---|
| 156 | // |
---|
| 157 | emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety |
---|
| 158 | emOptions.SetMscRangeFactor(0.04); //default |
---|
| 159 | emOptions.SetMscGeomFactor (2.5); //default |
---|
| 160 | emOptions.SetSkin(3.); //default |
---|
| 161 | |
---|
[807] | 162 | //energy loss |
---|
| 163 | // |
---|
[1230] | 164 | emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm) |
---|
| 165 | emOptions.SetLinearLossLimit(1.e-2); //default |
---|
[807] | 166 | |
---|
| 167 | //ionization |
---|
| 168 | // |
---|
[1230] | 169 | emOptions.SetSubCutoff(false); //default=false |
---|
[807] | 170 | } |
---|
| 171 | |
---|
| 172 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 173 | |
---|