Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-21 07:53:00

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 PhysicsList.cc
0027 /// \brief Implementation of the PhysicsList class
0028 
0029 #include "PhysicsList.hh"
0030 
0031 #include "G4ComptonScattering.hh"
0032 #include "G4EmBuilder.hh"
0033 #include "G4GammaConversion.hh"
0034 #include "G4ParticleDefinition.hh"
0035 #include "G4ParticleTable.hh"
0036 #include "G4ParticleTypes.hh"
0037 #include "G4PhotoElectricEffect.hh"
0038 #include "G4PhysicsListHelper.hh"
0039 #include "G4ProcessManager.hh"
0040 #include "G4RayleighScattering.hh"
0041 #include "G4SystemOfUnits.hh"
0042 #include "G4eBremsstrahlung.hh"
0043 #include "G4eIonisation.hh"
0044 #include "G4eMultipleScattering.hh"
0045 #include "G4eplusAnnihilation.hh"
0046 
0047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0048 
0049 PhysicsList::PhysicsList()
0050 {
0051   defaultCutValue = 1.0 * mm;
0052 }
0053 
0054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0055 
0056 void PhysicsList::ConstructParticle()
0057 {
0058   // In this method, static member functions should be called
0059   // for all particles which you want to use.
0060   // This ensures that objects of these particle types will be
0061   // created in the program.
0062   G4EmBuilder::ConstructMinimalEmSet();
0063 }
0064 
0065 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0066 
0067 void PhysicsList::ConstructProcess()
0068 {
0069   AddTransportation();
0070   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0071 
0072   auto particleIterator = GetParticleIterator();
0073   particleIterator->reset();
0074   while ((*particleIterator)()) {
0075     G4ParticleDefinition* particle = particleIterator->value();
0076     G4String particleName = particle->GetParticleName();
0077 
0078     if (particleName == "gamma") {
0079       ph->RegisterProcess(new G4RayleighScattering, particle);    
0080       ph->RegisterProcess(new G4PhotoElectricEffect, particle);
0081       ph->RegisterProcess(new G4ComptonScattering, particle);
0082       ph->RegisterProcess(new G4GammaConversion, particle);
0083     }
0084     else if (particleName == "e-") {
0085       ph->RegisterProcess(new G4eMultipleScattering, particle);
0086       ph->RegisterProcess(new G4eIonisation, particle);
0087       ph->RegisterProcess(new G4eBremsstrahlung, particle);
0088     }
0089     else if (particleName == "e+") {
0090       ph->RegisterProcess(new G4eMultipleScattering, particle);
0091       ph->RegisterProcess(new G4eIonisation, particle);
0092       ph->RegisterProcess(new G4eBremsstrahlung, particle);
0093       ph->RegisterProcess(new G4eplusAnnihilation, particle);
0094     }
0095   }
0096 }
0097 
0098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......