13 #include "G4Mag_UsualEqRhs.hh" 14 #include "G4ClassicalRK4.hh" 15 #include "G4PropagatorInField.hh" 16 #include "G4FieldManager.hh" 17 #include "G4TransportationManager.hh" 18 #include "G4ChordFinder.hh" 19 #include "G4UniformMagField.hh" 20 #include "G4LogicalVolumeStore.hh" 21 #include "CLHEP/Units/GlobalSystemOfUnits.h" 26 : theTopVolume(
nullptr),thePSet(p)
49 <<
" FieldBuilder::build: Global magnetic field is used";
55 G4PropagatorInField * fP)
57 G4LogicalVolumeStore* theStore = G4LogicalVolumeStore::GetInstance();
58 for (
auto vol : *theStore) {
69 double minStep = stpPSet.
getParameter<
double>(
"MinStep") ;
71 (
int)stpPSet.getUntrackedParameter<
double>(
"MaximumLoopCounts",1000);
72 double minEpsilonStep =
73 stpPSet.getUntrackedParameter<
double>(
"MinimumEpsilonStep",0.00001);
74 double maxEpsilonStep =
75 stpPSet.getUntrackedParameter<
double>(
"MaximumEpsilonStep",0.01);
78 theStepper->
select(stepper);
79 G4ChordFinder * cf =
new G4ChordFinder(
theField,minStep,theStepper);
82 G4MagIntegratorStepper* theStepperMon =
new G4ClassicalRK4(monopoleEquation,8);
83 G4ChordFinder * cfmon =
new G4ChordFinder(
theField,minStep,theStepperMon);
86 fieldType, stepper,
delta, minStep);
89 fP->SetMaxLoopCount(maxLoopCount);
90 fP->SetMinimumEpsilonStep(minEpsilonStep);
91 fP->SetMaximumEpsilonStep(maxEpsilonStep);
T getParameter(std::string const &) const
void InitialiseForVolume(const edm::ParameterSet &, sim::Field *, G4ChordFinder *, G4ChordFinder *, const std::string &vol, const std::string &type, const std::string &stepper, double delta, double minstep)
G4LogicalVolume * theTopVolume
FieldBuilder(const MagneticField *, const edm::ParameterSet &)
void build(CMSFieldManager *fM, G4PropagatorInField *fP)
G4MagIntegratorStepper * select(const std::string &s)
G4Mag_UsualEqRhs * theFieldEquation
edm::ParameterSet thePSet
void configureForVolume(const std::string &volName, edm::ParameterSet &volPSet, CMSFieldManager *fM, G4PropagatorInField *fP)