source: trunk/source/error_propagation/include/G4ErrorPropagatorManager.hh@ 1267

Last change on this file since 1267 was 1228, checked in by garnier, 16 years ago

update geant4.9.3 tag

File size: 5.6 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: G4ErrorPropagatorManager.hh,v 1.2 2007/05/29 14:41:35 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-03 $
29//
30// Class Description:
31//
32// This is the class manager of the GEANT4e package.
33// It is the main interface for the user to define the setup and
34// start the propagation. Initializes GEANT4 for the propagation.
35
36// History:
37// - Created: Pedro Arce, February 2001
38// --------------------------------------------------------------------
39
40#ifndef G4ErrorPropagatorManager_hh
41#define G4ErrorPropagatorManager_hh
42
43#include "globals.hh"
44#include "G4ErrorPropagatorData.hh"
45#include "G4ErrorPropagator.hh"
46#include "G4ApplicationState.hh"
47
48class G4ErrorPropagationNavigator;
49class G4ErrorRunManagerHelper;
50class G4ErrorTarget;
51class G4ErrorTrajState;
52
53class G4VUserDetectorConstruction;
54class G4VPhysicalVolume;
55class G4VUserPhysicsList;
56class G4UserRunAction;
57class G4UserEventAction;
58class G4UserStackingAction;
59class G4UserTrackingAction;
60class G4UserSteppingAction;
61class G4Mag_UsualEqRhs;
62class G4Track;
63
64class G4ErrorPropagatorManager
65{
66
67 public: // with description
68
69 G4ErrorPropagatorManager();
70 // Initialise data to 0. Starts the G4ErrorRunManagerHelper and
71 // G4ErrorPropagationNavigator.
72
73 ~G4ErrorPropagatorManager();
74
75 static G4ErrorPropagatorManager* GetErrorPropagatorManager();
76 // Get only instance of G4ErrorPropagatorManager. If it does not exists,
77 // creates it
78
79 void EventTermination();
80 // Set state to G4ErrorState_Init
81
82 void RunTermination();
83 // Set state to G4ErrorState_Init and invoke
84 // G4ErrorRunManagerHelper::RunTermination()
85
86 void InitGeant4e();
87 // Initializes Geant4 and Geant4e
88
89 void InitTrackPropagation();
90 // Set the propagator step number to 0 and the G4ErrorState to Propagating
91
92 G4bool InitFieldForBackwards();
93 // Creates the G4ErrorMag_UsualEqRhs, that will control backwards tracking
94
95 G4int Propagate( G4ErrorTrajState* currentTS, const G4ErrorTarget* target, G4ErrorMode mode = G4ErrorMode_PropForwards );
96 // Inits track propagation, invokes G4ErrorPropagator::Propagate and
97 // terminates "event"
98
99 G4int PropagateOneStep( G4ErrorTrajState* currentTS,
100 G4ErrorMode mode = G4ErrorMode_PropForwards );
101 // Invokes G4ErrorPropagator::PropagateOneStep
102
103 G4bool CloseGeometry();
104 // Close Geant4 geometry
105
106 void SetUserInitialization(G4VUserDetectorConstruction* userInit);
107 // Invokes G4ErrorRunManagerHelper to construct detector and set
108 // world volume
109 void SetUserInitialization(G4VPhysicalVolume* userInit);
110 // Invokes G4ErrorRunManagerHelper to set world volume
111 void SetUserInitialization(G4VUserPhysicsList* userInit);
112 // Invokes G4ErrorRunManagerHelper to initialize physics
113
114 void SetUserAction(G4UserTrackingAction* userAction);
115 // Invokes G4EventManager to set a G4UserTrackingAction
116 void SetUserAction(G4UserSteppingAction* userAction);
117 // Invokes G4EventManager to set a G4UserSteppingAction
118
119 G4String PrintG4ErrorState();
120 G4String PrintG4ErrorState( G4ErrorState state );
121 // Print Geant4e state
122
123 G4String PrintG4State();
124 G4String PrintG4State( G4ApplicationState state );
125 // Print Geant4 state
126
127 // Set and Get methods
128
129 G4ErrorRunManagerHelper* GetErrorRunManagerHelper() const
130 { return theG4ErrorRunManagerHelper; }
131
132 void SetSteppingManagerVerboseLevel();
133
134 G4ErrorPropagationNavigator* GetErrorPropagationNavigator() const
135 { return theG4ErrorPropagationNavigator; }
136
137 G4ErrorPropagator* GetPropagator() const
138 { return thePropagator; }
139
140 private:
141
142 void StartG4ErrorRunManagerHelper();
143 // Create a G4ErrorRunManagerHelper if it does not exist and set to it
144 // the G4ErrorPhysicsList
145
146 void StartNavigator();
147 // create a G4ErrorPropagationNavigator
148
149 private:
150
151 static G4ErrorPropagatorManager* theG4ErrorPropagatorManager;
152
153 G4ErrorRunManagerHelper* theG4ErrorRunManagerHelper;
154
155 G4ErrorPropagator* thePropagator;
156
157 G4Mag_UsualEqRhs* theEquationOfMotion;
158
159 G4ErrorPropagationNavigator* theG4ErrorPropagationNavigator;
160
161};
162
163#endif
Note: See TracBrowser for help on using the repository browser.