5 #include "CLHEP/Units/GlobalSystemOfUnits.h" 6 #include "G4ChordFinder.hh" 7 #include "G4MagIntegratorStepper.hh" 8 #include "G4PropagatorInField.hh" 10 #include "G4RegionStore.hh" 21 m_dIntersection(0.0001),
23 m_energyThreshold(0.0),
25 m_dOneStepSimple(0.1),
26 m_dIntersectionSimple(0.01),
27 m_stepMaxSimple(1000.),
47 G4PropagatorInField *
pf) {
48 double minstep = p.
getParameter<
double>(
"MinStep") * CLHEP::mm;
68 <<
" New CMSFieldManager: LogicalVolume: <" << vol <<
">\n" 69 <<
" Stepper: <" << stepper <<
">\n" 70 <<
" Field type <" << type <<
">\n" 71 <<
" Field const delta " << delta <<
" mm\n" 72 <<
" MaximumLoopCounts " << maxLC <<
"\n" 73 <<
" MinimumEpsilonStep " << minEpsStep <<
"\n" 74 <<
" MaximumEpsilonStep " << maxEpsStep <<
"\n" 75 <<
" MinStep " << minstep <<
" mm\n" 76 <<
" MaxStep " << m_stepMax / CLHEP::cm <<
" cm\n" 77 <<
" DeltaChord " <<
m_dChord <<
" mm\n" 78 <<
" DeltaOneStep " << m_dOneStep <<
" mm\n" 79 <<
" DeltaIntersection " << m_dIntersection <<
" mm\n" 80 <<
" EnergyThreshold " << m_energyThreshold <<
" MeV\n" 81 <<
" DeltaChordSimple " << m_dChordSimple <<
" mm\n" 82 <<
" DeltaOneStepSimple " << m_dOneStepSimple <<
" mm\n" 83 <<
" DeltaIntersectionSimple " << m_dIntersectionSimple <<
" mm\n" 84 <<
" MaxStepInVacuum " << m_stepMaxSimple / CLHEP::cm <<
" cm";
95 SetDetectorField(field);
96 SetMinimumEpsilonStep(minEpsStep);
97 SetMaximumEpsilonStep(maxEpsStep);
101 pf->SetMaxLoopCount(maxLC);
102 pf->SetMinimumEpsilonStep(minEpsStep);
103 pf->SetMaximumEpsilonStep(maxEpsStep);
109 std::vector<std::string> rnames = p.
getParameter<std::vector<std::string>>(
"VacRegions");
110 if (!rnames.empty()) {
111 std::stringstream ss;
112 std::vector<G4Region *> *rs = G4RegionStore::GetInstance();
113 for (
auto ®nam : rnames) {
114 for (
auto ® : *rs) {
115 if (regnam == reg->GetName()) {
121 edm::LogVerbatim(
"SimG4CoreApplication") <<
"Simple field integration in G4Regions:\n" << ss.str() <<
"\n";
150 SetFieldChangesEnergy(flag);
156 const G4Region *reg = track->GetVolume()->GetLogicalVolume()->GetRegion();
G4ChordFinder * m_chordFinder
T getParameter(std::string const &) const
double m_dIntersectionSimple
T getUntrackedParameter(std::string const &, T const &) const
void setDefaultChordFinder()
~CMSFieldManager() override
G4PropagatorInField * m_propagator
G4ChordFinder * m_currChordFinder
void ConfigureForTrack(const G4Track *) override
bool isInsideVacuum(const G4Track *)
G4ChordFinder * m_chordFinderMonopole
void setChordFinderForVacuum()
std::unique_ptr< sim::Field > theField
std::vector< const G4Region * > m_regions
void InitialiseForVolume(const edm::ParameterSet &, sim::Field *, G4ChordFinder *cfDefault, G4ChordFinder *cfMonopole, const std::string &vol, const std::string &fieldType, const std::string &stepperName, double delta, G4PropagatorInField *)
void SetMonopoleTracking(G4bool)