EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4OuterHcalFieldSetup.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4OuterHcalFieldSetup.cc
1 // $Id: $
2 
12 #include "PHG4OuterHcalField.h"
13 
14 #include <Geant4/G4ChordFinder.hh>
15 #include <Geant4/G4ClassicalRK4.hh>
16 #include <Geant4/G4FieldManager.hh>
17 #include <Geant4/G4MagIntegratorDriver.hh>
18 #include <Geant4/G4MagIntegratorStepper.hh>
19 #include <Geant4/G4Mag_UsualEqRhs.hh>
20 #include <Geant4/G4MagneticField.hh>
21 #include <Geant4/G4SystemOfUnits.hh>
22 
24  G4double scintiGap, G4double tiltAngle)
25  : fMinStep(0.005 * mm)
26  , n_steel_plates(steelPlates) /*G4int*/
27  , scinti_gap(scintiGap) /*G4double*/
28  , tilt_angle(tiltAngle) /*G4double*/
29 {
30  G4int nvar = 8;
31 
32  {
34  tilt_angle);
35 
36  fEquationIron = new G4Mag_UsualEqRhs(fEMfieldIron);
37 
38  fStepperIron = new G4ClassicalRK4(fEquationIron, nvar);
39 
40  fChordFinderIron = new G4ChordFinder(
41  new G4MagInt_Driver(fMinStep, fStepperIron,
42  fStepperIron->GetNumberOfVariables()));
43 
44  fFieldManagerIron = new G4FieldManager();
45  fFieldManagerIron->SetDetectorField(fEMfieldIron);
46  fFieldManagerIron->SetChordFinder(fChordFinderIron);
47  }
48 
49  {
51  tilt_angle);
52 
53  fEquationGap = new G4Mag_UsualEqRhs(fEMfieldGap);
54 
55  fStepperGap = new G4ClassicalRK4(fEquationGap, nvar);
56 
57  fChordFinderGap = new G4ChordFinder(
58  new G4MagInt_Driver(fMinStep, fStepperGap,
59  fStepperGap->GetNumberOfVariables()));
60 
61  fFieldManagerGap = new G4FieldManager();
62  fFieldManagerGap->SetDetectorField(fEMfieldGap);
63  fFieldManagerGap->SetChordFinder(fChordFinderGap);
64  }
65 }