Import Geant4 3.1.0 source tree
This commit is contained in:
+20
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.23 2000/10/20 11:43:35 kurasige Exp $
|
||||
$Id: History,v 1.28 2001/03/06 09:59:14 kurasige Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,25 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
Mar 7, 01 H.Kurashige (track-V03-00-04)
|
||||
- Add protection for the zero-momentum case
|
||||
for UpdateStepForAlongStep in ParticleChange (J.A)
|
||||
|
||||
Feb 17, 01 H.Kurashige (track-V03-00-03)
|
||||
- Add Velocity and Setmethod in G4StepPoint
|
||||
- Add SetVelocity in G4Step.::InitializeStep
|
||||
- Modify G4StepPoint::GetVelocity to return correct velocity for optical photon
|
||||
|
||||
Feb 17, 01 H.Kurashige (track-V03-00-02)
|
||||
- Fix G4Track::GetVelocity for Gamma
|
||||
|
||||
Feb 12, 01 H.Kurashige (track-V03-00-01)
|
||||
- Remove thePolarizationChange from G4ParticleChangeForTransport.hh
|
||||
|
||||
|
||||
Feb 07, 01 H.Kurashige (track-V03-00-00)
|
||||
- Add copy constructor to G4Track
|
||||
|
||||
Oct 19, 00 H.kurashige (track-V02-00-01)
|
||||
- Bug fixes in copy constructor of G4ParticleChange
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EvtBiasMechanism.hh,v 1.3 1999/11/07 16:31:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ForceCondition.hh,v 1.2 1999/11/07 16:31:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GPILSelection.hh,v 1.2 1999/11/07 16:31:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Mars5GeVMechanism.hh,v 1.3 1999/11/07 16:31:58 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChange.hh,v 1.6 2000/02/13 15:08:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChange.icc,v 1.7 2000/02/13 15:08:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
inline
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.hh,v 1.4 1999/11/07 16:31:59 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.3 1999/11/07 16:32:00 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.icc,v 1.3 1999/12/15 14:53:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForRadDecay.hh,v 1.2 2000/02/13 15:08:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.hh,v 1.5 2000/05/16 00:34:27 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4ParticleChangeForTransport.hh,v 1.6 2001/02/12 07:56:32 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -18,6 +18,7 @@
|
||||
// ------------------------------------------------------------
|
||||
// Implemented for the new scheme 10 May. 1998 H.Kurahige
|
||||
// Added theMaterialChange 16 FEb. 2000 H.Kurahige
|
||||
// Remove thePolarizationChange 12 Feb. 2001 H.Kurashige
|
||||
//
|
||||
// Class Description
|
||||
// This class is a concrete class for ParticleChange for transportation
|
||||
@@ -74,11 +75,6 @@ class G4ParticleChangeForTransport: public G4ParticleChange
|
||||
void SetMaterialChange(G4Material* fMaterial);
|
||||
// Get/Set the material in the touchable of the current particle.
|
||||
|
||||
const G4ThreeVector* GetPolarizationChange() const;
|
||||
void SetPolarizationChange(G4double Px, G4double Py, G4double Pz);
|
||||
void SetPolarizationChange(const G4ThreeVector& finalPoralization);
|
||||
// Get/Set thePolarizationChange vector.
|
||||
|
||||
G4bool GetMomentumChanged() const;
|
||||
void SetMomentumChanged(G4bool b);
|
||||
|
||||
@@ -94,8 +90,6 @@ class G4ParticleChangeForTransport: public G4ParticleChange
|
||||
// The flag which is set if mometum is changed in this stepi
|
||||
G4Material* theMaterialChange;
|
||||
// The material where given track currently locates
|
||||
G4ThreeVector thePolarizationChange;
|
||||
// The changed (final) polarization of a given track
|
||||
};
|
||||
|
||||
#include "G4ParticleChangeForTransport.icc"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.icc,v 1.5 2000/05/16 00:34:27 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Step.hh,v 1.7 1999/12/15 14:53:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Step.icc,v 1.3 2000/10/18 15:00:09 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Step.icc,v 1.4 2001/02/17 11:25:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -162,6 +162,7 @@ inline
|
||||
fpPreStepPoint->SetProperTime(fpTrack->GetProperTime());
|
||||
fpPreStepPoint->SetMomentumDirection(fpTrack->GetMomentumDirection());
|
||||
fpPreStepPoint->SetKineticEnergy(fpTrack->GetKineticEnergy());
|
||||
fpPreStepPoint->SetVelocity(fpTrack->GetVelocity());
|
||||
fpPreStepPoint->SetTouchable(fpTrack->GetTouchable());
|
||||
fpPreStepPoint->SetMaterial( fpTrack->GetTouchable()->GetVolume()->GetLogicalVolume()->GetMaterial());
|
||||
fpPreStepPoint->SetPolarization(fpTrack->GetPolarization());
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StepPoint.hh,v 1.6 2000/06/01 02:28:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4StepPoint.hh,v 1.7 2001/02/17 11:25:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -96,11 +96,7 @@ class G4StepPoint
|
||||
// Kinetic Energy of the track
|
||||
|
||||
G4double GetVelocity() const;
|
||||
// This velocity is the velocity as if in vacuum.
|
||||
// (So it is not corrected for the refraction index
|
||||
// in the case of photons - optical or X-rays.)
|
||||
// In order to get the velocity in the material, use
|
||||
// GetVelocity of G4Track.
|
||||
void SetVelocity(G4double v);
|
||||
//
|
||||
|
||||
G4double GetBeta() const;
|
||||
@@ -163,6 +159,7 @@ class G4StepPoint
|
||||
// Time since track is created (in rest frame of particle)
|
||||
G4ThreeVector fMomentumDirection;
|
||||
G4double fKineticEnergy;
|
||||
G4double fVelocity;
|
||||
const G4VTouchable* fpTouchable;
|
||||
G4Material* fpMaterial;
|
||||
// Material of the volmue
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StepPoint.icc,v 1.2 2000/06/01 02:28:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4StepPoint.icc,v 1.3 2001/02/17 11:25:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
inline const G4ThreeVector& G4StepPoint::GetPosition() const
|
||||
@@ -77,28 +77,19 @@
|
||||
|
||||
inline G4double G4StepPoint::GetVelocity() const
|
||||
{
|
||||
if(fMass==0.){
|
||||
return c_light;
|
||||
}
|
||||
else{
|
||||
G4double tMomentum = sqrt(fKineticEnergy*fKineticEnergy +
|
||||
2.0*fKineticEnergy*fMass);
|
||||
G4double tTotalEnergy = fKineticEnergy + fMass;
|
||||
return tMomentum/tTotalEnergy*c_light;
|
||||
}
|
||||
return fVelocity;
|
||||
}
|
||||
// This velocity is the velocity as if in vacuum.
|
||||
// (So it is not corrected for the refraction index
|
||||
// in the case of photons - optical or X-rays.)
|
||||
// In order to get the velocity in the material, use
|
||||
// GetVelocity of G4Track.
|
||||
//
|
||||
inline void G4StepPoint::SetVelocity(G4double v)
|
||||
{
|
||||
fVelocity = v;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4StepPoint::GetBeta() const
|
||||
{ return (fMass==0.) ?
|
||||
1.0 :
|
||||
sqrt(fKineticEnergy*fKineticEnergy + 2.0*fKineticEnergy*fMass)
|
||||
/(fKineticEnergy+fMass); }
|
||||
{
|
||||
return fVelocity/c_light;
|
||||
}
|
||||
|
||||
// Velocity of the track in unit of c(light velocity)
|
||||
|
||||
inline G4double G4StepPoint::GetGamma() const
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StepStatus.hh,v 1.2 1999/11/07 16:32:02 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingControl.hh,v 1.2 1999/11/07 16:32:03 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Track.hh,v 1.9 2000/10/18 15:00:09 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Track.hh,v 1.10 2001/01/18 12:25:08 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -55,11 +55,13 @@ public: // With description
|
||||
|
||||
// Constructor
|
||||
G4Track();
|
||||
G4Track(const G4Track&);
|
||||
G4Track(G4DynamicParticle* apValueDynamicParticle,
|
||||
G4double aValueTime,
|
||||
const G4ThreeVector& aValuePosition);
|
||||
// aValueTime is a global time
|
||||
|
||||
G4Track& operator=(const G4Track&);
|
||||
//--------
|
||||
public:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Track.icc,v 1.6 2000/10/18 15:00:09 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
// Definitions of inline functions
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackFastVector.hh,v 1.3 1999/11/07 16:32:04 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackStatus.hh,v 1.2 1999/11/07 16:32:04 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VEvtBiasMechanism.hh,v 1.3 1999/11/07 16:32:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VParticleChange.hh,v 1.4 1999/11/07 16:32:05 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VParticleChange.icc,v 1.5 2000/02/13 15:08:20 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//----------------------------------------------------------------
|
||||
// Virtual methods for updating G4Step
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.2 2000/06/02 09:09:47 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EvtBiasMechanism.cc,v 1.3 1999/12/15 14:53:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Mars5GeVMechanism.cc,v 1.4 1999/12/15 14:53:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChange.cc,v 1.11 2000/10/20 11:42:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4ParticleChange.cc,v 1.12 2001/03/05 12:20:46 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -235,9 +235,11 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
|
||||
+ ( CalcMomentum(theEnergyChange, theMomentumDirectionChange, mass)
|
||||
- pPreStepPoint->GetMomentum());
|
||||
G4double tMomentum = pMomentum.mag();
|
||||
G4ThreeVector direction( pMomentum.x()/tMomentum,
|
||||
pMomentum.y()/tMomentum,
|
||||
pMomentum.z()/tMomentum );
|
||||
G4ThreeVector direction(1.0,0.0,0.0);
|
||||
if( tMomentum > 0. ){
|
||||
G4double inv_Momentum= 1.0 / tMomentum;
|
||||
direction= pMomentum * inv_Momentum;
|
||||
}
|
||||
pPostStepPoint->SetMomentumDirection(direction);
|
||||
pPostStepPoint->SetKineticEnergy( energy );
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.cc,v 1.5 2000/02/13 15:08:27 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.cc,v 1.5 2000/02/13 15:08:28 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.cc,v 1.6 2000/02/13 15:08:28 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.7 2000/05/16 00:34:27 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.8 2001/03/06 09:59:23 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -130,8 +130,13 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForAlongStep(G4Step* pStep)
|
||||
G4ThreeVector pMomentum = pPostStepPoint->GetMomentum()
|
||||
+ ( CalcMomentum(theEnergyChange, theMomentumDirectionChange, mass)
|
||||
- pPreStepPoint->GetMomentum());
|
||||
G4double tMomentum_inv = 1.0 / pMomentum.mag();
|
||||
pPostStepPoint->SetMomentumDirection(pMomentum*tMomentum_inv);
|
||||
G4double tMomentum = pMomentum.mag();
|
||||
G4ThreeVector direction(1.0,0.0,0.0);
|
||||
if( tMomentum > 0. ){
|
||||
G4double inv_Momentum= 1.0 / tMomentum;
|
||||
direction= pMomentum * inv_Momentum;
|
||||
}
|
||||
pPostStepPoint->SetMomentumDirection(direction);
|
||||
pPostStepPoint->SetKineticEnergy( energy );
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Step.cc,v 1.4 1999/12/15 14:53:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StepPoint.cc,v 1.3 2000/02/16 16:10:06 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4StepPoint.cc,v 1.5 2001/02/17 11:27:13 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -52,7 +52,8 @@ G4StepPoint::G4StepPoint(const G4StepPoint &right):
|
||||
fpProcessDefinedStep(right.fpProcessDefinedStep),
|
||||
fMass(right.fMass),
|
||||
fCharge(right.fCharge),
|
||||
fWeight(right.fWeight)
|
||||
fWeight(right.fWeight),
|
||||
fVelocity(right.fVelocity)
|
||||
{}
|
||||
|
||||
|
||||
@@ -76,10 +77,7 @@ G4StepPoint & G4StepPoint::operator=(const G4StepPoint &right)
|
||||
fMass = right.fMass;
|
||||
fCharge = right.fCharge;
|
||||
fWeight = right.fWeight;
|
||||
fVelocity = right.fVelocity;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Track.cc,v 1.4 2000/06/02 05:36:53 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4Track.cc,v 1.11 2001/02/17 10:51:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -19,7 +19,9 @@
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
// Add copy constructor Hisaya Feb. 07 01
|
||||
// Fix GetVelocity Hisaya Feb. 17 01
|
||||
//
|
||||
#include "G4Track.hh"
|
||||
|
||||
G4Allocator<G4Track> aTrackAllocator;
|
||||
@@ -38,6 +40,7 @@ G4Track::G4Track(G4DynamicParticle* apValueDynamicParticle,
|
||||
fPosition = aValuePosition;
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
|
||||
fpLVAtVertex = 0;
|
||||
fpCreatorProcess = 0;
|
||||
@@ -63,6 +66,7 @@ G4Track::G4Track()
|
||||
fTrackID = 0;
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
|
||||
fpDynamicParticle = 0;
|
||||
fpLVAtVertex = 0;
|
||||
@@ -75,6 +79,12 @@ G4Track::G4Track()
|
||||
|
||||
fpUserInformation = 0;
|
||||
}
|
||||
//////////////////
|
||||
G4Track::G4Track(const G4Track& right)
|
||||
//////////////////
|
||||
{
|
||||
*this = right;
|
||||
}
|
||||
|
||||
///////////////////
|
||||
G4Track::~G4Track()
|
||||
@@ -84,6 +94,42 @@ G4Track::~G4Track()
|
||||
delete fpUserInformation;
|
||||
}
|
||||
|
||||
//////////////////
|
||||
G4Track & G4Track::operator=(const G4Track &right)
|
||||
//////////////////
|
||||
{
|
||||
if (this != &right) {
|
||||
fCurrentStepNumber = right.fCurrentStepNumber;
|
||||
fGlobalTime = right.fGlobalTime;
|
||||
fLocalTime = right.fLocalTime;
|
||||
fTrackLength = right.fTrackLength;
|
||||
fParentID = right.fParentID;
|
||||
|
||||
// Track ID is not copied and set to zero for new track
|
||||
fTrackID = 0;
|
||||
|
||||
// pointers to Touchables or Step are not copied
|
||||
fpTouchable = 0;
|
||||
fpNextTouchable = 0;
|
||||
fpStep=0;
|
||||
|
||||
fpDynamicParticle = new G4DynamicParticle(*(right.fpDynamicParticle));
|
||||
|
||||
fVtxKineticEnergy = right.fVtxKineticEnergy;
|
||||
fVtxPosition = right.fVtxPosition;
|
||||
fpLVAtVertex = right.fpLVAtVertex;
|
||||
fpCreatorProcess = right.fpCreatorProcess;
|
||||
|
||||
fTrackStatus = right.fTrackStatus;
|
||||
fBelowThreshold = right.fBelowThreshold;
|
||||
fGoodForTracking = right.fGoodForTracking;
|
||||
fWeight = right.fWeight;
|
||||
|
||||
fpUserInformation = right.fpUserInformation;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
///////////////////
|
||||
G4double G4Track::GetVelocity() const
|
||||
///////////////////
|
||||
@@ -95,10 +141,9 @@ G4double G4Track::GetVelocity() const
|
||||
// mass less particle
|
||||
if( mass == 0. ){
|
||||
velocity = c_light ;
|
||||
G4String name = fpDynamicParticle->GetDefinition()->GetParticleName();
|
||||
|
||||
// special case for photons
|
||||
if(( name=="gamma")||(name=="opticalphoton")){
|
||||
if(fpDynamicParticle->GetDefinition()->GetParticleName()=="opticalphoton"){
|
||||
G4Material*
|
||||
mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial();
|
||||
|
||||
@@ -107,7 +152,7 @@ G4double G4Track::GetVelocity() const
|
||||
// light velocity = c/reflection-index
|
||||
velocity /=
|
||||
mat->GetMaterialPropertiesTable()->GetProperty("RINDEX")->
|
||||
GetMinProperty() ;
|
||||
GetProperty(fpDynamicParticle->GetTotalMomentum()) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VEvtBiasMechanism.cc,v 1.2 1999/12/15 14:53:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VParticleChange.cc,v 1.5 2000/02/13 15:08:28 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user