source: trunk/examples/extended/field/BlineTracer/include/G4BlineTracer.hh @ 1358

Last change on this file since 1358 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.9 KB
Line 
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//
26//
27// $Id: G4BlineTracer.hh,v 1.2 2006/06/29 17:15:03 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31// --------------------------------------------------------------------
32//
33// G4BlineTracer
34//
35// Class description:
36//
37// Defines a tool to trace and visualise magnetic field lines
38// To use this tool in a Geant4 application the user should 
39// create an instance of this class in the code as a run action.
40// It will only work if a G4MagneticField field object is declared.
41
42// --------------------------------------------------------------------
43// Author: Laurent Desorgher (desorgher@phim.unibe.ch)
44//         Created - 2003-10-06
45// --------------------------------------------------------------------
46#ifndef G4BlineTracer_h
47#define G4BlineTracer_h 1
48
49#include <vector>
50
51#include "G4Types.hh"
52#include "G4UserRunAction.hh"
53
54class G4VUserPrimaryGeneratorAction;
55class G4MagneticField;
56class G4FieldManager;
57class G4ChordFinder;
58
59class G4BlineTracerMessenger;
60class G4BlineSteppingAction;
61class G4BlineEventAction;
62class G4BlinePrimaryGeneratorAction;
63class G4BlineEquation;
64
65class G4BlineTracer : public G4UserRunAction
66{
67   public:  // with description
68 
69     G4BlineTracer();
70     virtual ~G4BlineTracer();
71 
72     virtual void BeginOfRunAction(const G4Run* aRun);
73     virtual void EndOfRunAction(const G4Run* aRun);
74
75     void ComputeBlines(G4int nlines);
76
77     inline void SetMaxTrackingStep(G4double max_step)
78       { MaxTrackingStep=max_step; }
79     inline G4BlineEventAction* GetEventAction()
80       { return fEventAction; }
81
82   private:
83
84     void ResetChordFinders();
85
86   private:
87
88     G4BlineTracerMessenger* fMessenger;
89     G4BlineSteppingAction* fSteppingAction;
90     G4BlineEventAction* fEventAction;
91     G4BlinePrimaryGeneratorAction* fPrimaryGeneratorAction;
92     G4double MaxTrackingStep;
93     G4bool was_ResetChordFinders_already_called;
94 
95     G4VUserPrimaryGeneratorAction* fUserPrimaryAction;
96       // User defined primary generator action
97
98     std::vector<G4ChordFinder* > vecChordFinders;
99     std::vector<G4FieldManager* > vecFieldManagers;
100     std::vector<G4MagneticField* > vecMagneticFields;
101     std::vector<G4BlineEquation* > vecEquationOfMotion;
102       // ChordFinders, detector fields, equation of motions, and field
103       // manager for the different local and global magnetic fields.
104};
105
106#endif
Note: See TracBrowser for help on using the repository browser.