CMS 3D CMS Logo

CMSFieldManager.h
Go to the documentation of this file.
1 #ifndef SimG4Core_MagneticField_CMSFieldManager_H
2 #define SimG4Core_MagneticField_CMSFieldManager_H
3 
4 /*
5  Created: 13 January 2017, V. Ivanchenko
6  This class implements smart magnetic field manager
7 */
8 
10 
11 #include "G4FieldManager.hh"
12 #include <vector>
13 
14 class G4Track;
15 class G4ChordFinder;
16 class G4PropagatorInField;
17 class G4MagIntegratorStepper;
18 class G4Region;
19 
20 namespace sim {
21  class Field;
22 }
23 
24 class CMSFieldManager : public G4FieldManager {
25 public:
26  explicit CMSFieldManager();
27 
28  ~CMSFieldManager() override;
29 
30  void ConfigureForTrack(const G4Track *) override;
31 
33  sim::Field *,
34  G4ChordFinder *cfDefault,
35  G4ChordFinder *cfMonopole,
36  const std::string &vol,
37  const std::string &fieldType,
38  const std::string &stepperName,
39  double delta,
40  G4PropagatorInField *);
41 
42  void setMonopoleTracking(G4bool);
43 
44  CMSFieldManager(const CMSFieldManager &) = delete;
45  CMSFieldManager &operator=(const CMSFieldManager &) = delete;
46 
47 private:
48  bool isInsideVacuum(const G4Track *);
49  bool isInsideTracker(const G4Track *);
50  void setDefaultChordFinder();
53 
54  std::unique_ptr<sim::Field> theField;
55 
56  G4ChordFinder *m_currChordFinder;
57  G4ChordFinder *m_chordFinder;
58  G4ChordFinder *m_chordFinderMonopole;
59 
60  G4PropagatorInField *m_propagator;
61 
62  std::vector<const G4Region *> m_regions;
63 
64  double m_dChord;
66  double m_dOneStep;
70  double m_Rmax2;
71  double m_Zmax;
72  double m_stepMax;
79 
81  bool m_cfVacuum;
82 };
83 #endif
CMSFieldManager::ConfigureForTrack
void ConfigureForTrack(const G4Track *) override
Definition: CMSFieldManager.cc:140
CMSFieldManager::m_dInterTracker
double m_dInterTracker
Definition: CMSFieldManager.h:69
CMSFieldManager::m_dOneStepSimple
double m_dOneStepSimple
Definition: CMSFieldManager.h:76
CMSFieldManager::m_dOneStep
double m_dOneStep
Definition: CMSFieldManager.h:66
CMSFieldManager::m_chordFinder
G4ChordFinder * m_chordFinder
Definition: CMSFieldManager.h:57
CMSFieldManager::m_dIntersectionSimple
double m_dIntersectionSimple
Definition: CMSFieldManager.h:77
CMSFieldManager::m_stepMax
double m_stepMax
Definition: CMSFieldManager.h:72
CMSFieldManager::m_stepMaxSimple
double m_stepMaxSimple
Definition: CMSFieldManager.h:78
CMSFieldManager::m_Rmax2
double m_Rmax2
Definition: CMSFieldManager.h:70
CMSFieldManager::InitialiseForVolume
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 *)
Definition: CMSFieldManager.cc:46
CMSFieldManager
Definition: CMSFieldManager.h:24
CMSFieldManager::isInsideTracker
bool isInsideTracker(const G4Track *)
Definition: CMSFieldManager.cc:186
CMSFieldManager::theField
std::unique_ptr< sim::Field > theField
Definition: CMSFieldManager.h:54
CMSFieldManager::isInsideVacuum
bool isInsideVacuum(const G4Track *)
Definition: CMSFieldManager.cc:174
CMSFieldManager::m_Zmax
double m_Zmax
Definition: CMSFieldManager.h:71
CMSFieldManager::setMonopoleTracking
void setMonopoleTracking(G4bool)
Definition: CMSFieldManager.cc:158
CMSFieldManager::m_currChordFinder
G4ChordFinder * m_currChordFinder
Definition: CMSFieldManager.h:56
CMSFieldManager::m_chordFinderMonopole
G4ChordFinder * m_chordFinderMonopole
Definition: CMSFieldManager.h:58
sim::Field
Definition: Field.h:9
CMSFieldManager::m_dChordTracker
double m_dChordTracker
Definition: CMSFieldManager.h:65
CMSFieldManager::m_dChord
double m_dChord
Definition: CMSFieldManager.h:64
CMSFieldManager::m_cfTracker
bool m_cfTracker
Definition: CMSFieldManager.h:80
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CMSFieldManager::~CMSFieldManager
~CMSFieldManager() override
Definition: CMSFieldManager.cc:37
CMSFieldManager::m_propagator
G4PropagatorInField * m_propagator
Definition: CMSFieldManager.h:60
edm::ParameterSet
Definition: ParameterSet.h:47
CMSFieldManager::setChordFinderForTracker
void setChordFinderForTracker()
Definition: CMSFieldManager.cc:205
sim
Definition: GeometryProducer.h:20
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
CMSFieldManager::setChordFinderForVacuum
void setChordFinderForVacuum()
Definition: CMSFieldManager.cc:218
CMSFieldManager::setDefaultChordFinder
void setDefaultChordFinder()
Definition: CMSFieldManager.cc:193
CMSFieldManager::operator=
CMSFieldManager & operator=(const CMSFieldManager &)=delete
CMSFieldManager::m_energyThTracker
double m_energyThTracker
Definition: CMSFieldManager.h:73
CMSFieldManager::m_dChordSimple
double m_dChordSimple
Definition: CMSFieldManager.h:75
CMSFieldManager::m_dOneStepTracker
double m_dOneStepTracker
Definition: CMSFieldManager.h:67
ParameterSet.h
CMSFieldManager::CMSFieldManager
CMSFieldManager()
Definition: CMSFieldManager.cc:13
CMSFieldManager::m_regions
std::vector< const G4Region * > m_regions
Definition: CMSFieldManager.h:62
CMSFieldManager::m_energyThreshold
double m_energyThreshold
Definition: CMSFieldManager.h:74
CMSFieldManager::m_dIntersection
double m_dIntersection
Definition: CMSFieldManager.h:68
CMSFieldManager::m_cfVacuum
bool m_cfVacuum
Definition: CMSFieldManager.h:81