Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user