Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -55,17 +55,19 @@ public:
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// ----------------------------------------------
|
||||
// -- Used:
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* );
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*,
|
||||
G4ForceCondition& proposeForceCondition );
|
||||
|
||||
// -- Unused:
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
const G4Step*,
|
||||
G4bool& ) {return 0;}
|
||||
virtual G4double DistanceToApplyOperation( const G4Track*,
|
||||
G4double,
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
const G4Step* ) {return 0;}
|
||||
|
||||
public:
|
||||
// -- Additional methods, specific to this class:
|
||||
|
||||
@@ -56,10 +56,11 @@ public:
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// -------------------------------------------
|
||||
// -- Unsed:
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* ) {return 0;}
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& ) {return 0;}
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
const G4Step*,
|
||||
G4bool& ) {return 0;}
|
||||
// -- Used:
|
||||
virtual G4double DistanceToApplyOperation( const G4Track*,
|
||||
G4double,
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
|
||||
#include "G4VBiasingOperation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleChangeForNothing.hh"
|
||||
class G4ILawCommonTruncatedExp;
|
||||
class G4ILawForceFreeFlight;
|
||||
#include <map>
|
||||
|
||||
class G4BOptnForceCommonTruncatedExp : public G4VBiasingOperation {
|
||||
@@ -66,30 +68,33 @@ public:
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// -------------------------------------------
|
||||
// -- Used:
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* );
|
||||
virtual G4ForceCondition ProposeForceCondition( const G4ForceCondition processCondition );
|
||||
virtual G4bool DenyProcessPostStepDoIt( const G4BiasingProcessInterface*, const G4Track*, const G4Step*, G4double& );
|
||||
virtual G4double ProposeAlongStepLimit( const G4BiasingProcessInterface* );
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& );
|
||||
virtual G4double ProposeAlongStepLimit( const G4BiasingProcessInterface* ) { return DBL_MAX; }
|
||||
virtual G4GPILSelection ProposeGPILSelection( const G4GPILSelection processSelection );
|
||||
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step*,
|
||||
G4bool& );
|
||||
// -- Unused:
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
virtual G4double DistanceToApplyOperation( const G4Track*,
|
||||
G4double,
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
const G4Step* ) {return 0;}
|
||||
|
||||
public:
|
||||
// -- Additional methods, specific to this class:
|
||||
// ----------------------------------------------
|
||||
// -- return concrete type of interaction law:
|
||||
// -- return concrete type of interaction laws:
|
||||
G4ILawCommonTruncatedExp* GetCommonTruncatedExpLaw()
|
||||
{
|
||||
return fCommonTruncatedExpLaw;
|
||||
}
|
||||
G4ILawForceFreeFlight* GetForceFreeFlightLaw()
|
||||
{
|
||||
return fForceFreeFlightLaw;
|
||||
}
|
||||
|
||||
void Initialize( const G4Track* );
|
||||
void UpdateForStep( const G4Step* );
|
||||
void Sample();
|
||||
@@ -98,21 +103,22 @@ public:
|
||||
void ChooseProcessToApply();
|
||||
const G4VProcess* GetProcessToApply() const { return fProcessToApply; }
|
||||
void AddCrossSection( const G4VProcess*, G4double );
|
||||
G4double GetTriggeredProcessXSfraction();
|
||||
size_t GetNumberOfSharing() const { return fNumberOfSharing;}
|
||||
void PostStepInteractionOccured( const G4VProcess* );
|
||||
void SetInteractionOccured( G4bool b ) { fInteractionOccured = b; }
|
||||
G4bool GetInteractionOccured() const { return fInteractionOccured; }
|
||||
|
||||
private:
|
||||
G4ILawCommonTruncatedExp* fCommonTruncatedExpLaw;
|
||||
G4ILawForceFreeFlight* fForceFreeFlightLaw;
|
||||
G4double fTotalCrossSection;
|
||||
std::map < const G4VProcess*, G4double > fCrossSections;
|
||||
size_t fNumberOfSharing;
|
||||
//G4bool fFirstCallToDeny;
|
||||
const G4VProcess* fProcessToApply;
|
||||
G4bool fInteractionOccured;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
G4double fMaximumDistance;
|
||||
G4ParticleChangeForNothing fDummyParticleChange;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
// change for making this uninteracting flight,
|
||||
// cumulatedWeightChange.
|
||||
// When the track reaches the current volume boundary, its
|
||||
// weight is restore with value :
|
||||
// weight is restored with value :
|
||||
// initialWeight * cumulatedWeightChange
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -49,8 +49,10 @@
|
||||
|
||||
#include "G4VBiasingOperation.hh"
|
||||
#include "G4ForceCondition.hh"
|
||||
#include "G4ParticleChange.hh" // -- §§ should add a dedicated "weight change only" particle change
|
||||
class G4ILawForceFreeFlight;
|
||||
|
||||
|
||||
class G4BOptnForceFreeFlight : public G4VBiasingOperation {
|
||||
public:
|
||||
// -- Constructor :
|
||||
@@ -62,20 +64,17 @@ public:
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// -------------------------------------------
|
||||
// -- Used:
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface* );
|
||||
virtual G4ForceCondition ProposeForceCondition( const G4ForceCondition ) {return Forced;}
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& );
|
||||
virtual G4bool DenyProcessPostStepDoIt( const G4BiasingProcessInterface*, const G4Track*, const G4Step*, G4double& );
|
||||
virtual void AlongMoveBy( const G4BiasingProcessInterface*, const G4Step*, G4double );
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*, const G4Track*, const G4Step*, G4bool&);
|
||||
|
||||
// -- Unused:
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
virtual G4double DistanceToApplyOperation( const G4Track*,
|
||||
G4double,
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
G4ForceCondition*) {return DBL_MAX;}
|
||||
virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*,
|
||||
const G4Step* ) {return 0;}
|
||||
const G4Step* ) {return 0;}
|
||||
|
||||
|
||||
public:
|
||||
@@ -91,6 +90,7 @@ public:
|
||||
private:
|
||||
G4ILawForceFreeFlight* fForceFreeFlightInteractionLaw;
|
||||
G4double fCumulatedWeightChange, fInitialTrackWeight;
|
||||
G4ParticleChange fParticleChange;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -63,11 +63,12 @@ public:
|
||||
|
||||
private:
|
||||
// -- Mandatory from base class :
|
||||
virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess);
|
||||
virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) {return 0;}
|
||||
virtual G4VBiasingOperation* ProposeNonPhysicsBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess);
|
||||
virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess);
|
||||
virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess);
|
||||
// -- optional methods from base class:
|
||||
public:
|
||||
virtual void StartRun();
|
||||
virtual void StartTracking( const G4Track* track );
|
||||
virtual void ExitBiasing( const G4Track*, const G4BiasingProcessInterface* );
|
||||
|
||||
@@ -83,13 +84,10 @@ private:
|
||||
G4BOptnForceCommonTruncatedExp* fSharedForceInteractionOperation;
|
||||
G4BOptnCloning* fCloningOperation;
|
||||
G4double fInitialTrackWeight;
|
||||
//G4double fWeightToRestore;
|
||||
std::vector < const G4VProcess* > fProcesses;
|
||||
const G4VProcess *fFirstProcess, *fLastProcess;
|
||||
G4bool fSetup;
|
||||
const G4ParticleDefinition* fParticle;
|
||||
G4VBiasingOperation* fPreviousOperationApplied;
|
||||
G4ThreeVector fPreviousMomentum;
|
||||
G4bool fSetup;
|
||||
const G4ParticleDefinition* fParticleToBias;
|
||||
G4VBiasingOperation* fPreviousOperationApplied;
|
||||
G4ThreeVector fPreviousMomentum;
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
// Initial version Sep. 2013 M. Verderi
|
||||
// Use of "shared data" class Sep. 2014 M. Verderi
|
||||
|
||||
|
||||
#ifndef G4BiasingProcessInterface_h
|
||||
#define G4BiasingProcessInterface_h
|
||||
@@ -56,6 +58,7 @@
|
||||
#include "globals.hh"
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4Cache.hh"
|
||||
#include "G4BiasingProcessSharedData.hh"
|
||||
|
||||
class G4VBiasingInteractionLaw;
|
||||
class G4InteractionLawPhysical;
|
||||
@@ -88,15 +91,31 @@ public:
|
||||
// -- Helper methods:
|
||||
// ------------------
|
||||
// -- Current step and previous step biasing operator, if any:
|
||||
G4VBiasingOperator* GetCurrentBiasingOperator() const {return fCurrentBiasingOperator; }
|
||||
G4VBiasingOperator* GetPreviousBiasingOperator() const {return fPreviousBiasingOperator; }
|
||||
G4VBiasingOperator* GetCurrentBiasingOperator() const {return fSharedData-> fCurrentBiasingOperator; }
|
||||
G4VBiasingOperator* GetPreviousBiasingOperator() const {return fSharedData->fPreviousBiasingOperator; }
|
||||
// -- current and previous operation:
|
||||
G4VBiasingOperation* GetCurrentNonPhysicsBiasingOperation() const { return fNonPhysicsBiasingOperation; }
|
||||
G4VBiasingOperation* GetPreviousNonPhysicsBiasingOperation() const { return fPreviousNonPhysicsBiasingOperation; }
|
||||
G4VBiasingOperation* GetCurrentOccurenceBiasingOperation() const { return fOccurenceBiasingOperation; }
|
||||
G4VBiasingOperation* GetPreviousOccurenceBiasingOperation() const { return fPreviousOccurenceBiasingOperation; }
|
||||
G4VBiasingOperation* GetCurrentFinalStateBiasingOperation() const { return fFinalStateBiasingOperation; }
|
||||
G4VBiasingOperation* GetPreviousFinalStateBiasingOperation() const { return fPreviousFinalStateBiasingOperation; }
|
||||
G4VBiasingOperation* GetCurrentNonPhysicsBiasingOperation() const { return fNonPhysicsBiasingOperation; }
|
||||
G4VBiasingOperation* GetPreviousNonPhysicsBiasingOperation() const { return fPreviousNonPhysicsBiasingOperation; }
|
||||
|
||||
// -- Lists of processes cooperating under a same particle type/G4ProcessManager.
|
||||
// -- The vector ordering is:
|
||||
// -- - random, before first "run/beamOn"
|
||||
// -- - that of the PostStepGetPhysicalInteractionLength() once "/run/beamOn" has been issued
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetBiasingProcessInterfaces() const
|
||||
{return fSharedData-> fPublicBiasingProcessInterfaces;}
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetPhysicsBiasingProcessInterfaces() const
|
||||
{return fSharedData-> fPublicPhysicsBiasingProcessInterfaces;}
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetNonPhysicsBiasingProcessInterfaces() const
|
||||
{return fSharedData->fPublicNonPhysicsBiasingProcessInterfaces;}
|
||||
|
||||
// -- Get shared data for this process:
|
||||
const G4BiasingProcessSharedData* GetSharedData() const { return fSharedData; }
|
||||
// -- Get shared data associated to a G4ProcessManager:
|
||||
static const G4BiasingProcessSharedData* GetSharedData( const G4ProcessManager* );
|
||||
|
||||
|
||||
|
||||
@@ -186,17 +205,16 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
// ---- Setup first/last flags:
|
||||
void SetUpFirstLastFlags();
|
||||
void ResetForUnbiasedTracking();
|
||||
// ---- Internal utility methods:
|
||||
void SetUpFirstLastFlags();
|
||||
void ResetForUnbiasedTracking();
|
||||
void ReorderBiasingVectorAsGPIL();
|
||||
|
||||
G4Track* fCurrentTrack;
|
||||
G4double fPreviousStepSize;
|
||||
G4double fCurrentMinimumStep;
|
||||
G4double fProposedSafety;
|
||||
|
||||
G4VBiasingOperator* fCurrentBiasingOperator;
|
||||
G4VBiasingOperator* fPreviousBiasingOperator;
|
||||
G4VBiasingOperation* fOccurenceBiasingOperation;
|
||||
G4VBiasingOperation* fFinalStateBiasingOperation;
|
||||
G4VBiasingOperation* fNonPhysicsBiasingOperation;
|
||||
@@ -236,32 +254,34 @@ private:
|
||||
// -- for that is provided. Should be of pure internal usage.
|
||||
return 4*firstLast + 2*GPILDoIt + physAll;
|
||||
}
|
||||
// -- TO DO : let some common operation be done only once, by the first
|
||||
// -- process in GPIL. Nothing done yet, may help to reduce overhead.
|
||||
// -- For example each process instance fetch for the current operator,
|
||||
// -- which could be done once, and with pointer shared.
|
||||
// -- Idea is to have a class containing the data members shared among
|
||||
// -- the instances.
|
||||
// -- Could make these shared data members shared only per particle type
|
||||
// -- (at present, with a single static, any instance of a process shares
|
||||
// -- its members with any other instance, regardless of particle type.)
|
||||
G4bool fIamFirstGPIL;
|
||||
// -- method used to anticipate stepping manager calls to PostStepGPIL
|
||||
// -- of wrapped processes : this method calls wrapped process PostStepGPIL
|
||||
// -- and caches results for PostStepGPIL and condition.
|
||||
void InvokeWrappedProcessPostStepGPIL( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition );
|
||||
// -- the instance being "firstGPIL" does work shared by other instances:
|
||||
G4bool fIamFirstGPIL;
|
||||
|
||||
|
||||
// -- MUST be **thread local**:
|
||||
static G4Cache<G4bool> fResetInteractionLaws;
|
||||
static G4Cache<G4bool> fCommonStart;
|
||||
static G4Cache<G4bool> fCommonEnd;
|
||||
static G4Cache<G4bool> fResetInteractionLaws;
|
||||
static G4Cache<G4bool> fCommonStart;
|
||||
static G4Cache<G4bool> fCommonEnd;
|
||||
|
||||
// -- Maintain lists of interfaces attached to a same particle (ie
|
||||
// -- to a same G4ProcessManager ).
|
||||
// -- This is used when biasing operations in different processes need to
|
||||
// -- cooperate (like for knowing the total cross-section for example).
|
||||
std::vector< G4BiasingProcessInterface* >* fCoInterfaces;
|
||||
// -- thread local:
|
||||
static G4MapCache< const G4ProcessManager*,
|
||||
std::vector< G4BiasingProcessInterface* > > fManagerInterfaceMap;
|
||||
const G4ProcessManager* fProcessManager;
|
||||
|
||||
|
||||
// -- the data shared among processes attached to a same process manager:
|
||||
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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// G4BiasingProcessSharedData
|
||||
//
|
||||
// Class Description:
|
||||
// This class represents the data that the G4BiasingProcessInterface
|
||||
// objects attached to a same particle / hold by a same G4ProcessManager
|
||||
// share. It allows the active G4BiasingProcessInterface objects to share
|
||||
// information on operations that are common the these instances:
|
||||
// - the current and previous G4VBiasingOperator objects (their
|
||||
// pointers are collected once, at the beginning of the PostStepGPIL
|
||||
// by the first interface invoked)
|
||||
// - add the list of cooperating G4BiasingProcessInterface objects,
|
||||
// acting on a same particle type.
|
||||
// G4BiasingProcessInterface is friend class of this one.
|
||||
//---------------------------------------------------------------------------
|
||||
// Initial version Sep. 2014 M. Verderi
|
||||
|
||||
#ifndef G4BiasingProcessSharedData_h
|
||||
#define G4BiasingProcessSharedData_h
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4VBiasingOperator;
|
||||
class G4BiasingProcessInterface;
|
||||
class G4ProcessManager;
|
||||
|
||||
class G4BiasingProcessSharedData {
|
||||
|
||||
friend class G4BiasingProcessInterface;
|
||||
|
||||
public:
|
||||
// -------------------------
|
||||
// -- Public access methods:
|
||||
// -------------------------
|
||||
// -- The biasing process interface objects sharing this shared data class:
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetBiasingProcessInterfaces() const
|
||||
{return fPublicBiasingProcessInterfaces;}
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetPhysicsBiasingProcessInterfaces() const
|
||||
{return fPublicPhysicsBiasingProcessInterfaces;}
|
||||
const std::vector< const G4BiasingProcessInterface* >& GetNonPhysicsBiasingProcessInterfaces() const
|
||||
{return fPublicNonPhysicsBiasingProcessInterfaces;}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
// -- Methods used by the G4BiasingProcessInterface objects, thanks to class friendness.
|
||||
// -- Object is created by G4BiasingProcessInterface object:
|
||||
G4BiasingProcessSharedData( const G4ProcessManager* mgr) : fProcessManager(mgr) {}
|
||||
~G4BiasingProcessSharedData() {}
|
||||
// -- biasing operators:
|
||||
void CurrentBiasingOperator( G4VBiasingOperator* );
|
||||
G4VBiasingOperator* CurrentBiasingOperator() const;
|
||||
void PreviousBiasingOperator( G4VBiasingOperator* );
|
||||
G4VBiasingOperator* PreviousBiasingOperator() const;
|
||||
|
||||
private:
|
||||
// --
|
||||
const G4ProcessManager* fProcessManager;
|
||||
// -- biasing operators:
|
||||
G4VBiasingOperator* fCurrentBiasingOperator;
|
||||
G4VBiasingOperator* fPreviousBiasingOperator;
|
||||
// --
|
||||
G4bool fIsNewOperator;
|
||||
G4bool fLeavingPreviousOperator;
|
||||
|
||||
// -- biaising process interfaces sharing this object:
|
||||
std::vector < G4BiasingProcessInterface* > fBiasingProcessInterfaces;
|
||||
std::vector < G4BiasingProcessInterface* > fPhysicsBiasingProcessInterfaces;
|
||||
std::vector < G4BiasingProcessInterface* > fNonPhysicsBiasingProcessInterfaces;
|
||||
// -- the same ones, for public use:
|
||||
std::vector < const G4BiasingProcessInterface* > fPublicBiasingProcessInterfaces;
|
||||
std::vector < const G4BiasingProcessInterface* > fPublicPhysicsBiasingProcessInterfaces;
|
||||
std::vector < const G4BiasingProcessInterface* > fPublicNonPhysicsBiasingProcessInterfaces;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -37,8 +37,10 @@
|
||||
// is used to drive the law.
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// Refactored version Oct. 2014 M. Verderi
|
||||
// Initial version Nov. 2013 M. Verderi
|
||||
|
||||
|
||||
#ifndef G4ILawCommonTruncatedExp_hh
|
||||
#define G4ILawCommonTruncatedExp_hh 1
|
||||
|
||||
@@ -46,8 +48,6 @@
|
||||
#include "G4ILawTruncatedExp.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4BOptnForceCommonTruncatedExp;
|
||||
|
||||
class G4ILawCommonTruncatedExp : public G4VBiasingInteractionLaw
|
||||
{
|
||||
public:
|
||||
@@ -57,12 +57,10 @@ public:
|
||||
public:
|
||||
virtual G4bool IsSingular() const
|
||||
{return fExpInteractionLaw.IsSingular();}
|
||||
virtual G4bool IsEffectiveCrossSectionInfinite() const
|
||||
virtual G4bool IsEffectiveCrossSectionInfinite() const
|
||||
{return fExpInteractionLaw.IsEffectiveCrossSectionInfinite();}
|
||||
private:
|
||||
// -- sample the distribution:
|
||||
// -- in this case, cheat by returning DBL_MAX, to let operation proposing the
|
||||
// -- step length in the alongGPIL
|
||||
virtual G4double SampleInteractionLength();
|
||||
// -- move by true path length, this position becomes the new initial point
|
||||
// -- in this case, cheat by returning DBL_MAX, to let operation proposing the
|
||||
@@ -73,25 +71,17 @@ public:
|
||||
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const;
|
||||
|
||||
public:
|
||||
void SetNumberOfSharing(G4int n) { fNumberOfSharing = n; }
|
||||
G4int GetNumberOfSharing() const { return fNumberOfSharing; }
|
||||
void SetForceCrossSection( G4double xs ) { fExpInteractionLaw.SetForceCrossSection( xs ); }
|
||||
void reset();
|
||||
void SetMaximumDistance(G4double d) { fExpInteractionLaw.SetMaximumDistance(d); }
|
||||
G4double GetMaximumDistance() const {return fExpInteractionLaw.GetMaximumDistance();}
|
||||
G4double GetInteractionDistance() const {return fExpInteractionLaw.GetInteractionDistance();}
|
||||
void SetOperation( G4BOptnForceCommonTruncatedExp* operation) {fOperation = operation;}
|
||||
void SetForceCrossSection( G4double xs ) { fExpInteractionLaw.SetForceCrossSection( xs ); }
|
||||
void SetSelectedProcessXSfraction( G4double fXS ) { fSelectedProcessXSfraction = fXS; }
|
||||
G4double SetSelectedProcessXSfraction() const { return fSelectedProcessXSfraction; }
|
||||
void SetMaximumDistance(G4double d) { fExpInteractionLaw.SetMaximumDistance(d); }
|
||||
G4double GetMaximumDistance() const { return fExpInteractionLaw.GetMaximumDistance(); }
|
||||
G4double GetInteractionDistance() const { return fExpInteractionLaw.GetInteractionDistance(); }
|
||||
|
||||
private:
|
||||
G4ILawTruncatedExp fExpInteractionLaw;
|
||||
//G4bool fIsSingular;
|
||||
G4int fNumberOfSharing;
|
||||
//G4bool fFirstInitializationCall;
|
||||
G4bool fFirstUpdateCall;
|
||||
G4bool fFirstSamplingCall;
|
||||
G4double fInteractionDistance;
|
||||
// TRICKY
|
||||
G4BOptnForceCommonTruncatedExp* fOperation;
|
||||
G4ILawTruncatedExp fExpInteractionLaw;
|
||||
G4double fSelectedProcessXSfraction;
|
||||
G4double fInteractionDistance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// Initial version Nov. 2013 M. Verderi
|
||||
//
|
||||
#ifndef G4ParticleChangeForOccurenceBiasing_hh
|
||||
#define G4ParticleChangeForOccurenceBiasing_hh 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user