G4ErrorPropagatorManager.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4ErrorPropagatorManager.hh 69766 2013-05-14 14:33:55Z gcosmo $
00028 //
00029 // Class Description:
00030 //
00031 // This is the class manager of the GEANT4e package.
00032 // It is the main interface for the user to define the setup and
00033 // start the propagation. Initializes GEANT4 for the propagation.
00034 
00035 // History:
00036 // - Created:   Pedro Arce, February 2001
00037 // --------------------------------------------------------------------
00038 
00039 #ifndef G4ErrorPropagatorManager_hh
00040 #define G4ErrorPropagatorManager_hh
00041 
00042 #include "globals.hh"
00043 #include "G4ErrorPropagatorData.hh"
00044 #include "G4ErrorPropagator.hh"
00045 #include "G4ApplicationState.hh"
00046 
00047 class G4ErrorPropagationNavigator;
00048 class G4ErrorRunManagerHelper;
00049 class G4ErrorTarget;
00050 class G4ErrorTrajState;
00051 
00052 class G4VUserDetectorConstruction;
00053 class G4VPhysicalVolume;
00054 class G4VUserPhysicsList;
00055 class G4UserRunAction;
00056 class G4UserEventAction;
00057 class G4UserStackingAction;
00058 class G4UserTrackingAction;
00059 class G4UserSteppingAction;
00060 class G4Mag_UsualEqRhs;
00061 class G4Track;
00062 
00063 class G4ErrorPropagatorManager
00064 {
00065 
00066  public:  // with description
00067 
00068   G4ErrorPropagatorManager();
00069     // Initialise data to 0. Starts the G4ErrorRunManagerHelper and
00070     // G4ErrorPropagationNavigator.
00071 
00072   ~G4ErrorPropagatorManager();
00073 
00074   static G4ErrorPropagatorManager* GetErrorPropagatorManager();
00075     // Get only instance of G4ErrorPropagatorManager. If it does not exists,
00076     // creates it
00077 
00078   void EventTermination();
00079     // Set state to G4ErrorState_Init
00080 
00081   void RunTermination();
00082     // Set state to G4ErrorState_Init and invoke
00083     // G4ErrorRunManagerHelper::RunTermination()
00084 
00085   void InitGeant4e();
00086     // Initializes Geant4 and Geant4e
00087 
00088   void InitTrackPropagation();
00089     // Set the propagator step number to 0 and the G4ErrorState to Propagating
00090  
00091   G4bool InitFieldForBackwards();
00092     // Creates the G4ErrorMag_UsualEqRhs, that will control backwards tracking
00093 
00094   G4int Propagate( G4ErrorTrajState* currentTS, const G4ErrorTarget* target, G4ErrorMode mode = G4ErrorMode_PropForwards );
00095     // Inits track propagation, invokes G4ErrorPropagator::Propagate and
00096     // terminates "event"
00097 
00098   G4int PropagateOneStep( G4ErrorTrajState* currentTS,
00099                           G4ErrorMode mode = G4ErrorMode_PropForwards );
00100     // Invokes G4ErrorPropagator::PropagateOneStep
00101 
00102   G4bool CloseGeometry();
00103     // Close Geant4 geometry
00104 
00105   void SetUserInitialization(G4VUserDetectorConstruction* userInit);
00106     // Invokes G4ErrorRunManagerHelper to construct detector and set
00107     // world volume
00108   void SetUserInitialization(G4VPhysicalVolume* userInit);
00109     // Invokes G4ErrorRunManagerHelper to  set world volume
00110   void SetUserInitialization(G4VUserPhysicsList* userInit);
00111     // Invokes G4ErrorRunManagerHelper to initialize physics
00112 
00113   void SetUserAction(G4UserTrackingAction* userAction);
00114     // Invokes G4EventManager to set a G4UserTrackingAction
00115   void SetUserAction(G4UserSteppingAction* userAction);
00116     // Invokes G4EventManager to set a G4UserSteppingAction
00117 
00118   G4String PrintG4ErrorState();
00119   G4String PrintG4ErrorState( G4ErrorState state );
00120     // Print Geant4e state
00121 
00122   G4String PrintG4State();
00123   G4String PrintG4State( G4ApplicationState state );
00124     // Print Geant4 state
00125  
00126   // Set and Get methods 
00127 
00128   G4ErrorRunManagerHelper* GetErrorRunManagerHelper() const
00129     { return theG4ErrorRunManagerHelper; }
00130 
00131   void SetSteppingManagerVerboseLevel();
00132 
00133   G4ErrorPropagationNavigator* GetErrorPropagationNavigator() const
00134     { return theG4ErrorPropagationNavigator; }
00135 
00136   G4ErrorPropagator* GetPropagator() const
00137     { return thePropagator; }
00138 
00139  private:
00140 
00141   void StartG4ErrorRunManagerHelper();
00142     // Create a G4ErrorRunManagerHelper if it does not exist and set to it
00143     // the G4ErrorPhysicsList
00144  
00145   void StartNavigator();
00146     // create a G4ErrorPropagationNavigator
00147  
00148  private:
00149 
00150   static G4ErrorPropagatorManager* theG4ErrorPropagatorManager;
00151 
00152   G4ErrorRunManagerHelper* theG4ErrorRunManagerHelper;
00153 
00154   G4ErrorPropagator* thePropagator;
00155 
00156   G4Mag_UsualEqRhs* theEquationOfMotion;
00157 
00158   G4ErrorPropagationNavigator* theG4ErrorPropagationNavigator;
00159 
00160 };
00161 
00162 #endif

Generated on Mon May 27 17:48:11 2013 for Geant4 by  doxygen 1.4.7