11 #include <simulation/monopoles/G4MonopoleFieldSetup.h>
12 #include <simulation/monopoles/G4MonopoleEquation.h>
14 #include <G4MagneticField.hh>
15 #include <G4FieldManager.hh>
16 #include <G4TransportationManager.hh>
17 #include <G4MagIntegratorStepper.hh>
18 #include <G4ChordFinder.hh>
20 #include <G4ClassicalRK4.hh>
22 #include <CLHEP/Units/SystemOfUnits.h>
26 using namespace Belle2::Monopoles;
27 using namespace CLHEP;
31 G4MonopoleFieldSetup::G4MonopoleFieldSetup()
34 fFieldManager = G4TransportationManager::GetTransportationManager()->GetFieldManager();
35 fbasf2ChordFinder = fFieldManager->GetChordFinder();
36 fMagneticField = (G4MagneticField*)fFieldManager->GetDetectorField();
38 fMinStep = 0.01 * mm ;
39 fMonopoleStepper =
new G4ClassicalRK4(fMonopoleEquation, 8);
40 fMonopoleChordFinder =
new G4ChordFinder(fMagneticField, fMinStep, fMonopoleStepper);
45 if (0 == fMonopoleFieldSetup) {
47 fMonopoleFieldSetup = &theInstance;
50 return fMonopoleFieldSetup;
53 G4MonopoleFieldSetup::~G4MonopoleFieldSetup()
55 if (fMonopoleChordFinder)
delete fMonopoleChordFinder;
56 if (fMonopoleEquation)
delete fMonopoleEquation;
57 if (fMonopoleStepper)
delete fMonopoleStepper;
60 void G4MonopoleFieldSetup::SwitchChordFinder(G4int val)
64 fFieldManager->SetChordFinder(fbasf2ChordFinder);
67 fFieldManager->SetChordFinder(fMonopoleChordFinder);
Monopole equation of motion class.
Monopole field setup singleton class, that takes care of switching between conventional particle tran...
Abstract base class for different kinds of events.