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