13 #include <simulation/monopoles/G4MonopolePhysics.h>
14 #include <simulation/monopoles/G4mplIonisation.h>
15 #include <simulation/monopoles/G4Monopole.h>
16 #include <simulation/monopoles/G4MonopoleTransportation.h>
17 #include <framework/logging/Logger.h>
19 #include <TDatabasePDG.h>
21 #include <G4ProcessManager.hh>
22 #include <G4StepLimiter.hh>
23 #include <G4hIonisation.hh>
24 #include <G4PhysicsListHelper.hh>
25 #include <G4BuilderType.hh>
26 #include <CLHEP/Units/SystemOfUnits.h>
31 using namespace Belle2::Monopoles;
32 using namespace CLHEP;
34 G4MonopolePhysics::G4MonopolePhysics(
double magneticCharge)
35 : G4VPhysicsConstructor(
"Monopole physics"),
36 fMagCharge(magneticCharge),
42 const auto monopoleInPDG = TDatabasePDG::Instance()->GetParticle(c_monopolePDGCode);
43 const auto antiMonopoleInPDG = TDatabasePDG::Instance()->GetParticle(-c_monopolePDGCode);
44 if (!monopoleInPDG || !antiMonopoleInPDG) {
45 B2FATAL(
"Monopole physics was requested, but the monopole parameters"
46 "were not registered in local PDG database under PID code " << c_monopolePDGCode);
48 fElCharge = monopoleInPDG->Charge() / 3.0;
50 SetPhysicsType(bUnknown);
67 if (verboseLevel > 0) {
68 G4cout <<
"G4MonopolePhysics::ConstructProcess" << G4endl;
71 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
72 G4ProcessManager* pmanager[2] = {
fMpl->GetProcessManager(),
fApl->GetProcessManager()};
77 G4double elec =
fMpl->GetPDGCharge();
79 if (emin < keV) { emin = keV; }
81 G4int nbin = G4lrint(10 * std::log10(emax / emin));
85 pmanager[0]->RemoveProcess(0);
87 pmanager[1]->RemoveProcess(0);
95 G4double chg = sqrt(magn * magn + elec * elec);
97 mplioni->SetDEDXBinning(nbin);
98 mplioni->SetMinKinEnergy(emin);
99 mplioni->SetMaxKinEnergy(emax);
100 ph->RegisterProcess(mplioni,
fMpl);
101 ph->RegisterProcess(mplioni,
fApl);
103 if (elec != 0.0 && magn == 0.0) {
104 G4hIonisation* hhioni =
new G4hIonisation();
105 hhioni->SetDEDXBinning(nbin);
106 hhioni->SetMinKinEnergy(emin);
107 hhioni->SetMaxKinEnergy(emax);
108 ph->RegisterProcess(hhioni,
fMpl);
109 ph->RegisterProcess(hhioni,
fApl);
111 ph->RegisterProcess(
new G4StepLimiter(),
fMpl);
112 ph->RegisterProcess(
new G4StepLimiter(),
fApl);