Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
+57 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.14 1999/07/01 18:05:46 japost Exp $
$Id: History,v 1.18 1999/12/02 13:20:17 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,62 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
December 2nd, 1999 G. Cosmo - geomvol-V00-01-02
G4TransportationManager: Fixed definition of the singleton to conform
to the canonical implementation. Moved default constructor from private
to protected and added call to G4Exception in case of multiple instances
through derived classes.
November 26th, 1999 J. Apostolakis - geomvol-V00-01-01
G4TouchableHistory: Moved GetTranslation and GetRotation from inline file
to source file -- as they use static variables in the methods themselves.
--> cannot be handled by new HP aCC compiler
G4PropagatorInField: Initialised fVerboseLevel in constructor. (omision)
--> on WinNT 4.0sp4 / VC++ 6.0 it was given value of 1 not 0.
November 10th, 1999 J. Apostolakis - geomvol-01-01-01b
Modified test/GNUmakefile to make it use fully-granular libraries.
New test code in testG4Volumes for Object/Frame Rotation/Translation.
October 29th, 1999 J. Apostolakis - geomvol-01-01-01a
Moved initialisation of static data members of G4PropagatorInField
fDefault_Delta_Intersection_Val
fDefault_Delta_One_Step_Value
to G4TransportationManager.cc, to ensure correct order initialisation
of static (class) data members
G4PropagatorInField warning message about integration inaccuracy
now printed (for a maximum of 10 times) and in Verbose.
July 27th, 1999 J. Apostolakis
G4PropagatorInField:
Added instance variables to keep track of "abnormal" case - which caused loop:
This is induced when a step at a boundary goes into one volume
- but in that volume it encounters an intermediate boundary
and when the step is subdivided it finds a zero step.
Then it looped between the volumes
This is corrected by finding this problem (#subsequent zero steps > threshold)
and attempting ever smaller trial steps until it succeeds.
-> it was not done for the first step
July 27th, 1999 J. Apostolakis
G4PropagatorInField:
Made DeltaIntersection and DeltaOneStep instance variables (not class var.)
Added Get/Set methods. Old values of are now the defaults.
July 1st, 1999 J. Apostolakis - field-01-00-06a
In G4PropagatorInField --> method LocateIntersectionPoint():
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4AuxiliaryNavServices.hh,v 1.1 1999/01/07 16:08:40 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4AuxiliaryNavServices.hh,v 1.1.10.1 1999/12/07 20:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4NormalNavigation: Utility for navigation in volumes
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4BlockingList.hh,v 1.1 1999/01/07 16:08:40 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4BlockingList.hh,v 1.2.2.1 1999/12/07 20:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4BlockingList
//
@@ -66,7 +66,7 @@
#define G4BLOCKINGLIST_HH
#include "globals.hh"
#include <rw/tvvector.h>
#include "g4rw/tvvector.h"
const G4int kBlockingListMaxDefault = 500; // Block up to 511 daughters
// initially
@@ -91,7 +91,7 @@ private:
G4int fBlockTagNo,fStride;
// Blocked volumes: Elements with indices
// corresponding to blocked volume set to fBlockTagNo
RWTValVector<G4int> fBlockingList;
G4RWTValVector<G4int> fBlockingList;
};
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4BlockingList.icc,v 1.1 1999/01/07 16:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4BlockingList.icc,v 1.1.10.1 1999/12/07 20:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4BlockingList Inlined Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSSolid.hh,v 1.1 1999/01/07 16:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSSolid.hh,v 1.1.10.1 1999/12/07 20:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSSolid Paul Kent August 1996
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSSolid.icc,v 1.1 1999/01/07 16:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSSolid.icc,v 1.1.10.1 1999/12/07 20:48:38 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSSolid inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSVolume.hh,v 1.1 1999/01/07 16:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSVolume.hh,v 1.1.10.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSVolume Paul Kent August 1996
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSVolume.icc,v 1.2 1999/03/11 09:58:27 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSVolume.icc,v 1.2.8.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSVolume inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4LogicalBorderSurface.hh,v 1.1 1999/01/07 16:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LogicalBorderSurface.hh,v 1.2.2.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
////////////////////////////////////////////////////////////////////////
// G4LogicalBorderSurface Definition
@@ -34,8 +34,8 @@
#include "G4LogicalSurface.hh"
#include "G4VPhysicalVolume.hh"
// RWTPtrOrderedVector
#include <rw/tpordvec.h>
// G4RWTPtrOrderedVector
#include "g4rw/tpordvec.h"
class G4Event;
@@ -84,7 +84,7 @@ public:
// Methods dealing with the table of surfaces.
//
static const RWTPtrOrderedVector<G4LogicalBorderSurface>* GetSurfaceTable()
static const G4RWTPtrOrderedVector<G4LogicalBorderSurface>* GetSurfaceTable()
{ return &theBorderSurfaceTable; }
static size_t GetNumberOfBorderSurfaces()
{ return theBorderSurfaceTable.length(); }
@@ -112,13 +112,13 @@ private:
G4VPhysicalVolume* Volume2; // Physical Volume pointer on side 2
// The static Table of Surfaces
static RWTPtrOrderedVector<G4LogicalBorderSurface> theBorderSurfaceTable;
static G4RWTPtrOrderedVector<G4LogicalBorderSurface> theBorderSurfaceTable;
size_t theIndexInTable; // Index of surface in the surface table
};
typedef RWTPtrOrderedVector<G4LogicalBorderSurface> G4LogicalBorderSurfaceTable;
typedef G4RWTPtrOrderedVector<G4LogicalBorderSurface> G4LogicalBorderSurfaceTable;
////////////////////
// Inline methods
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4LogicalSkinSurface.hh,v 1.1 1999/01/07 16:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LogicalSkinSurface.hh,v 1.2.2.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
////////////////////////////////////////////////////////////////////////
// G4LogicalSkinSurface Definition
@@ -34,8 +34,8 @@
#include "G4LogicalSurface.hh"
#include "G4LogicalVolume.hh"
// RWTPtrOrderedVector
#include <rw/tpordvec.h>
// G4RWTPtrOrderedVector
#include "g4rw/tpordvec.h"
/////////////////////
@@ -79,7 +79,7 @@ public:
static void DumpInfo(); // const
#if THESE_ARE_NEEDED
// static const RWTPtrOrderedVector<G4LogicalSkinSurface>*
// static const G4RWTPtrOrderedVector<G4LogicalSkinSurface>*
// GetSurfaceTable()
// { return &theSurfaceTable; };
@@ -105,14 +105,14 @@ private:
G4LogicalVolume* LogVolume; // Logical Volume pointer on side 1
// The static Table of Surfaces
static RWTPtrOrderedVector<G4LogicalSkinSurface> theSurfaceTable;
static G4RWTPtrOrderedVector<G4LogicalSkinSurface> theSurfaceTable;
// static G4LogicalSkinSurfaceTable theSurfaceTable;
size_t theIndexInTable; // Index of surface in the surface table
};
typedef RWTPtrOrderedVector<G4LogicalSkinSurface> G4LogicalSkinSurfaceTable;
typedef G4RWTPtrOrderedVector<G4LogicalSkinSurface> G4LogicalSkinSurfaceTable;
////////////////////
// Inline methods
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationHistory.hh,v 1.1 1999/01/07 16:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationHistory.hh,v 1.2.2.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4NavigationHistory
//
@@ -29,8 +29,8 @@
#include "G4VPhysicalVolume.hh"
#include "G4NavigationLevel.hh"
#include <rw/tvvector.h>
#include <rw/tpvector.h>
#include "g4rw/tvvector.h"
#include "g4rw/tpvector.h"
const G4int kHistoryMax=15; // Default max size of history
const G4int kHistoryStride=16; // History increase stride
@@ -80,8 +80,8 @@ private:
// Depth of stack: effectively depth in geometrical tree
G4int fStackDepth;
RWTValVector<G4NavigationLevel> fNavHistory;
// RWTPtrVector<G4NavigationLevel> fNavHistory;
G4RWTValVector<G4NavigationLevel> fNavHistory;
// G4RWTPtrVector<G4NavigationLevel> fNavHistory;
};
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationHistory.icc,v 1.1 1999/01/07 16:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationHistory.icc,v 1.1.10.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4NavigationHistory Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationLevel.hh,v 1.8 1999/05/17 13:51:51 fbehner Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationLevel.hh,v 1.8.8.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4NavigationLevel
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationLevel.icc,v 1.8 1999/05/17 13:51:51 fbehner Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationLevel.icc,v 1.8.8.1 1999/12/07 20:48:39 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// 30.09.97 J.Apostolakis Initial version.
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationLevelRep.hh,v 1.1 1999/01/07 16:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationLevelRep.hh,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4NavigationLevelRep
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationLevelRep.icc,v 1.1 1999/01/07 16:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationLevelRep.icc,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// 1 October 1997 J.Apostolakis Initial version.
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4Navigator.hh,v 1.1 1999/01/07 16:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Navigator.hh,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4Navigator Paul Kent July 95/96
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4Navigator.icc,v 1.1 1999/01/07 16:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Navigator.icc,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4Navigator Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NormalNavigation.hh,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NormalNavigation.hh,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4NormalNavigation: Utility for navigation in volumes
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NormalNavigation.icc,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NormalNavigation.icc,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// G4NormalNavigation Inline Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ParameterisedNavigation.hh,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ParameterisedNavigation.hh,v 1.1.10.1 1999/12/07 20:48:40 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4ParameterisedNavigation: Utility for navigation in volumes
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ParameterisedNavigation.icc,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ParameterisedNavigation.icc,v 1.1.10.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4ParameterisedNavigation Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PropagatorInField.hh,v 1.3 1999/02/17 17:41:55 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PropagatorInField.hh,v 1.5.6.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// ------------------------------------------------------------------------
@@ -90,22 +90,28 @@ class G4PropagatorInField {
G4double GetEpsilonStep(); // Relative accuracy for current Step (Calc.)
void SetEpsilonStep(G4double newEps);
// A maximum for the number of steps that a (looping) particle
// can take.
//
G4int GetMaxLoopCount();
void SetMaxLoopCount(G4int new_max);
void SetChargeMomentumMass( G4double Charge, // in e+ units
G4double Momentum, // in Geant4 units
G4double pMass);
G4ChordFinder* GetChordFinder();
// void SetChordFinder(G4ChordFinder* newCF); // Not yet relevant
// void SetChordFinder(G4ChordFinder* newCF); // Not yet relevant
G4int SetVerboseLevel( G4int Verbose ){ return fVerboseLevel=Verbose; }
G4int Verbose(){ return fVerboseLevel; }
// Accuracies:
G4double GetDeltaIntersection(); // for boundary intersection
G4double GetDeltaOneStep(); // for one tracking/physics step
// Sets both accuracies,
// maintaining a particular ratio Delta Interaction / OneStep )
void SetAccuraciesWithDeltaOneStep(G4double deltaOneStep);
// A maximum for the number of steps that a (looping) particle can take
G4int GetMaxLoopCount();
void SetMaxLoopCount(G4int new_max);
// Print Method - useful mostly for debugging this class
//
void printStatus(
@@ -122,17 +128,6 @@ class G4PropagatorInField {
G4FieldTrack GetEndState() { return End_PointAndTangent; }
private:
// The Field Manager of the whole Detector
//
G4FieldManager *fDetectorFieldMgr;
G4Navigator *fNavigator;
// End point storage:
//
G4FieldTrack End_PointAndTangent;
// 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).
@@ -143,24 +138,50 @@ class G4PropagatorInField {
const G4FieldTrack& CurveEndPointTangent, // B
const G4ThreeVector& TrialPoint, // E
G4FieldTrack& IntersectPointTangent); // Output
//
// [ Should this have fewer or additional arguments ?
// pointer to info on solution already obtained
// tolerance
// ]
// DATA Members
// ----------------------------------------------------------------------
private:
// The Field Manager of the whole Detector
//
G4FieldManager *fDetectorFieldMgr;
G4Navigator *fNavigator;
// STATE information
// ------------------
G4double fEpsilonStep; // Relative accuracy for current Step (Calc.)
// End point storage:
//
G4FieldTrack End_PointAndTangent;
G4bool fParticleIsLooping;
// For debuging purposes
G4int fVerboseLevel;
// For the moment class constants ... set in G4PropagatemagField.cc
// Values for the required accuracies
//
static const G4double delta_intersection_val; // = 0.1 * mm;
static const G4double delta_one_step_val; // = 0.25 * mm;
G4double fDelta_One_Step_Value; // for one tracking/physics step
G4double fDelta_Intersection_Val; // for boundary intersection
// Their default values ... (set in G4PropagatemagField.cc)
//
static const G4double fDefault_Delta_One_Step_Value; // = 0.25 * mm;
static const G4double fDefault_Delta_Intersection_Val; // = 0.1 * mm;
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
// G4double fMidPoint_CurveLen_of_LastAttempt= -1;
G4double fFull_CurveLen_of_LastAttempt;
G4double fLast_ProposedStepLength;
}; // End of class G4PropagatorInField {
// Defines the constructor.
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PropagatorInField.icc,v 1.2 1999/02/17 17:35:59 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PropagatorInField.icc,v 1.5.2.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// ------------------------------------------------------------------------
@@ -30,10 +30,20 @@ G4PropagatorInField( G4Navigator *theNavigator,
G4FieldManager *detectorFieldMgr) :
fNavigator(theNavigator),
fDetectorFieldMgr(detectorFieldMgr),
fmax_loop_count(1000),
End_PointAndTangent(G4ThreeVector(0.,0.,0.),G4ThreeVector(0.,0.,0.),0.0,0.0)
fmax_loop_count(10000),
End_PointAndTangent(G4ThreeVector(0.,0.,0.),
G4ThreeVector(0.,0.,0.),0.0,0.0),
fDelta_One_Step_Value(fDefault_Delta_One_Step_Value),
fDelta_Intersection_Val(fDefault_Delta_Intersection_Val),
fVerboseLevel(0)
{
// this->fChordFinder = new G4ChordFinder( (G4MagneticField*)0, 1e-6 );
// this->fChordFinder = new G4ChordFinder( (G4MagneticField*)0, 1e-6 );
fNoZeroStep=0;
fThresholdNo_ZeroSteps= 2;
// fMidPoint_CurveLen_of_LastAttempt= -1;
fFull_CurveLen_of_LastAttempt= -1;
fLast_ProposedStepLength= -1;
}
inline
@@ -91,8 +101,15 @@ inline void G4PropagatorInField::SetMaxLoopCount(G4int new_max)
// inline void G4PropagatorInField::SetChordFinder(G4ChordFinder* newCF)
inline G4double G4PropagatorInField::DeltaOneStep()
{ return delta_one_step_val; }
inline G4double G4PropagatorInField::DeltaIntersection()
{ return delta_intersection_val; }
inline G4double G4PropagatorInField::GetDeltaIntersection()
{ return fDelta_Intersection_Val; }
inline G4double G4PropagatorInField:: GetDeltaOneStep()
{ return fDelta_One_Step_Value; }
// void SetDeltaIntersection(G4double);
inline void G4PropagatorInField::SetAccuraciesWithDeltaOneStep(G4double valDeltaOneStep)
{
fDelta_One_Step_Value= valDeltaOneStep;
fDelta_Intersection_Val = 0.4 * fDelta_One_Step_Value;
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ReplicaNavigation.hh,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ReplicaNavigation.hh,v 1.1.10.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4ReplicaNavigation: Utility for navigation in volumes
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ReplicaNavigation.icc,v 1.1 1999/01/07 16:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ReplicaNavigation.icc,v 1.1.10.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4ReplicaNavigation Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TouchableHistory.hh,v 1.1 1999/01/07 16:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TouchableHistory.hh,v 1.1.10.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4TouchableHistory Paul Kent August 1996
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TouchableHistory.icc,v 1.1 1999/01/07 16:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TouchableHistory.icc,v 1.2.2.1 1999/12/07 20:48:41 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4TouchableHistory inline implementation
@@ -58,35 +58,6 @@ inline G4VSolid* G4TouchableHistory::GetSolid(G4int depth) const
return fhistory.GetVolume(CalculateHistoryIndex(depth))->GetLogicalVolume()->GetSolid();
}
inline const G4ThreeVector& G4TouchableHistory::GetTranslation(G4int depth) const
{
// The value returned will change at the next call
// Copy it if you want to use it!
//
static G4ThreeVector currTranslation;
if(depth==0.0) {
return ftlate;
}else{
currTranslation= fhistory.GetTransform(CalculateHistoryIndex(depth)).NetTranslation();
return currTranslation;
}
}
inline const G4RotationMatrix* G4TouchableHistory::GetRotation(G4int depth) const
{
// The value returned will change at the next call
// Copy it if you want to use it!
//
static G4RotationMatrix rotM;
if(depth==0.0) {
return &frot;
}else{
rotM= fhistory.GetTransform(CalculateHistoryIndex(depth)).NetRotation();
return &rotM;
}
}
inline G4int G4TouchableHistory::GetReplicaNumber(G4int depth) const
{
// return this->GetHistory()->GetTopReplicaNo();
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4Transform.hh,v 1.1 1999/01/07 16:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Transform.hh,v 1.1.10.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4Transform
//
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TransportationManager.hh,v 1.1 1999/01/07 16:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TransportationManager.hh,v 1.2.2.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// ------------------------------------------------------------
@@ -49,15 +49,15 @@ class G4TransportationManager
~G4TransportationManager();
protected:
G4TransportationManager();
private:
G4Navigator* fNavigatorForTracking ;
G4PropagatorInField* fPropagatorInField;
G4FieldManager* fFieldManager;
G4TransportationManager();
// Must we also declare a null copy constructor ??
static G4TransportationManager fTransportationManager;
static G4TransportationManager* fTransportationManager;
};
#include "G4TransportationManager.icc"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TransportationManager.icc,v 1.1 1999/01/07 16:08:46 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TransportationManager.icc,v 1.2.2.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// ------------------------------------------------------------
@@ -52,8 +52,3 @@ inline void G4TransportationManager::SetFieldManager(
{
fFieldManager= newFieldManager;
}
inline G4TransportationManager* G4TransportationManager::GetTransportationManager()
{
return &fTransportationManager;
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VoxelNavigation.hh,v 1.3 1999/02/17 17:31:05 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VoxelNavigation.hh,v 1.4.2.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4VoxelNavigation: Utility for navigation in volumes
@@ -30,8 +30,8 @@
#include "G4SmartVoxelProxy.hh"
#include "G4SmartVoxelNode.hh"
#include "G4SmartVoxelHeader.hh"
#include <rw/tvvector.h>
#include <rw/tpvector.h>
#include "g4rw/tvvector.h"
#include "g4rw/tpvector.h"
// Voxel stack depth maximum [no resizing]
const G4int kNavigatorVoxelStackMax = 3;
@@ -85,19 +85,19 @@ private:
G4int fVoxelDepth;
// Voxel axes
RWTValVector<EAxis> fVoxelAxisStack;
G4RWTValVector<EAxis> fVoxelAxisStack;
// No slices per voxel at each level
RWTValVector<G4int> fVoxelNoSlicesStack;
G4RWTValVector<G4int> fVoxelNoSlicesStack;
// Width of voxels at each level
RWTValVector<G4double> fVoxelSliceWidthStack;
G4RWTValVector<G4double> fVoxelSliceWidthStack;
// Node no point is inside at each level
RWTValVector<G4int> fVoxelNodeNoStack;
G4RWTValVector<G4int> fVoxelNodeNoStack;
// Voxel headers at each level
RWTPtrVector<G4SmartVoxelHeader> fVoxelHeaderStack;
G4RWTPtrVector<G4SmartVoxelHeader> fVoxelHeaderStack;
// Node containing last located point
G4SmartVoxelNode* fVoxelNode;
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VoxelNavigation.icc,v 1.1 1999/01/07 16:08:47 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VoxelNavigation.icc,v 1.1.10.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4VoxelNavigation Inline implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4BlockingList.cc,v 1.1 1999/01/07 16:08:47 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4BlockingList.cc,v 1.1.10.1 1999/12/07 20:48:42 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4BlockingList Implementation
+3 -3
View File
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSSolid.cc,v 1.1 1999/01/07 16:08:47 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSSolid.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSSolid Implementation
+3 -3
View File
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4GRSVolume.cc,v 1.1 1999/01/07 16:08:47 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GRSVolume.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4GRSVolume Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4LogicalBorderSurface.cc,v 1.1 1999/01/07 16:08:47 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LogicalBorderSurface.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
////////////////////////////////////////////////////////////////////////
// G4LogicalBorderSurface Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4LogicalSkinSurface.cc,v 1.1 1999/01/07 16:08:48 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4LogicalSkinSurface.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
////////////////////////////////////////////////////////////////////////
// G4LogicalSkinSurface Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NavigationHistory.cc,v 1.1 1999/01/07 16:08:48 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NavigationHistory.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// G4NavigationHistory Implementation P.Kent August 96
+3 -23
View File
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4Navigator.cc,v 1.6 1999/05/17 14:19:09 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Navigator.cc,v 1.7.6.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4Navigator Implementation Paul Kent July 95/96
@@ -420,26 +420,6 @@ G4double G4Navigator::ComputeStep(const G4ThreeVector &pGlobalpoint,
G4double shiftOriginSafSq= (fPreviousSftOrigin-pGlobalpoint).mag2();
#if 0
// Reset point before computing safety
LocateGlobalPointWithinVolume(OriginalGlobalpoint);
G4double safety= ComputeSafety(OriginalGlobalpoint);
if( moveLenSq >= sqr(safety) ){
G4double moveLen=sqrt(moveLenSq);
if( moveLen > safety + kCarTolerance ){
G4cerr << " ERROR in G4Navigator::ComputeStep: " << endl
<< "The Step's starting point has moved " << moveLen
<< " since the last call to one of the Locate methods " << endl
<< " which is more than the current safety=" << safety << endl;
}else{
G4cerr << " Warning in G4Navigator::ComputeStep: " << endl
<< "The Step's starting point has moved " << moveLen
<< " which is equal to the current safety. " << endl;
}
}
G4double safetyPlus = safety + kCarTolerance;
assert( moveLenSq <= sqr(safetyPlus) );
#endif
// Check that the starting point of this step is
// within the isotropic safety sphere of the last point
// to a accuracy/precision given by
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4NormalNavigation.cc,v 1.1 1999/01/07 16:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4NormalNavigation.cc,v 1.1.10.1 1999/12/07 20:48:43 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4NormalNavigation Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ParameterisedNavigation.cc,v 1.1 1999/01/07 16:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ParameterisedNavigation.cc,v 1.1.10.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4ParameterisedNavigation Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PropagatorInField.cc,v 1.2 1999/07/01 17:56:22 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PropagatorInField.cc,v 1.8.6.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
//
@@ -27,9 +27,12 @@
#include "G4ios.hh"
#include <iomanip.h>
const G4double G4PropagatorInField::delta_intersection_val= 0.1 * mm;
const G4double G4PropagatorInField::delta_one_step_val = 0.25 * mm;
// Initialisation moved to G4TransportationManager.cc, to ensure
// correct order initialisation of static (class) data members
//const G4double G4PropagatorInField::fDefault_Delta_Intersection_Val= 0.1 * mm;
//const G4double G4PropagatorInField::fDefault_Delta_One_Step_Value = 0.25 * mm;
// -------------------------------------------------------------------------
G4double
G4PropagatorInField::
ComputeStep(const G4ThreeVector & StartPointA,
@@ -54,6 +57,7 @@ G4PropagatorInField::
currentSafety );
}
// -------------------------------------------------------------------------
G4double
G4PropagatorInField::
ComputeStep(G4FieldTrack& pFieldTrack,
@@ -99,12 +103,31 @@ G4PropagatorInField::
fNavigator->GetWorldVolume()->GetLogicalVolume()->
GetSolid()->DistanceToOut(StartPointA, VelocityUnit) ) ;
}
this->SetEpsilonStep( DeltaOneStep() / CurrentProposedStepLength);
this->SetEpsilonStep( GetDeltaOneStep() / CurrentProposedStepLength);
if( fNoZeroStep > fThresholdNo_ZeroSteps ) {
G4double stepTrial; // = fMidPoint_CurveLen_of_LastAttempt;
stepTrial= 0.5 * fFull_CurveLen_of_LastAttempt;
if( (stepTrial <= 0.0) && (fLast_ProposedStepLength>0.0) )
stepTrial=0.5 * fLast_ProposedStepLength;
if( fNoZeroStep > 2*fThresholdNo_ZeroSteps ){
stepTrial *= 0.5; // Ensure quicker convergence.
if( (stepTrial == 0.0)
|| ( fNoZeroStep > 5*fThresholdNo_ZeroSteps ) ) {
G4cerr << " G4PropagatorInField::ComputeStep "
<< " ERROR : attempting a zero step= " << stepTrial << endl
<< " and/or no progress after " << fNoZeroStep
<< " trial steps. ABORTING." << endl;
G4Exception("G4PropagatorInField::ComputeStep No progress - Looping with zero steps");
}
}
CurrentProposedStepLength = stepTrial;
}
fLast_ProposedStepLength= CurrentProposedStepLength;
G4int do_loop_count=0;
do
{
do_loop_count++;
G4FieldTrack SubStepStartState= CurrentState;
G4ThreeVector SubStartPoint= CurrentState.GetPosition();
// WAS = G4Navigator::Locate...
@@ -131,6 +154,7 @@ G4PropagatorInField::
h_TrialStepSize,
GetEpsilonStep() );
fFull_CurveLen_of_LastAttempt= s_length_taken;
// On Exit:
// CurrentState is updated with the final position and velocity.
@@ -178,21 +202,15 @@ G4PropagatorInField::
if( found_intersection )
{
// G is our EndPoint ...
G4ThreeVector IntersectPoint_G = IntersectPointVelct_G.Position();
End_PointAndTangent= IntersectPointVelct_G;
G4ThreeVector NewChord= IntersectPoint_G - SubStartPoint;
// LinearStepLength= NewChord.mag();
StepTaken =
TruePathLength= IntersectPointVelct_G.CurveS()
- OriginalState.CurveS(); // which is Zero now.
#ifdef G4VERBOSE
if( Verbose() > 0 ){
G4cout << " Found an intersection after a Step of length " <<
if( Verbose() > 0 )
G4cout << " Found intersection after Step of length " <<
StepTaken << endl;
}
#endif
// TruePathLength= StepTaken;
}
else
{
@@ -216,6 +234,7 @@ G4PropagatorInField::
pPhysVol);
#endif
do_loop_count++;
}
while( (!intersects ) && (StepTaken < CurrentProposedStepLength)
&& ( do_loop_count < GetMaxLoopCount() ) );
@@ -266,6 +285,15 @@ G4PropagatorInField::
}
#endif
// In particular anomalous cases, we can get repeated zero steps
// In order to correct this efficiently, we identify these cases
// and only take corrective action when they occur.
//
if( TruePathLength == 0.0 )
fNoZeroStep++;
else
fNoZeroStep= 0;
return TruePathLength;
}
@@ -337,12 +365,11 @@ G4PropagatorInField::LocateIntersectionPoint(
this->GetEpsilonStep() );
// The above function is the most difficult part ...
//
// Another approach would be for the curved true path
// to be an object and this should be a member function.
// -> The Curve Start and End point would not be needed as arguments.
//
G4ThreeVector CurrentF_Point= ApproxIntersecPointV.Position();
// fMidPoint_CurveLen_of_LastAttempt =
// ApproxIntersecPointV. GetCurveLength() -
// CurrentA_PointVelocity.GetCurveLength();
// First check whether EF is small - then F is a good approx. point
//
@@ -352,7 +379,7 @@ G4PropagatorInField::LocateIntersectionPoint(
// ------------
G4ThreeVector ChordEF_Vector = CurrentF_Point - CurrentE_Point;
if ( ChordEF_Vector.mag2() <= sqr(DeltaIntersection()) ){
if ( ChordEF_Vector.mag2() <= sqr(GetDeltaIntersection()) ){
found_approximate_intersection = true;
@@ -373,14 +400,17 @@ G4PropagatorInField::LocateIntersectionPoint(
}else{ // E is NOT close enough to the curve (ie point F).
if( !first_step){
// Check whether any volumes are encountered by the chord AF
//----------------------------------------------------------
fNavigator->LocateGlobalPointWithinVolume( Point_A );
// This locate is needed in all cases except for the
// original point A, because - presumably - that was
// called at the start of the physical Step
}
// Check whether any volumes are encountered by the chord AF
//----------------------------------------------------------
// First restore any Voxel etc information in the Navigator
// before calling ComputeStep -- not just if( !first_step)
fNavigator->LocateGlobalPointWithinVolume( Point_A );
// This locate is needed in all cases except for the
// original point A, because - presumably - that was
// called at the start of the physical Step
first_step= false;
// Calculate the length and direction of the chord AF
@@ -474,13 +504,20 @@ G4PropagatorInField::LocateIntersectionPoint(
GetChordFinder()->GetIntegrationDriver()
->AccurateAdvance(newEndpoint, curveDist, GetEpsilonStep() );
CurrentB_PointVelocity= newEndpoint;
G4cerr << "G4PropagatorInField::LocateIntersectionPoint: "
<< " Warning: Integration inaccuracy requires an adjustment in the step's endpoint "
<< " Two mid-points are further apart than their curve length difference"
<< endl
<< " Dist = " << sqrt(linDistSq)
<< " curve length = " << curveDist
<< endl;
#ifdef G4DEBUG
static int noInaccuracyWarnings = 0;
const int maxNoWarnings = 10;
if( (noInaccuracyWarnings < maxNoWarnings )
|| (Verbose() > 1) ){
G4cerr << "G4PropagatorInField::LocateIntersectionPoint: "
<< " Warning: Integration inaccuracy requires " << endl
<< " an adjustment in the step's endpoint " << endl
<< " Two mid-points are further apart than their "
<< "curve length difference" << endl
<< " Dist = " << sqrt(linDistSq)
<< " curve length = " << curveDist << endl;
}
#endif
}
if( curveDist < 0.0 ) {
G4Exception("G4PropagatorInField::LocateIntersectionPoint : the final curve point is not further along than the original.");
@@ -510,7 +547,7 @@ void G4PropagatorInField::printStatus(
const G4FieldTrack& CurrentFT,
G4double requestStep,
G4double safety,
G4int Step,
G4int stepNo,
G4VPhysicalVolume* startVolume)
// G4VPhysicalVolume* endVolume)
{
@@ -523,9 +560,10 @@ void G4PropagatorInField::printStatus(
G4double step_len= CurrentFT.GetCurveLength()
- StartFT.GetCurveLength();
if( (Step == 0) && (verboseLevel <= 3) )
if( (stepNo == 0) && (verboseLevel <= 3) )
{
G4cout.precision(3);
static G4int noPrecision= 4;
G4cout.precision(noPrecision);
// G4cout.setf(ios_base::fixed,ios_base::floatfield);
G4cout << setw( 6) << " "
<< setw( 25) << " Current Position and Direction" << " "
@@ -537,18 +575,52 @@ void G4PropagatorInField::printStatus(
<< setw( 7) << " N_x " << " "
<< setw( 7) << " N_y " << " "
<< setw( 7) << " N_z " << " "
// << setw( 9) << "KinE(MeV)" << " "
// << setw( 9) << "dE(MeV)" << " "
<< setw( 9) << "StepLen" << " "
<< setw( 9) << "PhsStep" << " "
<< setw(12) << "StartSafety" << " "
<< setw(18) << "NextVolume" << " "
<< endl;
// Recurse to print the start values
printStatus( StartFT, StartFT, //
-1.0, safety, -1, 0); // startVolume);
}
//
if( verboseLevel > 3 )
if( verboseLevel <= 3 )
{
G4cout.precision(3);
if( stepNo >= 0)
G4cout << setw( 5) << stepNo << " ";
else
G4cout << setw( 5) << "Start" << " ";
G4cout << setw( 9) << CurrentPosition.x() << " "
<< setw( 9) << CurrentPosition.y() << " "
<< setw( 9) << CurrentPosition.z() << " "
<< setw( 7) << CurrentUnitVelocity.x() << " "
<< setw( 7) << CurrentUnitVelocity.y() << " "
<< setw( 7) << CurrentUnitVelocity.z() << " ";
G4cout << setw( 9) << step_len << " ";
if( requestStep != -1.0 )
G4cout << setw( 9) << requestStep << " ";
else
G4cout << setw( 9) << " InitialStep " << " ";
G4cout << setw(12) << safety << " ";
if( startVolume != 0) {
G4cout << setw(12) << startVolume->GetName() << " ";
} else {
if( step_len != -1 )
G4cout << setw(12) << "OutOfWorld" << " ";
else
G4cout << setw(12) << "NotGiven" << " ";
}
G4cout << endl;
}
else // if( verboseLevel > 3 )
{
// Multi-line output
// G4cout << "Current Position is " << CurrentPosition << endl
// << " and UnitVelocity is " << CurrentUnitVelocity << endl;
G4cout << "Step taken was " << step_len
@@ -558,37 +630,4 @@ void G4PropagatorInField::printStatus(
G4cout << "Chord length = " << (CurrentPosition-StartPosition).mag() << endl;
G4cout << endl;
}
else // if( verboseLevel > 0 )
{
G4cout.precision(3);
G4cout << setw( 5) << Step << " "
<< setw( 9) << CurrentPosition.x() << " "
<< setw( 9) << CurrentPosition.y() << " "
<< setw( 9) << CurrentPosition.z() << " "
<< setw( 7) << CurrentUnitVelocity.x() << " "
<< setw( 7) << CurrentUnitVelocity.y() << " "
<< setw( 7) << CurrentUnitVelocity.z() << " "
// << setw( 9) << KineticEnergy << " "
// << setw( 9) << EnergyDifference << " "
<< setw( 9) << step_len << " "
<< setw( 9) << requestStep << " "
<< setw(12) << safety << " ";
if( startVolume != 0) {
G4cout << setw(12) << startVolume->GetName() << " ";
} else {
G4cout << setw(12) << "OutOfWorld" << " ";
}
#if 0
if( CurrentVolume != 0)
{
G4cout << setw(12) << CurrentVolume()->GetName() << " ";
}
else
{
G4cout << setw(12) << "OutOfWorld or Unknown" << " ";
}
#endif
G4cout << endl;
}
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4ReplicaNavigation.cc,v 1.1 1999/01/07 16:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ReplicaNavigation.cc,v 1.1.10.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4REplicaNavigation Implementation
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TouchableHistory.cc,v 1.1 1999/01/07 16:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TouchableHistory.cc,v 1.2.2.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4TouchableHistory Implementation
@@ -16,4 +16,32 @@
G4TouchableHistory::~G4TouchableHistory()
{
}
const G4ThreeVector& G4TouchableHistory::GetTranslation(G4int depth) const
{
// The value returned will change at the next call
// Copy it if you want to use it!
//
static G4ThreeVector currTranslation;
if(depth==0.0) {
return ftlate;
}else{
currTranslation= fhistory.GetTransform(CalculateHistoryIndex(depth)).NetTranslation();
return currTranslation;
}
}
const G4RotationMatrix* G4TouchableHistory::GetRotation(G4int depth) const
{
// The value returned will change at the next call
// Copy it if you want to use it!
//
static G4RotationMatrix rotM;
if(depth==0.0) {
return &frot;
}else{
rotM= fhistory.GetTransform(CalculateHistoryIndex(depth)).NetRotation();
return &rotM;
}
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4TransportationManager.cc,v 1.2 1999/07/02 15:47:28 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4TransportationManager.cc,v 1.4.2.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// G4TransportationManager
@@ -25,14 +25,26 @@
G4Allocator<G4NavigationLevel> aNavigationLevelAllocator;
G4Allocator<G4NavigationLevelRep> aNavigLevelRepAllocator;
G4TransportationManager G4TransportationManager::fTransportationManager;
// Ditto: correct order initialisation of class (class) data members
const G4double G4PropagatorInField::fDefault_Delta_Intersection_Val= 0.1 * mm;
const G4double G4PropagatorInField::fDefault_Delta_One_Step_Value = 0.25 * mm;
G4TransportationManager* G4TransportationManager::fTransportationManager=0;
G4TransportationManager::G4TransportationManager()
{
fNavigatorForTracking= new G4Navigator() ;
fFieldManager= new G4FieldManager() ;
fPropagatorInField= new G4PropagatorInField( fNavigatorForTracking,
if (!fTransportationManager)
{
fNavigatorForTracking= new G4Navigator() ;
fFieldManager= new G4FieldManager() ;
fPropagatorInField= new G4PropagatorInField( fNavigatorForTracking,
fFieldManager);
}
else
{
G4Exception("Only ONE instance of G4TransportationManager is allowed!");
}
}
@@ -42,3 +54,13 @@ G4TransportationManager::~G4TransportationManager()
delete fPropagatorInField;
delete fFieldManager;
}
G4TransportationManager* G4TransportationManager::GetTransportationManager()
{
static G4TransportationManager theInstance;
if (!fTransportationManager)
fTransportationManager = &theInstance;
return fTransportationManager;
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VoxelNavigation.cc,v 1.3 1999/02/17 17:29:24 japost Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VoxelNavigation.cc,v 1.3.8.1 1999/12/07 20:48:44 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// class G4VoxelNavigation Implementation