Import Geant4 11.4.0.beta source tree
This commit is contained in:
@@ -23,19 +23,18 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// class G4RegularNavigation
|
||||
// G4RegularNavigation
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Utility for fast navigation in volumes containing a regular
|
||||
// parameterisation. If two contiguous voxels have the same material,
|
||||
// navigation does not stop at the surface
|
||||
// navigation does not stop at the surface.
|
||||
|
||||
// History:
|
||||
// - Created. P. Arce, May 2007
|
||||
// Author: Pedro Arce (CIEMAT), May 2007
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4RegularNavigation_HH
|
||||
#define G4RegularNavigation_HH
|
||||
#define G4RegularNavigation_HH 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -48,13 +47,33 @@ class G4VPhysicalVolume;
|
||||
class G4Navigator;
|
||||
class G4NavigationHistory;
|
||||
|
||||
/**
|
||||
* @brief G4RegularNavigation is a concrete utility class for fast navigation
|
||||
* in volumes containing a regular parameterisation. If two contiguous voxels
|
||||
* have the same material, navigation does not stop at the surface.
|
||||
*/
|
||||
|
||||
class G4RegularNavigation : public G4VNavigation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor and Destructor.
|
||||
*/
|
||||
G4RegularNavigation();
|
||||
~G4RegularNavigation() override;
|
||||
|
||||
/**
|
||||
* Locates a point using its position with respect to regular
|
||||
* parameterisation container volume.
|
||||
* @param[in,out] history Navigation history.
|
||||
* @param[in,out] blockedVol Blocked volume to be ignored in queries.
|
||||
* @param[in,out] blockedNum Copy number for blocked replica volumes.
|
||||
* @param[in,out] globalPoint Point in global coordinates system.
|
||||
* @param[in,out] globalDirection Global direction vector.
|
||||
* @param[in,out] localPoint Point in local coordinates system.
|
||||
* @returns Whether a containing volume has been found.
|
||||
*/
|
||||
G4bool LevelLocate( G4NavigationHistory& history,
|
||||
const G4VPhysicalVolume* blockedVol,
|
||||
const G4int blockedNum,
|
||||
@@ -62,11 +81,15 @@ class G4RegularNavigation : public G4VNavigation
|
||||
const G4ThreeVector* globalDirection,
|
||||
const G4bool pLocatedOnEdge,
|
||||
G4ThreeVector& localPoint ) final;
|
||||
// Locate point using its position with respect to regular
|
||||
// parameterisation container volume.
|
||||
|
||||
G4double ComputeStep( const G4ThreeVector& globalPoint,
|
||||
const G4ThreeVector& globalDirection,
|
||||
/**
|
||||
* Method never called because to be called the daughter has to be a
|
||||
* 'regular' volume. This would only happen if the track is in the
|
||||
* mother of voxels volume. But the voxels fill completely their mother,
|
||||
* so when a track enters the mother it automatically enters a voxel.
|
||||
*/
|
||||
G4double ComputeStep( const G4ThreeVector& localPoint,
|
||||
const G4ThreeVector& localDirection,
|
||||
const G4double currentProposedStepLength,
|
||||
G4double& newSafety,
|
||||
G4NavigationHistory& history,
|
||||
@@ -76,14 +99,32 @@ class G4RegularNavigation : public G4VNavigation
|
||||
G4bool& entering,
|
||||
G4VPhysicalVolume *(*pBlockedPhysical),
|
||||
G4int& blockedReplicaNo ) final;
|
||||
// Method never called because to be called the daughter has to be a
|
||||
// 'regular' volume. This would only happen if the track is in the
|
||||
// mother of voxels volume. But the voxels fill completely their mother,
|
||||
// so when a track enters the mother it automatically enters a voxel.
|
||||
|
||||
/**
|
||||
* Computes the step skipping surfaces when they separate voxels with
|
||||
* equal materials. Loops to voxels until a different material is found:
|
||||
* invokes G4NormalNavigation::ComputeStep() in each voxel and moves the
|
||||
* point to the next voxel.
|
||||
* @param[in] localPoint Local point.
|
||||
* @param[in] localDirection Local direction vector.
|
||||
* @param[in] currentProposedStepLength Current proposed step length.
|
||||
* @param[in,out] newSafety New safety.
|
||||
* @param[in,out] history Navigation history.
|
||||
* @param[in,out] validExitNormal Flag to indicate whether exit normal is
|
||||
* valid or not.
|
||||
* @param[in,out] exitNormal Exit normal.
|
||||
* @param[in,out] exiting Flag to indicate whether exiting a volume.
|
||||
* @param[in,out] entering Flag to indicate whether entering a volume.
|
||||
* @param[in,out] pBlockedPhysical Blocked physical volume that should be
|
||||
* ignored in queries.
|
||||
* @param[in,out] blockedReplicaNo Copy number for blocked replica volumes.
|
||||
* @param[in] pCurrentPhysical Pointer to current volume.
|
||||
* @returns Length from current point to next boundary surface along
|
||||
* the direction.
|
||||
*/
|
||||
G4double ComputeStepSkippingEqualMaterials(
|
||||
G4ThreeVector& localPoint,
|
||||
const G4ThreeVector& globalDirection,
|
||||
const G4ThreeVector& localDirection,
|
||||
const G4double currentProposedStepLength,
|
||||
G4double& newSafety,
|
||||
G4NavigationHistory& history,
|
||||
@@ -94,40 +135,48 @@ class G4RegularNavigation : public G4VNavigation
|
||||
G4VPhysicalVolume *(*pBlockedPhysical),
|
||||
G4int& blockedReplicaNo,
|
||||
G4VPhysicalVolume* pCurrentPhysical);
|
||||
// Compute the step skipping surfaces when they separate voxels with
|
||||
// equal materials. Loop to voxels until a different material is found:
|
||||
// invokes G4NormalNavigation::ComputeStep() in each voxel and move the
|
||||
// point to the next voxel.
|
||||
|
||||
/**
|
||||
* Method never called because to be called the daughter has to be a
|
||||
* 'regular' volume. This would only happen if the track is in the
|
||||
* mother of voxels volume. But the voxels fill completely their mother,
|
||||
* so when a track enters the mother it automatically enters a voxel.
|
||||
*/
|
||||
G4double ComputeSafety( const G4ThreeVector& localPoint,
|
||||
const G4NavigationHistory& history,
|
||||
const G4double pProposedMaxLength = DBL_MAX ) final;
|
||||
// Method never called because to be called the daughter has to be a
|
||||
// 'regular' volume. This would only happen if the track is in the
|
||||
// mother of voxels volume. But the voxels fill completely their mother,
|
||||
// so when a track enters the mother it automatically enters a voxel.
|
||||
|
||||
public: // without description
|
||||
|
||||
void SetNormalNavigation( G4NormalNavigation* fnormnav )
|
||||
{ fnormalNav = fnormnav; }
|
||||
/**
|
||||
* Setter for normal navigation.
|
||||
*/
|
||||
void SetNormalNavigation( G4NormalNavigation* fnormnav );
|
||||
|
||||
private:
|
||||
|
||||
/** Cached pointer to normal navigation. */
|
||||
G4NormalNavigation* fnormalNav = nullptr;
|
||||
G4double kCarTolerance;
|
||||
|
||||
/** Surface tolerance. */
|
||||
G4double kCarTolerance;
|
||||
|
||||
/** Cached minimum step. */
|
||||
G4double fMinStep;
|
||||
|
||||
/** Whether the last ComputeStep moved Zero. Used to check for edges. */
|
||||
G4bool fLastStepWasZero = false;
|
||||
// Whether the last ComputeStep moved Zero. Used to check for edges.
|
||||
|
||||
/** Number of preceding moves that were 0. Reset to 0 after finite step. */
|
||||
G4int fNumberZeroSteps = 0;
|
||||
// Number of preceding moves that were Zero. Reset to 0 after finite step
|
||||
|
||||
/** After this many failed/zero steps, act (push etc). */
|
||||
G4int fActionThreshold_NoZeroSteps = 2;
|
||||
// After this many failed/zero steps, act (push etc)
|
||||
|
||||
/** After this many failed/zero steps, abandon track. */
|
||||
G4int fAbandonThreshold_NoZeroSteps = 25;
|
||||
// After this many failed/zero steps, abandon track
|
||||
|
||||
/** Maximum number of steps a track can travel skipping voxels
|
||||
(if there are more, track is assumed to be stuck and it is killed). */
|
||||
G4int fNoStepsAllowed = 10000;
|
||||
// Maximum number of steps a track can travel skipping voxels (if there are more, track is assumed to be stuck and it is killed)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user