Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransport.cc,v 1.11 2003/06/16 17:12:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4ParallelTransport.cc,v 1.12 2003/11/26 14:51:50 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -37,22 +37,22 @@
|
||||
#include "G4VPGeoDriver.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
|
||||
|
||||
G4ParallelTransport::G4ParallelTransport(G4VPGeoDriver &pgeodriver,
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4String &aName)
|
||||
:
|
||||
G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fPgeodriver(pgeodriver),
|
||||
fPStepper(aStepper),
|
||||
fCrossBoundary(false),
|
||||
fInitStep(false)
|
||||
G4VParallelStepper &aStepper,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fPgeodriver(pgeodriver),
|
||||
fPStepper(aStepper),
|
||||
fCrossBoundary(false),
|
||||
fInitStep(false)
|
||||
{
|
||||
if (!fParticleChange) {
|
||||
G4Exception("ERROR:G4ParallelTransport::G4ParallelTransport: new failed to create G4ParticleChange!");
|
||||
if (!fParticleChange)
|
||||
{
|
||||
G4Exception("G4ParallelTransport::G4ParallelTransport()",
|
||||
"FatalError", FatalException,
|
||||
"Failed to allocate G4ParticleChange !");
|
||||
}
|
||||
|
||||
G4VProcess::pParticleChange = fParticleChange;
|
||||
}
|
||||
|
||||
@@ -61,43 +61,48 @@ G4ParallelTransport::~G4ParallelTransport()
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
|
||||
void G4ParallelTransport::StartTracking(){
|
||||
void G4ParallelTransport::StartTracking()
|
||||
{
|
||||
fInitStep = true;
|
||||
}
|
||||
void G4ParallelTransport::EndTracking(){}
|
||||
|
||||
G4double
|
||||
G4ParallelTransport::
|
||||
void G4ParallelTransport::EndTracking()
|
||||
{
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
G4double ,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
G4double stepLength = 0;
|
||||
|
||||
// if this function is called on a new track let the navigator
|
||||
// know about it
|
||||
// G4bool initStep = (aTrack.GetCurrentStepNumber() == 1);
|
||||
// G4bool initStep = (aTrack.GetCurrentStepNumber() == 1);
|
||||
|
||||
if (fInitStep) {
|
||||
if (fInitStep)
|
||||
{
|
||||
fInitStep = false;
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthInit(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.Init(fPgeodriver.GetCurrentGeometryCell());
|
||||
fCrossBoundary = false;
|
||||
}
|
||||
else if (fCrossBoundary) {
|
||||
else if (fCrossBoundary)
|
||||
{
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthCrossBoundary(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.UnSetCrossBoundary();
|
||||
fCrossBoundary = false;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
stepLength = fPgeodriver.
|
||||
ComputeStepLengthInVolume(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
aTrack.GetMomentumDirection());
|
||||
}
|
||||
|
||||
*condition = NotForced;
|
||||
@@ -106,9 +111,10 @@ PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
|
||||
|
||||
G4VParticleChange *
|
||||
G4ParallelTransport::PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep)
|
||||
const G4Step& aStep)
|
||||
{
|
||||
if (!(aStep.GetStepLength() > 0.)) {
|
||||
if (!(aStep.GetStepLength() > 0.))
|
||||
{
|
||||
char st[1000];
|
||||
std::ostrstream os(st,1000);
|
||||
os << "G4PArallelTransport::InitPostDoIt: StepLength() == 0.\n"
|
||||
@@ -116,15 +122,13 @@ G4ParallelTransport::PostStepDoIt(const G4Track& aTrack,
|
||||
<< "dir: " << aTrack.GetMomentumDirection() << "\n"
|
||||
<< '\0';
|
||||
G4String m(st);
|
||||
|
||||
Warning(m);
|
||||
}
|
||||
|
||||
fParticleChange->Initialize(aTrack);
|
||||
|
||||
fCrossBoundary = true;
|
||||
fPgeodriver.LocateOnBoundary(aTrack.GetPosition(),
|
||||
aTrack.GetMomentumDirection());
|
||||
aTrack.GetMomentumDirection());
|
||||
fPStepper.Update(fPgeodriver.GetCurrentGeometryCell());
|
||||
|
||||
return fParticleChange;
|
||||
@@ -132,38 +136,41 @@ G4ParallelTransport::PostStepDoIt(const G4Track& aTrack,
|
||||
|
||||
void G4ParallelTransport::Error(const G4String &m)
|
||||
{
|
||||
G4cout << "ERROR - G4ParallelTransport::" << m << G4endl;
|
||||
G4Exception("Program aborted.");
|
||||
G4Exception("G4ParallelTransport::Error()",
|
||||
"ProgramError", FatalException, m);
|
||||
}
|
||||
|
||||
void G4ParallelTransport::Warning(const G4String &m)
|
||||
{
|
||||
G4cout << "WARNING - G4ParallelTransport: " << G4endl;
|
||||
G4cout << m << G4endl;
|
||||
G4Exception("G4ParallelTransport::Warning()",
|
||||
"ProgramWarning", JustWarning, m);
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
AlongStepGetPhysicalInteractionLength(const G4Track&,
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*) {
|
||||
G4double ,
|
||||
G4double ,
|
||||
G4double& ,
|
||||
G4GPILSelection*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4double G4ParallelTransport::
|
||||
AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4ForceCondition*) {
|
||||
AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*)
|
||||
{
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ParallelTransport::
|
||||
AtRestDoIt(const G4Track&, const G4Step&) {
|
||||
G4VParticleChange*
|
||||
G4ParallelTransport::AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ParallelTransport::
|
||||
AlongStepDoIt(const G4Track&, const G4Step&) {
|
||||
AlongStepDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user