Geant4  10.02.p01
G4BlineTracer.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // $Id: G4BlineTracer.hh 77941 2013-11-29 15:22:58Z gcosmo $
31 //
32 //
33 // --------------------------------------------------------------------
34 //
35 // G4BlineTracer
36 //
37 // Class description:
38 //
39 // Defines a tool to trace and visualise magnetic field lines
40 // To use this tool in a Geant4 application the user should
41 // create an instance of this class in the code as a run action.
42 // It will only work if a G4MagneticField field object is declared.
43 
44 // --------------------------------------------------------------------
45 // Author: Laurent Desorgher (desorgher@phim.unibe.ch)
46 // Created - 2003-10-06
47 // --------------------------------------------------------------------
48 #ifndef G4BlineTracer_h
49 #define G4BlineTracer_h 1
50 
51 #include <vector>
52 
53 #include "G4Types.hh"
54 #include "G4UserRunAction.hh"
55 
57 class G4MagneticField;
58 class G4FieldManager;
59 class G4ChordFinder;
60 
63 class G4BlineEventAction;
65 class G4BlineEquation;
66 
68 {
69  public: // with description
70 
71  G4BlineTracer();
72  virtual ~G4BlineTracer();
73 
74  virtual void BeginOfRunAction(const G4Run* aRun);
75  virtual void EndOfRunAction(const G4Run* aRun);
76 
77  void ComputeBlines(G4int nlines);
78 
79  inline void SetMaxTrackingStep(G4double max_step)
80  { fMaxTrackingStep=max_step; }
82  { return fEventAction; }
83 
84  private:
85 
86  void ResetChordFinders();
87 
88  private:
89 
96 
97  //G4VUserPrimaryGeneratorAction* fUserPrimaryAction;
98  // User defined primary generator action
99 
100  std::vector<G4ChordFinder* > fVecChordFinders;
101  std::vector<G4FieldManager* > fVecFieldManagers;
102  std::vector<G4MagneticField* > fVecMagneticFields;
103  std::vector<G4BlineEquation* > fVecEquationOfMotion;
104  // ChordFinders, detector fields, equation of motions, and field
105  // manager for the different local and global magnetic fields.
106 };
107 
108 #endif
G4BlineEventAction * fEventAction
G4BlineTracerMessenger * fMessenger
void ResetChordFinders()
virtual void EndOfRunAction(const G4Run *aRun)
G4BlineSteppingAction * fSteppingAction
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
virtual ~G4BlineTracer()
G4double fMaxTrackingStep
Definition: G4Run.hh:46
virtual void BeginOfRunAction(const G4Run *aRun)
std::vector< G4MagneticField * > fVecMagneticFields
void ComputeBlines(G4int nlines)
void SetMaxTrackingStep(G4double max_step)
std::vector< G4FieldManager * > fVecFieldManagers
G4BlineEventAction * GetEventAction()
double G4double
Definition: G4Types.hh:76
std::vector< G4BlineEquation * > fVecEquationOfMotion
std::vector< G4ChordFinder * > fVecChordFinders
G4BlinePrimaryGeneratorAction * fPrimaryGeneratorAction
G4bool fWas_ResetChordFinders_already_called