Back to home page

EIC code displayed by LXR

 
 

    


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

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