Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-29 07:51:38

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 "G4EmDNAChemistry_option2.hh"
0032 #include "G4EmDNAPhysics.hh"
0033 #include "G4EmDNAPhysics_option1.hh"
0034 #include "G4EmDNAPhysics_option2.hh"
0035 #include "G4EmDNAPhysics_option3.hh"
0036 #include "G4EmDNAPhysics_option4.hh"
0037 #include "G4EmDNAPhysics_option5.hh"
0038 #include "G4EmDNAPhysics_option6.hh"
0039 #include "G4EmDNAPhysics_option7.hh"
0040 #include "G4EmDNAPhysics_option8.hh"
0041 #include "G4PhysicsConstructorRegistry.hh"
0042 #include "G4SystemOfUnits.hh"
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0044 
0045 PhysicsList::PhysicsList()
0046   : G4VModularPhysicsList(), fDNAPhysicsList(nullptr), fChemistryList_option2(nullptr)
0047 {
0048   SetDefaultCutValue(1.0 * nanometer);
0049   SetVerboseLevel(1);
0050   RegisterConstructor("G4EmDNAPhysics");
0051   RegisterConstructor("G4EmDNAChemistry_option2");
0052   // This example works only with G4EmDNAChemistry_option2
0053   G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0054 }
0055 
0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0057 void PhysicsList::ConstructParticle()
0058 {
0059   if (fDNAPhysicsList != nullptr) {
0060     fDNAPhysicsList->ConstructParticle();
0061   }
0062 
0063   if (fChemistryList_option2 != nullptr) {
0064     fChemistryList_option2->ConstructParticle();
0065   }
0066 }
0067 
0068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0069 
0070 void PhysicsList::ConstructProcess()
0071 {
0072   AddTransportation();
0073 
0074   if (fDNAPhysicsList != nullptr) {
0075     fDNAPhysicsList->ConstructProcess();
0076   }
0077   if (fChemistryList_option2 != nullptr) {
0078     fChemistryList_option2->ConstructProcess();
0079   }
0080 }
0081 
0082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0083 
0084 void PhysicsList::RegisterConstructor(const G4String& name)
0085 {
0086   if (name == fPhysDNAName) {
0087     return;
0088   }
0089 
0090   if (verboseLevel > 0) {
0091     G4cout << "===== Register constructor ==== " << name << G4endl;
0092   }
0093 
0094   if (name == "G4EmDNAPhysics") {
0095     fDNAPhysicsList.reset(new G4EmDNAPhysics(verboseLevel));
0096     fPhysDNAName = name;
0097   }
0098   else if (name == "G4EmDNAPhysics_option1") {
0099     fDNAPhysicsList.reset(new G4EmDNAPhysics_option1(verboseLevel));
0100     fPhysDNAName = name;
0101   }
0102   else if (name == "G4EmDNAPhysics_option2") {
0103     fDNAPhysicsList.reset(new G4EmDNAPhysics_option2(verboseLevel));
0104     fPhysDNAName = name;
0105   }
0106   else if (name == "G4EmDNAPhysics_option3") {
0107     fDNAPhysicsList.reset(new G4EmDNAPhysics_option3(verboseLevel));
0108     fPhysDNAName = name;
0109   }
0110   else if (name == "G4EmDNAPhysics_option4") {
0111     fDNAPhysicsList.reset(new G4EmDNAPhysics_option4(verboseLevel));
0112     fPhysDNAName = name;
0113   }
0114   else if (name == "G4EmDNAPhysics_option5") {
0115     fDNAPhysicsList.reset(new G4EmDNAPhysics_option5(verboseLevel));
0116     fPhysDNAName = name;
0117   }
0118   else if (name == "G4EmDNAPhysics_option6") {
0119     fDNAPhysicsList.reset(new G4EmDNAPhysics_option6(verboseLevel));
0120     fPhysDNAName = name;
0121   }
0122   else if (name == "G4EmDNAPhysics_option7") {
0123     fDNAPhysicsList.reset(new G4EmDNAPhysics_option7(verboseLevel));
0124     fPhysDNAName = name;
0125   }
0126   else if (name == "G4EmDNAPhysics_option8") {
0127     fDNAPhysicsList.reset(new G4EmDNAPhysics_option8(verboseLevel));
0128     fPhysDNAName = name;
0129   }
0130   else if (name == "G4EmDNAChemistry_option2") {
0131     fChemistryList_option2.reset(new G4EmDNAChemistry_option2());
0132     fChemistryList_option2->SetVerboseLevel(verboseLevel);
0133   }
0134   else {
0135     G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0136            << " fails - name is not defined" << G4endl;
0137   }
0138 }
0139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......