Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -76,9 +76,12 @@ public:
|
||||
// ----------------------------------------------
|
||||
void SetCloneWeights(G4double clone1Weight, G4double clone2Weight) {fClone1W = clone1Weight ; fClone2W = clone2Weight;}
|
||||
|
||||
G4Track* GetCloneTrack() const { return fCloneTrack; }
|
||||
|
||||
private:
|
||||
G4double fClone1W, fClone2W;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4Track* fCloneTrack;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -99,14 +99,13 @@ public:
|
||||
void UpdateForStep( const G4Step* );
|
||||
void Sample();
|
||||
const G4ThreeVector& GetInitialMomentum() const { return fInitialMomentum; }
|
||||
G4double GetMaximumDistance() const { return fMaximumDistance;}
|
||||
G4double GetMaximumDistance() const { return fMaximumDistance; }
|
||||
void ChooseProcessToApply();
|
||||
const G4VProcess* GetProcessToApply() const { return fProcessToApply; }
|
||||
void AddCrossSection( const G4VProcess*, G4double );
|
||||
size_t GetNumberOfSharing() const { return fNumberOfSharing;}
|
||||
void PostStepInteractionOccured( const G4VProcess* );
|
||||
void SetInteractionOccured( G4bool b ) { fInteractionOccured = b; }
|
||||
G4bool GetInteractionOccured() const { return fInteractionOccured; }
|
||||
void SetInteractionOccured( G4bool b ) { fInteractionOccured = b; }
|
||||
G4bool GetInteractionOccured() const { return fInteractionOccured; }
|
||||
|
||||
private:
|
||||
G4ILawCommonTruncatedExp* fCommonTruncatedExpLaw;
|
||||
|
||||
@@ -86,11 +86,13 @@ public:
|
||||
}
|
||||
// -- initialization for weight:
|
||||
void ResetInitialTrackWeight(G4double w) {fInitialTrackWeight = w; fCumulatedWeightChange = 1.0;}
|
||||
G4bool OperationComplete() const { return fOperationComplete; }
|
||||
|
||||
private:
|
||||
G4ILawForceFreeFlight* fForceFreeFlightInteractionLaw;
|
||||
G4double fCumulatedWeightChange, fInitialTrackWeight;
|
||||
G4ParticleChange fParticleChange;
|
||||
G4bool fOperationComplete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,6 +54,7 @@ class G4ParticleDefinition;
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "G4ThreeVector.hh"
|
||||
class G4BOptrForceCollisionTrackData;
|
||||
|
||||
class G4BOptrForceCollision : public G4VBiasingOperator {
|
||||
public:
|
||||
@@ -63,33 +64,36 @@ public:
|
||||
|
||||
private:
|
||||
// -- Mandatory from base class :
|
||||
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);
|
||||
virtual G4VBiasingOperation* ProposeNonPhysicsBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess) final;
|
||||
virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess) final;
|
||||
virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation(const G4Track* track, const G4BiasingProcessInterface* callingProcess) final;
|
||||
// -- optional methods from base class:
|
||||
public:
|
||||
virtual void StartRun();
|
||||
virtual void StartTracking( const G4Track* track );
|
||||
virtual void ExitBiasing( const G4Track*, const G4BiasingProcessInterface* );
|
||||
virtual void Configure() final;
|
||||
virtual void ConfigureForWorker() final;
|
||||
virtual void StartRun() final;
|
||||
virtual void StartTracking( const G4Track* track ) final;
|
||||
virtual void ExitBiasing( const G4Track*, const G4BiasingProcessInterface* ) final {};
|
||||
virtual void EndTracking() final;
|
||||
|
||||
using G4VBiasingOperator::OperationApplied; // -- informs compiler of multiple OperationApplied symbols
|
||||
// -- in base class, to avoid warning messages for hidden functions
|
||||
// -- in case only one function if overloaded.
|
||||
// -- single operation applied (whatever operation):
|
||||
virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* operationApplied, const G4VParticleChange* particleChangeProduced );
|
||||
// -- operation applied:
|
||||
void OperationApplied( const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* operationApplied, const G4VParticleChange* particleChangeProduced ) final;
|
||||
void OperationApplied( const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase,
|
||||
G4VBiasingOperation* occurenceOperationApplied, G4double weightForOccurenceInteraction,
|
||||
G4VBiasingOperation* finalStateOperationApplied, const G4VParticleChange* particleChangeProduced ) final;
|
||||
|
||||
|
||||
private:
|
||||
G4int fForceCollisionModelID;
|
||||
const G4Track* fCurrentTrack;
|
||||
G4BOptrForceCollisionTrackData* fCurrentTrackData;
|
||||
std::map< const G4BiasingProcessInterface*, G4BOptnForceFreeFlight* > fFreeFlightOperations;
|
||||
G4BOptnForceCommonTruncatedExp* fSharedForceInteractionOperation;
|
||||
G4BOptnCloning* fCloningOperation;
|
||||
G4double fInitialTrackWeight;
|
||||
G4bool fSetup;
|
||||
const G4ParticleDefinition* fParticleToBias;
|
||||
G4VBiasingOperation* fPreviousOperationApplied;
|
||||
G4ThreeVector fPreviousMomentum;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// Class Description:
|
||||
// Extends G4Track properties with information needed for the
|
||||
// force collision biasing operator.
|
||||
// The G4BOptrForceCollision class is made friend of this one in
|
||||
// order to keep unexposed to public most of the data members, as
|
||||
// they are used to control the logic.
|
||||
//
|
||||
// ------------------ G4BOptrForceCollisionTrackData ------------------
|
||||
//
|
||||
// Author: M.Verderi (LLR), October 2015
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4BOptrForceCollisionTrackData_hh
|
||||
#define G4BOptrForceCollisionTrackData_hh
|
||||
|
||||
class G4BOptrForceCollision;
|
||||
#include "G4VAuxiliaryTrackInformation.hh"
|
||||
|
||||
enum class ForceCollisionState { free, toBeCloned, toBeForced, toBeFreeFlight };
|
||||
|
||||
class G4BOptrForceCollisionTrackData : public G4VAuxiliaryTrackInformation {
|
||||
|
||||
friend class G4BOptrForceCollision;
|
||||
|
||||
public:
|
||||
G4BOptrForceCollisionTrackData( const G4BOptrForceCollision* );
|
||||
~G4BOptrForceCollisionTrackData();
|
||||
|
||||
// -- from base class:
|
||||
void Print() const;
|
||||
|
||||
// -- Get methods:
|
||||
G4bool IsFreeFromBiasing() const
|
||||
{ return ( fForceCollisionState == ForceCollisionState::free);}
|
||||
// -- no set methods are provided : sets are made under exclusive control of G4BOptrForceCollision objects through friendness.
|
||||
|
||||
private:
|
||||
const G4BOptrForceCollision* fForceCollisionOperator;
|
||||
ForceCollisionState fForceCollisionState;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
fForceCollisionOperator = nullptr;
|
||||
fForceCollisionState = ForceCollisionState::free;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -268,7 +268,8 @@ private:
|
||||
static G4Cache<G4bool> fResetInteractionLaws;
|
||||
static G4Cache<G4bool> fCommonStart;
|
||||
static G4Cache<G4bool> fCommonEnd;
|
||||
|
||||
static G4Cache<G4bool> fDoCommonConfigure;
|
||||
|
||||
const G4ProcessManager* fProcessManager;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user