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 { class Field; }
21 
22 class CMSFieldManager : public G4FieldManager
23 {
24 public:
25 
26  explicit CMSFieldManager();
27 
28  ~CMSFieldManager() override;
29 
30  void ConfigureForTrack(const G4Track*) override;
31 
32  void InitialiseForVolume(const edm::ParameterSet&, sim::Field*,
33  G4ChordFinder* cfDefault, G4ChordFinder* cfMonopole,
34  const std::string& vol, const std::string& fieldType,
35  const std::string& stepperName,
36  double delta, G4PropagatorInField*);
37 
38  void SetMonopoleTracking(G4bool);
39 
40 private:
41 
42  bool isInsideVacuum(const G4Track*);
43  void setDefaultChordFinder();
44  void setChordFinderForVacuum();
45 
46  CMSFieldManager(const CMSFieldManager&) = delete;
47  CMSFieldManager& operator=(const CMSFieldManager&) = delete;
48 
49  std::unique_ptr<sim::Field> theField;
50 
51  G4ChordFinder* m_currChordFinder;
52  G4ChordFinder* m_chordFinder;
53  G4ChordFinder* m_chordFinderMonopole;
54 
55  G4PropagatorInField* m_propagator;
56 
57  std::vector<const G4Region*> m_regions;
58 
59  double m_dChord;
60  double m_dOneStep;
62  double m_stepMax;
68 
69  bool m_cfVacuum;
70 };
71 #endif
G4ChordFinder * m_chordFinder
dbl * delta
Definition: mlp_gen.cc:36
double m_dIntersectionSimple
double m_energyThreshold
G4PropagatorInField * m_propagator
G4ChordFinder * m_currChordFinder
G4ChordFinder * m_chordFinderMonopole
std::vector< const G4Region * > m_regions
std::unique_ptr< sim::Field > theField