Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -16,6 +16,10 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
September 4th, 2020 G.Cosmo
|
||||
- Fixed Coverity defect warnings for data initialisation and leaks in classes
|
||||
G4WeightCutOffProcess, G4ImportanceProcess and G4WeightWindowProcess.
|
||||
|
||||
February 17th, 2020 V.Ivanchenko
|
||||
- G4ImportanceProcess: added process type as fParallel
|
||||
|
||||
|
||||
@@ -23,22 +23,19 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ImportanceProcess
|
||||
// G4ImportanceProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Used internally by importance sampling in the "mass" geometry.
|
||||
// This process is a forced post step process. I will apply
|
||||
// This process is a forced post step process. It will apply
|
||||
// importance sampling if the particle crosses a boundary in the
|
||||
// "mass" geometry.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ImportanceProcess_hh
|
||||
#define G4ImportanceProcess_hh G4ImportanceProcess_hh
|
||||
#define G4ImportanceProcess_hh 1
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
@@ -63,9 +60,10 @@ class G4ImportanceProcess : public G4VProcess, public G4VTrackTerminator
|
||||
public: // with description
|
||||
|
||||
G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
const G4VIStore &aIstore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName = "ImportanceProcess", G4bool para = false);
|
||||
const G4VIStore &aIstore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
const G4String &aName = "ImportanceProcess",
|
||||
G4bool para = false);
|
||||
// creates a G4ParticleChange
|
||||
|
||||
virtual ~G4ImportanceProcess();
|
||||
@@ -130,34 +128,34 @@ private:
|
||||
|
||||
void CopyStep(const G4Step & step);
|
||||
|
||||
G4Step * fGhostStep;
|
||||
G4StepPoint * fGhostPreStepPoint;
|
||||
G4StepPoint * fGhostPostStepPoint;
|
||||
G4Step* fGhostStep = nullptr;
|
||||
G4StepPoint* fGhostPreStepPoint = nullptr;
|
||||
G4StepPoint* fGhostPostStepPoint = nullptr;
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
G4ParticleChange* fParticleChange = nullptr;
|
||||
const G4VImportanceAlgorithm &fImportanceAlgorithm;
|
||||
const G4VIStore &fIStore;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
const G4VIStore& fIStore;
|
||||
G4SamplingPostStepAction* fPostStepAction = nullptr;
|
||||
|
||||
G4TransportationManager* fTransportationManager;
|
||||
G4PathFinder* fPathFinder;
|
||||
G4TransportationManager* fTransportationManager = nullptr;
|
||||
G4PathFinder* fPathFinder = nullptr;
|
||||
|
||||
// -------------------------------
|
||||
// Navigation in the Ghost World:
|
||||
// -------------------------------
|
||||
G4String fGhostWorldName;
|
||||
G4VPhysicalVolume* fGhostWorld;
|
||||
G4Navigator* fGhostNavigator;
|
||||
G4int fNavigatorID;
|
||||
G4String fGhostWorldName = "NoParallelWorld";
|
||||
G4VPhysicalVolume* fGhostWorld = nullptr;
|
||||
G4Navigator* fGhostNavigator = nullptr;
|
||||
G4int fNavigatorID = -1;
|
||||
G4TouchableHandle fOldGhostTouchable;
|
||||
G4TouchableHandle fNewGhostTouchable;
|
||||
G4FieldTrack fFieldTrack;
|
||||
G4double fGhostSafety;
|
||||
G4bool fOnBoundary;
|
||||
G4FieldTrack fFieldTrack = '0';
|
||||
G4double fGhostSafety = -1;
|
||||
G4bool fOnBoundary = false;
|
||||
|
||||
G4bool fParaflag;
|
||||
G4FieldTrack fEndTrack;
|
||||
ELimited feLimited;
|
||||
G4bool fParaflag = false;
|
||||
G4FieldTrack fEndTrack = '0';
|
||||
ELimited feLimited = kDoNot;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -23,19 +23,16 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4WeightCutOffProcess
|
||||
// G4WeightCutOffProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Process for biasing particle-change cutoff.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4WeightCutOffProcess_hh
|
||||
#define G4WeightCutOffProcess_hh G4WeightCutOffProcess_hh
|
||||
#define G4WeightCutOffProcess_hh 1
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
@@ -63,13 +60,15 @@ public: // with description
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
// const G4VGCellFinder &aGCellFinder,
|
||||
const G4String &aName = "WeightCutOffProcess", G4bool para = false);
|
||||
const G4String &aName = "WeightCutOffProcess",
|
||||
G4bool para = false);
|
||||
// create a G4ParticleChange
|
||||
|
||||
virtual ~G4WeightCutOffProcess();
|
||||
// delete the G4ParticleChange
|
||||
|
||||
G4WeightCutOffProcess(const G4WeightCutOffProcess &) = delete;
|
||||
G4WeightCutOffProcess &operator=(const G4WeightCutOffProcess &) = delete;
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Set Parallel World
|
||||
@@ -118,40 +117,35 @@ private:
|
||||
|
||||
void CopyStep(const G4Step & step);
|
||||
|
||||
G4Step * fGhostStep;
|
||||
G4StepPoint * fGhostPreStepPoint;
|
||||
G4StepPoint * fGhostPostStepPoint;
|
||||
G4Step* fGhostStep = nullptr;
|
||||
G4StepPoint* fGhostPreStepPoint = nullptr;
|
||||
G4StepPoint* fGhostPostStepPoint = nullptr;
|
||||
|
||||
G4WeightCutOffProcess(const G4WeightCutOffProcess &);
|
||||
G4WeightCutOffProcess &operator=(const G4WeightCutOffProcess &);
|
||||
G4ParticleChange* fParticleChange = nullptr;
|
||||
G4double fWeightSurvival = 0.;
|
||||
G4double fWeightLimit = 0.;
|
||||
G4double fSourceImportance = 0.;
|
||||
G4VIStore* fIStore = nullptr;
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
G4double fWeightSurvival;
|
||||
G4double fWeightLimit;
|
||||
G4double fSourceImportance;
|
||||
G4VIStore *fIStore;
|
||||
// const G4VGCellFinder &fGCellFinder;
|
||||
|
||||
|
||||
G4TransportationManager* fTransportationManager;
|
||||
G4PathFinder* fPathFinder;
|
||||
G4TransportationManager* fTransportationManager = nullptr;
|
||||
G4PathFinder* fPathFinder = nullptr;
|
||||
|
||||
// -------------------------------
|
||||
// Navigation in the Ghost World:
|
||||
// -------------------------------
|
||||
G4String fGhostWorldName;
|
||||
G4VPhysicalVolume* fGhostWorld;
|
||||
G4Navigator* fGhostNavigator;
|
||||
G4int fNavigatorID;
|
||||
G4String fGhostWorldName = "NoParallelWorld";
|
||||
G4VPhysicalVolume* fGhostWorld = nullptr;
|
||||
G4Navigator* fGhostNavigator = nullptr;
|
||||
G4int fNavigatorID = -1;
|
||||
G4TouchableHandle fOldGhostTouchable;
|
||||
G4TouchableHandle fNewGhostTouchable;
|
||||
G4FieldTrack fFieldTrack;
|
||||
G4double fGhostSafety;
|
||||
G4bool fOnBoundary;
|
||||
G4FieldTrack fFieldTrack = '0';
|
||||
G4double fGhostSafety = -1;
|
||||
G4bool fOnBoundary = false;
|
||||
|
||||
G4bool fParaflag;
|
||||
G4FieldTrack fEndTrack;
|
||||
ELimited feLimited;
|
||||
G4FieldTrack fEndTrack = '0';
|
||||
ELimited feLimited = kDoNot;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,10 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MassWeioghtWindowProcess
|
||||
// G4WeightWindowProcess
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
@@ -35,10 +32,10 @@
|
||||
// weight window biasing on boundaries, collisions
|
||||
// or both according to the G4PlaceOfAction argument.
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef G4MassWeioghtWindowProcess_hh
|
||||
#define G4MassWeioghtWindowProcess_hh G4MassWeioghtWindowProcess_hh
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4WeightWindowProcess_hh
|
||||
#define G4WeightWindowProcess_hh 1
|
||||
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
@@ -68,8 +65,8 @@ public: // with description
|
||||
const G4VWeightWindowStore &aWWStore,
|
||||
const G4VTrackTerminator *TrackTerminator,
|
||||
G4PlaceOfAction placeOfAction,
|
||||
const G4String &aName =
|
||||
"WeightWindowProcess", G4bool para = false);
|
||||
const G4String &aName = "WeightWindowProcess",
|
||||
G4bool para = false);
|
||||
// creates a G4ParticleChange
|
||||
|
||||
virtual ~G4WeightWindowProcess();
|
||||
@@ -135,35 +132,35 @@ private:
|
||||
|
||||
void CopyStep(const G4Step & step);
|
||||
|
||||
G4Step * fGhostStep;
|
||||
G4StepPoint * fGhostPreStepPoint;
|
||||
G4StepPoint * fGhostPostStepPoint;
|
||||
G4Step* fGhostStep = nullptr;
|
||||
G4StepPoint* fGhostPreStepPoint = nullptr;
|
||||
G4StepPoint* fGhostPostStepPoint = nullptr;
|
||||
|
||||
G4ParticleChange *fParticleChange;
|
||||
const G4VWeightWindowAlgorithm &fWeightWindowAlgorithm;
|
||||
const G4VWeightWindowStore &fWeightWindowStore;
|
||||
G4SamplingPostStepAction *fPostStepAction;
|
||||
G4ParticleChange* fParticleChange = nullptr;
|
||||
const G4VWeightWindowAlgorithm& fWeightWindowAlgorithm;
|
||||
const G4VWeightWindowStore& fWeightWindowStore;
|
||||
G4SamplingPostStepAction* fPostStepAction = nullptr;
|
||||
G4PlaceOfAction fPlaceOfAction;
|
||||
|
||||
G4TransportationManager* fTransportationManager;
|
||||
G4PathFinder* fPathFinder;
|
||||
G4TransportationManager* fTransportationManager = nullptr;
|
||||
G4PathFinder* fPathFinder = nullptr;
|
||||
|
||||
// -------------------------------
|
||||
// Navigation in the Ghost World:
|
||||
// -------------------------------
|
||||
G4String fGhostWorldName;
|
||||
G4VPhysicalVolume* fGhostWorld;
|
||||
G4Navigator* fGhostNavigator;
|
||||
G4int fNavigatorID;
|
||||
G4String fGhostWorldName = "NoParallelWorld";
|
||||
G4VPhysicalVolume* fGhostWorld = nullptr;
|
||||
G4Navigator* fGhostNavigator = nullptr;
|
||||
G4int fNavigatorID = -1;
|
||||
G4TouchableHandle fOldGhostTouchable;
|
||||
G4TouchableHandle fNewGhostTouchable;
|
||||
G4FieldTrack fFieldTrack;
|
||||
G4double fGhostSafety;
|
||||
G4bool fOnBoundary;
|
||||
G4FieldTrack fFieldTrack = '0';
|
||||
G4double fGhostSafety = -1;
|
||||
G4bool fOnBoundary = false;
|
||||
|
||||
G4bool fParaflag;
|
||||
G4FieldTrack fEndTrack;
|
||||
ELimited feLimited;
|
||||
G4bool fParaflag = false;
|
||||
G4FieldTrack fEndTrack = '0';
|
||||
ELimited feLimited = kDoNot;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4biasing_imp
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,34 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/detector/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/biasing/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/biasing/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/transportation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4biasing_imp
|
||||
HEADERS
|
||||
G4GeometrySampler.hh
|
||||
|
||||
@@ -128,7 +128,7 @@ G4bool G4GeometrySampler::IsConfigured() const
|
||||
if (fIsConfigured)
|
||||
{
|
||||
G4cout << "WARNING - G4GeometrySampler::IsConfigured()"
|
||||
<< " Some initalization exists, use ClearSampling()"
|
||||
<< " Some initialization exists, use ClearSampling()"
|
||||
<< " before a new initialization !" << G4endl;
|
||||
isconf = true;
|
||||
}
|
||||
|
||||
@@ -23,14 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ImportanceProcess
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ImportanceProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4ImportanceProcess.hh"
|
||||
#include "G4VImportanceAlgorithm.hh"
|
||||
@@ -59,13 +55,10 @@ G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fImportanceAlgorithm(aImportanceAlgorithm),
|
||||
fIStore(aIstore),
|
||||
fPostStepAction(0),
|
||||
fGhostWorldName("NoParallelWorld"),fGhostWorld(0),
|
||||
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
|
||||
fParaflag(para), fEndTrack('0'), feLimited(kDoNot)
|
||||
fParaflag(para)
|
||||
{
|
||||
G4cout << "### G4ImportanceProcess:: Creating " << G4endl;
|
||||
if (TrackTerminator)
|
||||
if (TrackTerminator != nullptr)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
@@ -73,7 +66,7 @@ G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
if (!fParticleChange)
|
||||
if (fParticleChange == nullptr)
|
||||
{
|
||||
G4Exception("G4ImportanceProcess::G4ImportanceProcess()",
|
||||
"FatalError", FatalException,
|
||||
@@ -103,7 +96,7 @@ G4ImportanceProcess::~G4ImportanceProcess()
|
||||
|
||||
delete fPostStepAction;
|
||||
delete fParticleChange;
|
||||
// delete fGhostStep;
|
||||
// delete fGhostStep;
|
||||
// delete fGhostWorld;
|
||||
// delete fGhostNavigator;
|
||||
|
||||
@@ -159,7 +152,7 @@ void G4ImportanceProcess::StartTracking(G4Track* trk)
|
||||
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
|
||||
|
||||
if(fParaflag) {
|
||||
if(fGhostNavigator)
|
||||
if(fGhostNavigator != nullptr)
|
||||
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
|
||||
else
|
||||
{
|
||||
@@ -437,7 +430,7 @@ AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4VParticleChange* G4ImportanceProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4ImportanceProcess::
|
||||
@@ -448,7 +441,6 @@ AlongStepDoIt(const G4Track& aTrack, const G4Step& )
|
||||
//AH G4cout << " along step do it " << G4endl;
|
||||
pParticleChange->Initialize(aTrack);
|
||||
return pParticleChange;
|
||||
// return 0;
|
||||
}
|
||||
|
||||
void G4ImportanceProcess::CopyStep(const G4Step & step)
|
||||
|
||||
@@ -23,19 +23,13 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4WeightCutOffProcess
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4WeightCutOffProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4WeightCutOffProcess.hh"
|
||||
//#include "G4VScorer.hh"
|
||||
#include "G4GeometryCellStep.hh"
|
||||
//#include "G4GCellFinder.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4VIStore.hh"
|
||||
|
||||
@@ -55,7 +49,6 @@ G4WeightCutOffProcess(G4double wsurvival,
|
||||
G4double wlimit,
|
||||
G4double isource,
|
||||
G4VIStore *istore,
|
||||
// const G4VGCellFinder &aGCellFinder,
|
||||
const G4String &aName, G4bool para)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
@@ -63,10 +56,7 @@ G4WeightCutOffProcess(G4double wsurvival,
|
||||
fWeightLimit(wlimit),
|
||||
fSourceImportance(isource),
|
||||
fIStore(istore),
|
||||
// fGCellFinder(aGCellFinder),
|
||||
fGhostWorldName("NoParallelWorld"), fGhostWorld(0),
|
||||
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
|
||||
fParaflag(para), fEndTrack('0'), feLimited(kDoNot)
|
||||
fParaflag(para)
|
||||
{
|
||||
if (!fParticleChange)
|
||||
{
|
||||
@@ -93,7 +83,7 @@ G4WeightCutOffProcess(G4double wsurvival,
|
||||
G4WeightCutOffProcess::~G4WeightCutOffProcess()
|
||||
{
|
||||
delete fParticleChange;
|
||||
// delete fGhostStep;
|
||||
// delete fGhostStep;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +129,7 @@ void G4WeightCutOffProcess::StartTracking(G4Track* trk)
|
||||
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
|
||||
|
||||
if(fParaflag) {
|
||||
if(fGhostNavigator)
|
||||
if(fGhostNavigator != nullptr)
|
||||
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
|
||||
else
|
||||
{
|
||||
@@ -229,7 +219,7 @@ G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
|
||||
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
|
||||
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep);
|
||||
G4double R = fSourceImportance;
|
||||
if (fIStore)
|
||||
if (fIStore != nullptr)
|
||||
{
|
||||
G4double i = fIStore->GetImportance(postCell);
|
||||
if (i>0)
|
||||
@@ -259,7 +249,7 @@ G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
|
||||
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(aStep);
|
||||
// G4GeometryCell postCell = fGCellFinder.GetPostGeometryCell(fGhostStep);
|
||||
G4double R = fSourceImportance;
|
||||
if (fIStore)
|
||||
if (fIStore != nullptr)
|
||||
{
|
||||
G4double i = fIStore->GetImportance(postCell);
|
||||
if (i>0)
|
||||
@@ -376,7 +366,7 @@ AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4VParticleChange*
|
||||
G4WeightCutOffProcess::AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
G4VParticleChange*
|
||||
@@ -386,8 +376,6 @@ G4WeightCutOffProcess::AlongStepDoIt(const G4Track& track, const G4Step&)
|
||||
// Expecting G4Transportation to move the track
|
||||
pParticleChange->Initialize(track);
|
||||
return pParticleChange;
|
||||
|
||||
// return 0;
|
||||
}
|
||||
|
||||
void G4WeightCutOffProcess::CopyStep(const G4Step & step)
|
||||
|
||||
@@ -23,14 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4WeightWindowProcess
|
||||
//
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4WeightWindowProcess.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Author: Michael Dressel, 2002
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4WeightWindowProcess.hh"
|
||||
#include "G4VWeightWindowAlgorithm.hh"
|
||||
@@ -61,13 +57,9 @@ G4WeightWindowProcess::G4WeightWindowProcess(
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fWeightWindowAlgorithm(aWeightWindowAlgorithm),
|
||||
fWeightWindowStore(aWWStore),
|
||||
fPostStepAction(0),
|
||||
fPlaceOfAction(placeOfAction),
|
||||
fGhostWorldName("NoParallelWorld"),fGhostWorld(0),
|
||||
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
|
||||
fParaflag(), fEndTrack('0'), feLimited(kDoNot)
|
||||
fPlaceOfAction(placeOfAction)
|
||||
{
|
||||
if (TrackTerminator)
|
||||
if (TrackTerminator != nullptr)
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*TrackTerminator);
|
||||
}
|
||||
@@ -75,7 +67,7 @@ G4WeightWindowProcess::G4WeightWindowProcess(
|
||||
{
|
||||
fPostStepAction = new G4SamplingPostStepAction(*this);
|
||||
}
|
||||
if (!fParticleChange)
|
||||
if (fParticleChange == nullptr)
|
||||
{
|
||||
G4Exception("G4WeightWindowProcess::G4WeightWindowProcess()",
|
||||
"FatalError", FatalException,
|
||||
@@ -104,7 +96,7 @@ G4WeightWindowProcess::~G4WeightWindowProcess()
|
||||
|
||||
delete fPostStepAction;
|
||||
delete fParticleChange;
|
||||
// delete fGhostStep;
|
||||
// delete fGhostStep;
|
||||
|
||||
}
|
||||
|
||||
@@ -151,7 +143,7 @@ void G4WeightWindowProcess::StartTracking(G4Track* trk)
|
||||
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
|
||||
|
||||
if(fParaflag) {
|
||||
if(fGhostNavigator)
|
||||
if(fGhostNavigator != nullptr)
|
||||
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
|
||||
else
|
||||
{
|
||||
@@ -381,7 +373,7 @@ AtRestGetPhysicalInteractionLength(const G4Track& ,
|
||||
G4VParticleChange* G4WeightWindowProcess::
|
||||
AtRestDoIt(const G4Track&, const G4Step&)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
G4VParticleChange* G4WeightWindowProcess::
|
||||
@@ -391,8 +383,6 @@ AlongStepDoIt(const G4Track& track, const G4Step&)
|
||||
// Expecting G4Transportation to move the track
|
||||
pParticleChange->Initialize(track);
|
||||
return pParticleChange;
|
||||
|
||||
// return 0;
|
||||
}
|
||||
|
||||
void G4WeightWindowProcess::CopyStep(const G4Step & step)
|
||||
|
||||
Reference in New Issue
Block a user