Import Geant4 9.3.0 source tree
This commit is contained in:
+18
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.102 2008/10/24 08:22:20 kurasige Exp $
|
||||
$Id: History,v 1.107 2009/10/19 09:37:00 kurasige Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,23 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
Oct. 19, 2009 Hisaya Kurashige (track-V09-02-04)
|
||||
added a string prooperty to indicate type of UserTrackInformation
|
||||
|
||||
|
||||
June 18, 2009 Hisaya Kurashige (track-V09-02-03)
|
||||
added SetLowEnergyLimit method (Vladimir)
|
||||
|
||||
|
||||
May. 27, 2009 Hisaya Kurashige (track-V09-02-02)
|
||||
- Add lowEnergyLimit = 1 eV in lowEnergyLimit = 1 eV (Vladimir)
|
||||
|
||||
Apr. 2, 2009 Hisaya Kurashige (track-V09-02-01)
|
||||
- Add protection for the case mass==0 and T==0 in GetVelocity
|
||||
|
||||
Apr. 2, 2009 Hisaya Kurashige (track-V09-02-00)
|
||||
- Modify GetVelocity to improve performance
|
||||
|
||||
Oct. 24, 2008 Hisaya Kurashige (track-V09-01-02)
|
||||
- change fpCreatorProcess and fpLCAtVertex in G4Track to 'const' pointer
|
||||
- change fpProcessDefinedStep in G4StepPoint to 'const' pointer
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.20 2008/01/11 19:57:12 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ParticleChangeForLoss.hh,v 1.22 2009/06/17 17:25:57 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -41,7 +41,8 @@
|
||||
// 30.01.06 V.Ivanchenko add ProposedMomentumDirection for AlongStep
|
||||
// and ProposeWeight for PostStep
|
||||
// 07.06.06 V.Ivanchenko RemoveProposedMomentumDirection from AlongStep
|
||||
// 28.08.06 V.Ivanchenko Add access to current track and polarizaion
|
||||
// 28.08.06 V.Ivanchenko Added access to current track and polarizaion
|
||||
// 17.06.09 V.Ivanchenko Added SetLowEnergyLimit method
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
//
|
||||
@@ -107,6 +108,8 @@ public:
|
||||
|
||||
const G4Track* GetCurrentTrack() const;
|
||||
|
||||
void SetLowEnergyLimit(G4double elimit);
|
||||
|
||||
virtual void DumpInfo() const;
|
||||
|
||||
// for Debug
|
||||
@@ -125,6 +128,9 @@ private:
|
||||
G4double proposedKinEnergy;
|
||||
// The final kinetic energy of the current particle.
|
||||
|
||||
G4double lowEnergyLimit;
|
||||
// The limit kinetic energy below which particle is stopped
|
||||
|
||||
G4double currentCharge;
|
||||
// The final charge of the current particle.
|
||||
|
||||
@@ -262,7 +268,7 @@ inline G4Step* G4ParticleChangeForLoss::UpdateStepForAlongStep(G4Step* pStep)
|
||||
(proposedKinEnergy - pStep->GetPreStepPoint()->GetKineticEnergy());
|
||||
|
||||
// update kinetic energy and charge
|
||||
if (kinEnergy < DBL_MIN) {
|
||||
if (kinEnergy < lowEnergyLimit) {
|
||||
theLocalEnergyDeposit += kinEnergy;
|
||||
kinEnergy = 0.0;
|
||||
} else {
|
||||
@@ -310,5 +316,10 @@ inline void G4ParticleChangeForLoss::AddSecondary(G4DynamicParticle* aParticle)
|
||||
G4VParticleChange::AddSecondary(aTrack);
|
||||
}
|
||||
|
||||
inline void G4ParticleChangeForLoss::SetLowEnergyLimit(G4double elimit)
|
||||
{
|
||||
lowEnergyLimit = elimit;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.6 2006/06/29 21:14:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VUserTrackInformation.hh,v 1.8 2009/10/19 17:11:43 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -56,15 +56,32 @@
|
||||
#ifndef G4VUserTrackInformation_H
|
||||
#define G4VUserTrackInformation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VUserTrackInformation
|
||||
{
|
||||
public:
|
||||
{
|
||||
public: // With Description
|
||||
G4VUserTrackInformation();
|
||||
G4VUserTrackInformation(const G4String& infoType);
|
||||
// String is provided to indicate Type of UserTrackInfo class
|
||||
// User is recommended to set the type of his/her class
|
||||
|
||||
virtual ~G4VUserTrackInformation();
|
||||
|
||||
public:
|
||||
virtual void Print() const = 0;
|
||||
|
||||
const G4String& GetType() const;
|
||||
// get Type of this UserTrackInfo
|
||||
|
||||
protected:
|
||||
G4String fType;
|
||||
};
|
||||
|
||||
inline
|
||||
const G4String& G4VUserTrackInformation::GetType() const
|
||||
{
|
||||
return fType;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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 : ";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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 ;
|
||||
|
||||
@@ -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 : ";
|
||||
|
||||
@@ -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()
|
||||
{;}
|
||||
|
||||
Reference in New Issue
Block a user