Back to home page

EIC code displayed by LXR

 
 

    


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

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