Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
+3 -3
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChange.cc,v 1.30 2007/03/30 01:03:53 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParticleChange.cc,v 1.31 2009/04/02 02:22:30 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// --------------------------------------------------------------
@@ -453,7 +453,7 @@ G4bool G4ParticleChange::CheckIt(const G4Track& aTrack)
// MomentumDirection should be unit vector
G4bool itsOKforMomentum = true;
if ( theEnergyChange >0.) {
accuracy = std::abs(theMomentumDirectionChange.mag2()-1.0);
accuracy = std::fabs(theMomentumDirectionChange.mag2()-1.0);
if (accuracy > accuracyForWarning) {
#ifdef G4VERBOSE
G4cout << " G4ParticleChange::CheckIt : ";
+4 -3
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForLoss.cc,v 1.16 2006/08/28 16:10:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParticleChangeForLoss.cc,v 1.17 2009/05/26 13:19:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// --------------------------------------------------------------
@@ -48,7 +48,8 @@
#include "G4DynamicParticle.hh"
#include "G4ExceptionSeverity.hh"
G4ParticleChangeForLoss::G4ParticleChangeForLoss():G4VParticleChange()
G4ParticleChangeForLoss::G4ParticleChangeForLoss()
:G4VParticleChange(), lowEnergyLimit(1.0*eV)
{
theSteppingControlFlag = NormalCondition;
debugFlag = false;
+3 -3
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForMSC.cc,v 1.13 2006/06/29 21:15:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParticleChangeForMSC.cc,v 1.14 2009/04/02 02:22:30 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// --------------------------------------------------------------
@@ -164,7 +164,7 @@ G4bool G4ParticleChangeForMSC::CheckIt(const G4Track& aTrack)
// check
// MomentumDirection should be unit vector
accuracy = std::abs(theMomentumDirection.mag2()-1.0);
accuracy = std::fabs(theMomentumDirection.mag2()-1.0);
if (accuracy > accuracyForWarning) {
#ifdef G4VERBOSE
G4cout << " G4ParticleChangeForMSC::CheckIt : ";
+44 -42
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Track.cc,v 1.30 2007/10/02 00:46:21 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4Track.cc,v 1.32 2009/04/08 08:07:24 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
//---------------------------------------------------------------
@@ -37,6 +37,7 @@
// Fix GetVelocity Hisaya Feb. 17 01
// Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek//
// Fix GetVelocity (bug report #741) Horton-Smith Apr 14 2005
// Remove massless check in GetVelocity 02 Apr. 09 H.Kurashige
#include "G4Track.hh"
@@ -169,52 +170,53 @@ G4double G4Track::GetVelocity() const
G4double mass = fpDynamicParticle->GetMass();
// mass less particle
if( mass == 0. ){
velocity = c_light ;
velocity = c_light ;
// special case for photons
if ( (fOpticalPhoton !=0) &&
(fpDynamicParticle->GetDefinition()==fOpticalPhoton) ){
// special case for photons
if ( (fOpticalPhoton !=0) &&
(fpDynamicParticle->GetDefinition()==fOpticalPhoton) ){
G4Material* mat=0;
G4bool update_groupvel = false;
if ( this->GetStep() ){
mat= this->GetMaterial(); // Fix for repeated volumes
}else{
if (fpTouchable!=0){
mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial();
}
}
// check if previous step is in the same volume
// and get new GROUPVELOVITY table if necessary
if ((mat != prev_mat)||(groupvel==0)) {
groupvel = 0;
if(mat->GetMaterialPropertiesTable() != 0)
groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
update_groupvel = true;
}
prev_mat = mat;
if (groupvel != 0 ) {
// light velocity = c/(rindex+d(rindex)/d(log(E_phot)))
// values stored in GROUPVEL material properties vector
velocity = prev_velocity;
G4Material* mat=0;
G4bool update_groupvel = false;
if ( this->GetStep() ){
mat= this->GetMaterial(); // Fix for repeated volumes
}else{
if (fpTouchable!=0){
mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial();
}
}
// check if previous step is in the same volume
// and get new GROUPVELOVITY table if necessary
if ((mat != prev_mat)||(groupvel==0)) {
groupvel = 0;
if(mat->GetMaterialPropertiesTable() != 0)
groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL");
update_groupvel = true;
}
prev_mat = mat;
if (groupvel != 0 ) {
// light velocity = c/(rindex+d(rindex)/d(log(E_phot)))
// values stored in GROUPVEL material properties vector
velocity = prev_velocity;
// check if momentum is same as in the previous step
// and calculate group velocity if necessary
if( update_groupvel || (fpDynamicParticle->GetTotalMomentum() != prev_momentum) ) {
velocity =
groupvel->GetProperty(fpDynamicParticle->GetTotalMomentum());
// check if momentum is same as in the previous step
// and calculate group velocity if necessary
if( update_groupvel || (fpDynamicParticle->GetTotalMomentum() != prev_momentum) ) {
velocity =
groupvel->GetProperty(fpDynamicParticle->GetTotalMomentum());
prev_velocity = velocity;
prev_momentum = fpDynamicParticle->GetTotalMomentum();
}
}
}
prev_momentum = fpDynamicParticle->GetTotalMomentum();
}
}
} else {
G4double T = fpDynamicParticle->GetKineticEnergy();
velocity = c_light*std::sqrt(T*(T+2.*mass))/(T+mass);
if (mass<DBL_MIN) {
velocity = c_light;
} else {
G4double T = fpDynamicParticle->GetKineticEnergy();
velocity = c_light*std::sqrt(T*(T+2.*mass))/(T+mass);
}
}
return velocity ;
+3 -3
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.cc,v 1.20 2007/03/25 22:54:52 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VParticleChange.cc,v 1.21 2009/04/02 02:22:30 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// --------------------------------------------------------------
@@ -287,7 +287,7 @@ G4bool G4VParticleChange::CheckSecondary(G4Track& aTrack)
// MomentumDirection should be unit vector
G4bool itsOKforMomentum = true;
accuracy = std::abs((aTrack.GetMomentumDirection()).mag2()-1.0);
accuracy = std::fabs((aTrack.GetMomentumDirection()).mag2()-1.0);
if (accuracy > accuracyForWarning) {
#ifdef G4VERBOSE
G4cout << " G4VParticleChange::CheckSecondary : ";
+8 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VUserTrackInformation.cc,v 1.2 2006/06/29 21:15:21 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VUserTrackInformation.cc,v 1.3 2009/10/19 09:37:00 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// --------------------------------------------------------------
@@ -33,6 +33,12 @@
#include "G4VUserTrackInformation.hh"
G4VUserTrackInformation::G4VUserTrackInformation()
: fType("NONE")
{;}
G4VUserTrackInformation::G4VUserTrackInformation(const G4String& infoType)
: fType(infoType)
{;}
G4VUserTrackInformation::~G4VUserTrackInformation()
{;}