Import Geant4 9.0.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldTrackUpdator.cc,v 1.2 2006/12/13 15:49:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// M. Asai - first implementation Apr/28/2006
|
||||
//
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChange.cc,v 1.28 2006/06/29 21:15:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4ParticleChange.cc,v 1.30 2007/03/30 01:03:53 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -39,6 +39,8 @@
|
||||
// Add Track weight 12 Nov. 1998 H.Kurashige
|
||||
// Activate CheckIt method for VERBOSE mode 14 Dec. 1998 H.Kurashige
|
||||
// Modified CheckIt method for time 9 Feb. 1999 H.Kurashige
|
||||
// Rename SetXXX methods to ProposeXXX DynamicCharge Oct. 2005 H.Kurashige
|
||||
// Add get/ProposeMagneticMoment Mar 2007 H.Kurashige
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4ParticleChange.hh"
|
||||
@@ -51,6 +53,9 @@
|
||||
|
||||
G4ParticleChange::G4ParticleChange():G4VParticleChange()
|
||||
{
|
||||
G4VParticleChange::SetSecondaryWeightByProcess(false);
|
||||
G4VParticleChange::SetParentWeightByProcess(false);
|
||||
|
||||
}
|
||||
|
||||
G4ParticleChange::~G4ParticleChange()
|
||||
@@ -75,7 +80,8 @@ G4ParticleChange::G4ParticleChange(const G4ParticleChange &right): G4VParticleCh
|
||||
theEnergyChange = right.theEnergyChange;
|
||||
theMassChange = right.theMassChange;
|
||||
theChargeChange = right.theChargeChange;
|
||||
theWeightChange = right.theWeightChange;
|
||||
theMagneticMomentChange = right.theMagneticMomentChange;
|
||||
// theWeightChange = right.theWeightChange;
|
||||
theProperTimeChange = right.theProperTimeChange;
|
||||
}
|
||||
|
||||
@@ -99,7 +105,8 @@ G4ParticleChange & G4ParticleChange::operator=(const G4ParticleChange &right)
|
||||
theEnergyChange = right.theEnergyChange;
|
||||
theMassChange = right.theMassChange;
|
||||
theChargeChange = right.theChargeChange;
|
||||
theWeightChange = right.theWeightChange;
|
||||
theMagneticMomentChange = right.theMagneticMomentChange;
|
||||
// theWeightChange = right.theWeightChange;
|
||||
|
||||
theTrueStepLength = right.theTrueStepLength;
|
||||
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
|
||||
@@ -196,15 +203,16 @@ void G4ParticleChange::Initialize(const G4Track& track)
|
||||
thePolarizationChange = pParticle->GetPolarization();
|
||||
theProperTimeChange = pParticle->GetProperTime();
|
||||
|
||||
// Set mass/charge of DynamicParticle
|
||||
// Set mass/charge/MagneticMoment of DynamicParticle
|
||||
theMassChange = pParticle->GetMass();
|
||||
theChargeChange = pParticle->GetCharge();
|
||||
theMagneticMomentChange = pParticle->GetMagneticMoment();
|
||||
|
||||
// set Position/Time etc. equal to those of the parent track
|
||||
thePositionChange = track.GetPosition();
|
||||
theTimeChange = track.GetGlobalTime();
|
||||
|
||||
theWeightChange = track.GetWeight();
|
||||
// theWeightChange = track.GetWeight();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
@@ -228,9 +236,10 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4double mass = theMassChange;
|
||||
|
||||
// Set Mass/Charge
|
||||
// Set Mass/Charge/MagneticMoment
|
||||
pPostStepPoint->SetMass(theMassChange);
|
||||
pPostStepPoint->SetCharge(theChargeChange);
|
||||
pPostStepPoint->SetMagneticMoment(theMagneticMomentChange);
|
||||
|
||||
// calculate new kinetic energy
|
||||
G4double energy = pPostStepPoint->GetKineticEnergy()
|
||||
@@ -271,8 +280,11 @@ G4Step* G4ParticleChange::UpdateStepForAlongStep(G4Step* pStep)
|
||||
- pPreStepPoint->GetProperTime());
|
||||
|
||||
// update weight
|
||||
G4double newWeight= theWeightChange/(pPreStepPoint->GetWeight())*(pPostStepPoint->GetWeight());
|
||||
pPostStepPoint->SetWeight( newWeight );
|
||||
if (!fSetParentWeightByProcess){
|
||||
G4double newWeight= theParentWeight/(pPreStepPoint->GetWeight())
|
||||
* (pPostStepPoint->GetWeight());
|
||||
pPostStepPoint->SetWeight( newWeight );
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
@@ -297,6 +309,7 @@ G4Step* G4ParticleChange::UpdateStepForPostStep(G4Step* pStep)
|
||||
// Set Mass/Charge
|
||||
pPostStepPoint->SetMass(theMassChange);
|
||||
pPostStepPoint->SetCharge(theChargeChange);
|
||||
pPostStepPoint->SetMagneticMoment(theMagneticMomentChange);
|
||||
|
||||
// update kinetic energy and momentum direction
|
||||
pPostStepPoint->SetMomentumDirection(theMomentumDirectionChange);
|
||||
@@ -313,7 +326,10 @@ G4Step* G4ParticleChange::UpdateStepForPostStep(G4Step* pStep)
|
||||
pPostStepPoint->SetProperTime( theProperTimeChange );
|
||||
|
||||
// update weight
|
||||
pPostStepPoint->SetWeight( theWeightChange );
|
||||
if (!fSetParentWeightByProcess){
|
||||
pPostStepPoint->SetWeight( theParentWeight );
|
||||
}
|
||||
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (debugFlag) CheckIt(*aTrack);
|
||||
@@ -334,6 +350,7 @@ G4Step* G4ParticleChange::UpdateStepForAtRest(G4Step* pStep)
|
||||
// Set Mass/Charge
|
||||
pPostStepPoint->SetMass(theMassChange);
|
||||
pPostStepPoint->SetCharge(theChargeChange);
|
||||
pPostStepPoint->SetMagneticMoment(theMagneticMomentChange);
|
||||
|
||||
// update kinetic energy and momentum direction
|
||||
pPostStepPoint->SetMomentumDirection(theMomentumDirectionChange);
|
||||
@@ -350,7 +367,9 @@ G4Step* G4ParticleChange::UpdateStepForAtRest(G4Step* pStep)
|
||||
pPostStepPoint->SetProperTime( theProperTimeChange );
|
||||
|
||||
// update weight
|
||||
pPostStepPoint->SetWeight( theWeightChange );
|
||||
if (!fSetParentWeightByProcess){
|
||||
pPostStepPoint->SetWeight( theParentWeight );
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (debugFlag) CheckIt(*aTrack);
|
||||
@@ -377,6 +396,12 @@ void G4ParticleChange::DumpInfo() const
|
||||
G4cout << " Charge (eplus) : "
|
||||
<< std::setw(20) << theChargeChange/eplus
|
||||
<< G4endl;
|
||||
G4cout << " MagneticMoment : "
|
||||
<< std::setw(20) << theMagneticMomentChange << G4endl;
|
||||
G4cout << " : = " << std::setw(20)
|
||||
<< theMagneticMomentChange*2.*theMassChange/c_squared/eplus/hbar_Planck
|
||||
<< "*[e hbar]/[2 m]"
|
||||
<< G4endl;
|
||||
G4cout << " Position - x (mm) : "
|
||||
<< std::setw(20) << thePositionChange.x()/mm
|
||||
<< G4endl;
|
||||
@@ -413,9 +438,6 @@ void G4ParticleChange::DumpInfo() const
|
||||
G4cout << " Polarization - z : "
|
||||
<< std::setw(20) << thePolarizationChange.z()
|
||||
<< G4endl;
|
||||
G4cout << " Track Weight : "
|
||||
<< std::setw(20) << theWeightChange
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
G4bool G4ParticleChange::CheckIt(const G4Track& aTrack)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForDecay.cc,v 1.11 2006/06/29 21:15:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForGamma.cc,v 1.3 2006/08/28 16:10:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForLoss.cc,v 1.16 2006/08/28 16:10:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForMSC.cc,v 1.13 2006/06/29 21:15:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.19 2006/11/03 17:45:04 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Step.cc,v 1.7 2006/10/30 09:50:13 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepPoint.cc,v 1.12 2006/10/31 10:01:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4StepPoint.cc,v 1.13 2007/03/11 07:19:06 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -39,8 +39,7 @@
|
||||
//
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
// Hisaya Kurashige
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -74,5 +73,6 @@ G4StepPoint::G4StepPoint(const G4StepPoint &right):
|
||||
fpProcessDefinedStep(right.fpProcessDefinedStep),
|
||||
fMass(right.fMass),
|
||||
fCharge(right.fCharge),
|
||||
fMagneticMoment(right.fMagneticMoment),
|
||||
fWeight(right.fWeight)
|
||||
{}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Track.cc,v 1.29 2006/06/29 21:15:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticleChange.cc,v 1.19 2006/10/30 09:50:13 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4VParticleChange.cc,v 1.20 2007/03/25 22:54:52 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -51,6 +51,7 @@ G4VParticleChange::G4VParticleChange():
|
||||
theStatusChange(fAlive),
|
||||
theSteppingControlFlag(NormalCondition),
|
||||
theLocalEnergyDeposit(0.0),
|
||||
theNonIonizingEnergyDeposit(0.0),
|
||||
theFirstStepInVolume(false),
|
||||
theLastStepInVolume(false),
|
||||
verboseLevel(1),
|
||||
@@ -89,6 +90,7 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
|
||||
theStatusChange(fAlive),
|
||||
theSteppingControlFlag(NormalCondition),
|
||||
theLocalEnergyDeposit(0.0),
|
||||
theNonIonizingEnergyDeposit(0.0),
|
||||
theFirstStepInVolume(false),
|
||||
theLastStepInVolume(false),
|
||||
verboseLevel(1),
|
||||
@@ -107,6 +109,7 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
|
||||
theStatusChange = right.theStatusChange;
|
||||
theTrueStepLength = right.theTrueStepLength;
|
||||
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
|
||||
theNonIonizingEnergyDeposit = right.theNonIonizingEnergyDeposit;
|
||||
theSteppingControlFlag = right.theSteppingControlFlag;
|
||||
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
|
||||
|
||||
@@ -130,6 +133,7 @@ G4VParticleChange & G4VParticleChange::operator=(const G4VParticleChange &right)
|
||||
theStatusChange = right.theStatusChange;
|
||||
theTrueStepLength = right.theTrueStepLength;
|
||||
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
|
||||
theNonIonizingEnergyDeposit = right.theNonIonizingEnergyDeposit;
|
||||
theSteppingControlFlag = right.theSteppingControlFlag;
|
||||
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
|
||||
|
||||
@@ -183,6 +187,10 @@ void G4VParticleChange::DumpInfo() const
|
||||
<< std::setw(20) << theLocalEnergyDeposit/MeV
|
||||
<< G4endl;
|
||||
|
||||
G4cout << " Non-ionizing Energy Deposit (MeV): "
|
||||
<< std::setw(20) << theNonIonizingEnergyDeposit/MeV
|
||||
<< G4endl;
|
||||
|
||||
G4cout << " Track Status : "
|
||||
<< std::setw(20);
|
||||
if( theStatusChange == fAlive ){
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserTrackInformation.cc,v 1.2 2006/06/29 21:15:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user