Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AuxiliaryNavServices.hh,v 1.4 2007/05/22 07:48:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4AuxiliaryNavServices
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AuxiliaryNavServices.icc,v 1.4 2007/05/22 07:48:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4AuxiliaryNavServices Inline implementation
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BrentLocator.hh,v 1.2 2008/10/29 14:31:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// Class G4BrentLocator
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// Implementing the calculation of the intersection point with a boundary when
|
||||
// PropagationInField is used. Second order locator based on Brent Method
|
||||
// for finding the intersection point by means of a 'depth' algorithm in case
|
||||
// of slow progress (intersection is not found after 100 trials).
|
||||
|
||||
// History:
|
||||
// -------
|
||||
// 27.10.08 - Tatiana Nikitina: First implementation using
|
||||
// LocateIntersectionPoint() from
|
||||
// G4PropagatorInField class
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4BRENTLOCATOR_HH
|
||||
#define G4BRENTLOCATOR_HH
|
||||
|
||||
#include "G4VIntersectionLocator.hh"
|
||||
|
||||
class G4BrentLocator : public G4VIntersectionLocator
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4BrentLocator(G4Navigator *theNavigator);
|
||||
// Constructor
|
||||
~G4BrentLocator();
|
||||
// Default destructor
|
||||
|
||||
G4bool EstimateIntersectionPoint(
|
||||
const G4FieldTrack& curveStartPointTangent, // A
|
||||
const G4FieldTrack& curveEndPointTangent, // B
|
||||
const G4ThreeVector& trialPoint, // E
|
||||
G4FieldTrack& intersectPointTangent, // Output
|
||||
G4bool& recalculatedEndPoint, // Out
|
||||
G4double& fPreviousSafety, // In/Out
|
||||
G4ThreeVector& fPreviousSftOrigin); // In/Out
|
||||
// If such an intersection exists, this function calculates the
|
||||
// intersection point of the true path of the particle with the surface
|
||||
// of the current volume (or of one of its daughters).
|
||||
// Should use lateral displacement as measure of convergence
|
||||
|
||||
private:
|
||||
|
||||
static const G4int max_depth=4;
|
||||
G4FieldTrack* ptrInterMedFT[max_depth+1];
|
||||
// Used to store intermediate tracks values in case of too slow progress
|
||||
|
||||
G4int maxNumberOfStepsForIntersection;
|
||||
G4int maxNumberOfCallsToReIntegration;
|
||||
G4int maxNumberOfCallsToReIntegration_depth;
|
||||
// Counters for Statistics about Location and ReIntegrations
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DrawVoxels.hh,v 1.3 2006/06/29 18:35:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4DrawVoxels
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ErrorPropagationNavigator.hh,v 1.1 2007/05/16 12:49:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4ErrorPropagationNavigator.hh,v 1.2 2008/10/24 14:00:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -63,7 +63,8 @@ class G4ErrorPropagationNavigator : public G4Navigator
|
||||
// if the distance to surface is smaller than the proposed step
|
||||
|
||||
G4double ComputeSafety(const G4ThreeVector &globalpoint,
|
||||
const G4double pProposedMaxLength = DBL_MAX);
|
||||
const G4double pProposedMaxLength = DBL_MAX,
|
||||
const G4bool keepState = false);
|
||||
// Calls the navigation in the detector geometry and then checks
|
||||
// if the distance to surface is smaller than the proposed safety
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestErrorList.hh,v 1.3 2006/06/29 18:35:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestLogger.hh,v 1.3 2006/06/29 18:35:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestOverlapList.hh,v 1.3 2006/06/29 18:35:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestOvershootList.hh,v 1.3 2006/06/29 18:35:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestPoint.hh,v 1.3 2006/06/29 18:35:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestSegment.hh,v 1.4 2007/05/11 13:43:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestStreamLogger.hh,v 1.3 2006/06/29 18:35:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestVolPoint.hh,v 1.3 2006/06/29 18:35:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeomTestVolume.hh,v 1.3 2006/06/29 18:35:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GeometryMessenger.hh,v 1.4 2006/06/29 18:35:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MultiLevelLocator.hh,v 1.2 2008/10/29 14:31:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4MultiLevelLocator
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// Implementing the calculation of the intersection point with a boundary when
|
||||
// PropagationInField is used. Derived from method LocateIntersectionPoint()
|
||||
// from G4PropagatorInField, it is based on a linear method for finding the
|
||||
// intersection point by means of a 'depth' algorithm in case of slow progress
|
||||
// (intersection is not found after 100 trials).
|
||||
|
||||
// History:
|
||||
// -------
|
||||
// 27.10.08 - Tatiana Nikitina: Derived from LocateIntersectionPoint() from
|
||||
// G4PropagatorInField class
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4MULTILEVELLOCATOR_HH
|
||||
#define G4MULTILEVELLOCATOR_HH
|
||||
|
||||
#include "G4VIntersectionLocator.hh"
|
||||
|
||||
class G4MultiLevelLocator : public G4VIntersectionLocator
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4MultiLevelLocator(G4Navigator *theNavigator);
|
||||
// Constructor
|
||||
~G4MultiLevelLocator();
|
||||
// Default destructor
|
||||
|
||||
G4bool EstimateIntersectionPoint(
|
||||
const G4FieldTrack& curveStartPointTangent, // A
|
||||
const G4FieldTrack& curveEndPointTangent, // B
|
||||
const G4ThreeVector& trialPoint, // E
|
||||
G4FieldTrack& intersectPointTangent, // Output
|
||||
G4bool& recalculatedEndPoint, // Out
|
||||
G4double& fPreviousSafety, // In/Out
|
||||
G4ThreeVector& fPreviousSftOrigin); // In/Out
|
||||
// If such an intersection exists, this function calculates the
|
||||
// intersection point of the true path of the particle with the surface
|
||||
// of the current volume (or of one of its daughters).
|
||||
// Should use lateral displacement as measure of convergence
|
||||
|
||||
private:
|
||||
|
||||
static const G4int max_depth=4;
|
||||
|
||||
G4FieldTrack* ptrInterMedFT[max_depth+1];
|
||||
// Used to store intermediate tracks values in case of too slow progress
|
||||
|
||||
G4int maxNumberOfStepsForIntersection;
|
||||
G4int maxNumberOfCallsToReIntegration;
|
||||
G4int maxNumberOfCallsToReIntegration_depth;
|
||||
// Counters for Statistics about Location and ReIntegrations
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MultiNavigator.hh,v 1.4 2007/05/21 15:36:25 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MultiNavigator.hh,v 1.5 2008/10/24 14:00:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4MultiNavigator
|
||||
@@ -112,7 +112,8 @@ class G4MultiNavigator : public G4Navigator
|
||||
// along the direction of a computed step.
|
||||
|
||||
G4double ComputeSafety(const G4ThreeVector &globalpoint,
|
||||
const G4double pProposedMaxLength = DBL_MAX);
|
||||
const G4double pProposedMaxLength = DBL_MAX,
|
||||
const G4bool keepState = false);
|
||||
// Calculate the isotropic distance to the nearest boundary
|
||||
// in any geometry from the specified point in the global coordinate
|
||||
// system. The geometry must be closed.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Navigator.hh,v 1.26 2007/10/18 14:18:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4Navigator.hh,v 1.27 2008/10/24 14:00:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Navigator
|
||||
@@ -180,7 +180,8 @@ class G4Navigator
|
||||
// by the geometry was taken in its entirety.
|
||||
|
||||
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint,
|
||||
const G4double pProposedMaxLength = DBL_MAX);
|
||||
const G4double pProposedMaxLength = DBL_MAX,
|
||||
const G4bool keepState = false);
|
||||
// Calculate the isotropic distance to the nearest boundary from the
|
||||
// specified point in the global coordinate system.
|
||||
// The globalpoint utilised must be within the current volume.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Navigator.icc,v 1.15 2007/10/18 14:18:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4Navigator Inline implementation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NormalNavigation.hh,v 1.4 2006/06/29 18:36:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4NormalNavigation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NormalNavigation.icc,v 1.4 2006/06/29 18:36:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// G4NormalNavigation Inline Implementation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisedNavigation.hh,v 1.6 2007/11/09 16:06:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ParameterisedNavigation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParameterisedNavigation.icc,v 1.7 2007/11/09 16:06:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ParameterisedNavigation Inline implementation
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PathFinder.hh,v 1.34 2007/11/02 12:28:31 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// class G4PathFinder
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhantomParameterisation.hh,v 1.2 2007/10/18 14:29:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4PhantomParameterisation.hh,v 1.4 2008/01/22 15:02:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4PhantomParameterisation
|
||||
@@ -152,16 +152,16 @@ class G4PhantomParameterisation : public G4VPVParameterisation
|
||||
G4Material* GetMaterial( size_t nx, size_t ny, size_t nz) const;
|
||||
G4Material* GetMaterial( size_t copyNo ) const;
|
||||
|
||||
void CheckVoxelsFillContainer( G4double contX, G4double contY,
|
||||
G4double contZ ) const;
|
||||
// Check that the voxels fill it completely.
|
||||
|
||||
private:
|
||||
|
||||
void ComputeVoxelIndices(const G4int copyNo, size_t& nx,
|
||||
size_t& ny, size_t& nz ) const;
|
||||
// Convert the copyNo to voxel numbers in x, y and z.
|
||||
|
||||
void CheckVoxelsFillContainer( G4double contX, G4double contY,
|
||||
G4double contZ ) const;
|
||||
// Check that the voxels fill it completely.
|
||||
|
||||
void CheckCopyNo( const G4int copyNo ) const;
|
||||
// Check that the copy number is within limits.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PhantomParameterisation.icc,v 1.1 2007/10/17 19:13:58 arce Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
inline
|
||||
|
||||
@@ -23,20 +23,21 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PropagatorInField.hh,v 1.13 2007/06/08 09:49:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// class G4PropagatorInField
|
||||
// $Id: G4PropagatorInField.hh,v 1.17 2008/11/13 14:28:56 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class G4PropagatorInField
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// This class performs the navigation/propagation of a particle/track
|
||||
// in a magnetic field. The field is in general non-uniform.
|
||||
// For the calculation of the path, it relies on the class G4ChordFinder.
|
||||
//
|
||||
// Key Method:
|
||||
// ComputeStep(..)
|
||||
// Key Method: ComputeStep(..)
|
||||
|
||||
// History:
|
||||
// -------
|
||||
// 25.10.96 John Apostolakis, design and implementation
|
||||
@@ -53,6 +54,8 @@
|
||||
|
||||
#include "G4FieldTrack.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4VIntersectionLocator.hh"
|
||||
|
||||
class G4ChordFinder;
|
||||
|
||||
class G4Navigator;
|
||||
@@ -65,7 +68,8 @@ class G4PropagatorInField
|
||||
public: // with description
|
||||
|
||||
G4PropagatorInField( G4Navigator *theNavigator,
|
||||
G4FieldManager *detectorFieldMgr );
|
||||
G4FieldManager *detectorFieldMgr,
|
||||
G4VIntersectionLocator *vLocator=0 );
|
||||
~G4PropagatorInField();
|
||||
|
||||
G4double ComputeStep( G4FieldTrack &pFieldTrack,
|
||||
@@ -115,106 +119,80 @@ class G4PropagatorInField
|
||||
|
||||
inline G4FieldTrack GetEndState() const;
|
||||
|
||||
// The following 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 G4double GetMinimumEpsilonStep() const;
|
||||
inline void SetMinimumEpsilonStep( G4double newEpsMin );
|
||||
// Minimum for Relative accuracy of any Step
|
||||
|
||||
inline G4double GetMinimumEpsilonStep() const; // Min for relative accuracy
|
||||
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
|
||||
// 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
|
||||
|
||||
public: // with description
|
||||
void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter);
|
||||
// Set the filter that examines & stores 'intermediate'
|
||||
// curved trajectory points. Currently only position is stored.
|
||||
|
||||
std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const;
|
||||
// Access the points which have passed by the filter.
|
||||
// Responsibility for deleting the points lies with the client.
|
||||
// This method MUST BE called exactly ONCE per step.
|
||||
|
||||
void ClearPropagatorState();
|
||||
// Clear all the State of this class and its current associates
|
||||
// --> the current field manager & chord finder will also be called
|
||||
|
||||
inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager );
|
||||
// Update this (dangerous) state -- for the time being
|
||||
|
||||
inline void SetUseSafetyForOptimization( G4bool );
|
||||
inline G4bool GetUseSafetyForOptimization();
|
||||
// Toggle & view parameter for using safety to discard
|
||||
// unneccesary calls to navigator (thus 'optimising' performance)
|
||||
inline G4bool IntersectChord( G4ThreeVector StartPointA,
|
||||
G4ThreeVector EndPointB,
|
||||
G4double &NewSafety,
|
||||
G4double &LinearStepLength,
|
||||
G4ThreeVector &IntersectionPoint);
|
||||
// Intersect the chord from StartPointA to EndPointB
|
||||
// and return whether an intersection occurred
|
||||
// NOTE : SAFETY IS CHANGED
|
||||
|
||||
inline G4VIntersectionLocator* GetIntersectionLocator();
|
||||
inline void SetIntersectionLocator(G4VIntersectionLocator *pLocator );
|
||||
|
||||
public: // without description
|
||||
|
||||
// The following methods are obsolete and will not work --
|
||||
// as they have been replaced by the same methods in G4FieldManager
|
||||
// since Geant4 4.0
|
||||
inline G4double GetDeltaIntersection() const;
|
||||
inline G4double GetDeltaOneStep() const;
|
||||
inline void SetAccuraciesWithDeltaOneStep( G4double deltaOneStep );
|
||||
inline void SetDeltaIntersection( G4double deltaIntersection );
|
||||
inline void SetDeltaOneStep( G4double deltaOneStep );
|
||||
|
||||
public: // without description
|
||||
// The above 5 methods are obsolete and will not work, as they have been
|
||||
// replaced by the same methods in G4FieldManager since Geant4 4.0 ...
|
||||
|
||||
inline G4FieldManager* GetCurrentFieldManager();
|
||||
inline void SetNavigatorForPropagating( G4Navigator *SimpleOrMultiNavigator );
|
||||
inline G4Navigator* GetNavigatorForPropagating();
|
||||
|
||||
public: // no description
|
||||
|
||||
inline void SetThresholdNoZeroStep( G4int noAct,
|
||||
G4int noHarsh,
|
||||
G4int noAbandon );
|
||||
inline G4int GetThresholdNoZeroSteps( G4int i );
|
||||
|
||||
public: // with description
|
||||
//
|
||||
void SetTrajectoryFilter(G4VCurvedTrajectoryFilter* filter);
|
||||
// Set the filter that examines & stores 'intermediate'
|
||||
// curved trajectory points. Currently only position is stored.
|
||||
|
||||
std::vector<G4ThreeVector>* GimmeTrajectoryVectorAndForgetIt() const;
|
||||
// Access the points which have passed by the filter.
|
||||
// Responsibility for deleting the points lies with the client.
|
||||
// This method MUST BE called exactly ONCE per step.
|
||||
|
||||
void ClearPropagatorState();
|
||||
// Clear all the State of this class and its current associates
|
||||
// --> the current field manager & chord finder will also be called
|
||||
|
||||
inline void SetDetectorFieldManager( G4FieldManager* newGlobalFieldManager );
|
||||
// Update this (dangerous) state -- for the time being
|
||||
|
||||
inline void SetUseSafetyForOptimization( G4bool );
|
||||
inline G4bool GetUseSafetyForOptimization();
|
||||
// Toggle & view parameter for using safety to discard
|
||||
// unneccesary calls to navigator (thus 'optimising' performance)
|
||||
|
||||
protected: // with description
|
||||
|
||||
G4bool LocateIntersectionPoint(
|
||||
const G4FieldTrack& curveStartPointTangent, // A
|
||||
const G4FieldTrack& curveEndPointTangent, // B
|
||||
const G4ThreeVector& trialPoint, // E
|
||||
G4FieldTrack& intersectPointTangent, // Output
|
||||
G4bool& recalculatedEndPoint); // Out:
|
||||
|
||||
// If such an intersection exists, this function
|
||||
// calculate the intersection point of the true path of the particle
|
||||
// with the surface of the current volume (or of one of its daughters).
|
||||
// (Should use lateral displacement as measure of convergence).
|
||||
|
||||
G4bool IntersectChord( G4ThreeVector StartPointA,
|
||||
G4ThreeVector EndPointB,
|
||||
G4double &NewSafety,
|
||||
G4double &LinearStepLength,
|
||||
G4ThreeVector &IntersectionPoint);
|
||||
// Intersect the chord from StartPointA to EndPointB
|
||||
// and return whether an intersection occurred
|
||||
|
||||
G4FieldTrack ReEstimateEndpoint( const G4FieldTrack &CurrentStateA,
|
||||
const G4FieldTrack &EstimtdEndStateB,
|
||||
G4double linearDistSq,
|
||||
G4double curveDist);
|
||||
// Return new estimate for state after curveDist
|
||||
// starting from CurrentStateA, to replace EstimtdEndStateB,
|
||||
// (and report displacement -- if field is compiled verbose.)
|
||||
|
||||
void PrintStepLengthDiagnostic( G4double currentProposedStepLength,
|
||||
G4double decreaseFactor,
|
||||
G4double stepTrial,
|
||||
const G4FieldTrack& aFieldTrack);
|
||||
private:
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// DATA Members
|
||||
// ----------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------
|
||||
// DATA Members
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
G4FieldManager *fDetectorFieldMgr;
|
||||
// The Field Manager of the whole Detector. (default)
|
||||
@@ -223,7 +201,7 @@ class G4PropagatorInField
|
||||
// The Field Manager of the current volume (may be the one above.)
|
||||
|
||||
G4Navigator *fNavigator;
|
||||
|
||||
|
||||
// STATE information
|
||||
// -----------------
|
||||
|
||||
@@ -265,21 +243,18 @@ class G4PropagatorInField
|
||||
G4double kCarTolerance;
|
||||
// Geometrical tolerance defining surface thickness
|
||||
|
||||
private:
|
||||
G4VIntersectionLocator *fIntersectionLocator;
|
||||
G4bool fAllocatedLocator;
|
||||
// Used to Intersection Locator
|
||||
|
||||
static const G4int max_depth=4;
|
||||
G4FieldTrack* ptrInterMedFT[max_depth+1];
|
||||
// Used to store intermediate values of tracks in case of
|
||||
// too slow progress
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
G4VCurvedTrajectoryFilter* fpTrajectoryFilter;
|
||||
// The filter encapsulates the algorithm which selects which
|
||||
// intermediate points should be stored in a trajectory.
|
||||
// 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)
|
||||
G4VCurvedTrajectoryFilter* fpTrajectoryFilter;
|
||||
// The filter encapsulates the algorithm which selects which
|
||||
// intermediate points should be stored in a trajectory.
|
||||
// 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)
|
||||
};
|
||||
|
||||
// ********************************************************************
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PropagatorInField.icc,v 1.10 2006/11/13 17:34:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4PropagatorInField.icc,v 1.13 2008/10/29 14:31:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -145,7 +145,6 @@ G4int G4PropagatorInField::GetVerboseLevel() const
|
||||
{
|
||||
return fVerboseLevel;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PropagatorInField::Verbose() const // Obsolete
|
||||
{
|
||||
@@ -267,3 +266,31 @@ G4Navigator* G4PropagatorInField::GetNavigatorForPropagating()
|
||||
{
|
||||
return fNavigator;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::
|
||||
SetIntersectionLocator( G4VIntersectionLocator *pIntLoc )
|
||||
{
|
||||
if(pIntLoc) { fIntersectionLocator= pIntLoc; }
|
||||
}
|
||||
|
||||
inline
|
||||
G4VIntersectionLocator* G4PropagatorInField::GetIntersectionLocator()
|
||||
{
|
||||
return fIntersectionLocator;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4PropagatorInField::IntersectChord( G4ThreeVector StartPointA,
|
||||
G4ThreeVector EndPointB,
|
||||
G4double &NewSafety,
|
||||
G4double &LinearStepLength,
|
||||
G4ThreeVector &IntersectionPoint )
|
||||
{
|
||||
// Calculate the direction and length of the chord AB
|
||||
//
|
||||
return fIntersectionLocator
|
||||
->IntersectChord(StartPointA,EndPointB,NewSafety,
|
||||
fPreviousSafety,fPreviousSftOrigin,
|
||||
LinearStepLength,IntersectionPoint);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RegularNavigation.hh,v 1.2 2007/10/18 14:18:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4RegularNavigation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ReplicaNavigation.hh,v 1.6 2007/05/18 07:31:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ReplicaNavigation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ReplicaNavigation.icc,v 1.5 2006/06/29 18:36:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4ReplicaNavigation Inline implementation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SafetyHelper.hh,v 1.7 2007/05/02 15:32:13 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4SafetyHelper
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SimpleLocator.hh,v 1.2 2008/10/29 14:31:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4SimpleLocator
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// Implementing the calculation of the intersection point with a boundary when
|
||||
// PropagationInField is used. Derived from method LocateIntersectionPoint()
|
||||
// from G4PropagatorInField, it is based on a linear method for finding the
|
||||
// intersection point; the difference compared to G4MultiLevelLocator is that
|
||||
// no 'depth' algorithm is used in case of slow progress for finding the
|
||||
// intersection point.
|
||||
|
||||
// History:
|
||||
// -------
|
||||
// 27.10.08 - Tatiana Nikitina: Derived from LocateIntersectionPoint() from
|
||||
// G4PropagatorInField class
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4SIMPLELOCATOR_HH
|
||||
#define G4SIMPLELOCATOR_HH
|
||||
|
||||
#include "G4VIntersectionLocator.hh"
|
||||
|
||||
class G4SimpleLocator : public G4VIntersectionLocator
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4SimpleLocator(G4Navigator *theNavigator);
|
||||
// Constructor
|
||||
~G4SimpleLocator();
|
||||
// Default destructor
|
||||
|
||||
G4bool EstimateIntersectionPoint(
|
||||
const G4FieldTrack& curveStartPointTangent, // A
|
||||
const G4FieldTrack& curveEndPointTangent, // B
|
||||
const G4ThreeVector& trialPoint, // E
|
||||
G4FieldTrack& intersectPointTangent, // Output
|
||||
G4bool& recalculatedEndPoint, // Out
|
||||
G4double& fPreviousSafety, // In/Out
|
||||
G4ThreeVector& fPreviousSftOrigin); // In/Out
|
||||
// If such an intersection exists, this function calculates the
|
||||
// intersection point of the true path of the particle with the surface
|
||||
// of the current volume (or of one of its daughters).
|
||||
// Should use lateral displacement as measure of convergence
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransportationManager.hh,v 1.12 2007/04/20 15:28:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// class G4TransportationManager
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TransportationManager.icc,v 1.10 2007/04/20 15:28:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 inlined function members implementation
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIntersectionLocator.hh,v 1.4 2008/11/14 18:26:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4VIntersectionLocator
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// Base class for the calculation of the intersection point with a boundary
|
||||
// when PropagationInField is used.
|
||||
// Gives possibility to choose the method of intersection; concrete locators
|
||||
// implemented are: G4SimpleLocator, G4MultiLevelLocator, G4BrentLocator.
|
||||
//
|
||||
// Key Method: EstimateIntersectionPoint()
|
||||
|
||||
// History:
|
||||
// -------
|
||||
// 27.10.08 - John Apostolakis, Tatiana Nikitina: Design and implementation
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4VINTERSECTIONLOCATOR_HH
|
||||
#define G4VINTERSECTIONLOCATOR_HH
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4FieldTrack.hh"
|
||||
|
||||
#include "G4Navigator.hh"
|
||||
#include "G4ChordFinder.hh"
|
||||
|
||||
class G4VIntersectionLocator
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4VIntersectionLocator(G4Navigator *theNavigator);
|
||||
// Constructor
|
||||
virtual ~G4VIntersectionLocator();
|
||||
// Default destructor
|
||||
|
||||
virtual G4bool EstimateIntersectionPoint(
|
||||
const G4FieldTrack& curveStartPointTangent, // A
|
||||
const G4FieldTrack& curveEndPointTangent, // B
|
||||
const G4ThreeVector& trialPoint, // E
|
||||
G4FieldTrack& intersectPointTangent, // Output
|
||||
G4bool& recalculatedEndPoint, // Out
|
||||
G4double& fPreviousSafety, // In/Out
|
||||
G4ThreeVector& fPreviousSftOrigin) = 0; // In/Out
|
||||
// If such an intersection exists, this function calculates the
|
||||
// intersection point of the true path of the particle with the surface
|
||||
// of the current volume (or of one of its daughters).
|
||||
// Should use lateral displacement as measure of convergence
|
||||
// NOTE: changes the safety!
|
||||
|
||||
void printStatus( const G4FieldTrack& startFT,
|
||||
const G4FieldTrack& currentFT,
|
||||
G4double requestStep,
|
||||
G4double safety,
|
||||
G4int step);
|
||||
// Print Method, useful mostly for debugging
|
||||
|
||||
inline G4bool IntersectChord( G4ThreeVector StartPointA,
|
||||
G4ThreeVector EndPointB,
|
||||
G4double &NewSafety,
|
||||
G4double &fPreviousSafety, // In/Out
|
||||
G4ThreeVector &fPreviousSftOrigin, // In/Out
|
||||
G4double &LinearStepLength,
|
||||
G4ThreeVector &IntersectionPoint);
|
||||
// Intersect the chord from StartPointA to EndPointB and return
|
||||
// whether an intersection occurred. NOTE: changes the Safety!
|
||||
|
||||
public: // without description
|
||||
|
||||
// inline Set/Get methods used for IntersctionLocator
|
||||
|
||||
inline G4double GetDeltaIntersectionFor();
|
||||
inline G4double GetEpsilonStepFor();
|
||||
inline G4Navigator* GetNavigatorFor();
|
||||
inline G4ChordFinder* GetChordFinderFor();
|
||||
inline G4int GetVerboseFor();
|
||||
|
||||
inline void SetEpsilonStepFor( G4double EpsilonStep );
|
||||
inline void SetDeltaIntersectionFor( G4double deltaIntersection );
|
||||
inline void SetNavigatorFor( G4Navigator *fNavigator );
|
||||
inline void SetChordFinderFor(G4ChordFinder *fCFinder );
|
||||
inline void SetSafetyParametersFor(G4bool UseSafety );
|
||||
inline void SetVerboseFor(G4int fVerbose);
|
||||
|
||||
inline void AddAdjustementOfFoundIntersection(G4bool UseCorrection);
|
||||
inline G4bool GetAdjustementOfFoundIntersection();
|
||||
|
||||
protected: // with description
|
||||
|
||||
G4FieldTrack ReEstimateEndpoint( const G4FieldTrack &CurrentStateA,
|
||||
const G4FieldTrack &EstimtdEndStateB,
|
||||
G4double linearDistSq,
|
||||
G4double curveDist);
|
||||
// Return new estimate for state after curveDist starting from
|
||||
// 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
|
||||
|
||||
G4bool AdjustmentOfFoundIntersection(const G4ThreeVector &A,
|
||||
const G4ThreeVector &CurrentE_Point,
|
||||
const G4ThreeVector &CurrentF_Point,
|
||||
const G4ThreeVector &MomentumDir,
|
||||
const G4bool IntersectAF,
|
||||
G4ThreeVector &IntersectionPoint,
|
||||
G4double &NewSafety,
|
||||
G4double &fPrevSafety,
|
||||
G4ThreeVector &fPrevSftOrigin );
|
||||
// Optional method for adjustment of located intersection point
|
||||
// using the surface-normal
|
||||
|
||||
protected:
|
||||
|
||||
G4double kCarTolerance;
|
||||
G4int fVerboseLevel;
|
||||
// For verbose purposes
|
||||
G4bool fUseNormalCorrection;
|
||||
|
||||
G4double fiEpsilonStep;
|
||||
G4double fiDeltaIntersection;
|
||||
G4Navigator *fiNavigator;
|
||||
G4ChordFinder *fiChordFinder;
|
||||
G4bool fiUseSafety;
|
||||
// For passing the parameters from G4PropagatorInField
|
||||
|
||||
G4Navigator *fHelpingNavigator;
|
||||
// Helper for location
|
||||
};
|
||||
|
||||
#include "G4VIntersectionLocator.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,167 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VIntersectionLocator.icc,v 1.3 2008/11/14 18:26:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4VIntersectionLocator inline methods
|
||||
//
|
||||
// 27.10.07 - John Apostolakis, Tatiana Nikitina
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
inline G4double G4VIntersectionLocator::GetDeltaIntersectionFor()
|
||||
{
|
||||
return fiDeltaIntersection;
|
||||
}
|
||||
|
||||
inline G4double G4VIntersectionLocator::GetEpsilonStepFor()
|
||||
{
|
||||
return fiEpsilonStep;
|
||||
}
|
||||
|
||||
inline G4Navigator* G4VIntersectionLocator::GetNavigatorFor()
|
||||
{
|
||||
return fiNavigator;
|
||||
}
|
||||
|
||||
inline G4ChordFinder* G4VIntersectionLocator::GetChordFinderFor()
|
||||
{
|
||||
return fiChordFinder;
|
||||
}
|
||||
|
||||
inline G4int G4VIntersectionLocator::GetVerboseFor()
|
||||
{
|
||||
return fVerboseLevel;
|
||||
}
|
||||
|
||||
inline G4bool G4VIntersectionLocator::GetAdjustementOfFoundIntersection()
|
||||
{
|
||||
return fUseNormalCorrection;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::
|
||||
AddAdjustementOfFoundIntersection(G4bool UseCorrection )
|
||||
{
|
||||
fUseNormalCorrection=UseCorrection;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::SetEpsilonStepFor( G4double EpsilonStep )
|
||||
{
|
||||
fiEpsilonStep=EpsilonStep;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::
|
||||
SetDeltaIntersectionFor( G4double deltaIntersection )
|
||||
{
|
||||
fiDeltaIntersection=deltaIntersection;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::SetNavigatorFor( G4Navigator *fNavigator )
|
||||
{
|
||||
fiNavigator=fNavigator;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::SetChordFinderFor(G4ChordFinder *fCFinder )
|
||||
{
|
||||
fiChordFinder=fCFinder;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::SetSafetyParametersFor(G4bool UseSafety )
|
||||
{
|
||||
fiUseSafety=UseSafety;
|
||||
}
|
||||
|
||||
inline void G4VIntersectionLocator::SetVerboseFor(G4int fVerbose)
|
||||
{
|
||||
fVerboseLevel=fVerbose;
|
||||
}
|
||||
|
||||
inline G4bool
|
||||
G4VIntersectionLocator::IntersectChord( G4ThreeVector StartPointA,
|
||||
G4ThreeVector EndPointB,
|
||||
G4double &NewSafety,
|
||||
G4double &fPreviousSafety,
|
||||
G4ThreeVector &fPreviousSftOrigin,
|
||||
G4double &LinearStepLength,
|
||||
G4ThreeVector &IntersectionPoint )
|
||||
{
|
||||
// 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 ;
|
||||
G4double MagSqShift = OriginShift.mag2() ;
|
||||
G4double currentSafety;
|
||||
G4bool doCallNav= false;
|
||||
|
||||
if( MagSqShift >= sqr(fPreviousSafety) )
|
||||
{
|
||||
currentSafety = 0.0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentSafety = fPreviousSafety - std::sqrt(MagSqShift) ;
|
||||
}
|
||||
|
||||
if( fiUseSafety && (ChordAB_Length <= currentSafety) )
|
||||
{
|
||||
// The Step is guaranteed to be taken
|
||||
|
||||
LinearStepLength = ChordAB_Length;
|
||||
intersects = false;
|
||||
NewSafety= currentSafety;
|
||||
}
|
||||
else
|
||||
{
|
||||
doCallNav= true;
|
||||
// Check whether any volumes are encountered by the chord AB
|
||||
|
||||
LinearStepLength = GetNavigatorFor()->ComputeStep( StartPointA,
|
||||
ChordAB_Dir, ChordAB_Length, NewSafety );
|
||||
intersects = (LinearStepLength <= ChordAB_Length);
|
||||
|
||||
// G4Navigator contracts to return k_infinity if len==asked
|
||||
// and it did not find a surface boundary at that length
|
||||
|
||||
LinearStepLength = std::min( LinearStepLength, ChordAB_Length);
|
||||
|
||||
// Save the last calculated safety!
|
||||
|
||||
fPreviousSftOrigin = StartPointA;
|
||||
fPreviousSafety= NewSafety;
|
||||
|
||||
if( intersects )
|
||||
{
|
||||
// Intersection Point of chord AB and either volume A's surface
|
||||
// or a daughter volume's surface ..
|
||||
IntersectionPoint = StartPointA + LinearStepLength * ChordAB_Dir;
|
||||
}
|
||||
}
|
||||
return intersects;
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VoxelNavigation.hh,v 1.5 2007/05/11 13:43:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4VoxelNavigation
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VoxelNavigation.icc,v 1.4 2006/06/29 18:36:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// class G4VoxelNavigation Inline implementation
|
||||
|
||||
Reference in New Issue
Block a user