Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 97276 2016-05-31 14:21:35Z gcosmo $
|
||||
$Id: History 101028 2016-11-04 08:40:08Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,12 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov 3rd, 2016, M. Verderi
|
||||
- remove obsolete BAC_DenyInteraction value in G4BiasingAppliedCase
|
||||
enum and clean up of obsolete (and commeted out) portion of codes
|
||||
related to this case.
|
||||
- tag : : proc-biasmng-V10-02-02
|
||||
|
||||
May 30th, 2016, M. Verderi
|
||||
- check for unbounded while loop in G4ProcessPlacer.cc
|
||||
- tag : : proc-biasmng-V10-02-01
|
||||
|
||||
@@ -47,7 +47,6 @@ enum G4BiasingAppliedCase
|
||||
{
|
||||
BAC_None, // -- not under biasing
|
||||
BAC_NonPhysics, // -- splitting, killing (not a physics process biasing)
|
||||
BAC_DenyInteraction, // -- physics process occurence biasing, denying production of physics process final state -- *will be deprecated*
|
||||
BAC_FinalState, // -- physics process final state biasing only
|
||||
BAC_Occurence // -- physics process occurence biasing; may come together with a final state biasing
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
// $Id: $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// Geant4 class header file
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -141,21 +141,6 @@ public:
|
||||
const G4Step* /* step */,
|
||||
G4double /* weightForNonInteraction */ ) {}
|
||||
|
||||
// ----
|
||||
// ---- I.4) Methods called in at the PostStepDoIt(...) level :
|
||||
// ----
|
||||
// ------ o Method allowing the operation to prevent wrapped process interaction to happen:
|
||||
// ------ - has to return true if interaction is denied by the operation
|
||||
// ------ - the primary is left unchanged in this case
|
||||
// ------ - but its weight becomes the one given by proposedTrackWeight.
|
||||
// DEPRECATED
|
||||
// virtual G4bool DenyProcessPostStepDoIt( const G4BiasingProcessInterface* /* callingProcess */,
|
||||
// const G4Track* /* track */,
|
||||
// const G4Step* /* step */,
|
||||
// G4double& /* proposedTrackWeight */ )
|
||||
// {return false;}
|
||||
|
||||
|
||||
|
||||
// ---- II. Biasing of the process post step final state:
|
||||
// ------------------------------------------------------
|
||||
|
||||
@@ -123,16 +123,6 @@
|
||||
// for operation(s) which have been applied during the step. One of the two following
|
||||
// methods is called:
|
||||
//
|
||||
// - In case of at most a single biasing operation was applied by the process, report in cases of:
|
||||
// - a non-physics biasing operation applied, biasingCase == BAC_NonPhysics ;
|
||||
// - physics-based biasing:
|
||||
// - the operator requested no occurence, nor final state biasing, and did let the
|
||||
// physics process go : biasingCase == BAC_None;
|
||||
// - an occurence biasing, where operation denied the application of the PostStepDoIt(..)
|
||||
// of the physics process (proposing a weight for this),
|
||||
// biasingCase == BAC_DenyInteraction ;
|
||||
// -
|
||||
//
|
||||
// virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess,
|
||||
// G4BiasingAppliedCase biasingCase,
|
||||
// G4VBiasingOperation* operationApplied,
|
||||
@@ -142,9 +132,6 @@
|
||||
// - physics-based biasing:
|
||||
// - the operator requested no biasing operations, and did let the physics
|
||||
// process go : biasingCase == BAC_None;
|
||||
// - an occurence biasing was proposed, which operation purpose was to deny the
|
||||
// application of the PostStepDoIt(..) of the physics process (proposing a
|
||||
// weight for this) : biasingCase == BAC_DenyInteraction ;
|
||||
// - a single final state biasing was proposed, with no concomittant occurence:
|
||||
// biasingCase == BAC_FinalState;
|
||||
// The operation applied and final state passed to the tracking (particleChangeProduced) are
|
||||
@@ -157,14 +144,15 @@
|
||||
// G4VBiasingOperation* finalStateOperationApplied,
|
||||
// const G4VParticleChange* particleChangeProduced );
|
||||
// This method is called in case an occurence biasing operation has been applied during the step.
|
||||
// Depending on if the occurence operation was applied alone and together with a final state
|
||||
// operation, the biasingCase will take values:
|
||||
// The biasingCase value is then the one of the final state biasing, if any : depending on if the
|
||||
// occurence operation was applied alone and together with a final state operation, the
|
||||
// biasingCase will take values:
|
||||
// - occurence biasing alone : biasingCase == BAC_None ;
|
||||
// in which case finalStateOperationApplied == 0;
|
||||
// - occurence biasing + final state biasing : biasingCase == BAC_FinalState;
|
||||
// The particleChangeProduced is the one *before* application of the weight for occurence : hence
|
||||
// either the particle change of the physics process, or the physics process one, biased the final
|
||||
// state biasing operation.
|
||||
// either the particle change of the (analog) physics process, or the biased final state, resulting
|
||||
// from the biasing by the finalStateOperationApplied operation.
|
||||
//
|
||||
//
|
||||
// ----------------G4VBiasingOperation ----------------
|
||||
@@ -239,8 +227,8 @@ protected:
|
||||
virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation( const G4Track* track, const G4BiasingProcessInterface* callingProcess ) = 0;
|
||||
|
||||
protected:
|
||||
// -- optionnal methods for further information passed to the operator:
|
||||
// --------------------------------------------------------------------
|
||||
// -- optional methods for further information passed to the operator:
|
||||
// -------------------------------------------------------------------
|
||||
// ---- report to operator about the operation applied, the biasingCase value provides the case of biasing applied:
|
||||
virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* operationApplied, const G4VParticleChange* particleChangeProduced );
|
||||
@@ -256,6 +244,27 @@ protected:
|
||||
// ---- [Called at the beginning of next step, or at the end of tracking.]
|
||||
virtual void ExitBiasing( const G4Track* track, const G4BiasingProcessInterface* callingProcess );
|
||||
|
||||
|
||||
protected:
|
||||
// -----------------------------------
|
||||
// -- Delegation to an other 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 );
|
||||
// -- §§ Should we have:
|
||||
// -- §§ - a "step delegation" -where the delegation is made for the current step only-
|
||||
// -- §§ - a long delegation where the delegation can hold over several steps, as long as
|
||||
// -- §§ the scheme is not completed. [let's call it "scheme delegation"]
|
||||
// -- §§ In this case the "execution/delegated" operator might switch off back the
|
||||
// -- §§ delegation from the "delegator" when it knows it has done its work.
|
||||
// -- §§ Add a private SetDelegator( G4VBiasingOperator* ) method, call on the delegated
|
||||
// -- §§ operator.
|
||||
// -- §§ For a step long delegation, the ReportOperationApplied should be used to "unset"
|
||||
// -- §§ the delegation. For a scheme long delegation, the delegater operator will unset
|
||||
// -- §§ itself has delegation. Likely to happen in the ReportOperationApplied as well,
|
||||
// -- §§ but not sure it is mandatory though.
|
||||
|
||||
|
||||
public:
|
||||
// ---- Configure() is called in sequential mode or for master thread in MT mode.
|
||||
|
||||
@@ -34,17 +34,17 @@ G4Cache< G4BiasingOperatorStateNotifier* > G4VBiasingOperator::fS
|
||||
|
||||
|
||||
G4VBiasingOperator::G4VBiasingOperator(G4String name)
|
||||
: fName (name),
|
||||
fOccurenceBiasingOperation (nullptr),
|
||||
fFinalStateBiasingOperation (nullptr),
|
||||
fNonPhysicsBiasingOperation (nullptr),
|
||||
fPreviousProposedOccurenceBiasingOperation (nullptr),
|
||||
fPreviousProposedFinalStateBiasingOperation(nullptr),
|
||||
fPreviousProposedNonPhysicsBiasingOperation(nullptr),
|
||||
fPreviousAppliedOccurenceBiasingOperation (nullptr),
|
||||
fPreviousAppliedFinalStateBiasingOperation (nullptr),
|
||||
fPreviousAppliedNonPhysicsBiasingOperation (nullptr),
|
||||
fPreviousBiasingAppliedCase (BAC_None)
|
||||
: 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);
|
||||
|
||||
@@ -79,7 +79,7 @@ G4VBiasingOperator* G4VBiasingOperator::GetBiasingOperator(const G4LogicalVolume
|
||||
{
|
||||
G4MapCache< const G4LogicalVolume*, G4VBiasingOperator* >::iterator it;
|
||||
it = fLogicalToSetupMap.Find(logical);
|
||||
if ( it == fLogicalToSetupMap.End() ) return 0;
|
||||
if ( it == fLogicalToSetupMap.End() ) return nullptr;
|
||||
else return (*it).second;
|
||||
}
|
||||
|
||||
@@ -107,9 +107,9 @@ void G4VBiasingOperator::ReportOperationApplied( const G4BiasingProcessInterface
|
||||
const G4VParticleChange* particleChangeProduced )
|
||||
{
|
||||
fPreviousBiasingAppliedCase = biasingCase;
|
||||
fPreviousAppliedOccurenceBiasingOperation = 0;
|
||||
fPreviousAppliedFinalStateBiasingOperation = 0;
|
||||
fPreviousAppliedNonPhysicsBiasingOperation = 0;
|
||||
fPreviousAppliedOccurenceBiasingOperation = nullptr;
|
||||
fPreviousAppliedFinalStateBiasingOperation = nullptr;
|
||||
fPreviousAppliedNonPhysicsBiasingOperation = nullptr;
|
||||
switch ( biasingCase )
|
||||
{
|
||||
case BAC_None:
|
||||
@@ -117,9 +117,6 @@ void G4VBiasingOperator::ReportOperationApplied( const G4BiasingProcessInterface
|
||||
case BAC_NonPhysics:
|
||||
fPreviousAppliedNonPhysicsBiasingOperation = operationApplied ;
|
||||
break;
|
||||
case BAC_DenyInteraction: // -- §§ will b deprecated
|
||||
fPreviousAppliedOccurenceBiasingOperation = operationApplied;
|
||||
break;
|
||||
case BAC_FinalState:
|
||||
fPreviousAppliedFinalStateBiasingOperation = operationApplied;
|
||||
break;
|
||||
@@ -157,15 +154,15 @@ void G4VBiasingOperator::ExitingBiasing( const G4Track* track, const G4BiasingPr
|
||||
ExitBiasing( track, callingProcess );
|
||||
|
||||
// -- reset all data members:
|
||||
fOccurenceBiasingOperation = 0 ;
|
||||
fFinalStateBiasingOperation = 0 ;
|
||||
fNonPhysicsBiasingOperation = 0 ;
|
||||
fPreviousProposedOccurenceBiasingOperation = 0 ;
|
||||
fPreviousProposedFinalStateBiasingOperation = 0 ;
|
||||
fPreviousProposedNonPhysicsBiasingOperation = 0 ;
|
||||
fPreviousAppliedOccurenceBiasingOperation = 0 ;
|
||||
fPreviousAppliedFinalStateBiasingOperation = 0 ;
|
||||
fPreviousAppliedNonPhysicsBiasingOperation = 0 ;
|
||||
fOccurenceBiasingOperation = nullptr ;
|
||||
fFinalStateBiasingOperation = nullptr ;
|
||||
fNonPhysicsBiasingOperation = nullptr ;
|
||||
fPreviousProposedOccurenceBiasingOperation = nullptr ;
|
||||
fPreviousProposedFinalStateBiasingOperation = nullptr ;
|
||||
fPreviousProposedNonPhysicsBiasingOperation = nullptr ;
|
||||
fPreviousAppliedOccurenceBiasingOperation = nullptr ;
|
||||
fPreviousAppliedFinalStateBiasingOperation = nullptr ;
|
||||
fPreviousAppliedNonPhysicsBiasingOperation = nullptr ;
|
||||
fPreviousBiasingAppliedCase = BAC_None ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user