Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:30

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 //---------------------------------------------------------------------------
0028 //
0029 // ClassName:   INCLXXPhysicsListHelper
0030 //
0031 // Author: 04.03.2013 Davide Mancusi
0032 //   Created by modifying and generalising the QGSP_INCLXX source files
0033 //
0034 //----------------------------------------------------------------------------
0035 //
0036 
0037 #include <iomanip>   
0038 
0039 #include "globals.hh"
0040 #include "G4ios.hh"
0041 #include "G4ProcessManager.hh"
0042 #include "G4ProcessVector.hh"
0043 #include "G4ParticleTypes.hh"
0044 #include "G4ParticleTable.hh"
0045 
0046 #include "G4Material.hh"
0047 #include "G4MaterialTable.hh"
0048 
0049 #include "G4DecayPhysics.hh"
0050 #include "G4RadioactiveDecayPhysics.hh"
0051 #include "G4EmStandardPhysics.hh"
0052 #include "G4EmExtraPhysics.hh"
0053 #include "G4IonINCLXXPhysics.hh"
0054 #include "G4StoppingPhysics.hh"
0055 #include "G4StoppingPhysicsWithINCLXX.hh"
0056 #include "G4HadronElasticPhysics.hh"
0057 #include "G4HadronElasticPhysicsHP.hh"
0058 #include "G4NeutronTrackingCut.hh"
0059 
0060 #include "G4HadronPhysicsINCLXX.hh"
0061 
0062 #include "G4WarnPLStatus.hh"
0063 
0064 template<class T, bool withNeutronHP, bool withFTFP> TINCLXXPhysicsListHelper<T, withNeutronHP, withFTFP>::TINCLXXPhysicsListHelper(G4int ver):  T()
0065 {
0066 
0067   if(withFTFP)
0068     name = "FTFP_INCLXX";
0069   else
0070     name = "QGSP_INCLXX";
0071   if(withNeutronHP)
0072     name += "_HP";
0073 
0074   G4cout << "<<< Geant4 Physics List simulation engine: " << name << " (based on INCLXXPhysicsListHelper)"<<G4endl;
0075   G4cout <<G4endl;
0076 
0077   this->defaultCutValue = 0.7*CLHEP::mm;  
0078   this->SetVerboseLevel(ver);
0079 
0080   G4WarnPLStatus exp;
0081   exp.Experimental(name);
0082 
0083   // EM Physics
0084   this->RegisterPhysics( new G4EmStandardPhysics(ver) );
0085 
0086   // Synchroton Radiation & GN Physics
0087   this->RegisterPhysics( new G4EmExtraPhysics(ver) );
0088 
0089   // Decays
0090   this->RegisterPhysics( new G4DecayPhysics(ver) );
0091   if(withNeutronHP) this->RegisterPhysics( new G4RadioactiveDecayPhysics(ver) );
0092 
0093   // Hadron Elastic scattering
0094   if(withNeutronHP)
0095     this->RegisterPhysics( new G4HadronElasticPhysicsHP(ver) );
0096   else
0097     this->RegisterPhysics( new G4HadronElasticPhysics(ver) );
0098 
0099   // Hadron Physics
0100   this->RegisterPhysics( new G4HadronPhysicsINCLXX(G4String(1,static_cast<char>(ver)),true,withNeutronHP,withFTFP));
0101 
0102   // Stopping Physics
0103   this->RegisterPhysics( new G4StoppingPhysicsWithINCLXX(ver) );
0104 
0105   // Ion Physics
0106   this->RegisterPhysics( new G4IonINCLXXPhysics(ver));
0107 
0108   // Neutron tracking cut
0109   if(!withNeutronHP)
0110     this->RegisterPhysics( new G4NeutronTrackingCut(ver));
0111 
0112 }
0113 
0114 template<class T, bool withNeutronHP, bool withFTFP> TINCLXXPhysicsListHelper<T, withNeutronHP, withFTFP>::~TINCLXXPhysicsListHelper()
0115 {
0116 }
0117 
0118 template<class T, bool withNeutronHP, bool withFTFP> void TINCLXXPhysicsListHelper<T, withNeutronHP, withFTFP>::SetCuts()
0119 {
0120   if (this->verboseLevel >1){
0121     G4cout << name << "::SetCuts:";
0122   }  
0123   //  " G4VUserPhysicsList::SetCutsWithDefault" method sets 
0124   //   the default cut value for all particle types 
0125 
0126   this->SetCutsWithDefault();   
0127 
0128   if(withNeutronHP) { this->SetCutValue(0.0, "proton"); }
0129 
0130   //  if (this->verboseLevel >0)
0131   //    G4VUserPhysicsList::DumpCutValuesTable();  
0132 }
0133