Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/extended/medical/dna/svalue/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 // This example is provided by the Geant4-DNA collaboration
0030 // Any report or published results obtained using the Geant4-DNA software
0031 // shall cite the following Geant4-DNA collaboration publications:
0032 // Med. Phys. 45 (2018) e722-e739
0033 // Phys. Med. 31 (2015) 861-874
0034 // Med. Phys. 37 (2010) 4692-4708
0035 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
0036 //
0037 // The Geant4-DNA web site is available at http://geant4-dna.org
0038 //
0039 
0040 #include "PhysicsList.hh"
0041 
0042 #include "PhysicsListMessenger.hh"
0043 
0044 #include "G4EmDNAPhysics.hh"
0045 #include "G4EmDNAPhysics_option1.hh"
0046 #include "G4EmDNAPhysics_option2.hh"
0047 #include "G4EmDNAPhysics_option3.hh"
0048 #include "G4EmDNAPhysics_option4.hh"
0049 #include "G4EmDNAPhysics_option5.hh"
0050 #include "G4EmDNAPhysics_option6.hh"
0051 #include "G4EmDNAPhysics_option7.hh"
0052 #include "G4EmDNAPhysics_option8.hh"
0053 #include "G4EmStandardPhysics_option3.hh"
0054 #include "G4EmStandardPhysics_option4.hh"
0055 #include "G4UserSpecialCuts.hh"
0056 
0057 // Particles
0058 
0059 #include "G4BaryonConstructor.hh"
0060 #include "G4BosonConstructor.hh"
0061 #include "G4DNAGenericIonsManager.hh"
0062 #include "G4IonConstructor.hh"
0063 #include "G4LeptonConstructor.hh"
0064 #include "G4MesonConstructor.hh"
0065 
0066 // Decay
0067 
0068 #include "G4Electron.hh"
0069 #include "G4NuclideTable.hh"
0070 #include "G4RadioactiveDecayPhysics.hh"
0071 #include "G4SystemOfUnits.hh"
0072 
0073 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0074 
0075 PhysicsList::PhysicsList() : G4VModularPhysicsList(), fEmPhysicsList(0), fMessenger(0)
0076 {
0077   fMessenger = new PhysicsListMessenger(this);
0078 
0079   SetVerboseLevel(1);
0080 
0081   // Physics
0082 
0083   fEmPhysicsList = new G4EmDNAPhysics();
0084   defaultCutValue = 1. * CLHEP::nm;
0085 
0086   G4double lowLimit = 10. * CLHEP::eV;
0087   G4double highLimit = 100. * CLHEP::GeV;
0088 
0089   G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowLimit, highLimit);
0090 
0091   // Change time and other limits in G4NuclideTable
0092   G4NuclideTable::GetInstance()->SetThresholdOfHalfLife(0.1 * picosecond);
0093   G4NuclideTable::GetInstance()->SetLevelTolerance(1.0 * eV);
0094 
0095   fRadDecay = new G4RadioactiveDecayPhysics();
0096 }
0097 
0098 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0099 
0100 PhysicsList::~PhysicsList()
0101 {
0102   delete fMessenger;
0103   delete fEmPhysicsList;
0104   delete fRadDecay;
0105 }
0106 
0107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0108 
0109 void PhysicsList::ConstructParticle()
0110 {
0111   G4BosonConstructor pBosonConstructor;
0112   pBosonConstructor.ConstructParticle();
0113 
0114   G4LeptonConstructor pLeptonConstructor;
0115   pLeptonConstructor.ConstructParticle();
0116 
0117   G4MesonConstructor pMesonConstructor;
0118   pMesonConstructor.ConstructParticle();
0119 
0120   G4BaryonConstructor pBaryonConstructor;
0121   pBaryonConstructor.ConstructParticle();
0122 
0123   G4IonConstructor pIonConstructor;
0124   pIonConstructor.ConstructParticle();
0125 
0126   G4DNAGenericIonsManager* genericIonsManager;
0127   genericIonsManager = G4DNAGenericIonsManager::Instance();
0128   genericIonsManager->GetIon("alpha++");
0129   genericIonsManager->GetIon("alpha+");
0130   genericIonsManager->GetIon("helium");
0131   genericIonsManager->GetIon("hydrogen");
0132 }
0133 
0134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0135 
0136 void PhysicsList::ConstructProcess()
0137 {
0138   // Transportation
0139 
0140   AddTransportation();
0141 
0142   // Electromagnetic physics list
0143 
0144   fEmPhysicsList->ConstructProcess();
0145 
0146   // Tracking cut
0147 
0148   AddTrackingCut();
0149 
0150   // Radioactive decay
0151 
0152   fRadDecay->ConstructProcess();
0153 }
0154 
0155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0156 
0157 void PhysicsList::AddPhysicsList(const G4String& name)
0158 {
0159   if (verboseLevel > 0) {
0160     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0161   }
0162 
0163   if (name == fEmName) return;
0164 
0165   if (name == "dna") {
0166     fEmName = name;
0167     delete fEmPhysicsList;
0168     fEmPhysicsList = new G4EmDNAPhysics();
0169   }
0170   else if (name == "dna_opt1") {
0171     fEmName = name;
0172     delete fEmPhysicsList;
0173     fEmPhysicsList = new G4EmDNAPhysics_option1();
0174   }
0175   else if (name == "dna_opt2") {
0176     fEmName = name;
0177     delete fEmPhysicsList;
0178     fEmPhysicsList = new G4EmDNAPhysics_option2();
0179   }
0180   else if (name == "dna_opt3") {
0181     fEmName = name;
0182     delete fEmPhysicsList;
0183     fEmPhysicsList = new G4EmDNAPhysics_option3();
0184   }
0185   else if (name == "dna_opt4") {
0186     fEmName = name;
0187     delete fEmPhysicsList;
0188     fEmPhysicsList = new G4EmDNAPhysics_option4();
0189   }
0190   else if (name == "dna_opt5") {
0191     fEmName = name;
0192     delete fEmPhysicsList;
0193     fEmPhysicsList = new G4EmDNAPhysics_option5();
0194   }
0195   else if (name == "dna_opt6") {
0196     fEmName = name;
0197     delete fEmPhysicsList;
0198     fEmPhysicsList = new G4EmDNAPhysics_option6();
0199   }
0200   else if (name == "dna_opt7") {
0201     fEmName = name;
0202     delete fEmPhysicsList;
0203     fEmPhysicsList = new G4EmDNAPhysics_option7();
0204   }
0205   else if (name == "dna_opt8") {
0206     fEmName = name;
0207     delete fEmPhysicsList;
0208     fEmPhysicsList = new G4EmDNAPhysics_option8();
0209   }
0210   else if (name == "std_opt3") {
0211     fEmName = name;
0212     delete fEmPhysicsList;
0213     fEmPhysicsList = new G4EmStandardPhysics_option3();
0214   }
0215   else if (name == "std_opt4") {
0216     fEmName = name;
0217     delete fEmPhysicsList;
0218     fEmPhysicsList = new G4EmStandardPhysics_option4();
0219   }
0220   else {
0221     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0222            << " is not defined" << G4endl;
0223   }
0224 }
0225 
0226 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0227 
0228 void PhysicsList::AddTrackingCut()
0229 {
0230   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0231   ph->RegisterProcess(new G4UserSpecialCuts(), G4Electron::Electron());
0232 }