Analysis Software
Documentation for sPHENIX simulation 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 #include <Geant4/G4Types.hh>
23 
25  G4double scintiGap, G4double tiltAngle)
26  : fMinStep(0.005 * mm)
27  , n_steel_plates(steelPlates) /*G4int*/
28  , scinti_gap(scintiGap) /*G4double*/
29  , tilt_angle(tiltAngle) /*G4double*/
30 {
31  G4int nvar = 8;
32 
33  {
35  tilt_angle);
36 
37  fEquationIron = new G4Mag_UsualEqRhs(fEMfieldIron);
38 
39  fStepperIron = new G4ClassicalRK4(fEquationIron, nvar);
40 
41  fChordFinderIron = new G4ChordFinder(
42  new G4MagInt_Driver(fMinStep, fStepperIron,
43  fStepperIron->GetNumberOfVariables()));
44 
45  fFieldManagerIron = new G4FieldManager();
46  fFieldManagerIron->SetDetectorField(fEMfieldIron);
47  fFieldManagerIron->SetChordFinder(fChordFinderIron);
48  }
49 
50  {
52  tilt_angle);
53 
54  fEquationGap = new G4Mag_UsualEqRhs(fEMfieldGap);
55 
56  fStepperGap = new G4ClassicalRK4(fEquationGap, nvar);
57 
58  fChordFinderGap = new G4ChordFinder(
59  new G4MagInt_Driver(fMinStep, fStepperGap,
60  fStepperGap->GetNumberOfVariables()));
61 
62  fFieldManagerGap = new G4FieldManager();
63  fFieldManagerGap->SetDetectorField(fEMfieldGap);
64  fFieldManagerGap->SetChordFinder(fChordFinderGap);
65  }
66 }