Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 94220 2015-11-09 08:26:57Z gcosmo $
|
||||
$Id: History 96031 2016-03-09 08:23:10Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,34 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
March 8th, 2016, M. Verderi
|
||||
- Clean up for unused variable fParticleChange in G4BiasingProcessInterface
|
||||
- proc-biasgen-V10-02-03
|
||||
|
||||
March 7th, 2016, M. Verderi
|
||||
- Fix coverity warnings in src/G4BiasingProcessInterface.cc
|
||||
- proc-biasgen-V10-02-02
|
||||
|
||||
January 20th, 2016, M. Verderi
|
||||
- fix compilation warning in order initialization of data members
|
||||
in src/G4BiasingProcessInterface.cc.
|
||||
- proc-biasgen-V10-02-01
|
||||
|
||||
January 19th, 2016, M. Verderi
|
||||
- fix various coverity warnings (unitialized variables). Should have no
|
||||
effect. Fixes in:
|
||||
src/G4BOptnChangeCrossSection.cc
|
||||
src/G4BOptnCloning.cc
|
||||
src/G4BOptnForceCommonTruncatedExp.cc
|
||||
src/G4BOptnForceFreeFlight.cc
|
||||
src/G4BOptrForceCollision.cc
|
||||
src/G4BiasingProcessInterface.cc
|
||||
include/G4BiasingProcessSharedData.hh
|
||||
and minor cosmetics in:
|
||||
include/G4BOptnCloning.hh
|
||||
include/G4BOptnForceFreeFlight.hh
|
||||
- proc-biasgen-V10-02-00
|
||||
|
||||
November 6th, 2015, M. Verderi
|
||||
- fix non initialization of model IDs in MT mode.
|
||||
- prevent "over initialization" of operators (each
|
||||
|
||||
@@ -79,9 +79,10 @@ public:
|
||||
G4Track* GetCloneTrack() const { return fCloneTrack; }
|
||||
|
||||
private:
|
||||
G4double fClone1W, fClone2W;
|
||||
G4double fClone1W,
|
||||
fClone2W;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4Track* fCloneTrack;
|
||||
G4Track* fCloneTrack;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -90,9 +90,10 @@ public:
|
||||
|
||||
private:
|
||||
G4ILawForceFreeFlight* fForceFreeFlightInteractionLaw;
|
||||
G4double fCumulatedWeightChange, fInitialTrackWeight;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4bool fOperationComplete;
|
||||
G4double fCumulatedWeightChange,
|
||||
fInitialTrackWeight;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4bool fOperationComplete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,6 @@ class G4InteractionLawPhysical;
|
||||
class G4VBiasingOperator;
|
||||
class G4VBiasingOperation;
|
||||
class G4ParticleChangeForOccurenceBiasing;
|
||||
class G4ParticleChange;
|
||||
class G4ParticleChangeForNothing;
|
||||
|
||||
class G4BiasingProcessInterface : public G4VProcess {
|
||||
@@ -210,17 +209,17 @@ private:
|
||||
void ResetForUnbiasedTracking();
|
||||
void ReorderBiasingVectorAsGPIL();
|
||||
|
||||
G4Track* fCurrentTrack;
|
||||
G4double fPreviousStepSize;
|
||||
G4double fCurrentMinimumStep;
|
||||
G4double fProposedSafety;
|
||||
G4Track* fCurrentTrack;
|
||||
G4double fPreviousStepSize;
|
||||
G4double fCurrentMinimumStep;
|
||||
G4double fProposedSafety;
|
||||
|
||||
G4VBiasingOperation* fOccurenceBiasingOperation;
|
||||
G4VBiasingOperation* fFinalStateBiasingOperation;
|
||||
G4VBiasingOperation* fNonPhysicsBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousOccurenceBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousFinalStateBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousNonPhysicsBiasingOperation;
|
||||
G4VBiasingOperation* fOccurenceBiasingOperation;
|
||||
G4VBiasingOperation* fFinalStateBiasingOperation;
|
||||
G4VBiasingOperation* fNonPhysicsBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousOccurenceBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousFinalStateBiasingOperation;
|
||||
G4VBiasingOperation* fPreviousNonPhysicsBiasingOperation;
|
||||
|
||||
G4bool fResetWrappedProcessInteractionLength;
|
||||
|
||||
@@ -245,7 +244,6 @@ private:
|
||||
const G4VBiasingInteractionLaw* fPreviousBiasingInteractionLaw;
|
||||
G4InteractionLawPhysical* fPhysicalInteractionLaw;
|
||||
G4ParticleChangeForOccurenceBiasing* fOccurenceBiasingParticleChange;
|
||||
G4ParticleChange* fParticleChange; // -- to be changed with a light version for weight only
|
||||
G4ParticleChangeForNothing* fDummyParticleChange;
|
||||
G4bool fFirstLastFlags[8];
|
||||
G4int IdxFirstLast(G4int firstLast, G4int GPILDoIt, G4int physAll) const
|
||||
@@ -261,27 +259,27 @@ private:
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
// -- the instance being "firstGPIL" does work shared by other instances:
|
||||
G4bool fIamFirstGPIL;
|
||||
G4bool fIamFirstGPIL;
|
||||
|
||||
|
||||
// -- MUST be **thread local**:
|
||||
static G4Cache<G4bool> fResetInteractionLaws;
|
||||
static G4Cache<G4bool> fCommonStart;
|
||||
static G4Cache<G4bool> fCommonEnd;
|
||||
static G4Cache<G4bool> fDoCommonConfigure;
|
||||
static G4Cache<G4bool> fResetInteractionLaws;
|
||||
static G4Cache<G4bool> fCommonStart;
|
||||
static G4Cache<G4bool> fCommonEnd;
|
||||
static G4Cache<G4bool> fDoCommonConfigure;
|
||||
|
||||
const G4ProcessManager* fProcessManager;
|
||||
const G4ProcessManager* fProcessManager;
|
||||
|
||||
|
||||
// -- the data shared among processes attached to a same process manager:
|
||||
G4BiasingProcessSharedData* fSharedData;
|
||||
G4BiasingProcessSharedData* fSharedData;
|
||||
// -- thread local:
|
||||
// -- Map between process managers and shared data. This map is made of
|
||||
// -- pointers of G4BiasingSharedData instead of objects themselves :
|
||||
// -- each process needs to keep a valid pointer of a shared data object
|
||||
// -- but a map of object will make pointers invalid when map is increaded.
|
||||
static G4MapCache< const G4ProcessManager*,
|
||||
G4BiasingProcessSharedData* > fSharedDataMap;
|
||||
G4BiasingProcessSharedData* > fSharedDataMap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -74,7 +74,13 @@ public:
|
||||
private:
|
||||
// -- Methods used by the G4BiasingProcessInterface objects, thanks to class friendness.
|
||||
// -- Object is created by G4BiasingProcessInterface object:
|
||||
G4BiasingProcessSharedData( const G4ProcessManager* mgr) : fProcessManager(mgr) {}
|
||||
G4BiasingProcessSharedData( const G4ProcessManager* mgr)
|
||||
: fProcessManager (mgr),
|
||||
fCurrentBiasingOperator (0),
|
||||
fPreviousBiasingOperator(0),
|
||||
fIsNewOperator (true),
|
||||
fLeavingPreviousOperator(false)
|
||||
{}
|
||||
~G4BiasingProcessSharedData() {}
|
||||
// -- biasing operators:
|
||||
void CurrentBiasingOperator( G4VBiasingOperator* );
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
|
||||
G4BOptnChangeCrossSection::G4BOptnChangeCrossSection(G4String name)
|
||||
: G4VBiasingOperation(name)
|
||||
: G4VBiasingOperation( name ),
|
||||
fInteractionOccured( false )
|
||||
{
|
||||
fBiasedExponentialLaw = new G4InteractionLawPhysical("LawForOperation"+name);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
|
||||
|
||||
G4BOptnCloning::G4BOptnCloning(G4String name)
|
||||
: G4VBiasingOperation(name),
|
||||
: G4VBiasingOperation( name ),
|
||||
fClone1W ( -1.0 ),
|
||||
fClone2W ( -1.0 ),
|
||||
fParticleChange(),
|
||||
fCloneTrack(nullptr)
|
||||
fCloneTrack ( nullptr )
|
||||
{}
|
||||
|
||||
G4BOptnCloning::~G4BOptnCloning()
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
|
||||
G4BOptnForceCommonTruncatedExp::G4BOptnForceCommonTruncatedExp(G4String name)
|
||||
: G4VBiasingOperation(name),
|
||||
fInteractionOccured(false)
|
||||
fNumberOfSharing(0),
|
||||
fProcessToApply(nullptr),
|
||||
fInteractionOccured(false),
|
||||
fMaximumDistance(-1.0)
|
||||
{
|
||||
fCommonTruncatedExpLaw = new G4ILawCommonTruncatedExp("ExpLawForOperation"+name);
|
||||
fForceFreeFlightLaw = new G4ILawForceFreeFlight ("FFFLawForOperation"+name);
|
||||
@@ -47,8 +50,9 @@ G4BOptnForceCommonTruncatedExp::~G4BOptnForceCommonTruncatedExp()
|
||||
if ( fForceFreeFlightLaw ) delete fForceFreeFlightLaw;
|
||||
}
|
||||
|
||||
const G4VBiasingInteractionLaw* G4BOptnForceCommonTruncatedExp::ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* callingProcess,
|
||||
G4ForceCondition& proposeForceCondition )
|
||||
const G4VBiasingInteractionLaw* G4BOptnForceCommonTruncatedExp::
|
||||
ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* callingProcess,
|
||||
G4ForceCondition& proposeForceCondition )
|
||||
{
|
||||
if ( callingProcess->GetWrappedProcess() == fProcessToApply )
|
||||
{
|
||||
|
||||
@@ -31,8 +31,10 @@
|
||||
|
||||
|
||||
G4BOptnForceFreeFlight::G4BOptnForceFreeFlight(G4String name)
|
||||
: G4VBiasingOperation(name),
|
||||
fOperationComplete(true)
|
||||
: G4VBiasingOperation ( name ),
|
||||
fCumulatedWeightChange ( -1.0 ),
|
||||
fInitialTrackWeight ( -1.0 ),
|
||||
fOperationComplete ( true )
|
||||
{
|
||||
fForceFreeFlightInteractionLaw = new G4ILawForceFreeFlight("LawForOperation"+name);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
G4BOptrForceCollision::G4BOptrForceCollision(G4String particleName, G4String name)
|
||||
: G4VBiasingOperator(name),
|
||||
fForceCollisionModelID(-1),
|
||||
fCurrentTrack(nullptr),
|
||||
fCurrentTrackData(nullptr),
|
||||
fInitialTrackWeight(-1.0),
|
||||
fSetup(true)
|
||||
{
|
||||
fSharedForceInteractionOperation = new G4BOptnForceCommonTruncatedExp("SharedForceInteraction");
|
||||
@@ -68,7 +70,9 @@ G4BOptrForceCollision::G4BOptrForceCollision(G4String particleName, G4String nam
|
||||
G4BOptrForceCollision::G4BOptrForceCollision(const G4ParticleDefinition* particle, G4String name)
|
||||
: G4VBiasingOperator(name),
|
||||
fForceCollisionModelID(-1),
|
||||
fCurrentTrack(nullptr),
|
||||
fCurrentTrackData(nullptr),
|
||||
fInitialTrackWeight(-1.0),
|
||||
fSetup(true)
|
||||
{
|
||||
fSharedForceInteractionOperation = new G4BOptnForceCommonTruncatedExp("SharedForceInteraction");
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "G4VBiasingOperator.hh"
|
||||
#include "G4VBiasingOperation.hh"
|
||||
#include "G4ParticleChangeForOccurenceBiasing.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4ParticleChangeForNothing.hh"
|
||||
#include "G4VBiasingInteractionLaw.hh"
|
||||
#include "G4InteractionLawPhysical.hh"
|
||||
@@ -42,19 +41,34 @@ G4MapCache< const G4ProcessManager*, G4BiasingProcessSharedData* > G4BiasingProc
|
||||
|
||||
|
||||
G4BiasingProcessInterface::G4BiasingProcessInterface(G4String name)
|
||||
: G4VProcess ( name ),
|
||||
fWrappedProcess ( 0 ),
|
||||
fIsPhysicsBasedBiasing ( false ),
|
||||
fWrappedProcessIsAtRest ( false ),
|
||||
fWrappedProcessIsAlong ( false ),
|
||||
fWrappedProcessIsPost ( false ),
|
||||
fWrappedProcessInteractionLength( -1.0 ),
|
||||
fBiasingInteractionLaw ( 0 ),
|
||||
fPhysicalInteractionLaw ( 0 ),
|
||||
fOccurenceBiasingParticleChange ( 0 ),
|
||||
fIamFirstGPIL ( false ),
|
||||
fSharedData ( 0 )
|
||||
|
||||
: G4VProcess ( name ),
|
||||
fCurrentTrack ( nullptr ),
|
||||
fPreviousStepSize (-1.0), fCurrentMinimumStep( -1.0 ), fProposedSafety ( -1.0),
|
||||
fOccurenceBiasingOperation( nullptr ), fFinalStateBiasingOperation( nullptr ), fNonPhysicsBiasingOperation( nullptr ),
|
||||
fPreviousOccurenceBiasingOperation( nullptr ), fPreviousFinalStateBiasingOperation( nullptr ), fPreviousNonPhysicsBiasingOperation( nullptr ),
|
||||
fResetWrappedProcessInteractionLength( true ),
|
||||
fWrappedProcess ( nullptr ),
|
||||
fIsPhysicsBasedBiasing ( false ),
|
||||
fWrappedProcessIsAtRest ( false ),
|
||||
fWrappedProcessIsAlong ( false ),
|
||||
fWrappedProcessIsPost ( false ),
|
||||
fWrappedProcessPostStepGPIL ( -1.0 ),
|
||||
fBiasingPostStepGPIL ( -1.0 ),
|
||||
fWrappedProcessInteractionLength ( -1.0 ),
|
||||
fWrappedProcessForceCondition ( NotForced ),
|
||||
fBiasingForceCondition ( NotForced ),
|
||||
fWrappedProcessAlongStepGPIL ( -1.0 ),
|
||||
fBiasingAlongStepGPIL ( -1.0 ),
|
||||
fWrappedProcessGPILSelection ( NotCandidateForSelection ),
|
||||
fBiasingGPILSelection ( NotCandidateForSelection ),
|
||||
fBiasingInteractionLaw ( nullptr ),
|
||||
fPreviousBiasingInteractionLaw ( nullptr ),
|
||||
fPhysicalInteractionLaw ( nullptr ),
|
||||
fOccurenceBiasingParticleChange ( nullptr ),
|
||||
fDummyParticleChange ( nullptr ),
|
||||
fIamFirstGPIL ( false ),
|
||||
fProcessManager ( nullptr ),
|
||||
fSharedData ( nullptr )
|
||||
{
|
||||
for (G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] = false;
|
||||
fResetInteractionLaws.Put( true );
|
||||
@@ -69,17 +83,32 @@ G4BiasingProcessInterface::G4BiasingProcessInterface(G4VProcess* wrappedProcess,
|
||||
G4String useThisName)
|
||||
: G4VProcess( useThisName != "" ? useThisName : "biasWrapper("+wrappedProcess->GetProcessName()+")",
|
||||
wrappedProcess->GetProcessType()),
|
||||
fWrappedProcess ( wrappedProcess ),
|
||||
fIsPhysicsBasedBiasing ( true ),
|
||||
fWrappedProcessIsAtRest ( wrappedIsAtRest ),
|
||||
fWrappedProcessIsAlong ( wrappedIsAlongStep ),
|
||||
fWrappedProcessIsPost ( wrappedIsPostStep ),
|
||||
fWrappedProcessInteractionLength( -1.0 ),
|
||||
fBiasingInteractionLaw ( 0 ),
|
||||
fPhysicalInteractionLaw ( 0 ),
|
||||
fOccurenceBiasingParticleChange ( 0 ),
|
||||
fIamFirstGPIL ( false ),
|
||||
fSharedData ( 0 )
|
||||
fCurrentTrack ( nullptr ),
|
||||
fPreviousStepSize (-1.0), fCurrentMinimumStep( -1.0 ), fProposedSafety ( -1.0),
|
||||
fOccurenceBiasingOperation( nullptr ), fFinalStateBiasingOperation( nullptr ), fNonPhysicsBiasingOperation( nullptr ),
|
||||
fPreviousOccurenceBiasingOperation( nullptr ), fPreviousFinalStateBiasingOperation( nullptr ), fPreviousNonPhysicsBiasingOperation( nullptr ),
|
||||
fResetWrappedProcessInteractionLength ( false ),
|
||||
fWrappedProcess ( wrappedProcess ),
|
||||
fIsPhysicsBasedBiasing ( true ),
|
||||
fWrappedProcessIsAtRest ( wrappedIsAtRest ),
|
||||
fWrappedProcessIsAlong ( wrappedIsAlongStep ),
|
||||
fWrappedProcessIsPost ( wrappedIsPostStep ),
|
||||
fWrappedProcessPostStepGPIL ( -1.0 ),
|
||||
fBiasingPostStepGPIL ( -1.0 ),
|
||||
fWrappedProcessInteractionLength ( -1.0 ),
|
||||
fWrappedProcessForceCondition ( NotForced ),
|
||||
fBiasingForceCondition ( NotForced ),
|
||||
fWrappedProcessAlongStepGPIL ( -1.0 ),
|
||||
fBiasingAlongStepGPIL ( -1.0 ),
|
||||
fWrappedProcessGPILSelection ( NotCandidateForSelection ),
|
||||
fBiasingGPILSelection ( NotCandidateForSelection ),
|
||||
fBiasingInteractionLaw ( nullptr ),
|
||||
fPreviousBiasingInteractionLaw ( nullptr ),
|
||||
fPhysicalInteractionLaw ( nullptr ),
|
||||
fOccurenceBiasingParticleChange ( nullptr ),
|
||||
fIamFirstGPIL ( false ),
|
||||
fProcessManager ( nullptr ),
|
||||
fSharedData ( nullptr )
|
||||
{
|
||||
for (G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] = false;
|
||||
fResetInteractionLaws.Put( true );
|
||||
@@ -93,7 +122,6 @@ G4BiasingProcessInterface::G4BiasingProcessInterface(G4VProcess* wrappedProcess,
|
||||
fPhysicalInteractionLaw = new G4InteractionLawPhysical("PhysicalInteractionLawFor("+GetProcessName()+")");
|
||||
// -- instantiate particle change wrapper for occurence biaising:
|
||||
fOccurenceBiasingParticleChange = new G4ParticleChangeForOccurenceBiasing("biasingPCfor"+GetProcessName());
|
||||
fParticleChange = new G4ParticleChange();
|
||||
// -- instantiate a "do nothing" particle change:
|
||||
fDummyParticleChange = new G4ParticleChangeForNothing();
|
||||
}
|
||||
@@ -104,7 +132,6 @@ G4BiasingProcessInterface::~G4BiasingProcessInterface()
|
||||
{
|
||||
if ( fPhysicalInteractionLaw != 0 ) delete fPhysicalInteractionLaw;
|
||||
if ( fOccurenceBiasingParticleChange ) delete fOccurenceBiasingParticleChange;
|
||||
if ( fParticleChange ) delete fParticleChange;
|
||||
if ( fDummyParticleChange ) delete fDummyParticleChange;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 94224 2015-11-09 08:30:58Z gcosmo $
|
||||
$Id: History 97276 2016-05-31 14:21:35Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,14 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 30th, 2016, M. Verderi
|
||||
- check for unbounded while loop in G4ProcessPlacer.cc
|
||||
- tag : : proc-biasmng-V10-02-01
|
||||
|
||||
January 19th, 2016, M. Verderi
|
||||
- fix coveriy warnings in src/G4VBiasingOperator.cc
|
||||
- tag : proc-biasmng-V10-02-00
|
||||
|
||||
November 6th, 2015, M. Verderi
|
||||
- adaptation to using G4VAuxiliaryTrackInformation:
|
||||
o Removal of classes:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessPlacer.cc 77477 2013-11-25 09:42:24Z gcosmo $
|
||||
// $Id: G4ProcessPlacer.cc 97276 2016-05-31 14:21:35Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -165,7 +165,7 @@ G4ProcessManager *G4ProcessPlacer::GetProcessManager()
|
||||
G4ProcessManager *processmanager = 0;
|
||||
// find process manager ---------------------------
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() )
|
||||
while( (*theParticleIterator)() ) /* while checked for unending loop, 30.05.2016, Marc Verderi */
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
if (particle->GetParticleName() == fParticleName)
|
||||
|
||||
@@ -34,7 +34,17 @@ G4Cache< G4BiasingOperatorStateNotifier* > G4VBiasingOperator::fS
|
||||
|
||||
|
||||
G4VBiasingOperator::G4VBiasingOperator(G4String name)
|
||||
: fName(name)
|
||||
: fName (name),
|
||||
fOccurenceBiasingOperation (nullptr),
|
||||
fFinalStateBiasingOperation (nullptr),
|
||||
fNonPhysicsBiasingOperation (nullptr),
|
||||
fPreviousProposedOccurenceBiasingOperation (nullptr),
|
||||
fPreviousProposedFinalStateBiasingOperation(nullptr),
|
||||
fPreviousProposedNonPhysicsBiasingOperation(nullptr),
|
||||
fPreviousAppliedOccurenceBiasingOperation (nullptr),
|
||||
fPreviousAppliedFinalStateBiasingOperation (nullptr),
|
||||
fPreviousAppliedNonPhysicsBiasingOperation (nullptr),
|
||||
fPreviousBiasingAppliedCase (BAC_None)
|
||||
{
|
||||
fOperators.Push_back(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user