source: trunk/source/error_propagation/include/G4ErrorPropagator.hh@ 1227

Last change on this file since 1227 was 1058, checked in by garnier, 17 years ago

file release beta

File size: 4.7 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: G4ErrorPropagator.hh,v 1.3 2007/05/29 14:41:35 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//
31// Class Description:
32//
33// Manages the propagation of tracks. Creates a G4Track, asks to
34// propagate it and takes also care to propagate the errors.
35// Stops the track when GEANT4 stops it or a G4ErrorTarget is reached.
36
37// History:
38// - Created: P. Arce
39// --------------------------------------------------------------------
40
41#ifndef G4ErrorPropagator_hh
42#define G4ErrorPropagator_hh
43
44#include "globals.hh"
45#include "G4ErrorPropagatorData.hh"
46#include "G4SteppingManager.hh"
47
48class G4eErrorMatrix;
49class G4Track;
50class G4ErrorTrajState;
51class G4ErrorFreeTrajState;
52class G4ErrorTarget;
53#include "globals.hh"
54
55class G4ErrorPropagator
56{
57 public: // with description
58
59 G4ErrorPropagator();
60 ~G4ErrorPropagator(){}
61
62 G4Track* InitG4Track( G4ErrorTrajState& initialTS );
63 // Creates a G4Track from a G4ErrorTrajState
64
65 G4int Propagate( G4ErrorTrajState* currentTS,
66 const G4ErrorTarget* target,
67 G4ErrorMode mode = G4ErrorMode_PropForwards);
68 // Steers the GEANT4 propagation of a track:
69 // the particle will be extrapolated until the Target is reached.
70 // The final G4Track parameters will be passed to theFinalTrajState
71
72 G4int PropagateOneStep( G4ErrorTrajState* currentTS );
73 // Propagates a G4Track by one step, and then returns control to the user
74
75 G4int MakeOneStep( G4ErrorFreeTrajState* currentTS_FREE );
76 // Advance one step
77
78 G4ErrorFreeTrajState* InitFreeTrajState( G4ErrorTrajState* currentTS );
79 // Creates theCurrentTS_FREE (transforms the user G4ErrorSurfaceTrajState
80 // or copies the G4ErrorFreeTrajState)
81
82 void GetFinalTrajState( G4ErrorTrajState* currentTS, G4ErrorFreeTrajState* currentTS_FREE, const G4ErrorTarget* target );
83 // After steps are done, convert the G4ErrorFreeTrajState used for error
84 // propagation to the class of origin (G4ErrorFreeTrajState or
85 // G4eTrajStatOnSurface)
86
87 void InvokePreUserTrackingAction( G4Track* fpTrack );
88 // Invoke the G4UserTrackingAction::PreUserTrackingAction
89 void InvokePostUserTrackingAction( G4Track* fpTrack );
90 // Invoke the G4UserTrackingAction::PostUserTrackingAction
91
92 G4bool CheckIfLastStep( G4Track* aTrack );
93 // Check if it is the last step for error propagation:
94 // - G4ErrorState is G4ErrorState_StoppedAtTarget
95 // - Track is OutOfWorld
96 // - G4TrackStatus is fStopAndKill
97
98 // Get and Set methods
99
100 const G4ErrorTrajState* GetInitialTrajState() const
101 { return theInitialTrajState; }
102
103 G4double GetStepLength() const
104 { return theStepLength; }
105
106 void SetStepLength( const G4double sl )
107 { theStepLength = sl; }
108
109 void SetStepN( const G4int sn )
110 { theStepN = sn; }
111
112 private:
113
114 G4int MakeSteps( G4ErrorFreeTrajState* currentTS_FREE );
115 // Advance steps until target is reached
116
117 private:
118
119 G4double theStepLength;
120
121 G4ErrorTrajState* theInitialTrajState;
122 G4ErrorTrajState* theFinalTrajState;
123
124 G4int theStepN;
125
126 G4Track* theG4Track;
127
128 G4SteppingManager* fpSteppingManager;
129
130 G4int verbose;
131
132 G4bool thePropIsInitialized;
133
134};
135
136#endif
Note: See TracBrowser for help on using the repository browser.