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