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] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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"
 43 #include "G4ErrorPropagatorData.hh"
 44 #include "G4SteppingManager.hh"
 45 
 46 class G4eErrorMatrix;
 47 class G4Track;
 48 class G4ErrorTrajState;
 49 class G4ErrorFreeTrajState;
 50 class G4ErrorTarget;
 51 #include "globals.hh"
 52 
 53 class G4ErrorPropagator
 54 {
 55  public:  // with description
 56   G4ErrorPropagator();
 57   ~G4ErrorPropagator() {}
 58 
 59   G4Track* InitG4Track(G4ErrorTrajState& initialTS);
 60   // Creates a G4Track from a G4ErrorTrajState
 61 
 62   G4int Propagate(G4ErrorTrajState* currentTS, const G4ErrorTarget* target,
 63                   G4ErrorMode mode = G4ErrorMode_PropForwards);
 64   // Steers the GEANT4 propagation of a track:
 65   // the particle will be extrapolated until the Target is reached.
 66   // The final G4Track parameters will be passed to theFinalTrajState
 67 
 68   G4int PropagateOneStep(G4ErrorTrajState* currentTS);
 69   // Propagates a G4Track by one step, and then returns control to the user
 70 
 71   G4int MakeOneStep(G4ErrorFreeTrajState* currentTS_FREE);
 72   // Advance one step
 73 
 74   G4ErrorFreeTrajState* InitFreeTrajState(G4ErrorTrajState* currentTS);
 75   // Creates theCurrentTS_FREE (transforms the user G4ErrorSurfaceTrajState
 76   // or copies the G4ErrorFreeTrajState)
 77 
 78   void GetFinalTrajState(G4ErrorTrajState* currentTS,
 79                          G4ErrorFreeTrajState* currentTS_FREE,
 80                          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
 87   void InvokePostUserTrackingAction(G4Track* fpTrack);
 88   // Invoke the G4UserTrackingAction::PostUserTrackingAction
 89 
 90   G4bool CheckIfLastStep(G4Track* aTrack);
 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 
 98   const G4ErrorTrajState* GetInitialTrajState() const
 99   {
100     return theInitialTrajState;
101   }
102 
103   G4double GetStepLength() const { return theStepLength; }
104 
105   void SetStepLength(const G4double sl) { theStepLength = sl; }
106 
107   void SetStepN(const G4int sn) { theStepN = sn; }
108 
109  private:
110   G4int MakeSteps(G4ErrorFreeTrajState* currentTS_FREE);
111   // Advance steps until target is reached
112 
113  private:
114   G4double theStepLength;
115 
116   G4ErrorTrajState* theInitialTrajState;
117 
118   G4int theStepN;
119 
120   G4Track* theG4Track;
121 
122   G4SteppingManager* fpSteppingManager;
123 
124   G4int verbose;
125 
126   G4bool thePropIsInitialized;
127 };
128 
129 #endif
130