5 #include "G4ChordFinder.hh" 8 #include "G4RegionStore.hh" 9 #include "G4PropagatorInField.hh" 10 #include "G4MagIntegratorStepper.hh" 11 #include "CLHEP/Units/GlobalSystemOfUnits.h" 14 : G4FieldManager(), m_currChordFinder(
nullptr), m_chordFinder(
nullptr),
15 m_chordFinderMonopole(
nullptr), m_propagator(
nullptr), m_dChord(0.001),
16 m_dOneStep(0.001), m_dIntersection(0.0001), m_stepMax(1000000.),
17 m_energyThreshold(0.0), m_dChordSimple(0.1), m_dOneStepSimple(0.1),
18 m_dIntersectionSimple(0.01), m_stepMaxSimple(1000.), m_cfVacuum(
false)
28 G4ChordFinder* cf, G4ChordFinder* cfmon,
32 G4PropagatorInField*
pf)
34 double minstep = p.
getParameter<
double>(
"MinStep")*CLHEP::mm;
56 <<
" New CMSFieldManager: LogicalVolume: <" << vol <<
">\n" 57 <<
" Stepper: <" << stepper <<
">\n" 58 <<
" Field type <" << type<<
">\n" 59 <<
" Field const delta " << delta <<
" mm\n" 60 <<
" MaximumLoopCounts " << maxLC<<
"\n" 61 <<
" MinimumEpsilonStep " << minEpsStep<<
"\n" 62 <<
" MaximumEpsilonStep " << maxEpsStep<<
"\n" 63 <<
" MinStep " << minstep<<
" mm\n" 64 <<
" MaxStep " << m_stepMax/CLHEP::cm<<
" cm\n" 65 <<
" DeltaChord " <<
m_dChord<<
" mm\n" 66 <<
" DeltaOneStep " << m_dOneStep<<
" mm\n" 67 <<
" DeltaIntersection " << m_dIntersection<<
" mm\n" 68 <<
" EnergyThreshold " << m_energyThreshold<<
" MeV\n" 69 <<
" DeltaChordSimple " << m_dChordSimple<<
" mm\n" 70 <<
" DeltaOneStepSimple " << m_dOneStepSimple<<
" mm\n" 71 <<
" DeltaIntersectionSimple " << m_dIntersectionSimple<<
" mm\n" 72 <<
" MaxStepInVacuum " << m_stepMaxSimple/CLHEP::cm<<
" cm";
83 SetDetectorField(field);
84 SetMinimumEpsilonStep(minEpsStep);
85 SetMaximumEpsilonStep(maxEpsStep);
89 pf->SetMaxLoopCount(maxLC);
90 pf->SetMinimumEpsilonStep(minEpsStep);
91 pf->SetMaximumEpsilonStep(maxEpsStep);
97 std::vector<std::string> rnames = p.
getParameter<std::vector<std::string> >(
"VacRegions");
100 std::vector<G4Region*> *rs = G4RegionStore::GetInstance();
101 for (
auto & regnam : rnames) {
102 for (
auto & reg : *rs) {
103 if(regnam == reg->GetName()) {
109 edm::LogVerbatim(
"SimG4CoreApplication") <<
"Simple field integration in G4Regions:\n" 138 SetFieldChangesEnergy(flag);
145 const G4Region* reg = track->GetVolume()->GetLogicalVolume()->GetRegion();
147 if(reg == areg) {
return true; }
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
std::vector< const G4Region * > m_regions
void setChordFinderForVacuum()
std::unique_ptr< sim::Field > theField
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)