Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4MScoreProcess.cc,v 1.10 2003/04/02 16:59:14 dressel Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MScoreProcess.cc,v 1.11 2003/11/26 14:51:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -37,15 +37,16 @@
#include "G4VParallelStepper.hh"
G4MScoreProcess::G4MScoreProcess(G4VScorer &aScorer,
const G4String &aName)
:
G4VProcess(aName),
fScorer(aScorer),
fKillTrack(false)
const G4String &aName)
: G4VProcess(aName),
fScorer(aScorer),
fKillTrack(false)
{
G4VProcess::pParticleChange = new G4ParticleChange;
if (!G4VProcess::pParticleChange) {
G4Exception("ERROR:G4MScoreProcess::G4MScoreProcess new failed to create G4ParticleChange!");
if (!G4VProcess::pParticleChange)
{
G4Exception("G4MScoreProcess::G4MScoreProcess()", "Fatal Error",
FatalException, "Failed to allocate G4ParticleChange !");
}
}
@@ -56,8 +57,8 @@ G4MScoreProcess::~G4MScoreProcess()
G4double G4MScoreProcess::
PostStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4ForceCondition* condition)
G4double ,
G4ForceCondition* condition)
{
*condition = Forced;
return kInfinity;
@@ -68,26 +69,28 @@ G4MScoreProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
{
pParticleChange->Initialize(aTrack);
if (aStep.GetStepLength() > kCarTolerance) {
if (aStep.GetStepLength() > kCarTolerance)
{
G4StepPoint *prepoint = aStep.GetPreStepPoint();
G4StepPoint *postpoint = aStep.GetPostStepPoint();
G4GeometryCell prekey(*(prepoint->GetPhysicalVolume()),
prepoint->GetTouchable()->GetReplicaNumber());
prepoint->GetTouchable()->GetReplicaNumber());
G4GeometryCell postkey(*(postpoint->GetPhysicalVolume()),
postpoint->GetTouchable()->GetReplicaNumber());
postpoint->GetTouchable()->GetReplicaNumber());
G4GeometryCellStep pstep(prekey, postkey);
pstep.SetCrossBoundary(false);
if (prekey != postkey) {
if (prekey != postkey)
{
pstep.SetCrossBoundary(true);
}
fScorer.Score(aStep, pstep);
}
if (fKillTrack) {
if (fKillTrack)
{
fKillTrack = false;
pParticleChange->SetStatusChange(fStopAndKill);
}
@@ -95,36 +98,42 @@ G4MScoreProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
return G4VProcess::pParticleChange;
}
const G4String &G4MScoreProcess::GetName() const {
const G4String &G4MScoreProcess::GetName() const
{
return theProcessName;
}
G4double G4MScoreProcess::
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*) {
G4double ,
G4double ,
G4double& ,
G4GPILSelection*)
{
return -1.0;
}
G4double G4MScoreProcess::
AtRestGetPhysicalInteractionLength(const G4Track&,
G4ForceCondition*) {
G4ForceCondition*)
{
return -1.0;
}
G4VParticleChange* G4MScoreProcess::AtRestDoIt(const G4Track&,
const G4Step&) {
const G4Step&)
{
return 0;
}
G4VParticleChange* G4MScoreProcess::AlongStepDoIt(const G4Track&,
const G4Step&) {
const G4Step&)
{
return 0;
}
void G4MScoreProcess::KillTrack() const{
void G4MScoreProcess::KillTrack() const
{
fKillTrack = true;
}