File indexing completed on 2025-01-18 09:16:09
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 #include "PhysicsList.hh"
0031 #include "PhysicsListMessenger.hh"
0032
0033 #include "PhysListEmStandard.hh"
0034
0035 #include "G4EmStandardPhysics.hh"
0036 #include "G4EmStandardPhysics_option1.hh"
0037 #include "G4EmStandardPhysics_option2.hh"
0038 #include "G4EmStandardPhysics_option3.hh"
0039
0040 #include "G4LossTableManager.hh"
0041 #include "G4SystemOfUnits.hh"
0042 #include "G4UnitsTable.hh"
0043
0044
0045
0046 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0047 {
0048 pMessenger = new PhysicsListMessenger(this);
0049 SetVerboseLevel(1);
0050
0051
0052 emName = G4String("local");
0053 emPhysicsList = new PhysListEmStandard(emName);
0054
0055 SetDefaultCutValue(1*mm);
0056 G4LossTableManager::Instance();
0057 }
0058
0059
0060
0061 PhysicsList::~PhysicsList()
0062 {
0063 delete pMessenger;
0064 }
0065
0066
0067
0068 #include "G4BosonConstructor.hh"
0069 #include "G4LeptonConstructor.hh"
0070 #include "G4MesonConstructor.hh"
0071 #include "G4BosonConstructor.hh"
0072 #include "G4BaryonConstructor.hh"
0073 #include "G4IonConstructor.hh"
0074 #include "G4ShortLivedConstructor.hh"
0075
0076 void PhysicsList::ConstructParticle()
0077 {
0078 G4BosonConstructor pBosonConstructor;
0079 pBosonConstructor.ConstructParticle();
0080
0081 G4LeptonConstructor pLeptonConstructor;
0082 pLeptonConstructor.ConstructParticle();
0083
0084 G4MesonConstructor pMesonConstructor;
0085 pMesonConstructor.ConstructParticle();
0086
0087 G4BaryonConstructor pBaryonConstructor;
0088 pBaryonConstructor.ConstructParticle();
0089
0090 G4IonConstructor pIonConstructor;
0091 pIonConstructor.ConstructParticle();
0092
0093 G4ShortLivedConstructor pShortLivedConstructor;
0094 pShortLivedConstructor.ConstructParticle();
0095 }
0096
0097
0098
0099 #include "G4PhysicsListHelper.hh"
0100 #include "G4Decay.hh"
0101
0102 void PhysicsList::ConstructProcess()
0103 {
0104 AddTransportation();
0105
0106
0107
0108 emPhysicsList->ConstructProcess();
0109
0110
0111
0112 G4Decay* fDecayProcess = new G4Decay();
0113 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0114
0115 auto particleIterator=GetParticleIterator();
0116 particleIterator->reset();
0117 while( (*particleIterator)() ){
0118 G4ParticleDefinition* particle = particleIterator->value();
0119 if (fDecayProcess->IsApplicable(*particle))
0120 ph ->RegisterProcess(fDecayProcess, particle);
0121 }
0122 }
0123
0124
0125
0126 void PhysicsList::AddPhysicsList(const G4String& name)
0127 {
0128 if (verboseLevel>1) {
0129 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0130 }
0131
0132 if (name == emName) return;
0133
0134 if (name == "local") {
0135
0136 emName = name;
0137 delete emPhysicsList;
0138 emPhysicsList = new PhysListEmStandard(name);
0139
0140 } else if (name == "emstandard_opt0") {
0141
0142 emName = name;
0143 delete emPhysicsList;
0144 emPhysicsList = new G4EmStandardPhysics();
0145
0146 } else if (name == "emstandard_opt1") {
0147
0148 emName = name;
0149 delete emPhysicsList;
0150 emPhysicsList = new G4EmStandardPhysics_option1();
0151
0152 } else if (name == "emstandard_opt2") {
0153
0154 emName = name;
0155 delete emPhysicsList;
0156 emPhysicsList = new G4EmStandardPhysics_option2();
0157
0158 } else if (name == "emstandard_opt3") {
0159
0160 emName = name;
0161 delete emPhysicsList;
0162 emPhysicsList = new G4EmStandardPhysics_option3();
0163
0164 } else {
0165
0166 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0167 << " is not defined"
0168 << G4endl;
0169 }
0170 }
0171
0172