Import Geant4 11.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2025-06-26 09:17:29 +02:00
parent 20a218bbe1
commit a499fb82e9
1941 changed files with 203285 additions and 95593 deletions
@@ -23,43 +23,76 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// class G4RegularNavigationHelper
// G4RegularNavigationHelper
//
// Class description:
//
// Utility class for navigation on regular structures, providing step
// lengths counting for each regular voxel of the structure.
// Author: Pedro Arce, November 2008
// Author: Pedro Arce (CIEMAT), November 2008
// --------------------------------------------------------------------
#ifndef G4RegularNavigationHelper_HH
#define G4RegularNavigationHelper_HH
#define G4RegularNavigationHelper_HH 1
#include <vector>
#include "globals.hh"
#include "G4ThreadLocalSingleton.hh"
using G4RegularNavigationHelper_theStepLengths_t =
std::vector< std::pair<G4int,G4double> >;
/**
* @brief G4RegularNavigationHelper is a singleton utility class for navigation
* on regular structures, providing step lengths counting for each regular voxel
* of the structure.
*/
class G4RegularNavigationHelper
{
friend class G4ThreadLocalSingleton<G4RegularNavigationHelper>;
public:
/**
* Singleton instance accessor.
*/
static G4RegularNavigationHelper* Instance();
~G4RegularNavigationHelper();
void ClearStepLengths();
void AddStepLength( G4int copyNo, G4double slen );
const std::vector< std::pair<G4int,G4double> > & GetStepLengths();
std::vector< std::pair<G4int,G4double> > theStepLengths;
/**
* Default Destructor.
*/
~G4RegularNavigationHelper() = default;
/**
* Resets the state.
*/
void ClearStepLengths();
/**
* Stores step in container, associated to given voxel.
* @param[in] copyNo Voxel number.
* @param[in] slen Value of step length to store.
*/
void AddStepLength( G4int copyNo, G4double slen );
/**
* Returns the collection of stored steps per voxels.
*/
const std::vector< std::pair<G4int,G4double> > & GetStepLengths();
private:
G4RegularNavigationHelper();
/**
* Private default Constructor.
*/
G4RegularNavigationHelper() = default;
private:
/** The collection of steps associated to voxels. */
std::vector< std::pair<G4int,G4double> > theStepLengths;
};
#endif