File indexing completed on 2026-09-12 08:30:47
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 #include "Par02PhysicsList.hh"
0030
0031 #include "G4BaryonConstructor.hh"
0032 #include "G4ComptonScattering.hh"
0033 #include "G4Decay.hh"
0034 #include "G4FastSimulationManagerProcess.hh"
0035 #include "G4GammaConversion.hh"
0036 #include "G4IonConstructor.hh"
0037 #include "G4LeptonConstructor.hh"
0038 #include "G4Material.hh"
0039 #include "G4MaterialTable.hh"
0040 #include "G4MesonConstructor.hh"
0041 #include "G4MuBremsstrahlung.hh"
0042 #include "G4MuIonisation.hh"
0043 #include "G4MuMultipleScattering.hh"
0044 #include "G4MuPairProduction.hh"
0045 #include "G4ParticleDefinition.hh"
0046 #include "G4ParticleTable.hh"
0047 #include "G4ParticleTypes.hh"
0048 #include "G4PhotoElectricEffect.hh"
0049 #include "G4ProcessManager.hh"
0050 #include "G4ProcessVector.hh"
0051 #include "G4SystemOfUnits.hh"
0052 #include "G4eBremsstrahlung.hh"
0053 #include "G4eIonisation.hh"
0054 #include "G4eMultipleScattering.hh"
0055 #include "G4eplusAnnihilation.hh"
0056 #include "G4hIonisation.hh"
0057 #include "G4hMultipleScattering.hh"
0058 #include "G4ios.hh"
0059 #include "globals.hh"
0060
0061 #include <iomanip>
0062
0063
0064
0065 Par02PhysicsList::Par02PhysicsList() : G4VUserPhysicsList()
0066 {
0067 SetVerboseLevel(1);
0068 defaultCutValue = 0.1 * m;
0069 }
0070
0071
0072
0073 Par02PhysicsList::~Par02PhysicsList() = default;
0074
0075
0076
0077 void Par02PhysicsList::ConstructParticle()
0078 {
0079
0080
0081
0082 ConstructBosons();
0083 ConstructLeptons();
0084 ConstructMesons();
0085 ConstructBaryons();
0086 ConstructIons();
0087 }
0088
0089
0090
0091 void Par02PhysicsList::ConstructBosons()
0092 {
0093 G4Geantino::GeantinoDefinition();
0094 G4ChargedGeantino::ChargedGeantinoDefinition();
0095 G4Gamma::GammaDefinition();
0096 G4OpticalPhoton::OpticalPhotonDefinition();
0097 }
0098
0099
0100
0101 void Par02PhysicsList::ConstructLeptons()
0102 {
0103 G4LeptonConstructor pConstructor;
0104 pConstructor.ConstructParticle();
0105 }
0106
0107
0108
0109 void Par02PhysicsList::ConstructMesons()
0110 {
0111 G4MesonConstructor pConstructor;
0112 pConstructor.ConstructParticle();
0113 }
0114
0115
0116
0117 void Par02PhysicsList::ConstructBaryons()
0118 {
0119 G4BaryonConstructor pConstructor;
0120 pConstructor.ConstructParticle();
0121 }
0122
0123
0124
0125 void Par02PhysicsList::ConstructIons()
0126 {
0127 G4IonConstructor pConstructor;
0128 pConstructor.ConstructParticle();
0129 }
0130
0131
0132
0133 void Par02PhysicsList::ConstructProcess()
0134 {
0135 AddTransportation();
0136 AddParameterisation();
0137 ConstructGeneral();
0138 }
0139
0140
0141
0142 void Par02PhysicsList::AddTransportation()
0143 {
0144
0145 G4VUserPhysicsList::AddTransportation();
0146 }
0147
0148
0149
0150 void Par02PhysicsList::ConstructGeneral()
0151 {
0152 auto theDecayProcess = new G4Decay();
0153 auto particleIterator = GetParticleIterator();
0154 particleIterator->reset();
0155 while ((*particleIterator)()) {
0156 G4ParticleDefinition* particle = particleIterator->value();
0157 G4ProcessManager* pmanager = particle->GetProcessManager();
0158 if (theDecayProcess->IsApplicable(*particle)) {
0159 pmanager->AddProcess(theDecayProcess);
0160
0161 pmanager->SetProcessOrdering(theDecayProcess, idxPostStep);
0162 pmanager->SetProcessOrdering(theDecayProcess, idxAtRest);
0163 }
0164 }
0165 }
0166
0167
0168
0169 void Par02PhysicsList::AddParameterisation()
0170 {
0171 G4FastSimulationManagerProcess* fastSimProcess = new G4FastSimulationManagerProcess("G4FSMP");
0172
0173
0174
0175
0176
0177 auto particleIterator = GetParticleIterator();
0178 particleIterator->reset();
0179 while ((*particleIterator)()) {
0180 G4ParticleDefinition* particle = particleIterator->value();
0181 G4ProcessManager* pmanager = particle->GetProcessManager();
0182
0183 pmanager->AddProcess(fastSimProcess, -1, 0, 0);
0184 }
0185 }
0186
0187
0188
0189 void Par02PhysicsList::SetCuts()
0190 {
0191 if (verboseLevel > 1) {
0192 G4cout << "Par02PhysicsList::SetCuts:";
0193 }
0194 SetCutsWithDefault();
0195 }
0196
0197