Import Geant4 3.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:03:00 +02:00
parent cfcb558cfe
commit 137e303ecc
2843 changed files with 37082 additions and 38426 deletions
+1 -1
View File
@@ -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 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -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 $
//
//
// ------------------------------------------------------------
+7 -5
View File
@@ -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 {
+1 -1
View File
@@ -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 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -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 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -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 );
}
+1 -1
View File
@@ -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 -7
View File
@@ -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;
}
+51 -6
View File
@@ -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()) ;
}
}
}
+1 -1
View File
@@ -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 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -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 $
//
//
// --------------------------------------------------------------