Back to home page

EIC code displayed by LXR

 
 

    


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 // This class helps G4ErrorPropagatorManager with the initialization of
0032 // geometry and physics, definition of actions and run termination
0033 // (things done by G4RunManager in an standard GEANT4 run)
0034 // It holds a pointer to G4RunManagerKernel
0035 
0036 // History:
0037 // - Created:  Pedro Arce, January 2005
0038 // --------------------------------------------------------------------
0039 
0040 #ifndef G4ErrorRunManagerHelper_hh
0041 #define G4ErrorRunManagerHelper_hh
0042 
0043 #include "tls.hh"
0044 
0045 class G4RunManagerKernel;
0046 class G4VUserDetectorConstruction;
0047 class G4VPhysicalVolume;
0048 class G4VUserPhysicsList;
0049 class G4UserTrackingAction;
0050 class G4UserSteppingAction;
0051 
0052 class G4ErrorRunManagerHelper
0053 {
0054  public:  // with description
0055   G4ErrorRunManagerHelper();
0056   virtual ~G4ErrorRunManagerHelper();
0057 
0058   static G4ErrorRunManagerHelper* GetRunManagerKernel();
0059   // Static method which returns the singleton pointer of
0060   // G4ErrorRunManagerHelper
0061 
0062   void SetUserInitialization(G4VUserDetectorConstruction* userInit);
0063   // Initialize geometry by passing a G4VUserDetectorConstruction
0064   void SetUserInitialization(G4VPhysicalVolume* userInit);
0065   // Initialize geometry by passing a G4VPhysicalVolume
0066 
0067   void SetUserInitialization(G4VUserPhysicsList* userInit);
0068   // Initializes physics
0069 
0070   void SetUserAction(G4UserTrackingAction* userAction);
0071   // Set the user tracking action
0072   void SetUserAction(G4UserSteppingAction* userAction);
0073   // Set the user stepping action
0074 
0075   void RunInitialization();
0076   // Invokes G4RunManagerKernel RunInitialization();
0077 
0078   void InitializeGeometry();
0079   // Initializes GEANT4 geometry
0080   void InitializePhysics();
0081   // Initializes GEANT4 physics
0082 
0083   void RunTermination();
0084   // Invokes G4RunManagerKernel RunTermination();
0085 
0086   G4VUserPhysicsList* GetUserPhysicsList() const { return theUserPhysicsList; }
0087 
0088  private:
0089   static G4ThreadLocal G4ErrorRunManagerHelper* fRunManagerKernel;
0090 
0091   G4VUserPhysicsList* theUserPhysicsList;
0092   G4VPhysicalVolume* theUserWorld;
0093 
0094   G4RunManagerKernel* theG4RunManagerKernel;
0095 };
0096 
0097 #endif