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 Gabriele Cosmo (procbiasing-V10-06-01)
|
||||
- Fixed Coverity defect warnings for data initialisation and leaks in classes
|
||||
G4WeightCutOffProcess, G4ImportanceProcess and G4WeightWindowProcess.
|
||||
|
||||
February 17th, 2020 Vladimir Ivanchenko (procbiasing-V10-06-00)
|
||||
- G4ImportanceProcess: added process type as fParallel
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4biasing_gen
|
||||
#
|
||||
# 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,33 +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/transportation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4biasing_gen
|
||||
HEADERS
|
||||
G4BiasingHelper.hh
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
// step and propose a final state.
|
||||
//
|
||||
// This method is the first operator method called, it is called at the
|
||||
// by the PostStepGetPhysicalInterationLenght(...) method of the
|
||||
// by the PostStepGetPhysicalInterationLength(...) method of the
|
||||
// G4BiasingProcessInterface.
|
||||
//
|
||||
// 2) physics-based biasing:
|
||||
@@ -95,7 +95,7 @@
|
||||
// in the operator before returning the related operation to the process.
|
||||
//
|
||||
// This method is the second operator one called in a step, it is called by
|
||||
// the PostStepGetPhysicalInterationLenght(...) method of the
|
||||
// the PostStepGetPhysicalInterationLength(...) method of the
|
||||
// G4BiasingProcessInterface.
|
||||
//
|
||||
// b) The biasing of the physics process final state is proposed by:
|
||||
@@ -209,7 +209,7 @@ protected:
|
||||
// -- If a null pointer is returned, the analog -unbiased- behavior is adopted.
|
||||
// -- non-physics-based biasing:
|
||||
// -----------------------------
|
||||
// -- [ First operator method called, at the PostStepGetPhysicalInterationLenght(...) level. ]
|
||||
// -- [ First operator method called, at the PostStepGetPhysicalInterationLength(...) level. ]
|
||||
virtual G4VBiasingOperation* ProposeNonPhysicsBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess ) = 0;
|
||||
// -- physics-based biasing:
|
||||
// -------------------------
|
||||
@@ -220,7 +220,7 @@ protected:
|
||||
// -- The informations provided by the G4BiasingProcessInterface calling process (previous occurrence operation, previous step length,
|
||||
// -- etc.) might be useful for doing this. They will be useful also to decide with continuing with a same operation proposed
|
||||
// -- in the previous step, updating the interaction law taking into account the new G4Track state and the previous step size.
|
||||
// -- [ Second operator method called, at the PostStepGetPhysicalInterationLenght(...) level. ]
|
||||
// -- [ Second operator method called, at the PostStepGetPhysicalInterationLength(...) level. ]
|
||||
virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess ) = 0;
|
||||
// -- [ Third operator method called, at the PostStepDoIt(...) level. ]
|
||||
virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess ) = 0;
|
||||
@@ -245,9 +245,9 @@ protected:
|
||||
|
||||
|
||||
protected:
|
||||
// -----------------------------------
|
||||
// -- Delegation to an other operator:
|
||||
// -----------------------------------
|
||||
// ----------------------------------
|
||||
// -- Delegation to another operator:
|
||||
// ----------------------------------
|
||||
// -- An operator may wish to select a sequence of operations already implemented in an
|
||||
// -- existing biasing operator. In this case, this operator can delegate its work to
|
||||
// -- the "delegated" one by calling DelegateTo( G4VBiasingOperation* delegated );
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
|
||||
|
||||
|
||||
// -- used by biasing process interface, or used by an other operator (not expected to be invoked differently than with these two cases):
|
||||
// -- used by biasing process interface, or used by another operator (not expected to be invoked differently than with these two cases):
|
||||
public:
|
||||
G4VBiasingOperation* GetProposedOccurenceBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess );
|
||||
G4VBiasingOperation* GetProposedFinalStateBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess );
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4biasing_mgt
|
||||
#
|
||||
# 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,33 +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/transportation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4biasing_mgt
|
||||
HEADERS
|
||||
G4VProcessPlacer.hh
|
||||
|
||||
@@ -66,7 +66,7 @@ void G4VBiasingOperator::AttachTo(const G4LogicalVolume* logical)
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Biasing operator `" << GetName()
|
||||
<< "' can not be attached to Logical volume `"
|
||||
<< logical->GetName() << "' which is already used by an other operator !" << G4endl;
|
||||
<< logical->GetName() << "' which is already used by another operator !" << G4endl;
|
||||
G4Exception("G4VBiasingOperator::AttachTo(...)",
|
||||
"BIAS.MNG.01",
|
||||
JustWarning,
|
||||
|
||||
Reference in New Issue
Block a user