Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-05 07:50:36

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 //---------------------------------------------------------------------------
0030 //
0031 // ClassName:   PhysicsList
0032 //
0033 // Author:      V.Ivanchenko 03.05.2004
0034 //
0035 // Modified:
0036 // 16.11.06 Use components from physics_lists subdirectory (V.Ivanchenko)
0037 // 16.05.07 Use renamed EM components from physics_lists (V.Ivanchenko)
0038 //
0039 //----------------------------------------------------------------------------
0040 //
0041 
0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0044 
0045 #include "PhysicsList.hh"
0046 
0047 #include "PhysicsListMessenger.hh"
0048 #include "StepLimiterBuilder.hh"
0049 
0050 #include "G4DecayPhysics.hh"
0051 #include "G4EmExtraPhysics.hh"
0052 #include "G4EmLivermorePhysics.hh"
0053 #include "G4EmLowEPPhysics.hh"
0054 #include "G4EmParameters.hh"
0055 #include "G4EmPenelopePhysics.hh"
0056 #include "G4EmStandardPhysics.hh"
0057 #include "G4EmStandardPhysics_option1.hh"
0058 #include "G4EmStandardPhysics_option2.hh"
0059 #include "G4EmStandardPhysics_option3.hh"
0060 #include "G4EmStandardPhysics_option4.hh"
0061 #include "G4HadronElasticPhysics.hh"
0062 #include "G4HadronInelasticQBBC.hh"
0063 #include "G4IonBinaryCascadePhysics.hh"
0064 #include "G4LossTableManager.hh"
0065 #include "G4PhysicalConstants.hh"
0066 #include "G4StoppingPhysics.hh"
0067 #include "G4SystemOfUnits.hh"
0068 #include "G4UnitsTable.hh"
0069 
0070 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0071 
0072 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0073 {
0074   fHelIsRegisted = false;
0075   fBicIsRegisted = false;
0076   fIonIsRegisted = false;
0077   fGnucIsRegisted = false;
0078   fStopIsRegisted = false;
0079   fVerbose = 1;
0080 
0081   SetDefaultCutValue(1 * mm);
0082 
0083   fMessenger = new PhysicsListMessenger(this);
0084 
0085   // Add Physics builders
0086   RegisterPhysics(new G4EmStandardPhysics());
0087   RegisterPhysics(new G4DecayPhysics());
0088   RegisterPhysics(new StepLimiterBuilder());
0089 }
0090 
0091 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0092 
0093 PhysicsList::~PhysicsList()
0094 {
0095   delete fMessenger;
0096 }
0097 
0098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0099 
0100 void PhysicsList::ConstructParticle()
0101 {
0102   if (fVerbose > 0) {
0103     G4cout << "### PhysicsList Construte Particles" << G4endl;
0104   }
0105   G4VModularPhysicsList::ConstructParticle();
0106 }
0107 
0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0109 
0110 void PhysicsList::ConstructProcess()
0111 {
0112   if (fVerbose > 0) {
0113     G4cout << "### PhysicsList Construte Processes" << G4endl;
0114   }
0115 
0116   G4VModularPhysicsList::ConstructProcess();
0117 
0118   // Define energy interval for loss processes
0119   // from 10 eV to 10 GeV
0120   G4EmParameters* param = G4EmParameters::Instance();
0121   param->SetMinEnergy(0.01 * keV);
0122   param->SetMaxEnergy(10. * GeV);
0123   param->SetNumberOfBinsPerDecade(10);
0124   param->SetVerbose(1);
0125 }
0126 
0127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0128 
0129 void PhysicsList::AddPhysicsList(const G4String& name)
0130 {
0131   if (fVerbose > 0) {
0132     G4cout << "### PhysicsList Add Physics <" << name << "> " << G4endl;
0133   }
0134   if (name == "emstandard") {
0135     ReplacePhysics(new G4EmStandardPhysics());
0136   }
0137   else if (name == "emstandard_opt1") {
0138     ReplacePhysics(new G4EmStandardPhysics_option1());
0139   }
0140   else if (name == "emstandard_opt2") {
0141     ReplacePhysics(new G4EmStandardPhysics_option2());
0142   }
0143   else if (name == "emstandard_opt3") {
0144     ReplacePhysics(new G4EmStandardPhysics_option3());
0145   }
0146   else if (name == "emstandard_opt4") {
0147     ReplacePhysics(new G4EmStandardPhysics_option4());
0148   }
0149   else if (name == "emlivermore") {
0150     ReplacePhysics(new G4EmLivermorePhysics());
0151   }
0152   else if (name == "empenelope") {
0153     ReplacePhysics(new G4EmPenelopePhysics());
0154   }
0155   else if (name == "emlowenergy") {
0156     ReplacePhysics(new G4EmLowEPPhysics());
0157   }
0158   else if (name == "elastic" && !fHelIsRegisted) {
0159     RegisterPhysics(new G4HadronElasticPhysics());
0160     fHelIsRegisted = true;
0161   }
0162   else if (name == "binary" && !fBicIsRegisted) {
0163     RegisterPhysics(new G4HadronInelasticQBBC());
0164     fBicIsRegisted = true;
0165   }
0166   else if (name == "binary_ion" && !fIonIsRegisted) {
0167     RegisterPhysics(new G4IonBinaryCascadePhysics());
0168     fIonIsRegisted = true;
0169   }
0170   else if (name == "gamma_nuc" && !fGnucIsRegisted) {
0171     RegisterPhysics(new G4EmExtraPhysics());
0172     fGnucIsRegisted = true;
0173   }
0174   else if (name == "stopping" && !fStopIsRegisted) {
0175     RegisterPhysics(new G4StoppingPhysics());
0176     fStopIsRegisted = true;
0177   }
0178   else {
0179     G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
0180            << " fail - module is already regitered or is unknown " << G4endl;
0181   }
0182 }
0183 
0184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......