File indexing completed on 2026-04-05 07:49:58
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
0040
0041
0042
0043
0044
0045 #include "G4MonopolePhysics.hh"
0046
0047 #include "G4BuilderType.hh"
0048 #include "G4Monopole.hh"
0049 #include "G4MonopolePhysicsMessenger.hh"
0050 #include "G4MonopoleTransportation.hh"
0051 #include "G4ParticleDefinition.hh"
0052 #include "G4PhysicsListHelper.hh"
0053 #include "G4ProcessManager.hh"
0054 #include "G4ProcessVector.hh"
0055 #include "G4StepLimiter.hh"
0056 #include "G4SystemOfUnits.hh"
0057 #include "G4Transportation.hh"
0058 #include "G4hIonisation.hh"
0059 #include "G4hMultipleScattering.hh"
0060 #include "G4hhIonisation.hh"
0061 #include "G4mplIonisation.hh"
0062 #include "G4mplIonisationWithDeltaModel.hh"
0063
0064
0065
0066 G4MonopolePhysics::G4MonopolePhysics(const G4String& nam)
0067 : G4VPhysicsConstructor(nam), fMpl(nullptr)
0068 {
0069 fMagCharge = 1.0;
0070
0071
0072 fElCharge = 0.0;
0073 fMonopoleMass = 100. * GeV;
0074 SetPhysicsType(bUnknown);
0075 fMessenger = new G4MonopolePhysicsMessenger(this);
0076 }
0077
0078
0079
0080 G4MonopolePhysics::~G4MonopolePhysics()
0081 {
0082 delete fMessenger;
0083 }
0084
0085
0086
0087 void G4MonopolePhysics::ConstructParticle()
0088 {
0089 if (!fMpl) {
0090 fMpl = G4Monopole::MonopoleDefinition(fMonopoleMass, fMagCharge, fElCharge);
0091 }
0092 else {
0093 G4Monopole::Monopole();
0094 }
0095 }
0096
0097
0098
0099 void G4MonopolePhysics::ConstructProcess()
0100 {
0101 if (verboseLevel > 0) {
0102 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
0103 }
0104
0105 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0106 G4ProcessManager* pmanager = fMpl->GetProcessManager();
0107
0108
0109 G4double magn = fMpl->MagneticCharge();
0110 G4double emin = std::min(fMonopoleMass / 20000., CLHEP::keV);
0111 G4double emax = std::max(10. * TeV, fMonopoleMass * 100);
0112 G4int nbin = G4lrint(10 * std::log10(emax / emin));
0113
0114
0115 if (magn != 0.0) {
0116 G4int idxt(0);
0117 pmanager->RemoveProcess(idxt);
0118 pmanager->AddProcess(new G4MonopoleTransportation(fMpl), -1, 0, 0);
0119 }
0120
0121 if (fMpl->GetPDGCharge() != 0.0) {
0122 G4hIonisation* hhioni = new G4hIonisation();
0123 hhioni->SetDEDXBinning(nbin);
0124 hhioni->SetMinKinEnergy(emin);
0125 hhioni->SetMaxKinEnergy(emax);
0126 ph->RegisterProcess(hhioni, fMpl);
0127 }
0128 if (magn != 0.0) {
0129 G4mplIonisation* mplioni = new G4mplIonisation(magn);
0130 mplioni->SetDEDXBinning(nbin);
0131 mplioni->SetMinKinEnergy(emin);
0132 mplioni->SetMaxKinEnergy(emax);
0133 ph->RegisterProcess(mplioni, fMpl);
0134 }
0135 ph->RegisterProcess(new G4StepLimiter(), fMpl);
0136 }
0137
0138
0139
0140 void G4MonopolePhysics::SetMagneticCharge(G4double val)
0141 {
0142 if (fMpl) {
0143 G4Exception("G4MonopolePhysics", "01", JustWarning,
0144 "Cannot set value when monopole is already constructed.");
0145 }
0146 else {
0147 fMagCharge = val;
0148 }
0149 }
0150
0151
0152
0153 void G4MonopolePhysics::SetElectricCharge(G4double val)
0154 {
0155 if (fMpl) {
0156 G4Exception("G4MonopolePhysics", "01", JustWarning,
0157 "Cannot set value when monopole is already constructed.");
0158 }
0159 else {
0160 fElCharge = val;
0161 }
0162 }
0163
0164
0165
0166 void G4MonopolePhysics::SetMonopoleMass(G4double mass)
0167 {
0168 if (fMpl) {
0169 G4Exception("G4MonopolePhysics", "01", JustWarning,
0170 "Cannot set value when monopole is already constructed.");
0171 }
0172 else {
0173 fMonopoleMass = mass;
0174 }
0175 }
0176
0177