Back to home page

EIC code displayed by LXR

 
 

    


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

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