|
||||
File indexing completed on 2025-01-18 09:58:14
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // 0028 // 0029 // Class Description: 0030 // 0031 // Manages the propagation of tracks. Creates a G4Track, asks to 0032 // propagate it and takes also care to propagate the errors. 0033 // Stops the track when GEANT4 stops it or a G4ErrorTarget is reached. 0034 0035 // History: 0036 // - Created: P. Arce 0037 // -------------------------------------------------------------------- 0038 0039 #ifndef G4ErrorPropagator_hh 0040 #define G4ErrorPropagator_hh 0041 0042 #include "globals.hh" 0043 #include "G4ErrorPropagatorData.hh" 0044 #include "G4SteppingManager.hh" 0045 0046 class G4eErrorMatrix; 0047 class G4Track; 0048 class G4ErrorTrajState; 0049 class G4ErrorFreeTrajState; 0050 class G4ErrorTarget; 0051 #include "globals.hh" 0052 0053 class G4ErrorPropagator 0054 { 0055 public: // with description 0056 G4ErrorPropagator(); 0057 ~G4ErrorPropagator() {} 0058 0059 G4Track* InitG4Track(G4ErrorTrajState& initialTS); 0060 // Creates a G4Track from a G4ErrorTrajState 0061 0062 G4int Propagate(G4ErrorTrajState* currentTS, const G4ErrorTarget* target, 0063 G4ErrorMode mode = G4ErrorMode_PropForwards); 0064 // Steers the GEANT4 propagation of a track: 0065 // the particle will be extrapolated until the Target is reached. 0066 // The final G4Track parameters will be passed to theFinalTrajState 0067 0068 G4int PropagateOneStep(G4ErrorTrajState* currentTS); 0069 // Propagates a G4Track by one step, and then returns control to the user 0070 0071 G4int MakeOneStep(G4ErrorFreeTrajState* currentTS_FREE); 0072 // Advance one step 0073 0074 G4ErrorFreeTrajState* InitFreeTrajState(G4ErrorTrajState* currentTS); 0075 // Creates theCurrentTS_FREE (transforms the user G4ErrorSurfaceTrajState 0076 // or copies the G4ErrorFreeTrajState) 0077 0078 void GetFinalTrajState(G4ErrorTrajState* currentTS, 0079 G4ErrorFreeTrajState* currentTS_FREE, 0080 const G4ErrorTarget* target); 0081 // After steps are done, convert the G4ErrorFreeTrajState used for error 0082 // propagation to the class of origin (G4ErrorFreeTrajState or 0083 // G4eTrajStatOnSurface) 0084 0085 void InvokePreUserTrackingAction(G4Track* fpTrack); 0086 // Invoke the G4UserTrackingAction::PreUserTrackingAction 0087 void InvokePostUserTrackingAction(G4Track* fpTrack); 0088 // Invoke the G4UserTrackingAction::PostUserTrackingAction 0089 0090 G4bool CheckIfLastStep(G4Track* aTrack); 0091 // Check if it is the last step for error propagation: 0092 // - G4ErrorState is G4ErrorState_StoppedAtTarget 0093 // - Track is OutOfWorld 0094 // - G4TrackStatus is fStopAndKill 0095 0096 // Get and Set methods 0097 0098 const G4ErrorTrajState* GetInitialTrajState() const 0099 { 0100 return theInitialTrajState; 0101 } 0102 0103 G4double GetStepLength() const { return theStepLength; } 0104 0105 void SetStepLength(const G4double sl) { theStepLength = sl; } 0106 0107 void SetStepN(const G4int sn) { theStepN = sn; } 0108 0109 private: 0110 G4int MakeSteps(G4ErrorFreeTrajState* currentTS_FREE); 0111 // Advance steps until target is reached 0112 0113 private: 0114 G4double theStepLength; 0115 0116 G4ErrorTrajState* theInitialTrajState; 0117 0118 G4int theStepN; 0119 0120 G4Track* theG4Track; 0121 0122 G4SteppingManager* fpSteppingManager; 0123 0124 G4int verbose; 0125 0126 G4bool thePropIsInitialized; 0127 }; 0128 0129 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |