Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PropagatorInField.icc,v 1.6 2003/11/26 14:45:48 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// GEANT 4 inline implementation
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
//
|
||||
// 25.10.96 John Apostolakis, design and implementation
|
||||
// 25.03.97 John Apostolakis, adaptation for G4Transportation and cleanup
|
||||
//
|
||||
// To create an object of this type, must have:
|
||||
// - an object that calculates the Curved paths
|
||||
// - the navigator to find (linear) intersections
|
||||
// - and ?? also must know the value of the maximum displacement allowed
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
inline
|
||||
G4ChordFinder* G4PropagatorInField::GetChordFinder()
|
||||
{
|
||||
// The "Chord Finder" of the current Field Mgr is used
|
||||
// -- this could be of the global field manager
|
||||
// or that of another, from the current volume
|
||||
return fCurrentFieldMgr->GetChordFinder();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetChargeMomentumMass(
|
||||
G4double Charge, // in e+ units
|
||||
G4double Momentum, // in GeV/c
|
||||
G4double Mass) // in ? units
|
||||
{
|
||||
// GetChordFinder()->SetChargeMomentumMass(Charge, Momentum, Mass);
|
||||
// --> Not needed anymore, as it is done in ComputeStep for the
|
||||
// ChordFinder of the current step (which is known only then).
|
||||
fCharge = Charge;
|
||||
fInitialMomentumModulus = Momentum;
|
||||
fMass = Mass;
|
||||
}
|
||||
|
||||
// Obtain the final space-point and velocity (normal) at the end of the Step
|
||||
//
|
||||
inline
|
||||
G4ThreeVector G4PropagatorInField::EndPosition() const
|
||||
{
|
||||
return End_PointAndTangent.GetPosition();
|
||||
}
|
||||
|
||||
inline
|
||||
G4ThreeVector G4PropagatorInField::EndMomentumDir() const
|
||||
{
|
||||
return End_PointAndTangent.GetMomentumDir();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PropagatorInField::GetEpsilonStep() const
|
||||
{
|
||||
return fEpsilonStep;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetEpsilonStep( G4double newEps )
|
||||
{
|
||||
fEpsilonStep=newEps;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4PropagatorInField::IsParticleLooping() const
|
||||
{
|
||||
return fParticleIsLooping;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PropagatorInField::GetMaxLoopCount() const
|
||||
{
|
||||
return fMax_loop_count;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetMaxLoopCount( G4int new_max )
|
||||
{
|
||||
fMax_loop_count = new_max;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PropagatorInField::GetDeltaIntersection() const
|
||||
{
|
||||
return fCurrentFieldMgr->GetDeltaIntersection();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PropagatorInField::GetDeltaOneStep() const
|
||||
{
|
||||
return fCurrentFieldMgr->GetDeltaOneStep();
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
G4PropagatorInField::SetAccuraciesWithDeltaOneStep( G4double valDeltaOneStep )
|
||||
{
|
||||
fDetectorFieldMgr->SetAccuraciesWithDeltaOneStep(valDeltaOneStep);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetDeltaOneStep( G4double valDeltaOneStep )
|
||||
{
|
||||
fDetectorFieldMgr->SetDeltaOneStep(valDeltaOneStep);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetDeltaIntersection( G4double valDeltaIntersection )
|
||||
{
|
||||
fDetectorFieldMgr->SetDeltaIntersection(valDeltaIntersection);
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PropagatorInField::SetVerboseLevel( G4int Verbose )
|
||||
{
|
||||
return fVerboseLevel = Verbose;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PropagatorInField::GetVerboseLevel() const
|
||||
{
|
||||
return fVerboseLevel;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PropagatorInField::Verbose() const // Obsolete
|
||||
{
|
||||
return GetVerboseLevel();
|
||||
}
|
||||
|
||||
inline
|
||||
G4FieldTrack G4PropagatorInField::GetEndState() const
|
||||
{
|
||||
return End_PointAndTangent;
|
||||
}
|
||||
|
||||
// Minimum for Relative accuracy of a Step in volumes of global field
|
||||
inline
|
||||
G4double G4PropagatorInField::GetMinimumEpsilonStep() const
|
||||
{
|
||||
return fDetectorFieldMgr->GetMinimumEpsilonStep();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetMinimumEpsilonStep( G4double newEpsMin )
|
||||
{
|
||||
fDetectorFieldMgr->SetMinimumEpsilonStep(newEpsMin);
|
||||
}
|
||||
|
||||
// Maximum for Relative accuracy of any Step
|
||||
inline
|
||||
G4double G4PropagatorInField::GetMaximumEpsilonStep() const
|
||||
{
|
||||
return fDetectorFieldMgr->GetMaximumEpsilonStep();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetMaximumEpsilonStep( G4double newEpsMax )
|
||||
{
|
||||
fDetectorFieldMgr->SetMaximumEpsilonStep( newEpsMax );
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PropagatorInField::SetDetectorFieldManager(G4FieldManager* newDetectorFieldManager)
|
||||
{
|
||||
fDetectorFieldMgr = newDetectorFieldManager;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
void G4PropagatorInField:: SetUseSafetyForOptimization( G4bool value )
|
||||
{
|
||||
fUseSafetyForOptimisation= value;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4PropagatorInField::GetUseSafetyForOptimization()
|
||||
{
|
||||
return fUseSafetyForOptimisation;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user