Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4AuxiliaryNavServices.hh,v 1.3.4.1 2001/06/28 19:09:37 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4AuxiliaryNavServices.hh,v 1.4 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4NormalNavigation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4AuxiliaryNavServices.icc,v 1.3.2.1 2001/06/28 19:09:37 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4AuxiliaryNavServices.icc,v 1.4 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4AuxiliaryNavServices Inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BlockingList.hh,v 1.5.2.1 2001/06/28 19:09:37 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4BlockingList.hh,v 1.6 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// class G4BlockingList
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BlockingList.icc,v 1.4.2.1 2001/06/28 19:09:37 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4BlockingList.icc,v 1.5 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4BlockingList Inlined Implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GRSSolid.hh,v 1.4.4.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GRSSolid.hh,v 1.5 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4GRSSolid
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GRSSolid.icc,v 1.4.4.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GRSSolid.icc,v 1.5 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4GRSSolid inline implementation
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4GRSSolidHandle.hh,v 1.3 2001/11/06 17:08:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Class G4TouchableHandle
//
// Class description:
//
// Type providing reference counting mechanism for any kind of touchable
// objects.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek, CERN (Radovan.Chytracek@cern.ch)
// Version: 1.0
// Date: March 2001
// ----------------------------------------------------------------------
#ifndef _G4GRSSOLIDHANDLE_H_
#define _G4GRSSOLIDHANDLE_H_ 1
#include "G4GRSSolid.hh"
#include "G4ReferenceCountedHandle.hh"
typedef G4ReferenceCountedHandle<G4GRSSolid> G4GRSSolidHandle;
#endif // _G4GRSSOLIDHANDLE_H_
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GRSVolume.hh,v 1.4.4.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GRSVolume.hh,v 1.5 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4GRSVolume
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GRSVolume.icc,v 1.5.4.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GRSVolume.icc,v 1.6 2001/07/11 10:00:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4GRSVolume inline implementation
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4GRSVolumeHandle.hh,v 1.3 2001/11/06 17:08:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Class G4TouchableHandle
//
// Class description:
//
// Type providing reference counting mechanism for any kind of touchable
// objects.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek, CERN (Radovan.Chytracek@cern.ch)
// Version: 1.0
// Date: March 2001
// ----------------------------------------------------------------------
#ifndef _G4GRSVOLUMEHANDLE_H_
#define _G4GRSVOLUMEHANDLE_H_ 1
#include "G4GRSVolume.hh"
#include "G4ReferenceCountedHandle.hh"
typedef G4ReferenceCountedHandle<G4GRSVolume> G4GRSVolumeHandle;
#endif // _G4GRSVOLUMEHANDLE_H_
@@ -0,0 +1,90 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4GeometryMessenger.hh,v 1.2 2001/10/24 18:10:38 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
//
// G4GeometryMessenger
//
// Class description:
//
// A messenger defining commands for debugging, verifying
// and controlling the detector geometry and navigation.
// Author: G.Cosmo, CERN.
#ifndef G4GeometryMessenger_hh
#define G4GeometryMessenger_hh
#include "globals.hh"
#include "G4UImessenger.hh"
#include "G4ThreeVector.hh"
class G4UIdirectory;
class G4UIcommand;
class G4UIcmdWith3VectorAndUnit;
class G4UIcmdWith3Vector;
class G4UIcmdWithoutParameter;
class G4UIcmdWithABool;
class G4UIcmdWithADoubleAndUnit;
class G4TransportationManager;
class G4GeometryMessenger : public G4UImessenger
{
public: // with description
G4GeometryMessenger(G4TransportationManager* tman);
~G4GeometryMessenger();
// Constructor and destructor
void SetNewValue( G4UIcommand* command, G4String newValues );
G4String GetCurrentValue( G4UIcommand* command );
protected:
void ResetNavigator();
void RunTest();
G4UIdirectory *geodir, *navdir, *testdir;
G4UIcmdWith3VectorAndUnit *posCmd, *dirCmd;
G4UIcmdWithoutParameter *runCmd, *resCmd;
G4UIcmdWithABool *addCmd;
G4UIcmdWithADoubleAndUnit *tolCmd;
private:
G4bool geometryOpened;
G4ThreeVector x, p;
G4bool extra, newtol;
G4double tol;
private:
G4TransportationManager* tmanager;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LogicalBorderSurface.hh,v 1.6.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4LogicalBorderSurface.hh,v 1.7 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
////////////////////////////////////////////////////////////////////////
// class G4LogicalBorderSurface
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LogicalBorderSurface.icc,v 1.3.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4LogicalBorderSurface.icc,v 1.4 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4LogicalBorderSurface inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LogicalSkinSurface.hh,v 1.6.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4LogicalSkinSurface.hh,v 1.7 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
////////////////////////////////////////////////////////////////////////
// class G4LogicalSkinSurface
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LogicalSkinSurface.icc,v 1.3.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4LogicalSkinSurface.icc,v 1.4 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4LogicalSkinSurface inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationHistory.hh,v 1.8.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationHistory.hh,v 1.9 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// class G4NavigationHistory
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationHistory.icc,v 1.4.2.1 2001/06/28 19:09:38 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationHistory.icc,v 1.5 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4NavigationHistory Inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevel.hh,v 1.12.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationLevel.hh,v 1.13 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// class G4NavigationLevel
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevel.icc,v 1.10.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationLevel.icc,v 1.11 2001/07/11 10:00:28 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// 30.09.97 J.Apostolakis Initial version.
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevelRep.hh,v 1.5.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationLevelRep.hh,v 1.6 2001/07/11 10:00:29 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// class G4NavigationLevelRep
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NavigationLevelRep.icc,v 1.4.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NavigationLevelRep.icc,v 1.5 2001/07/11 10:00:29 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// 1 October 1997 J.Apostolakis Initial version.
//
+43 -27
View File
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: G4Navigator.hh,v 1.6.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Navigator.hh,v 1.15 2001/12/06 09:35:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//
// class G4Navigator
//
// Class description:
@@ -100,7 +100,8 @@
#include "G4GRSVolume.hh"
#include "G4GRSSolid.hh"
#include "G4TouchableHistory.hh"
#include "G4TouchableHandle.hh"
#include "G4TouchableHistoryHandle.hh"
#include "G4NavigationHistory.hh"
#include "G4NormalNavigation.hh"
@@ -139,12 +140,14 @@ class G4Navigator
// is returned together with the computed isotropic safety
// distance. Geometry must be closed.
G4VPhysicalVolume* LocateGlobalPointAndSetup(const G4ThreeVector &p,
const G4TouchableHistory &h);
inline G4VPhysicalVolume* LocateGlobalPointAndSetup(const G4ThreeVector &point,
const G4ThreeVector &direction,
const G4TouchableHistory &h);
G4VPhysicalVolume* LocateGlobalPointAndSetup(const G4ThreeVector& point,
const G4ThreeVector* direction=0,
const G4bool pRelativeSearch=true);
const G4ThreeVector* direction=0,
const G4bool pRelativeSearch=true,
const G4bool ignoreDirection=true);
// Search the geometrical hierarchy for the volumes deepest in the hierarchy
// containing the point in the global coordinate space. Two main cases are:
// i) If pRelativeSearch=false it makes use of no previous/state
@@ -154,10 +157,12 @@ class G4Navigator
// hierarchy at the location of the last located point, or the endpoint of
// the previous Step if SetGeometricallyLimitedStep() has been called
// immediately before.
// The direction is used (to check if a volume is entered) only if
// the Navigator has determined that it is on an edge shared by two or more
// volumes. (This is state information.)
// The geometry must be closed.
// The direction is used (to check if a volume is entered) if either
// - the argument ignoreDirection is false, or
// - the Navigator has determined that it is on an edge shared by two or more
// volumes. (This is state information.)
//
// Important Note: In order to call this the geometry MUST be closed.
void LocateGlobalPointWithinVolume( const G4ThreeVector& position);
// Notify the Navigator that a track has moved to the new Global point
@@ -168,10 +173,10 @@ class G4Navigator
// same volume as the previous position. Usually this can be guaranteed
// only if the point is within safety.
inline void LocateGlobalPointAndUpdateTouchable(
void LocateGlobalPointAndUpdateTouchableHandle(
const G4ThreeVector& position,
const G4ThreeVector& direction,
G4VTouchable* touchableToUpdate,
G4TouchableHandle& oldTouchableToUpdate,
const G4bool RelativeSearch =true);
// First, search the geometrical hierarchy like the above method
// LocateGlobalPointAndSetup(). Then use the volume found and its
@@ -179,7 +184,16 @@ class G4Navigator
inline void LocateGlobalPointAndUpdateTouchable(
const G4ThreeVector& position,
G4VTouchable* touchableToUpdate,
const G4ThreeVector& direction,
G4VTouchable* touchableToUpdate,
const G4bool RelativeSearch =true);
// First, search the geometrical hierarchy like the above method
// LocateGlobalPointAndSetup(). Then use the volume found and its
// navigation history to update the touchable.
inline void LocateGlobalPointAndUpdateTouchable(
const G4ThreeVector& position,
G4VTouchable* touchableToUpdate,
const G4bool RelativeSearch =true);
// Old version (missing direction).
// Not recommended replace with newer version above.
@@ -211,20 +225,23 @@ class G4Navigator
// system of the volume that was found by LocalGlobalPointAndSetup.
// The Local Coordinates of point in world coordinate system.
G4ThreeVector NetTranslation() const;
G4RotationMatrix NetRotation() const;
inline G4ThreeVector NetTranslation() const;
inline G4RotationMatrix NetRotation() const;
// Compute+return the local->global translation/rotation of current volume.
inline G4VPhysicalVolume* GetWorldVolume() const;
// Return the current world (`topmost') volume.
void SetWorldVolume(G4VPhysicalVolume* pWorld);
inline void SetWorldVolume(G4VPhysicalVolume* pWorld);
// Set the world (`topmost') volume. This must be positioned at
// origin (0,0,0) and unrotated.
G4GRSVolume* CreateGRSVolume() const;
G4GRSSolid* CreateGRSSolid() const;
G4TouchableHistory* CreateTouchableHistory() const;
inline G4GRSVolume* CreateGRSVolume() const;
inline G4GRSSolid* CreateGRSSolid() const;
inline G4TouchableHistory* CreateTouchableHistory() const;
// `Touchable' creation methods: caller has deletion responsibility.
G4TouchableHistoryHandle CreateTouchableHistoryHandle() const;
// `Touchable' creation methods: caller has deletion responsibility.
inline G4bool IsExitNormalValid();
@@ -251,7 +268,7 @@ class G4Navigator
// This function takes full care about how to calculate this normal,
// but if the surfaces are not convex it will return valid=false.
G4bool EnteredDaughterVolume();
inline G4bool EnteredDaughterVolume();
// The purpose of this function is to inform the caller if the track is
// entering a daughter volume while exiting from the current volume.
// This method returns
@@ -261,10 +278,8 @@ class G4Navigator
// This function is not guaranteed to work if SetGeometricallyLimitedStep()
// was not called when it should have been called.
// G4bool ExitedMotherVolume();
G4int GetVerboseLevel();
void SetVerboseLevel(G4int level);
inline G4int GetVerboseLevel();
inline void SetVerboseLevel(G4int level);
// Get/Set Verbose(ness) level.
// [if level>0 && G4VERBOSE, printout can occur]
@@ -273,12 +288,13 @@ class G4Navigator
// The level of detail is according to the verbosity.
inline const G4AffineTransform& GetGlobalToLocalTransform() const;
const G4AffineTransform GetLocalToGlobalTransform() const;
inline const G4AffineTransform GetLocalToGlobalTransform() const;
// Obtain the transformations Global/Local (and inverse).
// Clients of these methods must copy the data if they need to keep it.
protected: // with description
inline void ResetState();
inline void ResetStackAndState();
// Reset stack and minimum or navigator state machine necessary for reset
// as needed by LocalGlobalPointAndSetup.
+166 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Navigator.icc,v 1.3.4.1 2001/06/28 19:09:39 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Navigator.icc,v 1.8 2001/12/04 16:49:51 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4Navigator Inline implementation
@@ -61,6 +61,26 @@ G4VPhysicalVolume* G4Navigator::GetWorldVolume() const
return fTopPhysical;
}
// Set the world (`topmost') volume
//
inline
void G4Navigator::SetWorldVolume(G4VPhysicalVolume* pWorld)
{
// Setup the volume
pWorld->Setup(0); // No mother since world volume
if (!(pWorld->GetTranslation()==G4ThreeVector(0,0,0)))
{
G4Exception ("G4Navigator::SetWorldVolume - Must be centred on origin");
}
const G4RotationMatrix* rm=pWorld->GetRotation();
if (rm&&(!rm->isIdentity()))
{
G4Exception ("G4Navigator::SetWorldVolume - Must not be rotated");
}
fTopPhysical=pWorld;
fHistory.SetFirstEntry(pWorld);
}
// Inform the navigator that the previous Step calculated
// by the geometry was taken in its entirety
//
@@ -73,19 +93,35 @@ void G4Navigator::SetGeometricallyLimitedStep()
// Reset stack and minimum of navigator state `machine'
//
inline
void G4Navigator::ResetStackAndState()
void G4Navigator::ResetState()
{
fHistory.Reset();
fWasLimitedByGeometry=false;
fEntering=false;
fExiting=false;
fLocatedOnEdge = false;
fLastStepWasZero= false;
fEnteredDaughter = false;
fExitedMother = false;
fValidExitNormal = false;
fExitNormal = G4ThreeVector(0,0,0);
fPreviousSftOrigin = G4ThreeVector(0,0,0);
fPreviousSafety = 0.0;
fBlockedPhysicalVolume=0;
fBlockedReplicaNo=-1;
}
// Reset stack and minimum of navigator state `machine'
//
inline
void G4Navigator::ResetStackAndState()
{
fHistory.Reset();
ResetState();
}
inline
EVolume G4Navigator::VolumeType(const G4VPhysicalVolume *pVol) const
{
@@ -165,6 +201,92 @@ const G4AffineTransform& G4Navigator::GetGlobalToLocalTransform() const
return fHistory.GetTopTransform();
}
// Return global to local transformation
//
inline
const G4AffineTransform G4Navigator::GetLocalToGlobalTransform() const
{
G4AffineTransform tempTransform;
tempTransform= fHistory.GetTopTransform().Inverse();
return tempTransform;
}
// Compute+return the local->global translation of current volume.
//
inline
G4ThreeVector G4Navigator::NetTranslation() const
{
G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
return tf.NetTranslation();
}
// Compute+return the local->global rotation of current volume.
//
inline
G4RotationMatrix G4Navigator::NetRotation() const
{
G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
return tf.NetRotation();
}
// `Touchable' creation method: caller has deletion responsibility.
//
inline
G4GRSVolume* G4Navigator::CreateGRSVolume() const
{
G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
return new G4GRSVolume(fHistory.GetTopVolume(),
tf.NetRotation(),
tf.NetTranslation());
}
// `Touchable' creation method: caller has deletion responsibility.
//
inline
G4GRSSolid* G4Navigator::CreateGRSSolid() const
{
G4AffineTransform tf(fHistory.GetTopTransform().Inverse());
return new G4GRSSolid(fHistory.GetTopVolume()->GetLogicalVolume()->GetSolid(),
tf.NetRotation(),
tf.NetTranslation());
}
// `Touchable' creation method: caller has deletion responsibility.
//
inline
G4TouchableHistory* G4Navigator::CreateTouchableHistory() const
{
return new G4TouchableHistory(fHistory);
}
// To inform the caller if the track is entering a daughter volume.
//
inline
G4bool G4Navigator::EnteredDaughterVolume()
{
return fEnteredDaughter;
}
// inline
// G4bool G4Navigator::ExitedVolume()
// {
// return fExitedCurrent;
// }
inline
G4VPhysicalVolume*
G4Navigator::LocateGlobalPointAndSetup(const G4ThreeVector &p,
const G4ThreeVector &direction,
const G4TouchableHistory &h
)
{
ResetState();
fHistory=*h.GetHistory();
SetupHierarchy();
return LocateGlobalPointAndSetup(p, &direction, true, false);
}
inline
void G4Navigator::LocateGlobalPointAndUpdateTouchable(
const G4ThreeVector& position,
@@ -187,3 +309,42 @@ void G4Navigator::LocateGlobalPointAndUpdateTouchable(
pPhysVol= LocateGlobalPointAndSetup( position, &direction, RelativeSearch);
touchableToUpdate->UpdateYourself( pPhysVol, &fHistory );
}
inline
void G4Navigator::LocateGlobalPointAndUpdateTouchableHandle(
const G4ThreeVector& position,
const G4ThreeVector& direction,
G4TouchableHandle& oldTouchableToUpdate,
const G4bool RelativeSearch )
{
// G4VPhysicalVolume* pPhysVol=LocateGlobalPointAndSetup( position, 0, RelativeSearch);
G4VPhysicalVolume* pPhysVol=LocateGlobalPointAndSetup( position, &direction, RelativeSearch);
if( fEnteredDaughter || fExitedMother )
{
oldTouchableToUpdate = CreateTouchableHistory();
if( pPhysVol == 0 ){
// We want to ensure that the touchable is correct in this case.
// The method below should do this and recalculate a lot more ....
oldTouchableToUpdate->UpdateYourself( pPhysVol, &fHistory );
}
}
return;
}
inline
G4TouchableHistoryHandle G4Navigator::CreateTouchableHistoryHandle() const
{
return G4TouchableHistoryHandle( CreateTouchableHistory() );
}
inline
G4int G4Navigator::GetVerboseLevel()
{
return fVerbose;
}
inline
void G4Navigator::SetVerboseLevel(G4int level)
{
fVerbose=level;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NormalNavigation.hh,v 1.3.4.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NormalNavigation.hh,v 1.4 2001/07/11 10:00:30 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4NormalNavigation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NormalNavigation.icc,v 1.3.4.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NormalNavigation.icc,v 1.4 2001/07/11 10:00:30 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4NormalNavigation Inline Implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParameterisedNavigation.hh,v 1.3.4.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParameterisedNavigation.hh,v 1.4 2001/07/11 10:00:30 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4ParameterisedNavigation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParameterisedNavigation.icc,v 1.3.4.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParameterisedNavigation.icc,v 1.4 2001/07/11 10:00:30 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4ParameterisedNavigation Inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PropagatorInField.hh,v 1.15.2.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PropagatorInField.hh,v 1.20 2001/12/08 00:07:23 japost Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4PropagatorInField
@@ -138,12 +138,22 @@ class G4PropagatorInField
inline G4double GetMinimumEpsilonStep() const;
inline void SetMinimumEpsilonStep(G4double newEpsMin);
inline void SetLargestAcceptableStep(G4double newBigDist);
inline G4double GetLargestAcceptableStep();
public: // without description
// void SetGlobalFieldMgr( G4FieldManager *detectorFieldMgr );
// The Field Manager of the Detector.
private:
inline G4FieldManager* GetCurrentFieldManager();
public: // no description
inline void SetThresholdNoZeroStep(G4int noAct, G4int noHarsh, G4int noAbandon);
inline G4int GetThresholdNoZeroSteps(G4int i);
protected:
G4bool LocateIntersectionPoint(
const G4FieldTrack& CurveStartPointTangent, // A
@@ -155,7 +165,12 @@ class G4PropagatorInField
// with the surface of the current volume (or of one of its daughters).
// (Should use lateral displacement as measure of convergence).
void PrintStepLengthDiagnostic(G4double CurrentProposedStepLength,
G4double decreaseFactor,
G4double stepTrial,
const G4FieldTrack& aFieldTrack);
// ----------------------------------------------------------------------
// DATA Members
// ----------------------------------------------------------------------
@@ -186,19 +201,24 @@ class G4PropagatorInField
// Values for the small possible relative accuracy of a step
// (corresponding to the greatest possible integration accuracy)
// Minimum for Relative accuracy of any Step
// Limits for the Relative accuracy of any Step
G4double fEpsilonMin;
static const G4double fEpsilonMinDefault; // 1.0e-10 ;
G4double fEpsilonMax;
static const G4double fEpsilonMinDefault; // Can be 1.0e-5 to 1.0e-10 ...
static const G4double fEpsilonMaxDefault; // Can be 1.0e-1 to 1.0e-3 ...
G4int fmax_loop_count;
// Variables to keep track of "abnormal" case - which causes loop
//
G4int fNoZeroStep; // Counter of zeroStep
G4int fThresholdNo_ZeroSteps; // Threshold: above this - action
G4int fActionThreshold_NoZeroSteps; // Threshold: above this - act
G4int fSevereActionThreshold_NoZeroSteps; // Threshold to act harshly
G4int fAbandonThreshold_NoZeroSteps; // Threshold to abandon
// G4double fMidPoint_CurveLen_of_LastAttempt= -1;
G4double fFull_CurveLen_of_LastAttempt;
G4double fLast_ProposedStepLength;
G4double fLargestAcceptableStep;
};
// Defines the constructor.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PropagatorInField.icc,v 1.18.2.2 2001/06/28 20:18:53 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PropagatorInField.icc,v 1.25 2001/12/08 00:07:24 japost Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------------------
@@ -48,15 +48,21 @@ G4PropagatorInField::G4PropagatorInField(G4Navigator *theNavigator,
End_PointAndTangent(G4ThreeVector(0.,0.,0.),
G4ThreeVector(0.,0.,0.),0.0,0.0,0.0,0.0,0.0),
fVerboseLevel(0),
fmax_loop_count(10000)
fEpsilonMin(fEpsilonMinDefault),
fEpsilonMax(fEpsilonMaxDefault),
fmax_loop_count(10000),
fNoZeroStep(0)
{
// this->fChordFinder = new G4ChordFinder( (G4MagneticField*)0, 1e-6 );
fNoZeroStep=0;
fThresholdNo_ZeroSteps= 2;
fActionThreshold_NoZeroSteps= 2;
fSevereActionThreshold_NoZeroSteps= 10;
fAbandonThreshold_NoZeroSteps= 50;
// fMidPoint_CurveLen_of_LastAttempt= -1;
fFull_CurveLen_of_LastAttempt= -1;
fLast_ProposedStepLength= -1;
fLargestAcceptableStep= 1000.0 * meter;
}
inline
@@ -186,3 +192,39 @@ void G4PropagatorInField::SetMinimumEpsilonStep(G4double newEpsMin)
if( (newEpsMin > 0.0) && (fabs(1.0+newEpsMin)>1.0) )
fEpsilonMin= newEpsMin;
}
inline void G4PropagatorInField::SetLargestAcceptableStep(G4double newBigDist)
{if(fLargestAcceptableStep>0.0) fLargestAcceptableStep= newBigDist; }
inline G4double G4PropagatorInField::GetLargestAcceptableStep()
{return fLargestAcceptableStep;}
inline G4FieldManager* G4PropagatorInField::GetCurrentFieldManager()
{ return fCurrentFieldMgr; }
inline void G4PropagatorInField::SetThresholdNoZeroStep( G4int noAct, G4int noHarsh, G4int noAbandon)
{
if(noAct>0)
fActionThreshold_NoZeroSteps= noAct;
if( noHarsh > fActionThreshold_NoZeroSteps)
fSevereActionThreshold_NoZeroSteps= noHarsh;
else
fSevereActionThreshold_NoZeroSteps= 2*(fActionThreshold_NoZeroSteps+1);
if( noAbandon > fSevereActionThreshold_NoZeroSteps+5)
fAbandonThreshold_NoZeroSteps= noAbandon;
else
fAbandonThreshold_NoZeroSteps= 2*(fSevereActionThreshold_NoZeroSteps+3);
}
inline G4int G4PropagatorInField::GetThresholdNoZeroSteps(G4int i)
{
G4int t=0;
if( i==0 ) { t = 3; } // No of parameters
else if (i==1) { t = fActionThreshold_NoZeroSteps; }
else if (i==2) { t = fSevereActionThreshold_NoZeroSteps; }
else if (i==3) { t = fAbandonThreshold_NoZeroSteps; }
return t;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ReplicaNavigation.hh,v 1.3.4.1 2001/06/28 19:09:40 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ReplicaNavigation.hh,v 1.4 2001/07/11 10:00:30 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4ReplicaNavigation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ReplicaNavigation.icc,v 1.4.2.1 2001/06/28 19:09:41 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ReplicaNavigation.icc,v 1.5 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4ReplicaNavigation Inline implementation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TouchableHistory.hh,v 1.4.4.1 2001/06/28 19:09:41 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TouchableHistory.hh,v 1.5 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4TouchableHistory
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TouchableHistory.icc,v 1.5.4.1 2001/06/28 19:09:41 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TouchableHistory.icc,v 1.6 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4TouchableHistory inline implementation
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4TouchableHistoryHandle.hh,v 1.3 2001/11/06 17:08:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Class G4TouchableHandle
//
// Class description:
//
// A type providing reference counting mechanism for any kind of touchable
// history objects.
// The basic rule for the use of this type is that this handle must always
// be exchanged by reference never dinamically allocated (i.e. never
// instantiated using 'new').
//
// For more details see G4ReferenceCountedHandle.
// Author: Radovan Chytracek, CERN (Radovan.Chytracek@cern.ch)
// Version: 1.0
// Date: March 2001
// ----------------------------------------------------------------------
#ifndef _G4TOUCHABLEHISTORYHANDLE_H_
#define _G4TOUCHABLEHISTORYHANDLE_H_ 1
#include "G4TouchableHistory.hh"
#include "G4ReferenceCountedHandle.hh"
typedef G4ReferenceCountedHandle<G4TouchableHistory> G4TouchableHistoryHandle;
#endif // _G4TOUCHABLEHISTORYHANDLE_H_
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.hh,v 1.5.4.1 2001/06/28 19:09:41 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TransportationManager.hh,v 1.7 2001/10/24 15:33:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// class G4TransportationManager
//
@@ -45,6 +45,7 @@
#include "G4Navigator.hh"
class G4PropagatorInField;
class G4GeometryMessenger;
class G4FieldManager;
class G4TransportationManager
@@ -72,6 +73,7 @@ class G4TransportationManager
G4Navigator* fNavigatorForTracking ;
G4PropagatorInField* fPropagatorInField;
G4FieldManager* fFieldManager;
G4GeometryMessenger* fGeomMessenger;
static G4TransportationManager* fTransportationManager;
};
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TransportationManager.icc,v 1.4.4.1 2001/06/28 19:09:42 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TransportationManager.icc,v 1.5 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// ------------------------------------------------------------
// GEANT 4 inlined function members implementation
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VoxelNavigation.hh,v 1.8.2.1 2001/06/28 19:09:42 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VoxelNavigation.hh,v 1.9 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4VoxelNavigation
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VoxelNavigation.icc,v 1.7.2.1 2001/06/28 19:09:42 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VoxelNavigation.icc,v 1.8 2001/07/11 10:00:31 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// class G4VoxelNavigation Inline implementation