Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user