File indexing completed on 2026-04-17 07:51:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 #include "PhysicsList.hh"
0040 #include "PhysicsListMessenger.hh"
0041
0042 #include "globals.hh"
0043 #include "G4SystemOfUnits.hh"
0044 #include "G4PhysListFactory.hh"
0045 #include "G4VModularPhysicsList.hh"
0046 #include "G4VPhysicsConstructor.hh"
0047
0048 #include "G4BosonConstructor.hh"
0049 #include "G4LeptonConstructor.hh"
0050 #include "G4MesonConstructor.hh"
0051 #include "G4BaryonConstructor.hh"
0052 #include "G4IonConstructor.hh"
0053 #include "G4ShortLivedConstructor.hh"
0054
0055
0056
0057
0058 PhysicsList::PhysicsList(): G4VModularPhysicsList()
0059 {
0060 SetDefaultCutValue(1.0*mm);
0061
0062
0063 fPhysListIsSet = false;
0064
0065 fVerbose = 1;
0066 fMessenger = new PhysicsListMessenger(this);
0067 }
0068
0069
0070
0071
0072 PhysicsList::~PhysicsList()
0073 {
0074 delete fMessenger;
0075 }
0076
0077
0078
0079
0080 void PhysicsList::ConstructParticle()
0081 {
0082 if(fVerbose > 0) {
0083 G4cout << "### PhysicsList Construct Particles" << G4endl;
0084 }
0085
0086
0087
0088
0089 G4BosonConstructor pBosonConstructor;
0090 pBosonConstructor.ConstructParticle();
0091
0092 G4LeptonConstructor pLeptonConstructor;
0093 pLeptonConstructor.ConstructParticle();
0094
0095 G4MesonConstructor pMesonConstructor;
0096 pMesonConstructor.ConstructParticle();
0097
0098 G4BaryonConstructor pBaryonConstructor;
0099 pBaryonConstructor.ConstructParticle();
0100
0101 G4IonConstructor pIonConstructor;
0102 pIonConstructor.ConstructParticle();
0103
0104 G4ShortLivedConstructor pShortLivedConstructor;
0105 pShortLivedConstructor.ConstructParticle();
0106 }
0107
0108
0109
0110
0111 void PhysicsList::ConstructProcess()
0112 {
0113 if(fVerbose > 0) {
0114 G4cout << "### PhysicsList Construct Processes" << G4endl;
0115 }
0116
0117 if (fPhysListIsSet)
0118 G4VModularPhysicsList::ConstructProcess();
0119 else
0120 G4Exception("PhysicsList::ConstructProcess()", "PhysList001",
0121 FatalException, "No PHYSICS LIST has been set!");
0122 }
0123
0124
0125
0126
0127 void PhysicsList::SetPhysicsList(const G4String& name)
0128 {
0129 if(fVerbose > 0)
0130 G4cout << "### PhysicsList set physics list <" << name
0131 << "> " << G4endl;
0132
0133 if (!fPhysListIsSet) {
0134 G4PhysListFactory factory;
0135 G4VModularPhysicsList* phys = factory.GetReferencePhysList(name);
0136
0137 size_t ii = 0;
0138 const G4VPhysicsConstructor* elem = phys->GetPhysics(ii);
0139 G4VPhysicsConstructor* tmp = const_cast<G4VPhysicsConstructor*> (elem);
0140 while (elem) {
0141 RegisterPhysics(tmp);
0142 G4cout << "PhysicsList Type: " << elem->GetPhysicsType() << G4endl;
0143 G4cout << "PhysicsList Name: " << elem->GetPhysicsName() << G4endl;
0144 elem = phys->GetPhysics(++ii);
0145 tmp = const_cast<G4VPhysicsConstructor*> (elem);
0146 }
0147
0148 G4cout << name << " reference physics List has been ACTIVATED."
0149 << G4endl;
0150
0151
0152 fPhysListIsSet = true;
0153 }
0154 }
0155
0156