File indexing completed on 2025-01-31 09:22:04
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 #include "eRositaPhysicsList.hh"
0028
0029 #include "globals.hh"
0030 #include "G4ios.hh"
0031 #include "G4ParticleDefinition.hh"
0032 #include "G4ParticleTypes.hh"
0033 #include "G4PhysicsListHelper.hh"
0034 #include "G4ProductionCutsTable.hh"
0035 #include "G4StepLimiter.hh"
0036 #include "G4SystemOfUnits.hh"
0037 #include "G4VPhysicsConstructor.hh"
0038
0039
0040 #include "G4DecayPhysics.hh"
0041 #include "G4EmLivermorePhysics.hh"
0042 #include "G4EmPenelopePhysics.hh"
0043 #include "G4EmStandardPhysics.hh"
0044
0045
0046 #include "G4ComptonScattering.hh"
0047 #include "G4eBremsstrahlung.hh"
0048 #include "G4eIonisation.hh"
0049 #include "G4eMultipleScattering.hh"
0050 #include "G4eplusAnnihilation.hh"
0051 #include "G4GammaConversion.hh"
0052 #include "G4hImpactIonisation.hh"
0053 #include "G4hIonisation.hh"
0054 #include "G4hMultipleScattering.hh"
0055 #include "G4ionIonisation.hh"
0056 #include "G4PhotoElectricEffect.hh"
0057 #include "G4RayleighScattering.hh"
0058
0059
0060 #include "G4LivermoreBremsstrahlungModel.hh"
0061 #include "G4LivermoreComptonModel.hh"
0062 #include "G4LivermoreGammaConversionModel.hh"
0063 #include "G4LivermoreIonisationModel.hh"
0064 #include "G4LivermorePhotoElectricModel.hh"
0065 #include "G4LivermoreRayleighModel.hh"
0066 #include "G4PenelopeAnnihilationModel.hh"
0067 #include "G4UniversalFluctuation.hh"
0068
0069
0070
0071 eRositaPhysicsList::eRositaPhysicsList()
0072 {
0073 SetVerboseLevel(1);
0074
0075 constexpr auto DEFAULT_CUT_VALUE{0.001 * mm};
0076 SetDefaultCutValue(DEFAULT_CUT_VALUE);
0077
0078 G4cout << "============================================================================================="
0079 << G4endl
0080 << "Geant4 eRosita example, based on a simplified version of eROSITA simulation."
0081 << G4endl
0082 << "Further details can be found in:"
0083 << G4endl
0084 << " M. G. Pia et al.,"
0085 << G4endl
0086 << " 'PIXE Simulation With Geant4',"
0087 << G4endl
0088 << " IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, 2009"
0089 << G4endl
0090 << " N. Meidinger et al.,"
0091 << G4endl
0092 << " 'Development of the focal plane PNCCD camera system for the X-ray space telescope eROSITA',"
0093 << G4endl
0094 << " NIM A 624, 321-329, 2010"
0095 << G4endl
0096 << "============================================================================================="
0097 << G4endl;
0098
0099 G4cout << G4endl;
0100 }
0101
0102
0103
0104 eRositaPhysicsList::~eRositaPhysicsList()
0105 {
0106 }
0107
0108
0109
0110 void eRositaPhysicsList::ConstructBosons()
0111 {
0112
0113
0114
0115
0116
0117
0118
0119 G4Gamma::GammaDefinition();
0120 }
0121
0122
0123
0124 void eRositaPhysicsList::ConstructLeptons()
0125 {
0126
0127
0128
0129 G4Electron::ElectronDefinition();
0130 G4Positron::PositronDefinition();
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143 }
0144
0145
0146
0147 void eRositaPhysicsList::ConstructMesons()
0148 {
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167 }
0168
0169
0170
0171 void eRositaPhysicsList::ConstructBaryons()
0172 {
0173
0174
0175
0176 G4Proton::ProtonDefinition();
0177 G4AntiProton::AntiProtonDefinition();
0178
0179
0180
0181
0182 }
0183
0184
0185
0186 void eRositaPhysicsList::ConstructParticle()
0187 {
0188 ConstructBosons();
0189 ConstructLeptons();
0190 ConstructMesons();
0191 ConstructBaryons();
0192 }
0193
0194
0195
0196 void eRositaPhysicsList::ConstructEM()
0197 {
0198 auto *helper = G4PhysicsListHelper::GetPhysicsListHelper();
0199
0200 auto particleIterator = GetParticleIterator();
0201 particleIterator->reset();
0202
0203 while ((*particleIterator)()) {
0204 auto *particle = particleIterator->value();
0205 auto particleName = particle->GetParticleName();
0206
0207 if (particleName == "gamma") {
0208
0209 auto *photoelectricEffect = new G4PhotoElectricEffect();
0210
0211
0212
0213 photoelectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
0214 helper->RegisterProcess(photoelectricEffect, particle);
0215
0216
0217 auto *comptonScattering = new G4ComptonScattering();
0218 comptonScattering->SetEmModel(new G4LivermoreComptonModel());
0219 helper->RegisterProcess(comptonScattering, particle);
0220
0221
0222 auto *gammaConversion = new G4GammaConversion();
0223 gammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
0224 helper->RegisterProcess(gammaConversion, particle);
0225
0226
0227 auto *rayleighScattering = new G4RayleighScattering();
0228 rayleighScattering->SetEmModel(new G4LivermoreRayleighModel());
0229 helper->RegisterProcess(rayleighScattering, particle);
0230 } else if (particleName == "e-") {
0231
0232 helper->RegisterProcess(new G4eMultipleScattering(), particle);
0233
0234
0235 auto *ionization = new G4eIonisation();
0236 ionization->SetEmModel(new G4LivermoreIonisationModel());
0237 ionization->SetFluctModel(new G4UniversalFluctuation());
0238 helper->RegisterProcess(ionization, particle);
0239
0240
0241 auto *bremsstrahlung = new G4eBremsstrahlung();
0242 bremsstrahlung->SetEmModel(new G4LivermoreBremsstrahlungModel());
0243 helper->RegisterProcess(bremsstrahlung, particle);
0244 } else if (particleName == "e+") {
0245
0246 helper->RegisterProcess(new G4eMultipleScattering(), particle);
0247
0248
0249 helper->RegisterProcess(new G4eIonisation(), particle);
0250
0251
0252 auto *bremsstrahlung = new G4eBremsstrahlung();
0253 bremsstrahlung->SetEmModel(new G4LivermoreBremsstrahlungModel());
0254 helper->RegisterProcess(bremsstrahlung, particle);
0255
0256
0257 auto *annihilation = new G4eplusAnnihilation();
0258 annihilation->SetEmModel(new G4PenelopeAnnihilationModel());
0259 helper->RegisterProcess(annihilation, particle);
0260
0261
0262
0263
0264
0265
0266 } else if (particleName == "proton" || particleName == "pi-" || particleName == "pi+") {
0267 helper->RegisterProcess(new G4hMultipleScattering(), particle);
0268 helper->RegisterProcess(new G4hIonisation(), particle);
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286 } else if (particleName == "alpha" || particleName == "He3" || particleName == "pi-" || particleName == "pi+" || particleName == "GenericIon") {
0287
0288 helper->RegisterProcess(new G4hMultipleScattering, particle);
0289 helper->RegisterProcess(new G4ionIonisation, particle);
0290 } else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0) && (particle->GetParticleName() != "chargedgeantino")) {
0291
0292 helper->RegisterProcess(new G4hMultipleScattering, particle);
0293 helper->RegisterProcess(new G4hIonisation, particle);
0294 }
0295 }
0296 }
0297
0298
0299
0300 void eRositaPhysicsList::ConstructGeneral()
0301 {
0302 auto *helper = G4PhysicsListHelper::GetPhysicsListHelper();
0303
0304
0305 auto *decay = new G4Decay();
0306
0307 auto particleIterator = GetParticleIterator();
0308 particleIterator->reset();
0309
0310 while ((*particleIterator)()) {
0311 auto *particle = particleIterator->value();
0312
0313 if (decay->IsApplicable(*particle)) {
0314 if (verboseLevel > 1) {
0315 G4cout << "### Decays for " << particle->GetParticleName() << G4endl;
0316 }
0317 helper->RegisterProcess(decay, particle);
0318
0319
0320
0321
0322
0323 }
0324 }
0325 }
0326
0327
0328
0329 void eRositaPhysicsList::ConstructProcess()
0330 {
0331 AddTransportation();
0332 ConstructEM();
0333 ConstructGeneral();
0334
0335 }
0336
0337
0338
0339 void eRositaPhysicsList::SetCuts()
0340 {
0341
0342 SetCutsWithDefault();
0343
0344
0345 constexpr auto ENERGY_LOW_LIMIT{250. * eV};
0346 constexpr auto ENERGY_HIGH_LIMIT{100. * GeV};
0347
0348 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(ENERGY_LOW_LIMIT, ENERGY_HIGH_LIMIT);
0349
0350 if (verboseLevel > 0) {
0351 DumpCutValuesTable();
0352 }
0353 }
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381