Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4EvtBiasMechanism.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4EvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:34 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ForceCondition.hh,v 1.2.10.1 2001/06/28 19:15:22 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ForceCondition.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GPILSelection.hh,v 1.2.10.1 2001/06/28 19:15:22 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GPILSelection.hh,v 1.3 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Mars5GeVMechanism.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Mars5GeVMechanism.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
+9 -8
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.hh,v 1.6.4.2 2001/06/28 20:20:14 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChange.hh,v 1.9 2001/11/21 14:05:57 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -73,7 +73,7 @@ class G4ParticleChange: public G4VParticleChange
public:
// default constructor
G4ParticleChange();
G4ParticleChange(G4bool useEB);
// G4ParticleChange(G4bool useEB);
// destructor
virtual ~G4ParticleChange();
@@ -239,14 +239,15 @@ class G4ParticleChange: public G4VParticleChange
G4double theChargeChange;
// The Changed (final) charge of a given track
const G4Track* theCurrentTrack;
public:
// these methods is used for switch on/off EB in all ParticleChange objects
static void SwOnAllEB();
static void SwOffAllEB();
// these methods is used for switch on/off EB in all ParticleChange objects
// static void SwOnAllEB();
// static void SwOffAllEB();
private:
static G4bool fUseEBForAll;
// static G4bool fUseEBForAll;
public:
// for Debug
+16 -12
View File
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.icc,v 1.7.4.1 2001/06/28 19:15:23 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChange.icc,v 1.9 2001/10/20 08:07:49 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
inline
G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
{
// use fUseEBForAll instead of fUseEB
fUseEB = fUseEBForAll;
// fUseEB = fUseEBForAll;
return G4VParticleChange::UpdateStepInfo(pStep);
}
@@ -220,16 +220,20 @@ inline
return direction*tMomentum;
}
inline
void G4ParticleChange::SwOnAllEB()
{
fUseEBForAll = true;
}
//inline
// void G4ParticleChange::SwOnAllEB()
//{
// fUseEBForAll = true;
//}
//inline void G4ParticleChange::SwOffAllEB()
//{
// fUseEBForAll = false;
//}
inline void G4ParticleChange::SwOffAllEB()
{
fUseEBForAll = false;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForDecay.hh,v 1.4.10.2 2001/06/28 20:20:14 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForDecay.hh,v 1.5 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForLoss.hh,v 1.3.10.2 2001/06/28 20:20:14 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForLoss.hh,v 1.4 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -21,7 +21,7 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.hh,v 1.4.10.2 2001/06/28 20:20:14 gunter Exp $
// $Id: G4ParticleChangeForMSC.hh,v 1.5 2001/07/11 10:08:36 gunter Exp $
// GEANT4 tag $ $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.icc,v 1.3.4.1 2001/06/28 19:15:23 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForMSC.icc,v 1.4 2001/07/11 10:08:36 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForRadDecay.hh,v 1.2.4.2 2001/06/28 20:20:15 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForRadDecay.hh,v 1.4 2001/10/24 05:41:46 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -55,7 +55,8 @@ class G4ParticleChangeForRadDecay: public G4ParticleChange
protected:
// hide copy constructor and assignment operaor as protected
G4ParticleChangeForRadDecay(const G4ParticleChangeForRadDecay &right){}
G4ParticleChangeForRadDecay & operator=(const G4ParticleChangeForRadDecay &right){}
G4ParticleChangeForRadDecay & operator=(const G4ParticleChangeForRadDecay &right){return *this;}
public: // with description
void AddSecondary(G4Track* aSecondary);
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.hh,v 1.6.2.2 2001/06/28 20:20:15 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForTransport.hh,v 1.8 2001/10/22 04:19:39 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -32,7 +32,8 @@
// ------------------------------------------------------------
// Implemented for the new scheme 10 May. 1998 H.Kurahige
// Added theMaterialChange 16 FEb. 2000 H.Kurahige
// Remove thePolarizationChange 12 Feb. 2001 H.Kurashige
// Remove thePolarizationChange 12 Feb. 2001 H.Kurashige
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek
//
// Class Description
// This class is a concrete class for ParticleChange for transportation
@@ -42,7 +43,7 @@
#include "globals.hh"
#include "G4ios.hh"
class G4VTouchable;
#include "G4TouchableHandle.hh"
#include "G4ParticleChange.hh"
class G4ParticleChangeForTransport: public G4ParticleChange
@@ -80,8 +81,8 @@ class G4ParticleChangeForTransport: public G4ParticleChange
// "Change", what it stores (and returns in get) are the "FINAL"
// values of the Position, Momentum, etc.
const G4VTouchable* GetTouchableChange() const;
void SetTouchableChange(const G4VTouchable* fTouchable);
const G4TouchableHandle& GetTouchableHandle() const;
void SetTouchableHandle(const G4TouchableHandle& fTouchable);
// Get/Set the touchable of the current particle.
// Note: Touchable in PostStepPoint will be updated only after PostStepDoIt
@@ -96,7 +97,7 @@ class G4ParticleChangeForTransport: public G4ParticleChange
virtual void DumpInfo() const;
protected:
const G4VTouchable* theTouchableChange;
G4TouchableHandle theTouchableHandle;
// The changed touchable of a given particle.
private:
@@ -21,23 +21,24 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.icc,v 1.5.4.1 2001/06/28 19:15:23 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ParticleChangeForTransport.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
inline
void G4ParticleChangeForTransport::SetTouchableChange(const G4VTouchable* fTouchable)
void G4ParticleChangeForTransport::SetTouchableHandle(const G4TouchableHandle&
fTouchable)
{
theTouchableChange = fTouchable;
theTouchableHandle = fTouchable;
}
inline
const G4VTouchable* G4ParticleChangeForTransport::GetTouchableChange() const
const G4TouchableHandle& G4ParticleChangeForTransport::GetTouchableHandle() const
{
return theTouchableChange;
return theTouchableHandle;
}
inline
void G4ParticleChangeForTransport::SetMaterialChange(G4Material* fMaterial)
{
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Step.hh,v 1.7.4.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Step.hh,v 1.8 2001/07/11 10:08:36 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+8 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Step.icc,v 1.4.2.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Step.icc,v 1.7 2001/10/22 04:19:40 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
@@ -179,7 +179,7 @@ inline
fpPreStepPoint->SetMomentumDirection(fpTrack->GetMomentumDirection());
fpPreStepPoint->SetKineticEnergy(fpTrack->GetKineticEnergy());
fpPreStepPoint->SetVelocity(fpTrack->GetVelocity());
fpPreStepPoint->SetTouchable(fpTrack->GetTouchable());
fpPreStepPoint->SetTouchableHandle(fpTrack->GetTouchableHandle());
fpPreStepPoint->SetMaterial( fpTrack->GetTouchable()->GetVolume()->GetLogicalVolume()->GetMaterial());
fpPreStepPoint->SetPolarization(fpTrack->GetPolarization());
fpPreStepPoint->SetSafety(0.);
@@ -214,9 +214,12 @@ inline
fpTrack->SetStepLength(fStepLength);
// NextTouchable is updated
// (G4Track::Touchable points touchable of Pre-StepPoint)
fpTrack->SetNextTouchable(fpPostStepPoint->GetTouchable());
fpTrack->SetNextTouchableHandle(fpPostStepPoint->GetTouchableHandle());
fpTrack->SetWeight(fpPostStepPoint->GetWeight());
}
// set velocity
fpPostStepPoint->SetVelocity(fpTrack->GetVelocity());
}
+8 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4StepPoint.hh,v 1.7.2.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StepPoint.hh,v 1.9 2001/10/22 04:19:40 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
@@ -52,7 +52,7 @@
class G4VProcess;
#include "G4SteppingControl.hh"
#include "G4StepStatus.hh" // Include from 'track'
#include "G4VTouchable.hh" // Include from 'geometry'
#include "G4TouchableHandle.hh" // Include from 'geometry'
#include "G4Material.hh"
#include "G4LogicalVolume.hh"
@@ -124,7 +124,8 @@ class G4StepPoint
G4VPhysicalVolume* GetPhysicalVolume() const;
const G4VTouchable* GetTouchable() const;
void SetTouchable(const G4VTouchable* apValue);
const G4TouchableHandle& GetTouchableHandle() const;
void SetTouchableHandle(const G4TouchableHandle& apValue);
G4Material* GetMaterial() const;
void SetMaterial(G4Material*);
@@ -176,7 +177,9 @@ class G4StepPoint
G4ThreeVector fMomentumDirection;
G4double fKineticEnergy;
G4double fVelocity;
const G4VTouchable* fpTouchable;
// Momentum,energy and velocity
G4TouchableHandle fpTouchable;
// Touchable Handle
G4Material* fpMaterial;
// Material of the volmue
G4double fSafety;
+5 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4StepPoint.icc,v 1.3.2.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StepPoint.icc,v 1.5 2001/10/22 04:19:40 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
inline const G4ThreeVector& G4StepPoint::GetPosition() const
@@ -116,8 +116,10 @@
{ return fpTouchable->GetVolume(); }
inline const G4VTouchable* G4StepPoint::GetTouchable() const
{ return fpTouchable(); }
inline const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const
{ return fpTouchable; }
inline void G4StepPoint::SetTouchable(const G4VTouchable* apValue)
inline void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue)
{ fpTouchable = apValue; }
inline G4double G4StepPoint::GetSafety() const
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4StepStatus.hh,v 1.2.10.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StepStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingControl.hh,v 1.2.10.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4SteppingControl.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+15 -19
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Track.hh,v 1.10.2.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Track.hh,v 1.13 2001/11/13 05:13:37 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
@@ -35,14 +35,10 @@
// 1) current position/time of the particle,
// 2) static particle information,
// 3) the pointer to the physical volume where currently
// the particle exists,
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
// the particle exists
//
//---------------------------------------------------------------
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek
#ifndef G4Track_h
#define G4Track_h 1
@@ -54,7 +50,7 @@
#include "G4Allocator.hh" // Include from 'particle+matter'
#include "G4DynamicParticle.hh" // Include from 'particle+matter'
#include "G4TrackStatus.hh" // Include from 'tracking'
#include "G4VTouchable.hh" // Include from 'geometry'
#include "G4TouchableHandle.hh" // Include from 'geometry'
#include "G4VUserTrackInformation.hh"
#include "G4Material.hh"
@@ -134,11 +130,13 @@ public: // With description
G4Material* GetMaterial() const;
G4Material* GetNextMaterial() const;
const G4VTouchable* GetTouchable() const;
void SetTouchable(const G4VTouchable* apValue);
const G4VTouchable* GetTouchable() const;
const G4TouchableHandle& GetTouchableHandle() const;
void SetTouchableHandle( const G4TouchableHandle& apValue);
const G4VTouchable* GetNextTouchable() const;
void SetNextTouchable(const G4VTouchable* apValue);
const G4VTouchable* GetNextTouchable() const;
const G4TouchableHandle& GetNextTouchableHandle() const;
void SetNextTouchableHandle( const G4TouchableHandle& apValue);
// energy
G4double GetKineticEnergy() const;
@@ -212,10 +210,7 @@ public: // With description
void SetCreatorProcess(G4VProcess* aValue);
// track weight
// These are methods for manipulating a weight for this track.
// The track weight is used by G4VEvtBiasMechanism
// to execute inclusive simulation for hadronic/electomagnetic shower
// and neutron transportation etc.
// These are methods for manipulating a weight for this track.
G4double GetWeight() const;
void SetWeight(G4double aValue);
@@ -236,8 +231,9 @@ public: // With description
G4int fParentID;
G4int fTrackID;
const G4VTouchable* fpTouchable;
const G4VTouchable* fpNextTouchable;
G4TouchableHandle fpTouchable;
G4TouchableHandle fpNextTouchable;
// Touchable Handle
G4DynamicParticle* fpDynamicParticle;
G4TrackStatus fTrackStatus;
+29 -10
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Track.icc,v 1.6.4.1 2001/06/28 19:15:24 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Track.icc,v 1.8 2001/10/22 04:19:40 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//-----------------------------------------------------------------
// Definitions of inline functions
@@ -117,17 +117,36 @@
// touchable
inline const G4VTouchable* G4Track::GetTouchable() const
{ return fpTouchable; }
inline const G4VTouchable* G4Track::GetTouchable() const
{
return fpTouchable();
}
inline void G4Track::SetTouchable(const G4VTouchable* apValue)
{ fpTouchable = apValue; }
inline const G4TouchableHandle& G4Track::GetTouchableHandle() const
{
return fpTouchable;
}
inline const G4VTouchable* G4Track::GetNextTouchable() const
{ return fpNextTouchable; }
inline void G4Track::SetTouchableHandle( const G4TouchableHandle& apValue)
{
fpTouchable = apValue;
}
inline const G4VTouchable* G4Track::GetNextTouchable() const
{
return fpNextTouchable();
}
inline const G4TouchableHandle& G4Track::GetNextTouchableHandle() const
{
return fpNextTouchable;
}
inline void G4Track::SetNextTouchableHandle( const G4TouchableHandle& apValue)
{
fpNextTouchable = apValue;
}
inline void G4Track::SetNextTouchable(const G4VTouchable* apValue)
{ fpNextTouchable = apValue; }
// kinetic energy
inline G4double G4Track::GetKineticEnergy() const
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackFastVector.hh,v 1.3.10.2 2001/06/28 20:20:15 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TrackFastVector.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackStatus.hh,v 1.2.10.1 2001/06/28 19:15:25 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4TrackStatus.hh,v 1.3 2001/07/11 10:08:37 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VEvtBiasMechanism.hh,v 1.3.10.2 2001/06/28 20:20:15 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VEvtBiasMechanism.hh,v 1.4 2001/07/11 10:08:37 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
+19 -15
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.hh,v 1.4.10.2 2001/06/28 20:20:15 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VParticleChange.hh,v 1.7 2001/11/13 05:13:38 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ------------------------------------------------------------
@@ -73,7 +73,6 @@
class G4Track;
class G4Step;
class G4VEvtBiasMechanism;
#include "G4TrackFastVector.hh"
#include "G4TrackStatus.hh"
@@ -85,7 +84,6 @@ class G4VParticleChange
public:
// default constructor
G4VParticleChange();
G4VParticleChange(G4bool useEvtBiasing);
// destructor
virtual ~G4VParticleChange();
@@ -178,6 +176,21 @@ class G4VParticleChange
// ------------------------------------------------------
G4double GetParentWeight() const ;
// Get weight of the parent (i.e. current) track
void SetParentWeight(G4double);
void SetParentWeightByProcess(G4bool);
G4bool IsParentWeightSetByProcess() const;
// If fParentWeightByProcess flag is false (true in default),
// G4VParticleChange can change the weight of the parent track,
// in any DoIt by using SetParentWeight(G4double)
void SetSecondaryWeightByProcess(G4bool);
G4bool IsSecondaryWeightSetByProcess() const;
// If fSecondaryWeightByProcess flag is false (false in default),
// G4VParticleChange set the weight of the secondary tracks
// equal to the parent weight when the secondary tracks are added.
virtual void DumpInfo() const;
// Print out information
@@ -234,24 +247,15 @@ class G4VParticleChange
static const G4double accuracyForWarning;
static const G4double accuracyForException;
public: // with description
//---- following methods and members are used for Event Biasing
virtual void RegisterEBMechanism(G4VEvtBiasMechanism* );
virtual void SwOnEB();
virtual void SwOffEB();
virtual G4bool IsEBActive() const;
virtual G4VEvtBiasMechanism* GetEBMechanism();
protected:
G4VEvtBiasMechanism* theEBMechanism;
G4bool fUseEB;
G4double theParentWeight;
G4bool fSetSecondaryWeightByProcess;
G4bool fSetParentWeightByProcess;
};
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4VEvtBiasMechanism.hh"
#include "G4VParticleChange.icc"
#endif
+48 -38
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.icc,v 1.5.4.1 2001/06/28 19:15:26 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VParticleChange.icc,v 1.8 2001/11/13 05:13:38 kurasige Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//----------------------------------------------------------------
// Virtual methods for updating G4Step
@@ -30,9 +30,6 @@
inline G4Step* G4VParticleChange::UpdateStepInfo(G4Step* pStep)
{
// Apply math fomula if Event Biasing is active
if (fUseEB) theEBMechanism->ApplyMath( this, *pStep);
// Update the G4Step specific attributes
pStep->SetStepLength( theTrueStepLength );
pStep->AddTotalEnergyDeposit( theLocalEnergyDeposit );
@@ -43,18 +40,27 @@ inline G4Step* G4VParticleChange::UpdateStepInfo(G4Step* pStep)
inline
G4Step* G4VParticleChange::UpdateStepForAtRest(G4Step* Step)
{
if (!fSetParentWeightByProcess){
Step->GetPostStepPoint()->SetWeight( theParentWeight );
}
return UpdateStepInfo(Step);
}
inline
G4Step* G4VParticleChange::UpdateStepForAlongStep(G4Step* Step)
{
if (!fSetParentWeightByProcess){
Step->GetPostStepPoint()->SetWeight( theParentWeight );
}
return UpdateStepInfo(Step);
}
inline
G4Step* G4VParticleChange::UpdateStepForPostStep(G4Step* Step)
{
if (!fSetParentWeightByProcess){
Step->GetPostStepPoint()->SetWeight( theParentWeight );
}
return UpdateStepInfo(Step);
}
@@ -219,9 +225,11 @@ inline void G4VParticleChange::InitializeSecondaries(const G4Track&)
inline void G4VParticleChange::AddSecondary(G4Track *aTrack)
{
// pass the weight of parent track
aTrack->SetWeight(theParentWeight);
if (!fSetSecondaryWeightByProcess){
// pass the weight of parent track
aTrack->SetWeight(theParentWeight);
}
// add a secondary after size check
if (theSizeOftheListOfSecondaries > theNumberOfSecondaries) {
theListOfSecondaries->SetElement(theNumberOfSecondaries, aTrack);
@@ -271,36 +279,6 @@ inline void G4VParticleChange::Initialize(const G4Track& track)
InitializeParentWeight(track);
}
inline
void G4VParticleChange::RegisterEBMechanism(G4VEvtBiasMechanism* pEB)
{
theEBMechanism = pEB;
}
inline
void G4VParticleChange::SwOnEB()
{
if (theEBMechanism!=0) fUseEB = true;
}
inline
void G4VParticleChange::SwOffEB()
{
fUseEB = false;
}
inline
G4bool G4VParticleChange::IsEBActive() const
{
return fUseEB;
}
inline
G4VEvtBiasMechanism* G4VParticleChange::GetEBMechanism()
{
return theEBMechanism;
}
inline
void G4VParticleChange::ClearDebugFlag()
{
@@ -318,3 +296,35 @@ inline
{
return debugFlag;
}
inline
void G4VParticleChange::SetSecondaryWeightByProcess(G4bool flag)
{
fSetSecondaryWeightByProcess = flag;
}
inline
G4bool G4VParticleChange::IsSecondaryWeightSetByProcess() const
{
return fSetSecondaryWeightByProcess;
}
inline
void G4VParticleChange::SetParentWeight(G4double w)
{
theParentWeight = w;
}
inline
void G4VParticleChange::SetParentWeightByProcess(G4bool flag)
{
fSetParentWeightByProcess = flag;
}
inline
G4bool G4VParticleChange::IsParentWeightSetByProcess() const
{
return fSetParentWeightByProcess;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VUserTrackInformation.hh,v 1.2.4.1 2001/06/28 19:15:26 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VUserTrackInformation.hh,v 1.3 2001/07/11 10:08:38 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
//---------------------------------------------------------------