Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-08 07:53:11

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 // Authors:  01.06.17 V.Ivanchenko
0034 //
0035 //
0036 ///////////////////////////////////////////
0037 
0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0039 
0040 #include "PhysicsList.hh"
0041 
0042 #include "PhysicsListMessenger.hh"
0043 
0044 #include "G4DecayPhysics.hh"
0045 #include "G4EmConfigurator.hh"
0046 #include "G4EmLivermorePhysics.hh"
0047 #include "G4EmLowEPPhysics.hh"
0048 #include "G4EmParameters.hh"
0049 #include "G4EmPenelopePhysics.hh"
0050 #include "G4EmStandardPhysics.hh"
0051 #include "G4EmStandardPhysicsGS.hh"
0052 #include "G4EmStandardPhysicsSS.hh"
0053 #include "G4EmStandardPhysicsWVI.hh"
0054 #include "G4EmStandardPhysics_option1.hh"
0055 #include "G4EmStandardPhysics_option2.hh"
0056 #include "G4EmStandardPhysics_option3.hh"
0057 #include "G4EmStandardPhysics_option4.hh"
0058 #include "G4LDMBremModel.hh"
0059 #include "G4LDMBremsstrahlung.hh"
0060 #include "G4LDMHi.hh"
0061 #include "G4LDMHiBar.hh"
0062 #include "G4LDMPhoton.hh"
0063 #include "G4LossTableManager.hh"
0064 #include "G4ParticleTable.hh"
0065 #include "G4ParticleTypes.hh"
0066 #include "G4ProcessManager.hh"
0067 #include "G4ProductionCutsTable.hh"
0068 #include "G4SystemOfUnits.hh"
0069 #include "G4UnitsTable.hh"
0070 
0071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0072 
0073 PhysicsList::PhysicsList()
0074   : G4VModularPhysicsList(),
0075     fLDMPhotonMass(0.5 * CLHEP::GeV),
0076     fLDMHiMass(0.1 * CLHEP::GeV),
0077     fLDMPhoton(true),
0078     fLDMHi(false)
0079 {
0080   fMessenger = new PhysicsListMessenger(this);
0081 
0082   // Decay Physics is always defined
0083   fDecayPhysicsList = new G4DecayPhysics();
0084 
0085   // EM physics
0086   fEmName = G4String("emstandard_opt0");
0087   fEmPhysicsList = new G4EmStandardPhysics(1);
0088 
0089   SetVerboseLevel(1);
0090 }
0091 
0092 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0093 
0094 PhysicsList::~PhysicsList()
0095 {
0096   delete fMessenger;
0097   delete fDecayPhysicsList;
0098   delete fEmPhysicsList;
0099 }
0100 
0101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0102 
0103 void PhysicsList::ConstructParticle()
0104 {
0105   SetDefaultCutValue(1 * mm);
0106   fDecayPhysicsList->ConstructParticle();
0107   if (fLDMPhoton) {
0108     G4LDMPhoton::LDMPhotonDefinition(fLDMPhotonMass);
0109   }
0110   if (fLDMHi) {
0111     G4LDMHi::LDMHiDefinition(fLDMHiMass);
0112     G4LDMHiBar::LDMHiBarDefinition(fLDMHiMass);
0113   }
0114 }
0115 
0116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0117 
0118 void PhysicsList::ConstructProcess()
0119 {
0120   AddTransportation();
0121   fEmPhysicsList->ConstructProcess();
0122   fDecayPhysicsList->ConstructProcess();
0123   AddDarkMatter();
0124 }
0125 
0126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0127 
0128 void PhysicsList::AddPhysicsList(const G4String& name)
0129 {
0130   // G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0131   if (name == fEmName) {
0132     return;
0133   }
0134   else if (name == "emstandard_opt0") {
0135     fEmName = name;
0136     delete fEmPhysicsList;
0137     fEmPhysicsList = new G4EmStandardPhysics();
0138   }
0139   else if (name == "emstandard_opt1") {
0140     fEmName = name;
0141     delete fEmPhysicsList;
0142     fEmPhysicsList = new G4EmStandardPhysics_option1();
0143   }
0144   else if (name == "emstandard_opt2") {
0145     fEmName = name;
0146     delete fEmPhysicsList;
0147     fEmPhysicsList = new G4EmStandardPhysics_option2();
0148   }
0149   else if (name == "emstandard_opt3") {
0150     fEmName = name;
0151     delete fEmPhysicsList;
0152     fEmPhysicsList = new G4EmStandardPhysics_option3();
0153   }
0154   else if (name == "emstandard_opt4") {
0155     fEmName = name;
0156     delete fEmPhysicsList;
0157     fEmPhysicsList = new G4EmStandardPhysics_option4();
0158   }
0159   else if (name == "emstandardWVI") {
0160     fEmName = name;
0161     delete fEmPhysicsList;
0162     fEmPhysicsList = new G4EmStandardPhysicsWVI();
0163   }
0164   else if (name == "emstandardSS") {
0165     fEmName = name;
0166     delete fEmPhysicsList;
0167     fEmPhysicsList = new G4EmStandardPhysicsSS();
0168   }
0169   else if (name == "emstandardGS") {
0170     fEmName = name;
0171     delete fEmPhysicsList;
0172 
0173     fEmPhysicsList = new G4EmStandardPhysicsGS();
0174   }
0175   else if (name == "emlivermore") {
0176     fEmName = name;
0177     delete fEmPhysicsList;
0178     fEmPhysicsList = new G4EmLivermorePhysics();
0179   }
0180   else if (name == "empenelope") {
0181     fEmName = name;
0182     delete fEmPhysicsList;
0183     fEmPhysicsList = new G4EmPenelopePhysics();
0184   }
0185   else if (name == "emlowenergy") {
0186     fEmName = name;
0187     delete fEmPhysicsList;
0188     fEmPhysicsList = new G4EmLowEPPhysics();
0189   }
0190   else {
0191     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0192            << " is not defined" << G4endl;
0193     return;
0194   }
0195 }
0196 
0197 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0198 
0199 void PhysicsList::SetCuts()
0200 {
0201   G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100. * eV, 1e5);
0202   if (verboseLevel > 0) {
0203     DumpCutValuesTable();
0204   }
0205 }
0206 
0207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0208 
0209 void PhysicsList::AddDarkMatter()
0210 {
0211   G4cout << " PhysicsList::AddDarkMatter: " << fLDMPhoton << G4endl;
0212   if (fLDMPhoton) {
0213     // G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0214     G4LDMBremsstrahlung* ldmb = new G4LDMBremsstrahlung();
0215     G4ParticleDefinition* p = G4Proton::Proton();
0216     G4ProcessManager* man = p->GetProcessManager();
0217     man->AddProcess(ldmb, -1, -1, 5);
0218   }
0219 }
0220 
0221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0222 
0223 void PhysicsList::SetLDMPhotonMass(G4double val)
0224 {
0225   G4cout << "### PhysicsList::SetLDMPhotonMass: new value " << val / GeV << " GeV" << G4endl;
0226   fLDMPhotonMass = val;
0227   fLDMPhoton = true;
0228 }
0229 
0230 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0231 
0232 void PhysicsList::SetLDMHiMass(G4double val)
0233 {
0234   fLDMHiMass = val;
0235   fLDMHi = true;
0236 }
0237 
0238 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......