Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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//
28//
29// Class Description:
30//
31// Manages the propagation of tracks. Creates a G4Track, asks to
32// propagate it and takes also care to propagate the errors.
33// Stops the track when GEANT4 stops it or a G4ErrorTarget is reached.
34
35// History:
36// - Created: P. Arce
37// --------------------------------------------------------------------
38
39#ifndef G4ErrorPropagator_hh
40#define G4ErrorPropagator_hh
41
42#include "globals.hh"
44#include "G4SteppingManager.hh"
45
46class G4eErrorMatrix;
47class G4Track;
50class G4ErrorTarget;
51#include "globals.hh"
52
54{
55 public: // with description
56
59
61 // Creates a G4Track from a G4ErrorTrajState
62
64 const G4ErrorTarget* target,
66 // Steers the GEANT4 propagation of a track:
67 // the particle will be extrapolated until the Target is reached.
68 // The final G4Track parameters will be passed to theFinalTrajState
69
71 // Propagates a G4Track by one step, and then returns control to the user
72
73 G4int MakeOneStep( G4ErrorFreeTrajState* currentTS_FREE );
74 // Advance one step
75
77 // Creates theCurrentTS_FREE (transforms the user G4ErrorSurfaceTrajState
78 // or copies the G4ErrorFreeTrajState)
79
80 void GetFinalTrajState( G4ErrorTrajState* currentTS, G4ErrorFreeTrajState* currentTS_FREE, const G4ErrorTarget* target );
81 // After steps are done, convert the G4ErrorFreeTrajState used for error
82 // propagation to the class of origin (G4ErrorFreeTrajState or
83 // G4eTrajStatOnSurface)
84
85 void InvokePreUserTrackingAction( G4Track* fpTrack );
86 // Invoke the G4UserTrackingAction::PreUserTrackingAction
88 // Invoke the G4UserTrackingAction::PostUserTrackingAction
89
91 // Check if it is the last step for error propagation:
92 // - G4ErrorState is G4ErrorState_StoppedAtTarget
93 // - Track is OutOfWorld
94 // - G4TrackStatus is fStopAndKill
95
96 // Get and Set methods
97
99 { return theInitialTrajState; }
100
102 { return theStepLength; }
103
104 void SetStepLength( const G4double sl )
105 { theStepLength = sl; }
106
107 void SetStepN( const G4int sn )
108 { theStepN = sn; }
109
110 private:
111
112 G4int MakeSteps( G4ErrorFreeTrajState* currentTS_FREE );
113 // Advance steps until target is reached
114
115 private:
116
117 G4double theStepLength;
118
119 G4ErrorTrajState* theInitialTrajState;
120
121 G4int theStepN;
122
123 G4Track* theG4Track;
124
125 G4SteppingManager* fpSteppingManager;
126
127 G4int verbose;
128
129 G4bool thePropIsInitialized;
130
131};
132
133#endif
@ G4ErrorMode_PropForwards
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4Track * InitG4Track(G4ErrorTrajState &initialTS)
void InvokePostUserTrackingAction(G4Track *fpTrack)
void InvokePreUserTrackingAction(G4Track *fpTrack)
void GetFinalTrajState(G4ErrorTrajState *currentTS, G4ErrorFreeTrajState *currentTS_FREE, const G4ErrorTarget *target)
G4int PropagateOneStep(G4ErrorTrajState *currentTS)
G4bool CheckIfLastStep(G4Track *aTrack)
G4double GetStepLength() const
void SetStepLength(const G4double sl)
G4ErrorFreeTrajState * InitFreeTrajState(G4ErrorTrajState *currentTS)
const G4ErrorTrajState * GetInitialTrajState() const
G4int MakeOneStep(G4ErrorFreeTrajState *currentTS_FREE)
void SetStepN(const G4int sn)
G4int Propagate(G4ErrorTrajState *currentTS, const G4ErrorTarget *target, G4ErrorMode mode=G4ErrorMode_PropForwards)