Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-02 08:02: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 Author: Susanna Guatelli
0028 */
0029 //
0030 //    **********************************
0031 //    *                                *
0032 //    *     BrachyPhysicsList.cc       *
0033 //    *                                *
0034 //    **********************************
0035 //
0036 #include "BrachyPhysicsList.hh"
0037 #include "BrachyPhysicsListMessenger.hh"
0038 #include "G4EmStandardPhysics_option4.hh"
0039 #include "G4EmLivermorePhysics.hh"
0040 #include "G4EmStandardPhysics.hh"
0041 #include "G4EmStandardPhysics_option1.hh"
0042 #include "G4EmStandardPhysics_option2.hh"
0043 #include "G4EmStandardPhysics_option3.hh"
0044 #include "G4EmStandardPhysics_option4.hh"
0045 #include "G4DecayPhysics.hh"
0046 #include "G4RadioactiveDecayPhysics.hh"
0047 #include "G4EmPenelopePhysics.hh"
0048 #include "G4VPhysicsConstructor.hh"
0049 #include "G4ParticleDefinition.hh"
0050 #include "G4ProductionCutsTable.hh"
0051 #include "G4ProcessManager.hh"
0052 #include "G4ParticleTypes.hh"
0053 #include "G4ios.hh"
0054 #include "G4StepLimiter.hh"
0055 #include "G4ParticleDefinition.hh"
0056 #include "globals.hh"
0057 #include "G4SystemOfUnits.hh"
0058 #include "G4UAtomicDeexcitation.hh"
0059 #include "G4LossTableManager.hh"
0060 
0061 BrachyPhysicsList::BrachyPhysicsList():  G4VModularPhysicsList()
0062 {
0063 SetVerboseLevel(1); 
0064 
0065 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(250*eV, 1*GeV);
0066 SetDefaultCutValue(0.05 *mm);
0067 DumpCutValuesTable();
0068 
0069 // EM physics: default
0070 fEmPhysicsList = new G4EmLivermorePhysics();
0071 fEmName="emlivermore";
0072 
0073 // Add Decay
0074 fDecPhysicsList = new G4DecayPhysics();
0075 fRadDecayPhysicsList = new G4RadioactiveDecayPhysics();
0076 fMessenger = new BrachyPhysicsListMessenger(this);
0077 }
0078 
0079 BrachyPhysicsList::~BrachyPhysicsList()
0080 {  
0081 delete fMessenger;
0082 delete fDecPhysicsList;
0083 delete fRadDecayPhysicsList;
0084 delete fEmPhysicsList;
0085 }
0086 
0087 void BrachyPhysicsList::ConstructParticle()
0088 {
0089 fDecPhysicsList -> ConstructParticle();
0090 }
0091 
0092 void BrachyPhysicsList::ConstructProcess()
0093 {
0094 AddTransportation();
0095 fEmPhysicsList -> ConstructProcess();
0096 
0097 // decay physics list
0098 fDecPhysicsList -> ConstructProcess();
0099 fRadDecayPhysicsList -> ConstructProcess();
0100 
0101 // Deexcitation
0102 // Both Fluorescence and Auger e- emission activated
0103 G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
0104 G4LossTableManager::Instance()->SetAtomDeexcitation(de);
0105 de -> SetFluo(true);
0106 de -> SetAuger(true);
0107 
0108 // To model full Auger cascade include in the macro file
0109 // the following UI commands:
0110 // process/em/augerCascade true
0111 // process/em/deexcitationIgnoreCut true
0112 }
0113 
0114 void BrachyPhysicsList::AddPhysicsList(const G4String& name)
0115 {
0116   
0117   if (name == fEmName) return;
0118 
0119   if (name == "emstandard_opt0"){
0120     fEmName = name;
0121     delete fEmPhysicsList;
0122     fEmPhysicsList = new G4EmStandardPhysics();
0123     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0124 
0125   } else if (name == "emstandard_opt1"){
0126     fEmName = name;
0127     delete fEmPhysicsList;
0128     fEmPhysicsList = new G4EmStandardPhysics_option1();
0129     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0130   } else if (name == "emstandard_opt2"){
0131     fEmName = name;
0132     delete fEmPhysicsList;
0133     fEmPhysicsList = new G4EmStandardPhysics_option2();
0134     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0135   } else if (name == "emstandard_opt3"){
0136     fEmName = name;
0137     delete fEmPhysicsList;
0138     fEmPhysicsList = new G4EmStandardPhysics_option3();
0139     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0140   } else if (name == "emstandard_opt4"){
0141     fEmName = name;
0142     delete fEmPhysicsList;
0143     fEmPhysicsList = new G4EmStandardPhysics_option4();
0144     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0145   } else if (name == "empenelope"){
0146     fEmName = name;
0147     delete fEmPhysicsList;
0148     fEmPhysicsList = new G4EmPenelopePhysics();
0149     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0150   } else if (name == "emlivermore"){
0151     fEmName = name;
0152     delete fEmPhysicsList;
0153     fEmPhysicsList = new G4EmLivermorePhysics();
0154     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;  
0155   } else {
0156 
0157     G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0158            << " is not defined"
0159            << G4endl;
0160   }
0161   G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0162            << " is activated"
0163            << G4endl;
0164 }
0165