Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4AuxiliaryNavServices.hh,v 1.4 2007/05/22 07:48:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4AuxiliaryNavServices.hh,v 1.4 2007-05-22 07:48:08 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4AuxiliaryNavServices
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4AuxiliaryNavServices.icc,v 1.4 2007/05/22 07:48:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4AuxiliaryNavServices.icc,v 1.4 2007-05-22 07:48:08 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4AuxiliaryNavServices Inline implementation
@@ -102,7 +102,7 @@ CheckPointExiting( const G4VSolid* sampleSolid,
G4bool exiting = false;
EInside insideSolid = sampleSolid->Inside(localPoint);
if( (insideSolid==kSurface) )
if( insideSolid==kSurface )
{
localDirection= sampleTransform.TransformAxis(*globalDirection);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4BrentLocator.hh,v 1.2 2008/10/29 14:31:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4BrentLocator.hh,v 1.2 2008-10-29 14:31:55 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// Class G4BrentLocator
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DrawVoxels.hh,v 1.3 2006/06/29 18:35:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DrawVoxels.hh,v 1.3 2006-06-29 18:35:36 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4DrawVoxels
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ErrorPropagationNavigator.hh,v 1.2 2008/10/24 14:00:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ErrorPropagationNavigator.hh,v 1.2 2008-10-24 14:00:03 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// --------------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestErrorList.hh,v 1.3 2006/06/29 18:35:38 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestErrorList.hh,v 1.3 2006-06-29 18:35:38 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestLogger.hh,v 1.3 2006/06/29 18:35:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestLogger.hh,v 1.3 2006-06-29 18:35:40 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestOverlapList.hh,v 1.3 2006/06/29 18:35:43 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestOverlapList.hh,v 1.3 2006-06-29 18:35:43 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestOvershootList.hh,v 1.3 2006/06/29 18:35:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestOvershootList.hh,v 1.3 2006-06-29 18:35:45 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestPoint.hh,v 1.3 2006/06/29 18:35:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestPoint.hh,v 1.3 2006-06-29 18:35:48 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -59,6 +59,7 @@ class G4GeomTestPoint
virtual ~G4GeomTestPoint();
// Constructors and virtual destructor
G4GeomTestPoint& operator=(const G4GeomTestPoint& other);
G4bool operator==( const G4GeomTestPoint &other ) const;
G4bool operator< ( const G4GeomTestPoint &other ) const;
G4bool operator<=( const G4GeomTestPoint &other ) const;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestSegment.hh,v 1.4 2007/05/11 13:43:59 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestSegment.hh,v 1.4 2007-05-11 13:43:59 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestStreamLogger.hh,v 1.3 2006/06/29 18:35:52 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestStreamLogger.hh,v 1.3 2006-06-29 18:35:52 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestVolPoint.hh,v 1.3 2006/06/29 18:35:55 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestVolPoint.hh,v 1.3 2006-06-29 18:35:55 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -65,6 +65,9 @@ class G4GeomTestVolPoint : public G4GeomTestPoint
virtual ~G4GeomTestVolPoint();
// Constructors and virtual destructor
G4GeomTestVolPoint& operator=(const G4GeomTestVolPoint& other);
// Assignment operator
G4int GetDaughterIndex() const;
// Accessors
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeomTestVolume.hh,v 1.3 2006/06/29 18:35:57 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4GeomTestVolume.hh,v 1.3 2006-06-29 18:35:57 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GeometryMessenger.hh,v 1.5 2010/11/10 14:06:40 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4GeometryMessenger.hh,v 1.5 2010-11-10 14:06:40 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MultiLevelLocator.hh,v 1.3 2010/07/13 15:59:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4MultiLevelLocator.hh,v 1.3 2010-07-13 15:59:42 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Class G4MultiLevelLocator
@@ -73,7 +73,7 @@ class G4MultiLevelLocator : public G4VIntersectionLocator
private:
static const G4int max_depth=4;
static const G4int max_depth=10;
G4FieldTrack* ptrInterMedFT[max_depth+1];
// Used to store intermediate tracks values in case of too slow progress
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MultiNavigator.hh,v 1.5 2008/10/24 14:00:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MultiNavigator.hh,v 1.5 2008-10-24 14:00:03 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4MultiNavigator
@@ -121,6 +121,22 @@ class G4MultiNavigator : public G4Navigator
G4TouchableHistoryHandle CreateTouchableHistoryHandle() const;
// Returns a reference counted handle to a touchable history.
virtual G4ThreeVector GetLocalExitNormal(G4bool* obtained); // const
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector &CurrentE_Point,
G4bool* obtained); // const
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector &CurrentE_Point,
G4bool* obtained); // const
// Return Exit Surface Normal and validity too.
// Can only be called if the Navigator's last Step either
// - has just crossed a volume geometrical boundary and relocated, or
// - has arrived at a boundary in a ComputeStep
// It returns the Normal to the surface pointing out of the volume that
// was left behind and/or into the volume that was entered.
// Convention:x
// The *local* normal is in the coordinate system of the *final* volume.
// Restriction:
// Normals are not available for replica volumes (returns obtained= false)
public: // without description
G4Navigator* GetNavigator(G4int n) const
@@ -160,6 +176,8 @@ class G4MultiNavigator : public G4Navigator
G4bool fLimitTruth[fMaxNav];
G4double fCurrentStepSize[fMaxNav];
G4double fNewSafety[ fMaxNav ]; // Safety for starting point
G4int fNoLimitingStep; // How many geometries limited the step
G4int fIdNavLimiting; // Id of Navigator limiting step (if only one limits)
// Lowest values - determine step length, and safety
G4double fMinStep; // As reported by Navigators. Can be kInfinity
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationLogger.hh,v 1.1 2010/11/04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4NavigationLogger.hh,v 1.1 2010-11-04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4NavigationLogger
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Navigator.hh,v 1.34 2010/12/15 13:46:39 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4Navigator.hh,v 1.34 2010-12-15 13:46:39 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4Navigator
@@ -206,13 +206,20 @@ class G4Navigator
// Returns a reference counted handle to a touchable history.
virtual G4ThreeVector GetLocalExitNormal(G4bool* valid);
// Returns Exit Surface Normal and validity too.
// It can only be called if the Navigator's last Step has crossed a
virtual G4ThreeVector GetLocalExitNormalAndCheck(const G4ThreeVector& point,
G4bool* valid);
virtual G4ThreeVector GetGlobalExitNormal(const G4ThreeVector& point,
G4bool* valid);
// Return Exit Surface Normal and validity too.
// Can only be called if the Navigator's last Step has crossed a
// volume geometrical boundary.
// It returns the Normal to the surface pointing out of the volume that
// was left behind and/or into the volume that was entered.
// (The normal is in the coordinate system of the final volume.)
// This function takes full care about how to calculate this normal,
// Convention:
// The *local* normal is in the coordinate system of the *final* volume.
// Restriction:
// Normals are not available for replica volumes (returns valid= false)
// These methods takes full care about how to calculate this normal,
// but if the surfaces are not convex it will return valid=false.
inline G4int GetVerboseLevel() const;
@@ -254,6 +261,11 @@ class G4Navigator
// Obtain the transformations Global/Local (and inverse).
// Clients of these methods must copy the data if they need to keep it.
G4AffineTransform GetMotherToDaughterTransform(G4VPhysicalVolume* dVolume,
G4int dReplicaNo,
EVolume dVolumeType );
// Obtain mother to daughter transformation
inline void ResetStackAndState();
// Reset stack and minimum or navigator state machine necessary for reset
// as needed by LocalGlobalPointAndSetup.
@@ -346,8 +358,11 @@ class G4Navigator
// Set true if last Step was limited by geometry.
G4ThreeVector fStepEndPoint;
// Endpoint of last ComputeStep
// - can be used for optimisation (eg when computing safety)
// Endpoint of last ComputeStep
// can be used for optimisation (e.g. when computing safety).
G4ThreeVector fLastStepEndPointLocal;
// Position of the end-point of the last call to ComputeStep
// in last Local coordinates.
G4int fVerbose;
// Verbose(ness) level [if > 0, printout can occur].
@@ -357,6 +372,12 @@ class G4Navigator
G4bool fActive;
// States if the navigator is activated or not.
G4bool fLastTriedStepComputation;
// Whether ComputeStep was called since the last call to a Locate method
// Uses: - distinguish parts of state which differ before/after calls
// to ComputeStep or one of the Locate methods;
// - avoid two consecutive calls to compute-step (illegal).
G4bool fEntering,fExiting;
// Entering/Exiting volumes blocking/setup
// o If exiting
@@ -369,14 +390,10 @@ class G4Navigator
G4VPhysicalVolume *fBlockedPhysicalVolume;
G4int fBlockedReplicaNo;
// G4VPhysicalVolume *fCandidatePhysicalVolume; // Unused
// G4int fCandidateReplicaNo;
G4ThreeVector fLastLocatedPointLocal;
// Position of the last located point relative to its containing volume.
G4bool fLocatedOutsideWorld;
// Whether the last call to Locate methods left the world
// G4PhysicalVolume* fLastVolumeLocated;
G4bool fValidExitNormal; // Set true if have leaving volume normal
G4ThreeVector fExitNormal; // Leaving volume normal, in the
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Navigator.icc,v 1.18 2010/12/15 13:46:39 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4Navigator.icc,v 1.18 2010-12-15 13:46:39 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4Navigator Inline implementation
@@ -93,13 +93,13 @@ void G4Navigator::SetWorldVolume(G4VPhysicalVolume* pWorld)
{
if ( !(pWorld->GetTranslation()==G4ThreeVector(0,0,0)) )
{
G4Exception ("G4Navigator::SetWorldVolume()", "InvalidSetup",
G4Exception ("G4Navigator::SetWorldVolume()", "GeomNav0002",
FatalException, "Volume must be centered on the origin.");
}
const G4RotationMatrix* rm = pWorld->GetRotation();
if ( rm && (!rm->isIdentity()) )
{
G4Exception ("G4Navigator::SetWorldVolume()", "InvalidSetup",
G4Exception ("G4Navigator::SetWorldVolume()", "GeomNav0002",
FatalException, "Volume must not be rotated.");
}
fTopPhysical = pWorld;
@@ -190,7 +190,6 @@ EVolume G4Navigator::CharacteriseDaughters(const G4LogicalVolume *pLog) const
return type;
}
// ********************************************************************
// GetDaughtersRegularStructureId
// ********************************************************************
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4NormalNavigation.hh,v 1.6 2010/11/04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4NormalNavigation.hh,v 1.6 2010-11-04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4NormalNavigation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4NormalNavigation.icc,v 1.5 2010/11/04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4NormalNavigation.icc,v 1.5 2010-11-04 08:57:56 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// G4NormalNavigation Inline Implementation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParameterisedNavigation.hh,v 1.6 2007/11/09 16:06:02 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParameterisedNavigation.hh,v 1.6 2007-11-09 16:06:02 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4ParameterisedNavigation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParameterisedNavigation.icc,v 1.7 2007/11/09 16:06:02 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParameterisedNavigation.icc,v 1.7 2007-11-09 16:06:02 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4ParameterisedNavigation Inline implementation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PartialPhantomParameterisation.hh,v 1.2 2010/11/10 11:20:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4PartialPhantomParameterisation.hh,v 1.2 2010-11-10 11:20:45 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4PartialPhantomParameterisation
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PathFinder.hh,v 1.35 2010/07/13 15:59:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4PathFinder.hh,v 1.35 2010-07-13 15:59:42 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// class G4PathFinder
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PhantomParameterisation.hh,v 1.6 2010/11/09 15:43:15 arce Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4PhantomParameterisation.hh,v 1.6 2010-11-09 15:43:15 arce Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4PhantomParameterisation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PhantomParameterisation.icc,v 1.1 2007/10/17 19:13:58 arce Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4PhantomParameterisation.icc,v 1.1 2007-10-17 19:13:58 arce Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//--------------------------------------------------------------------
inline
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PropagatorInField.hh,v 1.19 2009/11/13 17:34:26 japost Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PropagatorInField.hh,v 1.19 2009-11-13 17:34:26 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Class G4PropagatorInField
@@ -123,14 +123,15 @@ class G4PropagatorInField
inline void SetMinimumEpsilonStep( G4double newEpsMin ); // of any step
inline G4double GetMaximumEpsilonStep() const;
inline void SetMaximumEpsilonStep( G4double newEpsMax );
inline void SetLargestAcceptableStep( G4double newBigDist );
inline G4double GetLargestAcceptableStep();
// The 6 above methods are now obsolescent but *for now* will work
// The 4 above methods are now obsolescent but *for now* will work
// They are being replaced by same-name methods in G4FieldManager,
// allowing the specialisation in different volumes.
// Their new behaviour is to change the values for the global field
// manager
inline void SetLargestAcceptableStep( G4double newBigDist );
inline G4double GetLargestAcceptableStep();
void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter);
// Set the filter that examines & stores 'intermediate'
// curved trajectory points. Currently only position is stored.
@@ -193,67 +194,42 @@ class G4PropagatorInField
G4double stepTrial,
const G4FieldTrack& aFieldTrack);
private:
// ----------------------------------------------------------------------
// DATA Members
// ----------------------------------------------------------------------
G4FieldManager *fDetectorFieldMgr;
// The Field Manager of the whole Detector. (default)
// ==================================================================
// INVARIANTS - Must not change during tracking
G4FieldManager *fCurrentFieldMgr;
// The Field Manager of the current volume (may be the one above.)
// ** PARAMETERS -----------
G4int fMax_loop_count;
// Limit for the number of sub-steps taken in one call to ComputeStep
G4bool fUseSafetyForOptimisation;
G4Navigator *fNavigator;
// STATE information
// -----------------
// Thresholds for identifying "abnormal" cases - which cause looping
G4int fActionThreshold_NoZeroSteps; // Threshold # - above it act
G4int fSevereActionThreshold_NoZeroSteps; // Threshold # to act harshly
G4int fAbandonThreshold_NoZeroSteps; // Threshold # to abandon
G4double fZeroStepThreshold;
// Threshold *length* for counting of tiny or 'zero' steps
G4double fLargestAcceptableStep;
// Maximum size of a step - for optimization (and to avoid problems)
// ** End of PARAMETERS -----
G4double fEpsilonStep;
// Relative accuracy for current Step (Calc.)
G4double kCarTolerance;
// Geometrical tolerance defining surface thickness
G4FieldTrack End_PointAndTangent;
// End point storage
G4bool fAllocatedLocator; // Book-keeping
G4bool fParticleIsLooping;
// --------------------------------------------------------
// ** Dependent Objects - to which work is delegated
G4int fVerboseLevel;
// For debuging purposes
G4int fMax_loop_count;
// Limit for the number of sub-steps taken in one call to ComputeStep
// Variables to keep track of "abnormal" case - which causes loop
//
G4int fNoZeroStep; // Counter of zeroStep
G4int fActionThreshold_NoZeroSteps; // Threshold: above this - act
G4int fSevereActionThreshold_NoZeroSteps; // Threshold to act harshly
G4int fAbandonThreshold_NoZeroSteps; // Threshold to abandon
G4double fFull_CurveLen_of_LastAttempt;
G4double fLast_ProposedStepLength;
G4double fLargestAcceptableStep;
G4double fCharge, fInitialMomentumModulus, fMass;
G4ThreeVector fPreviousSftOrigin;
G4double fPreviousSafety;
G4bool fUseSafetyForOptimisation;
// Last safety origin & value: for optimisation
G4bool fSetFieldMgr;
// Flag whether field manager has been set for the current step
G4double kCarTolerance;
// Geometrical tolerance defining surface thickness
G4double fZeroStepThreshold;
// Threshold for counting of tiny or 'zero' steps
G4FieldManager *fDetectorFieldMgr;
// The Field Manager of the whole Detector. (default)
G4VIntersectionLocator *fIntersectionLocator;
G4bool fAllocatedLocator;
// Used to Intersection Locator
private:
// Refines candidate intersection
G4VCurvedTrajectoryFilter* fpTrajectoryFilter;
// The filter encapsulates the algorithm which selects which
@@ -261,11 +237,44 @@ class G4PropagatorInField
// When it is NULL, no intermediate points will be stored.
// Else PIF::ComputeStep must submit (all) intermediate
// points it calculates, to this filter. (jacek 04/11/2002)
G4Navigator *fNavigator;
// Set externally - only by tracking / run manager
//
// ** End of Dependent Objects ----------------------------
// End of INVARIANTS
// ==================================================================
// STATE information
// -----------------
G4FieldManager *fCurrentFieldMgr;
// The Field Manager of the current volume (may be the global)
G4bool fSetFieldMgr; // Has it been set for the current step
// Parameters of current step
G4double fCharge, fInitialMomentumModulus, fMass;
G4double fEpsilonStep; // Relative accuracy of current Step
G4FieldTrack End_PointAndTangent; // End point storage
G4bool fParticleIsLooping;
G4int fNoZeroStep; // Count of zero Steps
// State used for Optimisation
G4double fFull_CurveLen_of_LastAttempt;
G4double fLast_ProposedStepLength;
// Previous step information -- for use in adjust step size
G4ThreeVector fPreviousSftOrigin;
G4double fPreviousSafety;
// Last safety origin & value: for optimisation
G4int fVerboseLevel;
// For debuging purposes
private:
};
// ********************************************************************
// Inline methods.
// ********************************************************************
// *******************************
#include "G4PropagatorInField.icc"
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PropagatorInField.icc,v 1.16 2009/11/13 17:34:26 japost Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PropagatorInField.icc,v 1.16 2009-11-13 17:34:26 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// ------------------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RegularNavigation.hh,v 1.4 2010/09/03 16:29:43 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4RegularNavigation.hh,v 1.4 2010-09-03 16:29:43 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4RegularNavigation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RegularNavigationHelper.hh,v 1.1 2009/01/27 09:31:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4RegularNavigationHelper.hh,v 1.1 2009-01-27 09:31:29 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ReplicaNavigation.hh,v 1.6 2007/05/18 07:31:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ReplicaNavigation.hh,v 1.6 2007-05-18 07:31:09 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4ReplicaNavigation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ReplicaNavigation.icc,v 1.5 2006/06/29 18:36:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ReplicaNavigation.icc,v 1.5 2006-06-29 18:36:22 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4ReplicaNavigation Inline implementation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SafetyHelper.hh,v 1.7 2007/05/02 15:32:13 japost Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4SafetyHelper.hh,v 1.7 2007-05-02 15:32:13 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4SafetyHelper
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SimpleLocator.hh,v 1.2 2008/10/29 14:31:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4SimpleLocator.hh,v 1.2 2008-10-29 14:31:55 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Class G4SimpleLocator
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.hh,v 1.12 2007/04/20 15:28:37 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4TransportationManager.hh,v 1.12 2007-04-20 15:28:37 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// class G4TransportationManager
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.icc,v 1.10 2007/04/20 15:28:37 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4TransportationManager.icc,v 1.10 2007-04-20 15:28:37 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// ------------------------------------------------------------
// GEANT 4 inlined function members implementation
// ------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VIntersectionLocator.hh,v 1.6 2009/11/30 11:39:15 japost Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4VIntersectionLocator.hh,v 1.6 2009-11-30 11:39:15 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Class G4VIntersectionLocator
@@ -87,10 +87,11 @@ class G4VIntersectionLocator
inline G4bool IntersectChord( G4ThreeVector StartPointA,
G4ThreeVector EndPointB,
G4double &NewSafety,
G4double &fPreviousSafety, // In/Out
G4ThreeVector &fPreviousSftOrigin, // In/Out
G4double &PreviousSafety, // In/Out
G4ThreeVector &PreviousSftOrigin, // In/Out
G4double &LinearStepLength,
G4ThreeVector &IntersectionPoint);
G4ThreeVector &IntersectionPoint,
G4bool *calledNavigator=0 );
// Intersect the chord from StartPointA to EndPointB and return
// whether an intersection occurred. NOTE: changes the Safety!
@@ -135,10 +136,22 @@ class G4VIntersectionLocator
// CurrentStateA, to replace EstimtdEndStateB, and report displacement
// (if field is compiled verbose)
G4ThreeVector GetLocalSurfaceNormal(const G4ThreeVector &CurrentE_Point,
G4bool &validNormal);
// Return the SurfaceNormal of Intersecting Solid
G4ThreeVector GetSurfaceNormal(const G4ThreeVector &CurrentInt_Point,
G4bool &validNormal); // const
// Position *must* be the intersection point from last call
// to G4Navigator's ComputeStep (via IntersectChord )
// Will try to use cached (last) value in Navigator for speed,
// if it was kept and valid.
// Value returned is in global coordinates.
// It does NOT guarantee to obtain Normal. This can happen eg if:
// - the "Intersection" Point is not on a surface, potentially due to
// - inaccuracies in the transformations used, or
// - issues with the Solid.
G4ThreeVector GetGlobalSurfaceNormal(const G4ThreeVector &CurrentE_Point,
G4bool &validNormal);
// Return the SurfaceNormal of Intersecting Solid in global coordinates
// Costlier then GetSurfaceNormal
G4bool AdjustmentOfFoundIntersection(const G4ThreeVector &A,
const G4ThreeVector &CurrentE_Point,
@@ -152,6 +165,26 @@ class G4VIntersectionLocator
// Optional method for adjustment of located intersection point
// using the surface-normal
void ReportTrialStep( G4int step_no,
const G4ThreeVector& ChordAB_v,
const G4ThreeVector& ChordEF_v,
const G4ThreeVector& NewMomentumDir,
const G4ThreeVector& NormalAtEntry,
G4bool validNormal );
// Print a three-line report on the current "sub-step", ie trial intersection
private: // no description
G4ThreeVector GetLocalSurfaceNormal(const G4ThreeVector &CurrentE_Point,
G4bool &validNormal);
// Return the SurfaceNormal of Intersecting Solid in local coordinates
G4ThreeVector GetLastSurfaceNormal( G4ThreeVector intersectPoint,
G4bool &validNormal) const;
// Position *must* be the intersection point from last call
// to G4Navigator's ComputeStep (via IntersectChord )
// Temporary - will use the same method in the Navigator
protected:
G4double kCarTolerance; // Constant
@@ -160,16 +193,19 @@ class G4VIntersectionLocator
G4bool fUseNormalCorrection; // Configuration parameter
G4Navigator *fiNavigator;
// Parameters set by G4PropagatorInField ( when ? )
G4ChordFinder *fiChordFinder;
G4double fiEpsilonStep;
G4double fiDeltaIntersection;
G4bool fiUseSafety;
// Parameters set at each physical step by calling method - G4PropagatorInField
// Parameters set at each physical step by calling method
// by G4PropagatorInField
G4Navigator *fHelpingNavigator;
// Helper for location
G4TouchableHistory *fpTouchable;
// Touchable history hook
};
#include "G4VIntersectionLocator.icc"
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VIntersectionLocator.icc,v 1.3 2008/11/14 18:26:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VIntersectionLocator.icc,v 1.3 2008-11-14 18:26:35 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// Class G4VIntersectionLocator inline methods
@@ -104,29 +104,31 @@ inline G4bool
G4VIntersectionLocator::IntersectChord( G4ThreeVector StartPointA,
G4ThreeVector EndPointB,
G4double &NewSafety,
G4double &fPreviousSafety,
G4ThreeVector &fPreviousSftOrigin,
G4double &PreviousSafety,
G4ThreeVector &PreviousSftOrigin,
G4double &LinearStepLength,
G4ThreeVector &IntersectionPoint )
G4ThreeVector &IntersectionPoint,
G4bool *ptrCalledNavigator )
{
G4bool CalledNavigator = false;
// Calculate the direction and length of the chord AB
G4ThreeVector ChordAB_Vector = EndPointB - StartPointA;
G4double ChordAB_Length = ChordAB_Vector.mag(); // Magnitude (norm)
G4ThreeVector ChordAB_Dir = ChordAB_Vector.unit();
G4bool intersects;
G4ThreeVector OriginShift = StartPointA - fPreviousSftOrigin ;
G4ThreeVector OriginShift = StartPointA - PreviousSftOrigin ;
G4double MagSqShift = OriginShift.mag2() ;
G4double currentSafety;
G4bool doCallNav= false;
if( MagSqShift >= sqr(fPreviousSafety) )
if( MagSqShift >= sqr(PreviousSafety) )
{
currentSafety = 0.0 ;
}
else
{
currentSafety = fPreviousSafety - std::sqrt(MagSqShift) ;
currentSafety = PreviousSafety - std::sqrt(MagSqShift) ;
}
if( fiUseSafety && (ChordAB_Length <= currentSafety) )
@@ -136,11 +138,11 @@ G4VIntersectionLocator::IntersectChord( G4ThreeVector StartPointA,
LinearStepLength = ChordAB_Length;
intersects = false;
NewSafety= currentSafety;
CalledNavigator= false;
}
else
{
doCallNav= true;
// Check whether any volumes are encountered by the chord AB
// Check whether any volumes are encountered by the chord AB
LinearStepLength = GetNavigatorFor()->ComputeStep( StartPointA,
ChordAB_Dir, ChordAB_Length, NewSafety );
@@ -150,11 +152,12 @@ G4VIntersectionLocator::IntersectChord( G4ThreeVector StartPointA,
// and it did not find a surface boundary at that length
LinearStepLength = std::min( LinearStepLength, ChordAB_Length);
CalledNavigator = true;
// Save the last calculated safety!
fPreviousSftOrigin = StartPointA;
fPreviousSafety= NewSafety;
PreviousSftOrigin = StartPointA;
PreviousSafety = NewSafety;
if( intersects )
{
@@ -163,5 +166,10 @@ G4VIntersectionLocator::IntersectChord( G4ThreeVector StartPointA,
IntersectionPoint = StartPointA + LinearStepLength * ChordAB_Dir;
}
}
if( ptrCalledNavigator )
{
*ptrCalledNavigator = CalledNavigator;
}
return intersects;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VoxelNavigation.hh,v 1.8 2010/11/04 12:13:30 japost Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4VoxelNavigation.hh,v 1.8 2010-11-04 12:13:30 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4VoxelNavigation
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VoxelNavigation.icc,v 1.7 2010/11/04 17:38:17 japost Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4VoxelNavigation.icc,v 1.7 2010-11-04 17:38:17 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// class G4VoxelNavigation Inline implementation
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VoxelSafety.hh,v 1.2 2010/11/04 17:32:46 japost Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4VoxelSafety.hh,v 1.2 2010-11-04 17:32:46 japost Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// class G4VoxelSafety
//