[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.8 2009/11/16 16:18:27 maire Exp $ |
---|
| 27 | // GEANT4 tag $Name: geant4-09-03-cand-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" |
---|
[1230] | 57 | #include "G4IonParametrisedLossModel.hh" |
---|
| 58 | #include "G4NuclearStopping.hh" |
---|
[807] | 59 | |
---|
[1230] | 60 | #include "G4EmProcessOptions.hh" |
---|
| 61 | #include "G4MscStepLimitType.hh" |
---|
| 62 | |
---|
[807] | 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 |
---|
[1230] | 79 | // |
---|
[807] | 80 | |
---|
| 81 | theParticleIterator->reset(); |
---|
| 82 | while( (*theParticleIterator)() ){ |
---|
| 83 | G4ParticleDefinition* particle = theParticleIterator->value(); |
---|
| 84 | G4ProcessManager* pmanager = particle->GetProcessManager(); |
---|
| 85 | G4String particleName = particle->GetParticleName(); |
---|
| 86 | |
---|
| 87 | if (particleName == "gamma") { |
---|
[1230] | 88 | // gamma |
---|
[807] | 89 | pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); |
---|
| 90 | pmanager->AddDiscreteProcess(new G4ComptonScattering); |
---|
| 91 | pmanager->AddDiscreteProcess(new G4GammaConversion); |
---|
| 92 | |
---|
| 93 | } else if (particleName == "e-") { |
---|
| 94 | //electron |
---|
[1230] | 95 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 96 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 97 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 98 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 99 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
[807] | 100 | |
---|
| 101 | } else if (particleName == "e+") { |
---|
| 102 | //positron |
---|
[1230] | 103 | G4eMultipleScattering* msc = new G4eMultipleScattering(); |
---|
| 104 | msc->AddEmModel(0, new G4UrbanMscModel93()); |
---|
| 105 | pmanager->AddProcess(msc, -1, 1, 1); |
---|
| 106 | pmanager->AddProcess(new G4eIonisation, -1, 2, 2); |
---|
| 107 | pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); |
---|
| 108 | pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); |
---|
| 109 | |
---|
| 110 | } else if (particleName == "mu+" || |
---|
[807] | 111 | particleName == "mu-" ) { |
---|
| 112 | //muon |
---|
[1230] | 113 | pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1); |
---|
| 114 | pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); |
---|
| 115 | pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); |
---|
| 116 | pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); |
---|
| 117 | |
---|
| 118 | } else if( particleName == "proton" || |
---|
| 119 | particleName == "pi-" || |
---|
| 120 | particleName == "pi+" ) { |
---|
| 121 | //proton |
---|
| 122 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 123 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
| 124 | pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); |
---|
| 125 | pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); |
---|
[807] | 126 | |
---|
[1230] | 127 | } else if( particleName == "alpha" || |
---|
| 128 | particleName == "He3" ) { |
---|
| 129 | //alpha |
---|
| 130 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 131 | pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); |
---|
| 132 | pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1); |
---|
| 133 | |
---|
| 134 | } else if( particleName == "GenericIon" ) { |
---|
| 135 | //Ions |
---|
| 136 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 137 | G4ionIonisation* ionIoni = new G4ionIonisation(); |
---|
| 138 | ionIoni->SetEmModel(new G4IonParametrisedLossModel()); |
---|
| 139 | pmanager->AddProcess(ionIoni, -1, 2, 2); |
---|
| 140 | pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1); |
---|
| 141 | |
---|
[807] | 142 | } else if ((!particle->IsShortLived()) && |
---|
| 143 | (particle->GetPDGCharge() != 0.0) && |
---|
| 144 | (particle->GetParticleName() != "chargedgeantino")) { |
---|
| 145 | //all others charged particles except geantino |
---|
[1230] | 146 | pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); |
---|
| 147 | pmanager->AddProcess(new G4hIonisation, -1, 2, 2); |
---|
[807] | 148 | } |
---|
| 149 | } |
---|
[1230] | 150 | |
---|
| 151 | // Em options |
---|
| 152 | // |
---|
| 153 | // Main options and setting parameters are shown here. |
---|
| 154 | // Several of them have default values. |
---|
| 155 | // |
---|
| 156 | G4EmProcessOptions emOptions; |
---|
| 157 | |
---|
| 158 | //physics tables |
---|
| 159 | // |
---|
| 160 | emOptions.SetMinEnergy(100*eV); //default |
---|
| 161 | emOptions.SetMaxEnergy(100*TeV); //default |
---|
| 162 | emOptions.SetDEDXBinning(12*20); //default=12*7 |
---|
| 163 | emOptions.SetLambdaBinning(12*20); //default=12*7 |
---|
| 164 | emOptions.SetSplineFlag(true); //default |
---|
| 165 | |
---|
| 166 | //multiple coulomb scattering |
---|
| 167 | // |
---|
| 168 | emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety |
---|
| 169 | emOptions.SetMscRangeFactor(0.04); //default |
---|
| 170 | emOptions.SetMscGeomFactor (2.5); //default |
---|
| 171 | emOptions.SetSkin(3.); //default |
---|
| 172 | |
---|
| 173 | //energy loss |
---|
| 174 | // |
---|
| 175 | emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm) |
---|
| 176 | emOptions.SetLinearLossLimit(1.e-2); //default |
---|
| 177 | |
---|
| 178 | //ionization |
---|
| 179 | // |
---|
| 180 | emOptions.SetSubCutoff(false); //default |
---|
[807] | 181 | } |
---|
| 182 | |
---|
| 183 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 184 | |
---|