Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:30:40

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 SAXSPhysicsList.cc
0027 /// \brief Implementation of the SAXSPhysicsList class
0028 //
0029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0030 
0031 #include "SAXSPhysicsList.hh"
0032 
0033 #include "SAXSPhysicsListMessenger.hh"
0034 
0035 #include "G4ProcessManager.hh"
0036 #include "G4SystemOfUnits.hh"
0037 #include "G4Threading.hh"
0038 #include "G4UnitsTable.hh"
0039 #include "globals.hh"
0040 
0041 // Particles
0042 #include "G4ParticleDefinition.hh"
0043 #include "G4ParticleTable.hh"
0044 #include "G4ParticleTypes.hh"
0045 
0046 // EM Physics Lists
0047 #include "G4EmLivermorePhysics.hh"
0048 #include "G4EmLowEPPhysics.hh"
0049 #include "G4EmParameters.hh"
0050 #include "G4EmPenelopePhysics.hh"
0051 #include "G4EmPenelopePhysicsMI.hh"
0052 #include "G4EmStandardPhysics.hh"
0053 #include "G4EmStandardPhysics_option4.hh"
0054 #include "G4LossTableManager.hh"
0055 
0056 // Hadronic and Extra Physics Lists
0057 #include "G4EmExtraPhysics.hh"
0058 #include "G4HadronElasticPhysicsHP.hh"
0059 #include "G4HadronPhysicsQGSP_BIC_HP.hh"
0060 #include "G4IonPhysics.hh"
0061 #include "G4StoppingPhysics.hh"
0062 
0063 // Decays
0064 #include "G4DecayPhysics.hh"
0065 
0066 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0067 
0068 SAXSPhysicsList::SAXSPhysicsList() : G4VUserPhysicsList(), fUseMIFlag(true), fPMessenger(0)
0069 {
0070   G4cout << "### PhysicsList instantiated ###" << G4endl;
0071 
0072   G4LossTableManager::Instance();
0073 
0074   // set default cuts value
0075   defaultCutValue = 0.1 * mm;
0076 
0077   // define the messenger
0078   fPMessenger = new SAXSPhysicsListMessenger(this);
0079 
0080   // set verbosity
0081   SetVerboseLevel(1);
0082 
0083   // particle list
0084   fParticleList = new G4DecayPhysics(verboseLevel);
0085 
0086   // EM Physics
0087   fEmPhysicsList = new G4EmPenelopePhysics(verboseLevel);
0088 }
0089 
0090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0091 
0092 SAXSPhysicsList::~SAXSPhysicsList()
0093 {
0094   delete fPMessenger;
0095 }
0096 
0097 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0098 
0099 void SAXSPhysicsList::ConstructParticle()
0100 {
0101   fParticleList->ConstructParticle();
0102 }
0103 
0104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0105 
0106 void SAXSPhysicsList::ConstructProcess()
0107 {
0108   // transportation
0109   AddTransportation();
0110 
0111   // Atomic deexcitation
0112   G4EmParameters* param = G4EmParameters::Instance();
0113   param->SetFluo(true);  // Activate deexcitation processes and fluorescence
0114   param->SetAuger(true);  // Activate Auger effect if deexcitation is activated
0115   param->SetPixe(true);  // Activate Particle Induced X-Ray Emission (PIXE)
0116 
0117   // EM physics
0118   fEmPhysicsList->ConstructProcess();
0119 }
0120 
0121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0122 
0123 void SAXSPhysicsList::SelectPhysicsList(const G4String& name)
0124 {
0125   if (verboseLevel > 1) {
0126     G4cout << "### PhysicsList::SelectPhysicsList: <" << name << "> ###" << G4endl;
0127   }
0128 
0129   if (name == "emstandard") {
0130     delete fEmPhysicsList;
0131     fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
0132     G4cout << "### selected Standard PhysicsList ###" << G4endl;
0133   }
0134   else if (name == "emstandard_opt4") {
0135     delete fEmPhysicsList;
0136     fEmPhysicsList = new G4EmStandardPhysics_option4(verboseLevel);
0137     G4cout << "### selected Standard_option4 PhysicsList ###" << G4endl;
0138   }
0139   else if (name == "emlivermore") {
0140     delete fEmPhysicsList;
0141     fEmPhysicsList = new G4EmLivermorePhysics(verboseLevel);
0142     G4cout << "### selected Livermore PhysicsList ###" << G4endl;
0143   }
0144   else if (name == "empenelope") {
0145     delete fEmPhysicsList;
0146     fEmPhysicsList = new G4EmPenelopePhysics(verboseLevel);
0147     G4cout << "### selected Penelope PhysicsList ###" << G4endl;
0148   }
0149   else if (name == "empenelopeMI") {
0150     delete fEmPhysicsList;
0151     fEmPhysicsList = new G4EmPenelopePhysicsMI(verboseLevel, "G4EmPenelopeMI", fUseMIFlag);
0152     G4cout << "### selected Penelope PhysicsList with MI effects ###" << G4endl;
0153   }
0154   else if (name == "emlowenergy") {
0155     delete fEmPhysicsList;
0156     fEmPhysicsList = new G4EmLowEPPhysics(verboseLevel);
0157     G4cout << "### selected LowEP PhysicsList ###" << G4endl;
0158   }
0159   else {
0160     G4cout << "### PhysicsList::SelectPhysicsList: <" << name << ">"
0161            << " is not defined ###" << G4endl;
0162   }
0163 }
0164 
0165 void SAXSPhysicsList::SetDefaultCutsValue(G4double value)
0166 {
0167   // define a new default cuts value
0168   defaultCutValue = value;
0169 }
0170 
0171 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......