Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:40

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file ElectromagneticPhysics.cc
0027 /// \brief Implementation of the ElectromagneticPhysics class
0028 //
0029 //
0030 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 
0033 #include "ElectromagneticPhysics.hh"
0034 
0035 #include "G4BuilderType.hh"
0036 #include "G4ComptonScattering.hh"
0037 #include "G4GammaConversion.hh"
0038 #include "G4IonParametrisedLossModel.hh"
0039 #include "G4LossTableManager.hh"
0040 #include "G4MuBremsstrahlung.hh"
0041 #include "G4MuIonisation.hh"
0042 #include "G4MuMultipleScattering.hh"
0043 #include "G4MuPairProduction.hh"
0044 #include "G4NuclearStopping.hh"
0045 #include "G4ParticleDefinition.hh"
0046 #include "G4PhotoElectricEffect.hh"
0047 #include "G4PhysicsListHelper.hh"
0048 #include "G4ProcessManager.hh"
0049 #include "G4RayleighScattering.hh"
0050 #include "G4SystemOfUnits.hh"
0051 #include "G4UAtomicDeexcitation.hh"
0052 #include "G4eBremsstrahlung.hh"
0053 #include "G4eIonisation.hh"
0054 #include "G4eMultipleScattering.hh"
0055 #include "G4eplusAnnihilation.hh"
0056 #include "G4hBremsstrahlung.hh"
0057 #include "G4hIonisation.hh"
0058 #include "G4hMultipleScattering.hh"
0059 #include "G4hPairProduction.hh"
0060 #include "G4ionIonisation.hh"
0061 
0062 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0063 
0064 ElectromagneticPhysics::ElectromagneticPhysics(const G4String& name) : G4VPhysicsConstructor(name)
0065 {
0066   SetPhysicsType(bElectromagnetic);
0067 
0068   G4EmParameters* param = G4EmParameters::Instance();
0069   param->SetDefaults();
0070   param->SetStepFunction(0.2, 100 * um);
0071   param->SetStepFunctionMuHad(0.1, 10 * um);
0072   param->SetStepFunctionLightIons(0.1, 10 * um);
0073   param->SetStepFunctionIons(0.1, 1 * um);
0074   param->SetDeexcitationIgnoreCut(true);
0075 }
0076 
0077 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0078 
0079 void ElectromagneticPhysics::ConstructProcess()
0080 {
0081   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0082 
0083   // Add standard EM Processes
0084   //
0085   auto particleIterator = GetParticleIterator();
0086   particleIterator->reset();
0087   while ((*particleIterator)()) {
0088     G4ParticleDefinition* particle = particleIterator->value();
0089     G4String particleName = particle->GetParticleName();
0090 
0091     if (particleName == "gamma") {
0092       ph->RegisterProcess(new G4RayleighScattering, particle);
0093       ph->RegisterProcess(new G4PhotoElectricEffect, particle);
0094       ph->RegisterProcess(new G4ComptonScattering, particle);
0095       ph->RegisterProcess(new G4GammaConversion, particle);
0096     }
0097     else if (particleName == "e-") {
0098       ph->RegisterProcess(new G4eMultipleScattering(), particle);
0099       ph->RegisterProcess(new G4eIonisation, particle);
0100       ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0101     }
0102     else if (particleName == "e+") {
0103       ph->RegisterProcess(new G4eMultipleScattering(), particle);
0104       ph->RegisterProcess(new G4eIonisation, particle);
0105       ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0106       ph->RegisterProcess(new G4eplusAnnihilation(), particle);
0107     }
0108     else if (particleName == "mu+" || particleName == "mu-") {
0109       ph->RegisterProcess(new G4MuMultipleScattering(), particle);
0110       ph->RegisterProcess(new G4MuIonisation, particle);
0111       ph->RegisterProcess(new G4MuBremsstrahlung(), particle);
0112       ph->RegisterProcess(new G4MuPairProduction(), particle);
0113     }
0114     else if (particleName == "proton" || particleName == "pi-" || particleName == "pi+") {
0115       ph->RegisterProcess(new G4hMultipleScattering(), particle);
0116       ph->RegisterProcess(new G4hIonisation, particle);
0117     }
0118     else if (particleName == "alpha" || particleName == "He3") {
0119       ph->RegisterProcess(new G4hMultipleScattering(), particle);
0120       ph->RegisterProcess(new G4ionIonisation, particle);
0121       ph->RegisterProcess(new G4NuclearStopping(), particle);
0122     }
0123     else if (particleName == "GenericIon") {
0124       ph->RegisterProcess(new G4hMultipleScattering(), particle);
0125       G4ionIonisation* ionIoni = new G4ionIonisation();
0126       ionIoni->SetEmModel(new G4IonParametrisedLossModel());
0127       ph->RegisterProcess(ionIoni, particle);
0128       ph->RegisterProcess(new G4NuclearStopping(), particle);
0129     }
0130     else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0)
0131              && (particle->GetParticleName() != "chargedgeantino"))
0132     {
0133       // all others charged particles except geantino
0134       ph->RegisterProcess(new G4hMultipleScattering(), particle);
0135       ph->RegisterProcess(new G4hIonisation(), particle);
0136     }
0137   }
0138 
0139   // Deexcitation
0140   //
0141   G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
0142   G4LossTableManager::Instance()->SetAtomDeexcitation(de);
0143 }
0144 
0145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......