Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:16:09

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 //
0027 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0028 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
0029 
0030 #include "PhysListEmStandard.hh"
0031 
0032 #include "G4BuilderType.hh"
0033 #include "G4ParticleDefinition.hh"
0034 #include "G4PhysicsListHelper.hh"
0035 
0036 #include "G4ComptonScattering.hh"
0037 #include "G4GammaConversion.hh"
0038 #include "G4PhotoElectricEffect.hh"
0039 
0040 #include "G4eMultipleScattering.hh"
0041 #include "G4hMultipleScattering.hh"
0042 
0043 #include "G4eIonisation.hh"
0044 #include "G4eBremsstrahlung.hh"
0045 #include "G4eplusAnnihilation.hh"
0046 
0047 #include "G4MuIonisation.hh"
0048 #include "G4MuBremsstrahlung.hh"
0049 #include "G4MuPairProduction.hh"
0050 
0051 #include "G4hIonisation.hh"
0052 #include "G4hBremsstrahlung.hh"
0053 #include "G4hPairProduction.hh"
0054 
0055 #include "G4ionIonisation.hh"
0056 
0057 #include "G4MscStepLimitType.hh"
0058 
0059 #include "G4SystemOfUnits.hh"
0060 
0061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0062 
0063 PhysListEmStandard::PhysListEmStandard(const G4String& name)
0064    :  G4VPhysicsConstructor(name)
0065 {
0066     SetPhysicsType(bElectromagnetic);
0067 
0068     G4EmParameters* param = G4EmParameters::Instance();
0069     param->SetDefaults();
0070     param->SetVerbose(0);
0071     param->SetMinEnergy(100*eV);
0072     param->SetMaxEnergy(100*TeV);
0073     param->SetNumberOfBinsPerDecade(10);
0074     param->SetMscStepLimitType(fUseSafety);
0075     param->SetStepFunction(0.2, 100*um);
0076     param->SetStepFunctionMuHad(0.2, 100*um);
0077 }
0078 
0079 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0080 
0081 PhysListEmStandard::~PhysListEmStandard()
0082 {}
0083 
0084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0085 
0086 void PhysListEmStandard::ConstructProcess()
0087 {
0088   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0089   
0090   // Add standard EM Processes
0091   //
0092   auto particleIterator=GetParticleIterator();
0093   particleIterator->reset();
0094   while( (*particleIterator)() ){
0095     G4ParticleDefinition* particle = particleIterator->value();
0096     G4String particleName = particle->GetParticleName();
0097      
0098     if (particleName == "gamma") {
0099       // gamma         
0100       ph->RegisterProcess(new G4PhotoElectricEffect, particle);
0101       ph->RegisterProcess(new G4ComptonScattering,   particle);
0102       ph->RegisterProcess(new G4GammaConversion,     particle);
0103       
0104     } else if (particleName == "e-") {
0105       //electron
0106       ph->RegisterProcess(new G4eMultipleScattering, particle);
0107       ph->RegisterProcess(new G4eIonisation,         particle);
0108       ph->RegisterProcess(new G4eBremsstrahlung(),   particle);
0109       
0110     } else if (particleName == "e+") {
0111       //positron
0112       ph->RegisterProcess(new G4eMultipleScattering, particle);
0113       ph->RegisterProcess(new G4eIonisation,         particle);
0114       ph->RegisterProcess(new G4eBremsstrahlung(),   particle);
0115       ph->RegisterProcess(new G4eplusAnnihilation,   particle);
0116       
0117     } else if( particleName == "mu-" || 
0118                particleName == "mu+"    ) {
0119       //muon  
0120       ph->RegisterProcess(new G4hMultipleScattering, particle);
0121       ph->RegisterProcess(new G4MuIonisation,        particle);
0122       ph->RegisterProcess(new G4MuBremsstrahlung,    particle);
0123       ph->RegisterProcess(new G4MuPairProduction,    particle);
0124              
0125     } else if( particleName == "proton" ||
0126                particleName == "pi-" ||
0127                particleName == "pi+"    ) {
0128       //proton  
0129       ph->RegisterProcess(new G4hMultipleScattering, particle);
0130       ph->RegisterProcess(new G4hIonisation,         particle);
0131       ph->RegisterProcess(new G4hBremsstrahlung,     particle);
0132       ph->RegisterProcess(new G4hPairProduction,     particle);       
0133      
0134     } else if( particleName == "alpha" || 
0135            particleName == "He3" || 
0136            particleName == "GenericIon" ) {
0137       //Ions 
0138       ph->RegisterProcess(new G4hMultipleScattering, particle);
0139       ph->RegisterProcess(new G4ionIonisation,       particle);
0140 
0141     } else if ((!particle->IsShortLived()) &&
0142            (particle->GetPDGCharge() != 0.0) && 
0143            (particle->GetParticleName() != "chargedgeantino")) {
0144       //all others charged particles except geantino
0145       ph->RegisterProcess(new G4hMultipleScattering, particle);
0146       ph->RegisterProcess(new G4hIonisation,         particle);
0147     }
0148   }
0149 }
0150 
0151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0152