Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:12

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