Belle II Software development
G4MonopoleFieldSetup Class Reference

Monopole field setup singleton class, that takes care of switching between conventional particle transportation and monopole transportation. More...

#include <G4MonopoleFieldSetup.h>

Public Member Functions

void SwitchChordFinder (G4int val)
 Switches chord finder between 1 - basf2 FullSim chord finder 2 - monopole chord finder Since monopoles use different equation of motion.
 
 ~G4MonopoleFieldSetup ()
 Destructor.
 

Static Public Member Functions

static G4MonopoleFieldSetupGetMonopoleFieldSetup ()
 Returns G4MonopoleFieldSetup instance.
 

Private Member Functions

 G4MonopoleFieldSetup ()
 Constructor.
 
 G4MonopoleFieldSetup (const G4MonopoleFieldSetup &copy)
 Copy constructor should be hidden.
 
G4MonopoleFieldSetupoperator= (const G4MonopoleFieldSetup &copy)
 Assignment operator should be hidden.
 

Private Attributes

G4FieldManager * fFieldManager
 Field manager that holds current chord finder.
 
G4ChordFinder * fMonopoleChordFinder
 Chord finder for monopoles.
 
G4ChordFinder * fbasf2ChordFinder
 Chord finder taken from FullSim of basf2.
 
G4MonopoleEquationfMonopoleEquation
 Monopole equation of motion.
 
G4MagneticField * fMagneticField
 Magnetic field of basf2.
 
G4MagIntegratorStepper * fMonopoleStepper
 Stepper for monopoles.
 
G4double fMinStep
 Minimal step.
 

Static Private Attributes

static G4MonopoleFieldSetupfMonopoleFieldSetup = 0
 The instance of this class.
 

Detailed Description

Monopole field setup singleton class, that takes care of switching between conventional particle transportation and monopole transportation.

Definition at line 33 of file G4MonopoleFieldSetup.h.

Constructor & Destructor Documentation

◆ ~G4MonopoleFieldSetup()

Destructor.

Definition at line 53 of file G4MonopoleFieldSetup.cc.

54{
58}
G4ChordFinder * fMonopoleChordFinder
Chord finder for monopoles.
G4MagIntegratorStepper * fMonopoleStepper
Stepper for monopoles.
G4MonopoleEquation * fMonopoleEquation
Monopole equation of motion.

◆ G4MonopoleFieldSetup() [1/2]

G4MonopoleFieldSetup ( )
private

Constructor.

Definition at line 31 of file G4MonopoleFieldSetup.cc.

32{
33 //Take existing setup from basf2
34 fFieldManager = G4TransportationManager::GetTransportationManager()->GetFieldManager();
35 fbasf2ChordFinder = fFieldManager->GetChordFinder();
36 fMagneticField = (G4MagneticField*)fFieldManager->GetDetectorField();
38 fMinStep = 0.01 * mm ; // minimal step of 1 mm is default
39 fMonopoleStepper = new G4ClassicalRK4(fMonopoleEquation, 8); // for time information..
41}
Monopole equation of motion class.
G4FieldManager * fFieldManager
Field manager that holds current chord finder.
G4MagneticField * fMagneticField
Magnetic field of basf2.
G4ChordFinder * fbasf2ChordFinder
Chord finder taken from FullSim of basf2.

◆ G4MonopoleFieldSetup() [2/2]

G4MonopoleFieldSetup ( const G4MonopoleFieldSetup copy)
private

Copy constructor should be hidden.

Parameters
copyCopy reference.

Member Function Documentation

◆ GetMonopoleFieldSetup()

G4MonopoleFieldSetup * GetMonopoleFieldSetup ( )
static

Returns G4MonopoleFieldSetup instance.

Definition at line 43 of file G4MonopoleFieldSetup.cc.

44{
45 if (0 == fMonopoleFieldSetup) {
46 static G4MonopoleFieldSetup theInstance;
47 fMonopoleFieldSetup = &theInstance;
48 }
49
51}
Monopole field setup singleton class, that takes care of switching between conventional particle tran...
static G4MonopoleFieldSetup * fMonopoleFieldSetup
The instance of this class.

◆ operator=()

G4MonopoleFieldSetup & operator= ( const G4MonopoleFieldSetup copy)
private

Assignment operator should be hidden.

Parameters
copyAssign reference.

◆ SwitchChordFinder()

void SwitchChordFinder ( G4int  val)

Switches chord finder between 1 - basf2 FullSim chord finder 2 - monopole chord finder Since monopoles use different equation of motion.

Parameters
valWhich chord finder to switch to.

Definition at line 60 of file G4MonopoleFieldSetup.cc.

61{
62 switch (val) {
63 case 0:
64 fFieldManager->SetChordFinder(fbasf2ChordFinder);
65 break;
66 case 1:
67 fFieldManager->SetChordFinder(fMonopoleChordFinder);
68 break;
69 }
70}

Member Data Documentation

◆ fbasf2ChordFinder

G4ChordFinder* fbasf2ChordFinder
private

Chord finder taken from FullSim of basf2.

Definition at line 72 of file G4MonopoleFieldSetup.h.

◆ fFieldManager

G4FieldManager* fFieldManager
private

Field manager that holds current chord finder.

Definition at line 70 of file G4MonopoleFieldSetup.h.

◆ fMagneticField

G4MagneticField* fMagneticField
private

Magnetic field of basf2.

Definition at line 74 of file G4MonopoleFieldSetup.h.

◆ fMinStep

G4double fMinStep
private

Minimal step.

1mm is taken as default

Definition at line 76 of file G4MonopoleFieldSetup.h.

◆ fMonopoleChordFinder

G4ChordFinder* fMonopoleChordFinder
private

Chord finder for monopoles.

Definition at line 71 of file G4MonopoleFieldSetup.h.

◆ fMonopoleEquation

G4MonopoleEquation* fMonopoleEquation
private

Monopole equation of motion.

Definition at line 73 of file G4MonopoleFieldSetup.h.

◆ fMonopoleFieldSetup

G4MonopoleFieldSetup * fMonopoleFieldSetup = 0
staticprivate

The instance of this class.

Definition at line 78 of file G4MonopoleFieldSetup.h.

◆ fMonopoleStepper

G4MagIntegratorStepper* fMonopoleStepper
private

Stepper for monopoles.

Definition at line 75 of file G4MonopoleFieldSetup.h.


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