Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -23,65 +23,64 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4BOptnCloning
|
||||
//
|
||||
// Class Description:
|
||||
// A G4VBiasingOperation to clone a track, allowing to set
|
||||
// weight arbitrary weights.
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
// Initial version Nov. 2013 M. Verderi
|
||||
|
||||
|
||||
// A G4VBiasingOperation to clone a track, allowing to set
|
||||
// weight arbitrary weights.
|
||||
//
|
||||
// Author: Marc Verderi, November 2013.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4BOptnCloning_hh
|
||||
#define G4BOptnCloning_hh 1
|
||||
|
||||
#include "G4VBiasingOperation.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
|
||||
class G4BOptnCloning : public G4VBiasingOperation {
|
||||
public:
|
||||
// -- Constructor :
|
||||
G4BOptnCloning(G4String name);
|
||||
// -- destructor:
|
||||
virtual ~G4BOptnCloning();
|
||||
|
||||
public:
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// -------------------------------------------
|
||||
// -- Unsed:
|
||||
virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& ) {return 0;}
|
||||
virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*,
|
||||
const G4Step*,
|
||||
G4bool& ) {return 0;}
|
||||
// -- Used:
|
||||
virtual G4double DistanceToApplyOperation( const G4Track*,
|
||||
G4double,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
*condition = NotForced; return 0; // -- acts immediately
|
||||
}
|
||||
virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*,
|
||||
const G4Step* );
|
||||
|
||||
public:
|
||||
// -- Additional methods, specific to this class:
|
||||
// ----------------------------------------------
|
||||
void SetCloneWeights(G4double clone1Weight, G4double clone2Weight) {fClone1W = clone1Weight ; fClone2W = clone2Weight;}
|
||||
class G4BOptnCloning : public G4VBiasingOperation
|
||||
{
|
||||
public:
|
||||
|
||||
G4Track* GetCloneTrack() const { return fCloneTrack; }
|
||||
// -- Constructor :
|
||||
G4BOptnCloning(const G4String& name);
|
||||
// -- destructor:
|
||||
virtual ~G4BOptnCloning();
|
||||
|
||||
// -- Methods from G4VBiasingOperation interface:
|
||||
// -------------------------------------------
|
||||
// -- Unsed:
|
||||
virtual const G4VBiasingInteractionLaw*
|
||||
ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*,
|
||||
G4ForceCondition& ) { return nullptr; }
|
||||
virtual G4VParticleChange*
|
||||
ApplyFinalStateBiasing( const G4BiasingProcessInterface*,
|
||||
const G4Track*, const G4Step*, G4bool& ) { return nullptr; }
|
||||
// -- Used:
|
||||
virtual G4double
|
||||
DistanceToApplyOperation( const G4Track*,
|
||||
G4double, G4ForceCondition* condition )
|
||||
{
|
||||
*condition = NotForced; return 0.; // -- acts immediately
|
||||
}
|
||||
virtual G4VParticleChange*
|
||||
GenerateBiasingFinalState( const G4Track*, const G4Step* );
|
||||
|
||||
private:
|
||||
G4double fClone1W,
|
||||
fClone2W;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4Track* fCloneTrack;
|
||||
// -- Additional methods, specific to this class:
|
||||
// ----------------------------------------------
|
||||
void SetCloneWeights( G4double clone1Weight, G4double clone2Weight )
|
||||
{
|
||||
fClone1W = clone1Weight;
|
||||
fClone2W = clone2Weight;
|
||||
}
|
||||
|
||||
G4Track* GetCloneTrack() const { return fCloneTrack; }
|
||||
|
||||
private:
|
||||
|
||||
G4double fClone1W = -1.0, fClone2W = -1.0;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4Track* fCloneTrack = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user