Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 2003/10/03 15:49:20 gcosmo Exp $
# $Id: GNUmakefile,v 1.5 2004/06/11 14:28:12 gcosmo Exp $
# ----------------------------------------------------------
# GNUmakefile for track library. Gabriele Cosmo, 3/4/1997.
# ----------------------------------------------------------
@@ -9,8 +9,13 @@ ifndef G4INSTALL
G4INSTALL = ../..
endif
GLOBLIBS = libG4particles.lib libG4geometry.lib
GLOBLIBS += libG4materials.lib libG4graphics_reps.lib
GLOBLIBS += libG4intercoms.lib libG4global.lib
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -DG4TRACK_ALLOC_EXPORT
CPPFLAGS += \
-I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
+28 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.63 2004/01/20 15:29:41 vnivanch Exp $
$Id: History,v 1.70 2004/06/15 08:19:02 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,33 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun. 15, 04 V.Ivanchenko (track-V06-01-05)
- G4ParticleChangeForLoss: fix initialization of ParentWeight
Jun. 11, 04 G.Cosmo (track-V06-01-04)
- Use global flag G4TRACK_ALLOC_EXPORT to export extern symbols for DLLs.
Modified GNUmakefile and rearranged usage of extern symbols in G4Track.
Jun. 09, 04 G.Cosmo (track-V06-01-03)
- Adopt G4DLLIMPORT/G4DLLEXPORT technique to handle extern simbols for
allowing support of DLLs on Windows.
- Coworks with "global-V06-01-02b".
Jun. 07, 04 G.Cosmo (track-V06-01-02)
- Export extern symbols for allowing support of DLLs on Windows.
Modified G4Track.icc.
- GNUmakefile: added definition of GLOBLIBS for DLLs support on Windows.
- Coworks with "global-V06-01-02a".
May. 11, 04 V.Ivanchenko (track-V06-01-01)
- G4ParticleChangeForLoss: rename variables according to 00 tag;
fix of minor energy non-conservation in case of more than 1
processes changing the energy
May. 08, 04 H.Kurashige (track-V06-01-00)
- Add new methods of ProposeXXX (and corresponding GetXXX methods)
as replacements of old methods of SetXXXChange and GetXXXChange
Jan. 20, 04 V.Ivanchenko (track-V06-00-01)
- Update G4ParticleChangeForLoss for utilisation in G4VEnergyLossProcess
- Minor update G4ParticleChangeForMSC for utilisation in model design of msc
+65 -46
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.hh,v 1.9 2001/11/21 14:05:57 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ParticleChange.hh,v 1.10 2004/05/08 15:28:11 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ------------------------------------------------------------
@@ -121,51 +121,48 @@ class G4ParticleChange: public G4VParticleChange
// ----------------------------------------------------
//--- methods to keep information of the final state--
// IMPORTANT NOTE: Although the name of the class and methods are
// "Change", what it stores (and returns in get) are the "FINAL"
// values of the Position, Momentum, etc.
// IMPORTANT NOTE:
// These ProposeXXX methods stores (and returns in GetXXX methods)
// the "FINAL" values of the Position, Momentum, etc.
const G4ThreeVector* GetMomentumDirectionChange() const;
void SetMomentumDirectionChange(G4double Px, G4double Py, G4double Pz);
void SetMomentumDirectionChange(const G4ThreeVector& Pfinal);
const G4ThreeVector* GetMomentumChange() const;
void SetMomentumChange(G4double Px, G4double Py, G4double Pz);
void SetMomentumChange(const G4ThreeVector& Pfinal);
// Get/Set theMomentumDirectionChange vector: it is the final momentum direction.
const G4ThreeVector* GetMomentumDirection() const;
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
// Get/Propose the MomentumDirection vector: it is the final momentum direction.
const G4ThreeVector* GetPolarizationChange() const;
void SetPolarizationChange(G4double Px, G4double Py, G4double Pz);
void SetPolarizationChange(const G4ThreeVector& finalPoralization);
// Get/Set thePolarizationChange vector.
const G4ThreeVector* GetPolarization() const;
void ProposePolarization(G4double Px, G4double Py, G4double Pz);
void ProposePolarization(const G4ThreeVector& finalPoralization);
// Get/Propose the final Polarization vector.
G4double GetEnergyChange() const;
void SetEnergyChange(G4double theEnergyChange);
// Get/Set the final kinetic energy of the current particle.
G4double GetEnergy() const;
void ProposeEnergy(G4double finalEnergy);
// Get/Propose the final kinetic energy of the current particle.
G4double GetProperTimeChange() const;
void SetProperTimeChange(G4double t);
// Get/Set theProperTimeChange vector
G4double GetProperTime() const;
void ProposeProperTime(G4double finalProperTime);
// Get/Propose th final eProperTime
const G4ThreeVector* GetPositionChange() const;
void SetPositionChange(G4double x, G4double y, G4double z);
void SetPositionChange(const G4ThreeVector& finalPosition);
// Get/Set the final position of the current particle.
const G4ThreeVector* GetPosition() const;
void ProposePosition(G4double x, G4double y, G4double z);
void ProposePosition(const G4ThreeVector& finalPosition);
// Get/Propose the final position of the current particle.
G4double GetTimeChange() const;
void SetTimeChange(G4double t);
// Get/Set theTimeChange vector.
G4double GetGlobalTime() const;
void ProposeGlobalTime(G4double finalGlobalTime);
// Get/Propose the final GlobalTime
G4double GetMassChange() const;
void SetMassChange(G4double mass);
// Get/Set theMassChange
G4double GetMass() const;
void ProposeMass(G4double finalMass);
// Get/Propose the final dynamical Mass in G4DynamicParticle
G4double GetChargeChange() const;
void SetChargeChange(G4double mass);
// Get/Set theChargeChange
G4double GetCharge() const;
void ProposeCharge(G4double finalCharge);
// Get/Propose the final dynamical Charge in G4DynamicParticl
G4double GetWeightChange() const;
void SetWeightChange(G4double w);
// Get/Set theWeightChange
G4double GetWeight() const;
void ProposeWeight(G4double finalWeight);
// Get/Propose the final Weight of the current particle
// -- Utility functions --
G4ThreeVector GetGlobalPosition(const G4ThreeVector& displacement) const;
@@ -204,6 +201,36 @@ class G4ParticleChange: public G4VParticleChange
// position and are same as thePositionChange
// ----------------------------------------------------
public:
// Following methods will be removed in release 7.0
// Using ProposeXXXX methods is recommended to setting
// properties in G4ParticleChange
const G4ThreeVector* GetMomentumDirectionChange() const;
void SetMomentumDirectionChange(G4double Px, G4double Py, G4double Pz);
void SetMomentumDirectionChange(const G4ThreeVector& Pfinal);
const G4ThreeVector* GetMomentum() const;
void SetMomentumChange(G4double Px, G4double Py, G4double Pz);
void SetMomentumChange(const G4ThreeVector& Pfinal);
const G4ThreeVector* GetMomentumChange() const;
const G4ThreeVector* GetPolarizationChange() const;
void SetPolarizationChange(G4double Px, G4double Py, G4double Pz);
void SetPolarizationChange(const G4ThreeVector& finalPoralization);
G4double GetEnergyChange() const;
void SetEnergyChange(G4double theEnergyChange);
G4double GetProperTimeChange() const;
void SetProperTimeChange(G4double t);
const G4ThreeVector* GetPositionChange() const;
void SetPositionChange(G4double x, G4double y, G4double z);
void SetPositionChange(const G4ThreeVector& finalPosition);
G4double GetTimeChange() const;
void SetTimeChange(G4double t);
G4double GetMassChange() const;
void SetMassChange(G4double mass);
G4double GetChargeChange() const;
void SetChargeChange(G4double mass);
G4double GetWeightChange() const;
void SetWeightChange(G4double w);
public:
virtual void DumpInfo() const;
@@ -241,14 +268,6 @@ class G4ParticleChange: public G4VParticleChange
const G4Track* theCurrentTrack;
public:
// these methods is used for switch on/off EB in all ParticleChange objects
// static void SwOnAllEB();
// static void SwOffAllEB();
private:
// static G4bool fUseEBForAll;
public:
// for Debug
virtual G4bool CheckIt(const G4Track&);
+184 -68
View File
@@ -21,38 +21,36 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.icc,v 1.9 2001/10/20 08:07:49 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ParticleChange.icc,v 1.10 2004/05/08 15:28:11 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
inline
G4Step* G4ParticleChange::UpdateStepInfo(G4Step* pStep)
{
// use fUseEBForAll instead of fUseEB
// fUseEB = fUseEBForAll;
return G4VParticleChange::UpdateStepInfo(pStep);
}
inline
G4double G4ParticleChange::GetEnergyChange() const
G4double G4ParticleChange::GetEnergy() const
{
return theEnergyChange;
}
inline
void G4ParticleChange::SetEnergyChange(G4double Energy)
void G4ParticleChange::ProposeEnergy(G4double finalEnergy)
{
theEnergyChange = Energy;
theEnergyChange = finalEnergy;
}
inline
const G4ThreeVector* G4ParticleChange::GetMomentumChange() const
const G4ThreeVector* G4ParticleChange::GetMomentumDirection() const
{
return &theMomentumDirectionChange;
}
inline
void G4ParticleChange::SetMomentumChange(
void G4ParticleChange::ProposeMomentumDirection(
G4double Px,
G4double Py,
G4double Pz )
@@ -63,48 +61,26 @@ inline
}
inline
void G4ParticleChange::SetMomentumChange(const G4ThreeVector& P)
void G4ParticleChange::ProposeMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirectionChange = P;
}
inline
const G4ThreeVector* G4ParticleChange::GetMomentumDirectionChange() const
{
return &theMomentumDirectionChange;
}
inline
void G4ParticleChange::SetMomentumDirectionChange(
G4double Px,
G4double Py,
G4double Pz )
{
theMomentumDirectionChange.setX(Px);
theMomentumDirectionChange.setY(Py);
theMomentumDirectionChange.setZ(Pz);
}
inline
void G4ParticleChange::SetMomentumDirectionChange(const G4ThreeVector& P)
{
theMomentumDirectionChange = P;
}
inline
const G4ThreeVector* G4ParticleChange::GetPolarizationChange() const
const G4ThreeVector* G4ParticleChange::GetPolarization() const
{
return &thePolarizationChange;
}
inline
void G4ParticleChange::SetPolarizationChange( const G4ThreeVector& finalPoralization)
void G4ParticleChange::ProposePolarization( const G4ThreeVector& finalPoralization)
{
thePolarizationChange = finalPoralization;
}
inline
void G4ParticleChange::SetPolarizationChange(
void G4ParticleChange::ProposePolarization(
G4double Px,
G4double Py,
G4double Pz )
@@ -115,38 +91,37 @@ inline
}
inline
const G4ThreeVector* G4ParticleChange::GetPositionChange() const
const G4ThreeVector* G4ParticleChange::GetPosition() const
{
return &thePositionChange;
}
inline
G4double G4ParticleChange::GetProperTimeChange() const
{
return theProperTimeChange;
}
inline
void G4ParticleChange::SetProperTimeChange(G4double tau)
{
theProperTimeChange = tau;
}
inline
void G4ParticleChange::SetPositionChange(const G4ThreeVector& finalPosition)
void G4ParticleChange::ProposePosition(const G4ThreeVector& finalPosition)
{
thePositionChange= finalPosition;
}
inline
void G4ParticleChange::SetPositionChange(G4double x,G4double y, G4double z)
void G4ParticleChange::ProposePosition(G4double x,G4double y, G4double z)
{
thePositionChange.setX(x);
thePositionChange.setY(y);
thePositionChange.setZ(z);
}
inline
G4double G4ParticleChange::GetProperTime() const
{
return theProperTimeChange;
}
inline
void G4ParticleChange::ProposeProperTime(G4double tau)
{
theProperTimeChange = tau;
}
inline
G4ThreeVector G4ParticleChange::GetGlobalPosition(const G4ThreeVector& displacement) const
{
@@ -162,49 +137,49 @@ inline
}
inline
G4double G4ParticleChange::GetTimeChange() const
G4double G4ParticleChange::GetGlobalTime() const
{
return theTimeChange;
}
inline
void G4ParticleChange::SetTimeChange(G4double t)
void G4ParticleChange::ProposeGlobalTime(G4double t)
{
theTimeChange = t;
}
inline
G4double G4ParticleChange::GetMassChange() const
G4double G4ParticleChange::GetMass() const
{
return theMassChange;
}
inline
void G4ParticleChange::SetMassChange(G4double t)
void G4ParticleChange::ProposeMass(G4double t)
{
theMassChange = t;
}
inline
G4double G4ParticleChange::GetChargeChange() const
G4double G4ParticleChange::GetCharge() const
{
return theChargeChange;
}
inline
void G4ParticleChange::SetChargeChange(G4double t)
void G4ParticleChange::ProposeCharge(G4double t)
{
theChargeChange = t;
}
inline
G4double G4ParticleChange::GetWeightChange() const
G4double G4ParticleChange::GetWeight() const
{
return theWeightChange;
}
inline
void G4ParticleChange::SetWeightChange(G4double w)
void G4ParticleChange::ProposeWeight(G4double w)
{
theWeightChange = w;
theParentWeight = w;
@@ -220,20 +195,161 @@ inline
return direction*tMomentum;
}
//inline
// void G4ParticleChange::SwOnAllEB()
//{
// fUseEBForAll = true;
//}
//inline void G4ParticleChange::SwOffAllEB()
//{
// fUseEBForAll = false;
//}
// Following methods will be removed in release 7.0
inline
G4double G4ParticleChange::GetEnergyChange() const
{
return GetEnergy();
}
inline
void G4ParticleChange::SetEnergyChange(G4double energy)
{
ProposeEnergy(energy);
}
inline
const G4ThreeVector* G4ParticleChange::GetMomentumChange() const
{
return GetMomentumDirection();
}
inline
void G4ParticleChange::SetMomentumChange(
G4double Px,
G4double Py,
G4double Pz )
{
ProposeMomentumDirection(Px, Py, Pz);
}
inline
void G4ParticleChange::SetMomentumChange(const G4ThreeVector& P)
{
ProposeMomentumDirection(P);
}
inline
const G4ThreeVector* G4ParticleChange::GetMomentumDirectionChange() const
{
return GetMomentumDirection();
}
inline
void G4ParticleChange::SetMomentumDirectionChange(
G4double Px,
G4double Py,
G4double Pz )
{
ProposeMomentumDirection(Px, Py, Pz);
}
inline
void G4ParticleChange::SetMomentumDirectionChange(const G4ThreeVector& P)
{
ProposeMomentumDirection(P);
}
inline
const G4ThreeVector* G4ParticleChange::GetPolarizationChange() const
{
return GetPolarization();
}
inline
void G4ParticleChange::SetPolarizationChange( const G4ThreeVector& finalPoralization)
{
ProposePolarization(finalPoralization);
}
inline
void G4ParticleChange::SetPolarizationChange(
G4double Px,
G4double Py,
G4double Pz )
{
ProposePolarization(Px, Py, Pz);
}
inline
const G4ThreeVector* G4ParticleChange::GetPositionChange() const
{
return GetPosition();
}
inline
void G4ParticleChange::SetPositionChange(const G4ThreeVector& finalPosition)
{
ProposePosition(finalPosition);
}
inline
void G4ParticleChange::SetPositionChange(G4double x,G4double y, G4double z)
{
ProposePosition(x, y, z);
}
inline
G4double G4ParticleChange::GetProperTimeChange() const
{
return GetProperTime();
}
inline
void G4ParticleChange::SetProperTimeChange(G4double tau)
{
ProposeProperTime(tau);
}
inline
G4double G4ParticleChange::GetTimeChange() const
{
return GetGlobalTime();
}
inline
void G4ParticleChange::SetTimeChange(G4double t)
{
ProposeGlobalTime(t);
}
inline
G4double G4ParticleChange::GetMassChange() const
{
return GetMass();
}
inline
void G4ParticleChange::SetMassChange(G4double t)
{
ProposeMass(t);
}
inline
G4double G4ParticleChange::GetChargeChange() const
{
return GetCharge();
}
inline
void G4ParticleChange::SetChargeChange(G4double t)
{
ProposeCharge(t);
}
inline
G4double G4ParticleChange::GetWeightChange() const
{
return GetWeight();
}
inline
void G4ParticleChange::SetWeightChange(G4double w)
{
ProposeWeight(w);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForDecay.hh,v 1.5 2001/07/11 10:08:35 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ParticleChangeForDecay.hh,v 1.6 2004/05/08 15:28:11 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ------------------------------------------------------------
@@ -83,9 +83,19 @@ class G4ParticleChangeForDecay: public G4VParticleChange
virtual void Initialize(const G4Track&);
// Initialize all propoerties by using G4Track information
G4double GetGlobalTime() const;
void ProposeGlobalTime(G4double t);
// Get/Propose the final GlobalTime
G4double GetGlobalTime(G4double timeDelay) const;
// Convert the time delay to the global time.
public:
// Following methods will be removed in release 7.0
// Using ProposeXXXX methods is recommended to setting
// properties in G4ParticleChangeForDecay
G4double GetTimeChange() const;
void SetTimeChange(G4double t);
// Get/Set theTimeChange vector.
public:
virtual void DumpInfo() const;
@@ -99,6 +109,26 @@ class G4ParticleChangeForDecay: public G4VParticleChange
virtual G4bool CheckIt(const G4Track&);
};
inline
G4double G4ParticleChangeForDecay::GetGlobalTime() const
{
return theTimeChange;
}
inline
void G4ParticleChangeForDecay::ProposeGlobalTime(G4double t)
{
theTimeChange = t;
}
inline
G4double G4ParticleChangeForDecay::GetGlobalTime(G4double timeDelay) const
{
// Convert the time delay to the global time.
return theTimeChange + timeDelay;
}
// Following methods will be removed in release 7.0
inline
G4double G4ParticleChangeForDecay::GetTimeChange() const
{
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForLoss.hh,v 1.5 2004/01/20 15:29:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: G4ParticleChangeForLoss.hh,v 1.12 2004/06/15 08:17:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ------------------------------------------------------------
@@ -78,12 +78,24 @@ public:
void SetProposedCharge(G4double theCharge);
// Get/Set theCharge
G4double GetCharge() const;
void ProposeCharge(G4double finalCharge);
// Get/Propose the final dynamical Charge in G4DynamicParticle
G4double GetProposedKineticEnergy() const;
void SetProposedKineticEnergy(G4double kinEnergy);
void SetProposedKineticEnergy(G4double proposedKinEnergy);
// Get/Set the final kinetic energy of the current particle.
// G4double GetEnergy() const;
// void ProposeEnergy(G4double finalEnergy);
// Get/Propose the final kinetic energy of the current particle.
const G4ThreeVector& GetProposedMomentumDirection() const;
void SetProposedMomentumDirection(const G4ThreeVector& dir);
const G4ThreeVector& GetMomentumDirection() const;
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
// Get/Propose the MomentumDirection vector: it is the final momentum direction.
virtual void DumpInfo() const;
@@ -99,22 +111,25 @@ private:
const G4Track* currentTrack;
// The pointer to G4Track
G4double kinEnergy;
G4double proposedKinEnergy;
// The final kinetic energy of the current particle.
G4double currentCharge;
// The final charge of the current particle.
G4ThreeVector proposedMomentumDirection;
// The final momentum direction of the current particle.
};
inline G4double G4ParticleChangeForLoss::GetProposedKineticEnergy() const
{
return kinEnergy;
return proposedKinEnergy;
}
inline void G4ParticleChangeForLoss::SetProposedKineticEnergy(G4double energy)
{
kinEnergy = energy;
proposedKinEnergy = energy;
}
inline G4double G4ParticleChangeForLoss::GetProposedCharge() const
@@ -122,29 +137,60 @@ inline G4double G4ParticleChangeForLoss::GetProposedCharge() const
return currentCharge;
}
inline G4double G4ParticleChangeForLoss::GetCharge() const
{
return currentCharge;
}
inline void G4ParticleChangeForLoss::SetProposedCharge(G4double theCharge)
{
currentCharge = theCharge;
}
inline void G4ParticleChangeForLoss::ProposeCharge(G4double theCharge)
{
currentCharge = theCharge;
}
inline
const G4ThreeVector& G4ParticleChangeForLoss::GetProposedMomentumDirection() const
{
return proposedMomentumDirection;
}
inline
const G4ThreeVector& G4ParticleChangeForLoss::GetMomentumDirection() const
{
return proposedMomentumDirection;
}
inline
void G4ParticleChangeForLoss::ProposeMomentumDirection(const G4ThreeVector& dir)
{
proposedMomentumDirection = dir;
}
inline
void G4ParticleChangeForLoss::SetProposedMomentumDirection(const G4ThreeVector& dir)
{
proposedMomentumDirection = dir;
}
inline
void G4ParticleChangeForLoss::ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
{
proposedMomentumDirection.setX(Px);
proposedMomentumDirection.setY(Py);
proposedMomentumDirection.setZ(Pz);
}
inline void G4ParticleChangeForLoss::InitializeForAlongStep(const G4Track& track)
{
theStatusChange = track.GetTrackStatus();
theLocalEnergyDeposit = 0.0;
InitializeSecondaries(track);
kinEnergy = track.GetKineticEnergy();
theParentWeight = track.GetWeight();
proposedKinEnergy = track.GetKineticEnergy();
currentCharge = track.GetDynamicParticle()->GetCharge();
}
@@ -153,7 +199,8 @@ inline void G4ParticleChangeForLoss::InitializeForPostStep(const G4Track& track)
theStatusChange = track.GetTrackStatus();
theLocalEnergyDeposit = 0.0;
InitializeSecondaries(track);
kinEnergy = track.GetKineticEnergy();
theParentWeight = track.GetWeight();
proposedKinEnergy = track.GetKineticEnergy();
currentCharge = track.GetDynamicParticle()->GetCharge();
proposedMomentumDirection = track.GetMomentumDirection();
currentTrack = &track;
+18 -63
View File
@@ -21,7 +21,7 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.hh,v 1.6 2004/01/20 15:29:41 vnivanch Exp $
// $Id: G4ParticleChangeForMSC.hh,v 1.7 2004/05/08 15:28:11 kurasige Exp $
// GEANT4 tag $ $
//
//
@@ -83,18 +83,28 @@ class G4ParticleChangeForMSC: public G4VParticleChange
// "Change", what it stores (and returns in get) are the "FINAL"
// values of the Position, Momentum, etc.
void SetMomentumChange(const G4ThreeVector& Pfinal);
void SetMomentumChange(G4double Px, G4double Py, G4double Pz);
void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
const G4ThreeVector* GetMomentumDirection() const;
const G4ThreeVector* GetProposedMomentumDirection() const;
void SetProposedMomentumDirection(const G4ThreeVector& Pfinal);
// Get/Set theMomentumDirectionChange vector: it is the final momentum direction.
const G4ThreeVector* GetPositionChange() const;
void SetPositionChange(const G4ThreeVector& finalPosition);
const G4ThreeVector* GetPosition() const;
void ProposePosition(const G4ThreeVector& finalPosition);
const G4ThreeVector* GetProposedPosition() const;
void SetProposedPosition(const G4ThreeVector& finalPosition);
void SetProposedPosition(const G4ThreeVector& finalPosition);
// Get/Set the final position of the current particle.
public:
// Following methods will be removed in release 7.0
// Using ProposeXXXX methods is recommended to setting
// properties in G4ParticleChangeForMSC
void SetMomentumChange(const G4ThreeVector& Pfinal);
void SetMomentumChange(G4double Px, G4double Py, G4double Pz);
const G4ThreeVector* GetPositionChange() const;
void SetPositionChange(const G4ThreeVector& finalPosition);
public:
virtual void DumpInfo() const;
// for Debug
@@ -113,61 +123,6 @@ class G4ParticleChangeForMSC: public G4VParticleChange
};
inline
void G4ParticleChangeForMSC::SetMomentumChange(const G4ThreeVector& P)
{
theMomentumDirection = P;
}
inline
void G4ParticleChangeForMSC::SetProposedMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirection = P;
}
inline
void G4ParticleChangeForMSC::SetMomentumChange(G4double Px, G4double Py, G4double Pz)
{
theMomentumDirection.setX(Px);
theMomentumDirection.setY(Py);
theMomentumDirection.setZ(Pz);
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedMomentumDirection() const
{
return &theMomentumDirection;
}
inline
void G4ParticleChangeForMSC::SetProposedPosition(const G4ThreeVector& P)
{
thePosition = P;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedPosition() const
{
return &thePosition;
}
inline
void G4ParticleChangeForMSC::SetPositionChange(const G4ThreeVector& P)
{
thePosition = P;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetPositionChange() const
{
return &thePosition;
}
inline void G4ParticleChangeForMSC::Initialize(const G4Track& track)
{
theStatusChange = track.GetTrackStatus();
theMomentumDirection = track.GetMomentumDirection();
thePosition = track.GetPosition();
}
#include "G4ParticleChangeForMSC.icc"
#endif
+72 -47
View File
@@ -21,73 +21,98 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.icc,v 1.4 2001/07/11 10:08:36 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ParticleChangeForMSC.icc,v 1.5 2004/05/08 15:28:12 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetMomentumChange() const
inline
void G4ParticleChangeForMSC::ProposeMomentumDirection(const G4ThreeVector& P)
{
return &theMomentumDirectionChange;
theMomentumDirection = P;
}
inline
void G4ParticleChangeForMSC::SetMomentumChange(
G4double Px,
G4double Py,
G4double Pz )
inline
void G4ParticleChangeForMSC::SetProposedMomentumDirection(const G4ThreeVector& P)
{
theMomentumDirectionChange.setX(Px);
theMomentumDirectionChange.setY(Py);
theMomentumDirectionChange.setZ(Pz);
theMomentumDirection = P;
}
inline
inline
void G4ParticleChangeForMSC::ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
{
theMomentumDirection.setX(Px);
theMomentumDirection.setY(Py);
theMomentumDirection.setZ(Pz);
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetMomentumDirection() const
{
return &theMomentumDirection;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedMomentumDirection() const
{
return &theMomentumDirection;
}
inline
void G4ParticleChangeForMSC::SetProposedPosition(const G4ThreeVector& P)
{
thePosition = P;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetPosition() const
{
return &thePosition;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetProposedPosition() const
{
return &thePosition;
}
inline
void G4ParticleChangeForMSC::ProposePosition(const G4ThreeVector& P)
{
thePosition = P;
}
inline void G4ParticleChangeForMSC::Initialize(const G4Track& track)
{
theStatusChange = track.GetTrackStatus();
theMomentumDirection = track.GetMomentumDirection();
thePosition = track.GetPosition();
}
// Following methods will be removed in release 7.0
inline
void G4ParticleChangeForMSC::SetMomentumChange(const G4ThreeVector& P)
{
theMomentumDirectionChange = P;
}
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetMomentumDirectionChange() const
{
return &theMomentumDirectionChange;
ProposeMomentumDirection(P);
}
inline
void G4ParticleChangeForMSC::SetMomentumDirectionChange(
G4double Px,
G4double Py,
G4double Pz )
inline
void G4ParticleChangeForMSC::SetMomentumChange(G4double Px, G4double Py, G4double Pz)
{
theMomentumDirectionChange.setX(Px);
theMomentumDirectionChange.setY(Py);
theMomentumDirectionChange.setZ(Pz);
ProposeMomentumDirection(Px, Py, Pz);
}
inline
void G4ParticleChangeForMSC::SetMomentumDirectionChange(const G4ThreeVector& P)
inline
void G4ParticleChangeForMSC::SetPositionChange(const G4ThreeVector& P)
{
theMomentumDirectionChange = P;
ProposePosition(P);
}
inline
inline
const G4ThreeVector* G4ParticleChangeForMSC::GetPositionChange() const
{
return &thePositionChange;
}
inline
void G4ParticleChangeForMSC::SetPositionChange(const G4ThreeVector& finalPosition)
{
thePositionChange= finalPosition;
}
inline
void G4ParticleChangeForMSC::SetPositionChange(G4double x,G4double y, G4double z)
{
thePositionChange.setX(x);
thePositionChange.setY(y);
thePositionChange.setZ(z);
return GetPosition();
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.hh,v 1.12 2003/09/19 19:08:14 kurasige Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4ParticleChangeForTransport.hh,v 1.13 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ------------------------------------------------------------
@@ -90,17 +90,26 @@ class G4ParticleChangeForTransport: public G4ParticleChange
// Get/Set the touchable of the current particle.
// Note: Touchable in PostStepPoint will be updated only after PostStepDoIt
G4Material* GetMaterialChange() const;
void SetMaterialChange(G4Material* fMaterial);
// Get/Set the material in the touchable of the current particle.
G4Material* GetMaterialInTouchable() const;
void SetMaterialInTouchable(G4Material* fMaterial);
// Get/Propose the material in the touchable of the current particle.
const G4MaterialCutsCouple* GetMaterialCutsCoupleChange() const;
void SetMaterialCutsCoupleChange(const G4MaterialCutsCouple* fMaterialCutsCouple);
const G4MaterialCutsCouple* GetMaterialCutsCoupleInTouchable() const;
void SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple* fMaterialCutsCouple);
// Get/Set the materialCutsCouple in the touchable of the current particle.
G4bool GetMomentumChanged() const;
void SetMomentumChanged(G4bool b);
public:
// Following methods will be removed in release 7.0
// Using ProposeXXXX methods is recommended to setting
// properties in G4ParticleChangeForDecay
G4Material* GetMaterialChange() const;
void SetMaterialChange(G4Material* fMaterial);
const G4MaterialCutsCouple* GetMaterialCutsCoupleChange() const;
void SetMaterialCutsCoupleChange(const G4MaterialCutsCouple* fMaterialCutsCouple);
public:
virtual void DumpInfo() const;
@@ -131,3 +140,9 @@ class G4ParticleChangeForTransport: public G4ParticleChange
#include "G4ParticleChangeForTransport.icc"
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.icc,v 1.9 2003/06/16 17:12:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ParticleChangeForTransport.icc,v 1.10 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
inline
@@ -40,25 +40,25 @@ inline
inline
void G4ParticleChangeForTransport::SetMaterialChange(G4Material* fMaterial)
void G4ParticleChangeForTransport::SetMaterialInTouchable(G4Material* fMaterial)
{
theMaterialChange = fMaterial;
}
inline
G4Material* G4ParticleChangeForTransport::GetMaterialChange() const
G4Material* G4ParticleChangeForTransport::GetMaterialInTouchable() const
{
return theMaterialChange;
}
inline
void G4ParticleChangeForTransport::SetMaterialCutsCoupleChange(const G4MaterialCutsCouple* fMaterialCutsCouple)
void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple* fMaterialCutsCouple)
{
theMaterialCutsCoupleChange = fMaterialCutsCouple;
}
inline
const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleChange() const
const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable() const
{
return theMaterialCutsCoupleChange;
}
@@ -126,3 +126,38 @@ G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
{
return fpVectorOfAuxiliaryPointsPointer;
}
// Following methods will be removed in release 7.0
inline
void G4ParticleChangeForTransport::SetMaterialChange(G4Material* fMaterial)
{
theMaterialChange = fMaterial;
}
inline
G4Material* G4ParticleChangeForTransport::GetMaterialChange() const
{
return theMaterialChange;
}
inline
void G4ParticleChangeForTransport::SetMaterialCutsCoupleChange(const G4MaterialCutsCouple* fMaterialCutsCouple)
{
theMaterialCutsCoupleChange = fMaterialCutsCouple;
}
inline
const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleChange() const
{
return theMaterialCutsCoupleChange;
}
+10 -4
View File
@@ -21,16 +21,22 @@
// ********************************************************************
//
//
// $Id: G4Track.icc,v 1.10 2002/12/16 11:59:12 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4Track.icc,v 1.13 2004/06/11 14:28:13 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//-----------------------------------------------------------------
// Definitions of inline functions
//-----------------------------------------------------------------
// change GetMaterial 16 Feb. 2000 H.Kurashige
#if defined G4TRACK_ALLOC_EXPORT
extern G4DLLEXPORT G4Allocator<G4Track> aTrackAllocator;
#else
extern G4DLLIMPORT G4Allocator<G4Track> aTrackAllocator;
#endif
// Operators
extern G4Allocator<G4Track> aTrackAllocator;
inline void* G4Track::operator new(size_t)
{ void *aTrack;
aTrack = (void *) aTrackAllocator.MallocSingle();
+26 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.hh,v 1.10 2003/12/12 13:12:13 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4VParticleChange.hh,v 1.11 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// ------------------------------------------------------------
@@ -66,6 +66,7 @@
// add CheckIt 13 Apr.,99 H.Kurashige
// add accuracy leveles 5 May, 99 H.Kurashige
// add check secondaries 11 June, 03 H.Kurashige
// add new methods of ProposeXXX 08 May, 04 H.Kurashige
#ifndef G4VParticleChange_h
#define G4VParticleChange_h 1
@@ -132,24 +133,24 @@ class G4VParticleChange
public: // with description
//---- the following methods are for TruePathLength ----
G4double GetTrueStepLength() const;
void SetTrueStepLength(G4double truePathLength);
// Get/Set theTrueStepLength
void ProposeTrueStepLength(G4double truePathLength);
// Get/Propose theTrueStepLength
//---- the following methods are for LocalEnergyDeposit ----
G4double GetLocalEnergyDeposit() const;
void SetLocalEnergyDeposit(G4double anEnergyPart);
// Get/Set the locally deposited energy
void ProposeLocalEnergyDeposit(G4double anEnergyPart);
// Get/Propose the locally deposited energy
//---- the following methods are for TrackStatus -----
G4TrackStatus GetStatusChange() const;
void SetStatusChange(G4TrackStatus status);
// Get/Set the final TrackStatus of the current particle.
G4TrackStatus GetTrackStatus() const;
void ProposeTrackStatus(G4TrackStatus status);
// Get/Propose the final TrackStatus of the current particle.
// ------------------------------------------------------
//---- the following methods are for managements of SteppingControl --
G4SteppingControl GetSteppingControl() const;
void SetSteppingControl(G4SteppingControl StepControlFlag);
// Set/Get a flag to control stepping manager behavier
void ProposeSteppingControl(G4SteppingControl StepControlFlag);
// Set/Propose a flag to control stepping manager behavier
// ------------------------------------------------------
//---- the following methods are for managements of secondaries --
@@ -178,8 +179,9 @@ class G4VParticleChange
G4double GetParentWeight() const ;
// Get weight of the parent (i.e. current) track
void ProposeParentWeight(G4double);
// Propse new 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),
@@ -199,6 +201,18 @@ class G4VParticleChange
void SetVerboseLevel(G4int vLevel);
G4int GetVerboseLevel() const;
public:
// Following methods will be removed in release 7.0
// Using ProposeXXXX methods is recommended to setting
// properties in G4VParticleChange
void SetTrueStepLength(G4double truePathLength);
void SetLocalEnergyDeposit(G4double anEnergyPart);
G4TrackStatus GetStatusChange() const;
void SetStatusChange(G4TrackStatus status);
void SetSteppingControl(G4SteppingControl StepControlFlag);
void SetParentWeight(G4double);
protected:
G4TrackFastVector* theListOfSecondaries;
+45 -8
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.icc,v 1.10 2003/06/11 07:16:28 kurasige Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4VParticleChange.icc,v 1.11 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//----------------------------------------------------------------
// Virtual methods for updating G4Step
@@ -81,13 +81,13 @@ inline
}
inline
void G4VParticleChange::SetStatusChange(G4TrackStatus aStatus)
void G4VParticleChange::ProposeTrackStatus(G4TrackStatus aStatus)
{
theStatusChange = aStatus;
}
inline
G4TrackStatus G4VParticleChange::GetStatusChange() const
G4TrackStatus G4VParticleChange::GetTrackStatus() const
{
return theStatusChange;
}
@@ -99,7 +99,7 @@ G4SteppingControl G4VParticleChange::GetSteppingControl() const
}
inline
void G4VParticleChange::SetSteppingControl(G4SteppingControl StepControlFlag)
void G4VParticleChange::ProposeSteppingControl(G4SteppingControl StepControlFlag)
{
theSteppingControlFlag = StepControlFlag;
}
@@ -115,7 +115,7 @@ inline
}
inline
void G4VParticleChange::SetLocalEnergyDeposit(G4double anEnergyPart)
void G4VParticleChange::ProposeLocalEnergyDeposit(G4double anEnergyPart)
{
theLocalEnergyDeposit = anEnergyPart;
}
@@ -127,7 +127,7 @@ inline
}
inline
void G4VParticleChange::SetTrueStepLength(G4double aLength)
void G4VParticleChange::ProposeTrueStepLength(G4double aLength)
{
theTrueStepLength = aLength;
}
@@ -288,7 +288,7 @@ inline
}
inline
void G4VParticleChange::SetParentWeight(G4double w)
void G4VParticleChange::ProposeParentWeight(G4double w)
{
theParentWeight = w;
}
@@ -305,4 +305,41 @@ inline
return fSetParentWeightByProcess;
}
// Following methods will be removed in release 7.0
inline
void G4VParticleChange::SetStatusChange(G4TrackStatus aStatus)
{
ProposeTrackStatus(aStatus);
}
inline
G4TrackStatus G4VParticleChange::GetStatusChange() const
{
return GetTrackStatus();
}
inline
void G4VParticleChange::SetSteppingControl(G4SteppingControl StepControlFlag)
{
ProposeSteppingControl(StepControlFlag);
}
inline
void G4VParticleChange::SetLocalEnergyDeposit(G4double anEnergyPart)
{
ProposeLocalEnergyDeposit(anEnergyPart);
}
inline
void G4VParticleChange::SetTrueStepLength(G4double aLength)
{
ProposeTrueStepLength(aLength);
}
inline
void G4VParticleChange::SetParentWeight(G4double w)
{
ProposeParentWeight(w);
}
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.cc,v 1.24 2003/11/24 10:27:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4ParticleChange.cc,v 1.26 2004/05/08 15:28:13 kurasige Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// --------------------------------------------------------------
@@ -223,7 +223,6 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
G4Track* aTrack = pStep->GetTrack();
G4double mass = theMassChange;
// Set Mass/Charge
@@ -273,6 +272,7 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
pPostStepPoint->SetWeight( newWeight );
#ifdef G4VERBOSE
G4Track* aTrack = pStep->GetTrack();
if (debugFlag) CheckIt(*aTrack);
#endif
@@ -421,7 +421,7 @@ G4bool G4ParticleChange::CheckIt(const G4Track& aTrack)
G4double accuracy;
// No check in case of "fStopAndKill"
if (GetStatusChange() == fStopAndKill ) {
if (GetTrackStatus() == fStopAndKill ) {
return G4VParticleChange::CheckIt(aTrack);
}
+30 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForLoss.cc,v 1.9 2004/01/20 15:29:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: G4ParticleChangeForLoss.cc,v 1.13 2004/06/15 08:17:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
// --------------------------------------------------------------
@@ -70,8 +70,9 @@ G4ParticleChangeForLoss::G4ParticleChangeForLoss(
G4cout << "G4ParticleChangeForLoss:: copy constructor is called " << G4endl;
}
currentTrack = right.currentTrack;
kinEnergy = right.kinEnergy;
proposedKinEnergy = right.proposedKinEnergy;
currentCharge = right.currentCharge;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
}
@@ -92,8 +93,9 @@ G4ParticleChangeForLoss & G4ParticleChangeForLoss::operator=(
theSteppingControlFlag = right.theSteppingControlFlag;
currentTrack = right.currentTrack;
kinEnergy = right.kinEnergy;
proposedKinEnergy = right.proposedKinEnergy;
currentCharge = right.currentCharge;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
}
return *this;
@@ -112,18 +114,29 @@ G4Step* G4ParticleChangeForLoss::UpdateStepForAlongStep(G4Step* pStep)
// So, the differences (delta) between these two states have to be
// calculated and be accumulated in PostStepPoint.
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
// calculate new kinetic energy
G4double energy = pPostStepPoint->GetKineticEnergy()
+ (kinEnergy - pStep->GetPreStepPoint()->GetKineticEnergy());
G4double kinEnergy = pPostStepPoint->GetKineticEnergy()
+ (proposedKinEnergy - pPreStepPoint->GetKineticEnergy());
// update kinetic energy and momentum direction
if (energy < 0.0) energy = 0.0;
if (kinEnergy < 0.0) {
theLocalEnergyDeposit += kinEnergy;
kinEnergy = 0.0;
}
pPostStepPoint->SetKineticEnergy( energy );
pPostStepPoint->SetKineticEnergy( kinEnergy );
pPostStepPoint->SetCharge( currentCharge );
// update weight
// this feature is commented out, it should be overwritten in case
// if energy loss processes will use biasing
// G4double newWeight = theProposedWeight/(pPreStepPoint->GetWeight())*(pPostStepPoint->GetWeight());
// pPostStepPoint->SetWeight( newWeight );
// Not necessary to check now
//#ifdef G4VERBOSE
// if (debugFlag) CheckIt(*aTrack);
@@ -145,10 +158,15 @@ G4Step* G4ParticleChangeForLoss::UpdateStepForPostStep(G4Step* pStep)
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
pPostStepPoint->SetKineticEnergy( kinEnergy );
pPostStepPoint->SetKineticEnergy( proposedKinEnergy );
pPostStepPoint->SetCharge( currentCharge );
pPostStepPoint->SetMomentumDirection( proposedMomentumDirection );
// update weight
// this feature is commented out, it should be overwritten in case
// if energy loss processes will use biasing
// pPostStepPoint->SetWeight( theProposedWeight );
// Not necessary to check now
//#ifdef G4VERBOSE
// if (debugFlag) CheckIt(*aTrack);
@@ -173,7 +191,7 @@ void G4ParticleChangeForLoss::DumpInfo() const
<< std::setw(20) << currentCharge/eplus
<< G4endl;
G4cout << " Kinetic Energy (MeV): "
<< std::setw(20) << kinEnergy/MeV
<< std::setw(20) << proposedKinEnergy/MeV
<< G4endl;
G4cout << " Momentum Direct - x : "
<< std::setw(20) << proposedMomentumDirection.x()
@@ -194,7 +212,7 @@ G4bool G4ParticleChangeForLoss::CheckIt(const G4Track& aTrack)
G4double accuracy;
// Energy should not be lager than initial value
accuracy = ( kinEnergy - aTrack.GetKineticEnergy())/MeV;
accuracy = ( proposedKinEnergy - aTrack.GetKineticEnergy())/MeV;
if (accuracy > accuracyForWarning) {
#ifdef G4VERBOSE
G4cout << "G4ParticleChangeForLoss::CheckIt: ";
@@ -223,7 +241,7 @@ G4bool G4ParticleChangeForLoss::CheckIt(const G4Track& aTrack)
//correction
if (!itsOK) {
kinEnergy = aTrack.GetKineticEnergy();
proposedKinEnergy = aTrack.GetKineticEnergy();
}
itsOK = (itsOK) && G4VParticleChange::CheckIt(aTrack);
+3 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Track.cc,v 1.19 2003/05/20 22:24:41 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4Track.cc,v 1.21 2004/06/11 14:28:14 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
//---------------------------------------------------------------
@@ -33,6 +33,7 @@
// Add copy constructor Hisaya Feb. 07 01
// Fix GetVelocity Hisaya Feb. 17 01
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek//
#include "G4Track.hh"
G4Allocator<G4Track> aTrackAllocator;