Belle II Software development
G4MonopolePhysics Class Reference

Monopole physics class to register on the physics list. More...

#include <G4MonopolePhysics.h>

Inheritance diagram for G4MonopolePhysics:

Public Member Functions

 G4MonopolePhysics (double magneticCharge=1.0)
 Constructor.
 
 ~G4MonopolePhysics ()
 Destructor.
 
virtual void ConstructParticle ()
 Adds monopole and anti-monopole to GEANT4 with a pdg of +/-99666 and parameters taken from current class.
 
virtual void ConstructProcess ()
 This method will be invoked in the Construct() method.
 

Private Member Functions

G4MonopolePhysicsoperator= (const G4MonopolePhysics &right)
 Assignment operator should be hidden.
 
 G4MonopolePhysics (const G4MonopolePhysics &copy)
 Copy constructor should be hidden.
 

Private Attributes

G4double fMagCharge
 Magnetic charge of the monopole, in e+ units.
 
G4double fElCharge
 Electric charge in case of dyon.
 
G4double fMonopoleMass
 Mass of the monopole.
 
G4MonopolefMpl
 Pointer to the monopole definition in GEANT4.
 
G4MonopolefApl
 Pointer to the anti-monopole definition in GEANT4.
 

Detailed Description

Monopole physics class to register on the physics list.

Entry point from FullSim to the monopole package. Consists of monopole definition, transportation and ionisation processes.

Definition at line 33 of file G4MonopolePhysics.h.

Constructor & Destructor Documentation

◆ G4MonopolePhysics() [1/2]

G4MonopolePhysics ( double  magneticCharge = 1.0)
explicit

Constructor.

Parameters
magneticChargeMagnetic charge of the monopole, in e+ units.

Definition at line 32 of file G4MonopolePhysics.cc.

33 : G4VPhysicsConstructor("Monopole physics"),
34 fMagCharge(magneticCharge), //in units of the positron charge
35 fMpl(0), fApl(0)
36{
37 //No way to store magnetic charge in TDatabasePDG,
38 //so part of the information (e, m, code, etc.) should be stored before generation
39 //and other part (g) passed to the simulation setup
40 const auto monopoleInPDG = TDatabasePDG::Instance()->GetParticle(c_monopolePDGCode);
41 const auto antiMonopoleInPDG = TDatabasePDG::Instance()->GetParticle(-c_monopolePDGCode);
42 if (!monopoleInPDG || !antiMonopoleInPDG) {
43 B2FATAL("Monopole physics was requested, but the monopole parameters"
44 "were not registered in local PDG database under PID code " << c_monopolePDGCode);
45 }
46 fElCharge = monopoleInPDG->Charge() / 3.0; //TParticlePDG returns in units of |e|/3
47 fMonopoleMass = antiMonopoleInPDG->Mass() * GeV;
48 SetPhysicsType(bUnknown);
49}
G4Monopole * fMpl
Pointer to the monopole definition in GEANT4.
G4double fElCharge
Electric charge in case of dyon.
G4double fMagCharge
Magnetic charge of the monopole, in e+ units.
G4double fMonopoleMass
Mass of the monopole.
G4Monopole * fApl
Pointer to the anti-monopole definition in GEANT4.

◆ ~G4MonopolePhysics()

Destructor.

Definition at line 51 of file G4MonopolePhysics.cc.

52{
53}

◆ G4MonopolePhysics() [2/2]

G4MonopolePhysics ( const G4MonopolePhysics copy)
private

Copy constructor should be hidden.

Parameters
copyCopy reference.

Member Function Documentation

◆ ConstructParticle()

void ConstructParticle ( )
virtual

Adds monopole and anti-monopole to GEANT4 with a pdg of +/-99666 and parameters taken from current class.

Definition at line 55 of file G4MonopolePhysics.cc.

56{
57 fMpl = new G4Monopole("monopole", fMonopoleMass, fMagCharge, fElCharge, c_monopolePDGCode);
58//NOTE careful not to use same name or encoding, this will lead to G4exception
59 fApl = new G4Monopole("anti-monopole", fMonopoleMass, -fMagCharge, -fElCharge, -c_monopolePDGCode);
60}
A class to hold monopole description as a particle.
Definition: G4Monopole.h:33

◆ ConstructProcess()

void ConstructProcess ( )
virtual

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.

Definition at line 63 of file G4MonopolePhysics.cc.

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 // defined monopole parameters and binning
73
74 G4double magn = fMpl->MagneticCharge();
75 G4double elec = fMpl->GetPDGCharge();
76 G4double emin = fMonopoleMass / 20000.;
77 if (emin < keV) { emin = keV; }
78 G4double emax = std::max(10.*TeV, fMonopoleMass * 100);
79 G4int nbin = G4lrint(10 * std::log10(emax / emin));
80
81 // dedicated trasporation
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// commented out the following 3 lines,
89// to supress a cppcheck [duplicateCondition] warning for the if condition
90// }
91//
92// if (magn != 0.0) {
93 G4double chg = sqrt(magn * magn + elec * elec);//TODO properly combine electric and magnetic ionisation
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}
Concrete class that does the geometrical transport.
G4double MagneticCharge() const
Returns magnetic charge of the monopole.
Definition: G4Monopole.cc:47
Monopole ionisation class.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ operator=()

G4MonopolePhysics & operator= ( const G4MonopolePhysics right)
private

Assignment operator should be hidden.

Parameters
rightAssign reference.

Member Data Documentation

◆ fApl

G4Monopole* fApl
private

Pointer to the anti-monopole definition in GEANT4.

Definition at line 78 of file G4MonopolePhysics.h.

◆ fElCharge

G4double fElCharge
private

Electric charge in case of dyon.

Definition at line 74 of file G4MonopolePhysics.h.

◆ fMagCharge

G4double fMagCharge
private

Magnetic charge of the monopole, in e+ units.

Definition at line 73 of file G4MonopolePhysics.h.

◆ fMonopoleMass

G4double fMonopoleMass
private

Mass of the monopole.

Definition at line 75 of file G4MonopolePhysics.h.

◆ fMpl

G4Monopole* fMpl
private

Pointer to the monopole definition in GEANT4.

Definition at line 77 of file G4MonopolePhysics.h.


The documentation for this class was generated from the following files: