Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/extended/electromagnetic/TestEm0/src/PhysicsList.cc was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 "PhysListEmStandard.hh"
0032 #include "PhysicsListMessenger.hh"
0033 
0034 #include "G4EmLivermorePhysics.hh"
0035 #include "G4EmParameters.hh"
0036 #include "G4EmPenelopePhysics.hh"
0037 #include "G4EmStandardPhysics.hh"
0038 #include "G4EmStandardPhysics_option1.hh"
0039 #include "G4EmStandardPhysics_option2.hh"
0040 #include "G4EmStandardPhysics_option3.hh"
0041 #include "G4EmStandardPhysics_option4.hh"
0042 #include "G4LossTableManager.hh"
0043 #include "G4SystemOfUnits.hh"
0044 #include "G4UnitsTable.hh"
0045 
0046 // Bosons
0047 #include "G4ChargedGeantino.hh"
0048 #include "G4Gamma.hh"
0049 #include "G4Geantino.hh"
0050 #include "G4OpticalPhoton.hh"
0051 
0052 // leptons
0053 #include "G4AntiNeutrinoE.hh"
0054 #include "G4AntiNeutrinoMu.hh"
0055 #include "G4Electron.hh"
0056 #include "G4MuonMinus.hh"
0057 #include "G4MuonPlus.hh"
0058 #include "G4NeutrinoE.hh"
0059 #include "G4NeutrinoMu.hh"
0060 #include "G4Positron.hh"
0061 
0062 // Mesons
0063 #include "G4AntiKaonZero.hh"
0064 #include "G4Eta.hh"
0065 #include "G4EtaPrime.hh"
0066 #include "G4KaonMinus.hh"
0067 #include "G4KaonPlus.hh"
0068 #include "G4KaonZero.hh"
0069 #include "G4KaonZeroLong.hh"
0070 #include "G4KaonZeroShort.hh"
0071 #include "G4PionMinus.hh"
0072 #include "G4PionPlus.hh"
0073 #include "G4PionZero.hh"
0074 
0075 // Baryons
0076 #include "G4AntiNeutron.hh"
0077 #include "G4AntiProton.hh"
0078 #include "G4Neutron.hh"
0079 #include "G4Proton.hh"
0080 
0081 // Nuclei
0082 #include "G4Alpha.hh"
0083 #include "G4Deuteron.hh"
0084 #include "G4GenericIon.hh"
0085 #include "G4Triton.hh"
0086 
0087 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0088 
0089 PhysicsList::PhysicsList()
0090 {
0091   fMessenger = new PhysicsListMessenger(this);
0092 
0093   // set default cut value
0094   SetDefaultCutValue(1.0 * mm);
0095 
0096   SetVerboseLevel(1);
0097 
0098   AddPhysicsList("emstandard_opt0");
0099 
0100   G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0101 
0102   // add new units for cross sections
0103   //
0104   new G4UnitDefinition("mm2/g", "mm2/g", "Surface/Mass", mm2 / g);
0105   new G4UnitDefinition("um2/mg", "um2/mg", "Surface/Mass", um * um / mg);
0106 }
0107 
0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0109 
0110 PhysicsList::~PhysicsList()
0111 {
0112   delete fMessenger;
0113 }
0114 
0115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0116 
0117 void PhysicsList::ConstructParticle()
0118 {
0119   // pseudo-particles
0120   G4Geantino::GeantinoDefinition();
0121   G4ChargedGeantino::ChargedGeantinoDefinition();
0122 
0123   // gamma
0124   G4Gamma::GammaDefinition();
0125 
0126   // optical photon
0127   G4OpticalPhoton::OpticalPhotonDefinition();
0128 
0129   // leptons
0130   G4Electron::ElectronDefinition();
0131   G4Positron::PositronDefinition();
0132   G4MuonPlus::MuonPlusDefinition();
0133   G4MuonMinus::MuonMinusDefinition();
0134 
0135   G4NeutrinoE::NeutrinoEDefinition();
0136   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
0137   G4NeutrinoMu::NeutrinoMuDefinition();
0138   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
0139 
0140   // mesons
0141   G4PionPlus::PionPlusDefinition();
0142   G4PionMinus::PionMinusDefinition();
0143   G4PionZero::PionZeroDefinition();
0144   G4Eta::EtaDefinition();
0145   G4EtaPrime::EtaPrimeDefinition();
0146   G4KaonPlus::KaonPlusDefinition();
0147   G4KaonMinus::KaonMinusDefinition();
0148   G4KaonZero::KaonZeroDefinition();
0149   G4AntiKaonZero::AntiKaonZeroDefinition();
0150   G4KaonZeroLong::KaonZeroLongDefinition();
0151   G4KaonZeroShort::KaonZeroShortDefinition();
0152 
0153   // barions
0154   G4Proton::ProtonDefinition();
0155   G4AntiProton::AntiProtonDefinition();
0156   G4Neutron::NeutronDefinition();
0157   G4AntiNeutron::AntiNeutronDefinition();
0158 
0159   // ions
0160   G4Deuteron::DeuteronDefinition();
0161   G4Triton::TritonDefinition();
0162   G4Alpha::AlphaDefinition();
0163   G4GenericIon::GenericIonDefinition();
0164 }
0165 
0166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0167 
0168 void PhysicsList::ConstructProcess()
0169 {
0170   // Transportation
0171   //
0172   AddTransportation();
0173 
0174   // Electromagnetic physics list
0175   //
0176   fEmPhysicsList->ConstructProcess();
0177 }
0178 
0179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0180 
0181 void PhysicsList::AddPhysicsList(const G4String& name)
0182 {
0183   if (verboseLevel > 0) {
0184     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0185   }
0186 
0187   if (name == fEmName) return;
0188 
0189   if (name == "local") {
0190     fEmName = name;
0191     delete fEmPhysicsList;
0192     fEmPhysicsList = new PhysListEmStandard(name);
0193   }
0194   else if (name == "emstandard_opt0") {
0195     fEmName = name;
0196     delete fEmPhysicsList;
0197     fEmPhysicsList = new G4EmStandardPhysics();
0198   }
0199   else if (name == "emstandard_opt1") {
0200     fEmName = name;
0201     delete fEmPhysicsList;
0202     fEmPhysicsList = new G4EmStandardPhysics_option1();
0203   }
0204   else if (name == "emstandard_opt2") {
0205     fEmName = name;
0206     delete fEmPhysicsList;
0207     fEmPhysicsList = new G4EmStandardPhysics_option2();
0208   }
0209   else if (name == "emstandard_opt3") {
0210     fEmName = name;
0211     delete fEmPhysicsList;
0212     fEmPhysicsList = new G4EmStandardPhysics_option3();
0213   }
0214   else if (name == "emstandard_opt4") {
0215     fEmName = name;
0216     delete fEmPhysicsList;
0217     fEmPhysicsList = new G4EmStandardPhysics_option4();
0218   }
0219   else if (name == "empenelope") {
0220     fEmName = name;
0221     delete fEmPhysicsList;
0222     fEmPhysicsList = new G4EmPenelopePhysics();
0223   }
0224   else if (name == "emlivermore") {
0225     fEmName = name;
0226     delete fEmPhysicsList;
0227     fEmPhysicsList = new G4EmLivermorePhysics();
0228   }
0229   else {
0230     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0231            << " is not defined" << G4endl;
0232   }
0233 
0234   // Em options
0235   //
0236   G4EmParameters::Instance()->SetBuildCSDARange(true);
0237   G4EmParameters::Instance()->SetGeneralProcessActive(false);
0238 }
0239 
0240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......