This method will be invoked in the Construct() method.
each physics process will be instantiated and registered to the process manager of each particle type.
64{
65 if (verboseLevel > 0) {
66 G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
67 }
68
69 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
70 G4ProcessManager* pmanager[2] = {
fMpl->GetProcessManager(),
fApl->GetProcessManager()};
71
72
73
74 G4double magn =
fMpl->MagneticCharge();
75 G4double elec =
fMpl->GetPDGCharge();
77 if (emin < keV) { emin = keV; }
79 G4int nbin = G4lrint(10 * std::log10(emax / emin));
80
81
82 if (magn != 0.0) {
83 pmanager[0]->RemoveProcess(0);
84 pmanager[0]->AddProcess(
new G4MonopoleTransportation(
fMpl), -1, 0, 0);
85 pmanager[1]->RemoveProcess(0);
86 pmanager[1]->AddProcess(
new G4MonopoleTransportation(
fApl), -1, 0, 0);
87
88
89
90
91
92
93 G4double chg =
sqrt(magn * magn + elec * elec);
94 G4mplIonisation* mplioni = new G4mplIonisation(chg);
95 mplioni->SetDEDXBinning(nbin);
96 mplioni->SetMinKinEnergy(emin);
97 mplioni->SetMaxKinEnergy(emax);
98 ph->RegisterProcess(mplioni,
fMpl);
99 ph->RegisterProcess(mplioni,
fApl);
100 }
101 if (elec != 0.0 && magn == 0.0) {
102 G4hIonisation* hhioni = new G4hIonisation();
103 hhioni->SetDEDXBinning(nbin);
104 hhioni->SetMinKinEnergy(emin);
105 hhioni->SetMaxKinEnergy(emax);
106 ph->RegisterProcess(hhioni,
fMpl);
107 ph->RegisterProcess(hhioni,
fApl);
108 }
109 ph->RegisterProcess(
new G4StepLimiter(),
fMpl);
110 ph->RegisterProcess(
new G4StepLimiter(),
fApl);
111}
double sqrt(double a)
sqrt for double