Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 08:30:17

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 publication:
0032 // Med. Phys. 37 (2010) 4692-4708
0033 // J. Comput. Phys. 274 (2014) 841-882
0034 // The Geant4-DNA web site is available at http://geant4-dna.org
0035 //
0036 //
0037 
0038 #include "PhysicsList.hh"
0039 
0040 #include "G4PhysicsListHelper.hh"
0041 #include "G4RunManager.hh"
0042 #include "G4SystemOfUnits.hh"
0043 
0044 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0045 
0046 PhysicsList::PhysicsList() : G4VUserPhysicsList()
0047 {
0048   SetVerboseLevel(1);
0049 }
0050 
0051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0052 
0053 PhysicsList::~PhysicsList() {}
0054 
0055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0056 
0057 void PhysicsList::ConstructParticle()
0058 {
0059   ConstructBosons();
0060   ConstructLeptons();
0061   ConstructBarions();
0062 }
0063 
0064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0065 
0066 void PhysicsList::ConstructBosons()
0067 {
0068   // gamma
0069   G4Gamma::GammaDefinition();
0070 }
0071 
0072 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0073 
0074 void PhysicsList::ConstructLeptons()
0075 {
0076   // leptons
0077   G4Electron::ElectronDefinition();
0078   G4Positron::PositronDefinition();
0079 }
0080 
0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0082 
0083 // DNA
0084 #include "G4DNAGenericIonsManager.hh"
0085 // ENDDNA
0086 
0087 void PhysicsList::ConstructBarions()
0088 {
0089   // baryons
0090   G4Proton::ProtonDefinition();
0091   G4GenericIon::GenericIonDefinition();
0092 
0093   // Geant4 DNA new particles
0094   G4DNAGenericIonsManager* genericIonsManager;
0095   genericIonsManager = G4DNAGenericIonsManager::Instance();
0096   genericIonsManager->GetIon("alpha++");
0097   genericIonsManager->GetIon("alpha+");
0098   genericIonsManager->GetIon("helium");
0099   genericIonsManager->GetIon("hydrogen");
0100   genericIonsManager->GetIon("carbon");
0101   genericIonsManager->GetIon("nitrogen");
0102   genericIonsManager->GetIon("oxygen");
0103   genericIonsManager->GetIon("iron");
0104 }
0105 
0106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0107 
0108 void PhysicsList::ConstructProcess()
0109 {
0110   AddTransportation();
0111   ConstructEM();
0112   ConstructGeneral();
0113 }
0114 
0115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0116 
0117 // Geant4-DNA MODELS
0118 
0119 #include "G4DNAAttachment.hh"
0120 #include "G4DNABornExcitationModel.hh"
0121 #include "G4DNABornIonisationModel.hh"
0122 #include "G4DNAChampionElasticModel.hh"
0123 #include "G4DNAChargeDecrease.hh"
0124 #include "G4DNAChargeIncrease.hh"
0125 #include "G4DNADingfelderChargeDecreaseModel.hh"
0126 #include "G4DNADingfelderChargeIncreaseModel.hh"
0127 #include "G4DNAElastic.hh"
0128 #include "G4DNAEmfietzoglouExcitationModel.hh"
0129 #include "G4DNAEmfietzoglouIonisationModel.hh"
0130 #include "G4DNAExcitation.hh"
0131 #include "G4DNAIonisation.hh"
0132 #include "G4DNAMeltonAttachmentModel.hh"
0133 #include "G4DNAMillerGreenExcitationModel.hh"
0134 #include "G4DNAPTBElasticModel.hh"
0135 #include "G4DNAPTBExcitationModel.hh"
0136 #include "G4DNAPTBIonisationModel.hh"
0137 #include "G4DNARuddIonisationModel.hh"
0138 #include "G4DNASancheExcitationModel.hh"
0139 #include "G4DNAScreenedRutherfordElasticModel.hh"
0140 #include "G4DNAVibExcitation.hh"
0141 
0142 //
0143 
0144 #include "G4DNAModelInterface.hh"
0145 #include "G4DNAVacuumModel.hh"
0146 #include "G4EmConfigurator.hh"
0147 #include "G4LossTableManager.hh"
0148 #include "G4VEmModel.hh"
0149 
0150 // #include "G4ElectronCapture.hh"
0151 
0152 //....oooOO0OOooo........oooOO0OOooo........oooOOG4DNAPTB0OOooo........oooOO0OOooo....
0153 
0154 void PhysicsList::ConstructEM()
0155 {
0156   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0157 
0158   auto myParticleIterator = GetParticleIterator();
0159   myParticleIterator->reset();
0160   while ((*myParticleIterator)()) {
0161     G4ParticleDefinition* particle = myParticleIterator->value();
0162     G4String particleName = particle->GetParticleName();
0163 
0164     if (particleName == "e-") {
0165       // **********************************************************
0166       // Instanciate models
0167       // **********************************************************
0168 
0169       G4DNAScreenedRutherfordElasticModel* e_modelDNARutherfordElastic =
0170         new G4DNAScreenedRutherfordElasticModel();
0171       G4DNAEmfietzoglouIonisationModel* e_modelDNAEmfietzoglouIonisation =
0172         new G4DNAEmfietzoglouIonisationModel();
0173       G4DNAEmfietzoglouExcitationModel* e_modelDNAEmfietzoglouExcitation =
0174         new G4DNAEmfietzoglouExcitationModel();
0175 
0176       G4DNAPTBElasticModel* modelDNAPTBElastic = new G4DNAPTBElasticModel();
0177       G4DNAPTBIonisationModel* modelDNAPTBIonisation = new G4DNAPTBIonisationModel();
0178       G4DNAPTBExcitationModel* modelDNAPTBExcitation = new G4DNAPTBExcitationModel();
0179 
0180       // Register models in the model interface
0181 
0182       // for elastics in three types of materials
0183       G4DNAModelInterface* e_elasticInteraction = new G4DNAModelInterface("DNA_e-_elastic");
0184 
0185       e_elasticInteraction->RegisterModel(modelDNAPTBElastic);
0186       e_elasticInteraction->RegisterModel(e_modelDNARutherfordElastic);
0187 
0188       // for ionization in three types of material
0189 
0190       G4DNAModelInterface* e_ionisationInteraction = new G4DNAModelInterface("DNA_e-_ionisation");
0191 
0192       e_ionisationInteraction->RegisterModel(modelDNAPTBIonisation);
0193       e_ionisationInteraction->RegisterModel(e_modelDNAEmfietzoglouIonisation);
0194       // for excitation in three types of material
0195       G4DNAModelInterface* e_excitationInteraction = new G4DNAModelInterface("DNA_e-_excitation");
0196       e_excitationInteraction->RegisterModel(e_modelDNAEmfietzoglouExcitation);
0197       e_excitationInteraction->RegisterModel(modelDNAPTBExcitation);
0198 
0199       // Instanciate Processes
0200       //  Elastic
0201       G4DNAElastic* e_DNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
0202       e_DNAElasticProcess->SetEmModel(e_elasticInteraction);
0203       // Ionisation
0204       G4DNAIonisation* e_DNAIonisationProcess = new G4DNAIonisation("e-_G4DNAIonisation");
0205       e_DNAIonisationProcess->SetEmModel(e_ionisationInteraction);
0206       // Excitation
0207       G4DNAExcitation* e_DNAExcitationProcess = new G4DNAExcitation("e-_G4DNAExcitation");
0208       e_DNAExcitationProcess->SetEmModel(e_excitationInteraction);
0209 
0210       // **********************************************************
0211       // Add previous process
0212       // **********************************************************
0213 
0214       // *** Elastic ***
0215       ph->RegisterProcess(e_DNAElasticProcess, particle);
0216       // *** Excitation ***
0217       ph->RegisterProcess(e_DNAExcitationProcess, particle);
0218       // *** Ionisation ***
0219       ph->RegisterProcess(e_DNAIonisationProcess, particle);
0220 
0221     } /*else if ( particleName == "proton" ) {
0222 
0223         G4DNAPTBIonisationModel* p_modelDNAPTBIonisation =
0224         new G4DNAPTBIonisationModel("THF/TMP/PY", particle);
0225         G4DNARuddIonisationModel* p_modelDNARuddIonisation =
0226         new G4DNARuddIonisationModel();
0227         //       G4DNABornIonisationModel* p_modelDNABornIonisation =
0228          new G4DNABornIonisationModel();
0229         //        G4DNABornExcitationModel* p_modelDNABornExcitation =
0230         new G4DNABornExcitationModel();
0231 
0232         G4DNAModelInterface* p_ionisationInteraction=
0233         new G4DNAModelInterface("p_ionisation_interaction");
0234         p_ionisationInteraction->RegisterModel(p_modelDNAPTBIonisation);
0235         p_ionisationInteraction->RegisterModel(new G4DNAVacuumModel());
0236         p_ionisationInteraction->RegisterModel(p_modelDNARuddIonisation, particle);
0237 
0238         G4DNAIonisation* p_DNAIonisationProcess =
0239         new G4DNAIonisation("p_G4DNAIonisation");
0240         p_DNAIonisationProcess->SetEmModel(p_ionisationInteraction);
0241         ph->RegisterProcess(p_DNAIonisationProcess, particle);
0242 
0243     }*/
0244   }
0245 }
0246 
0247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0248 
0249 void PhysicsList::ConstructGeneral() {}
0250 
0251 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0252 
0253 void PhysicsList::SetCuts()
0254 {
0255   // Set default cut value to 1 nm for all particles
0256 
0257   SetDefaultCutValue(0.000001);
0258 }