Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 2.8 1998/11/10 19:05:18 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4ParticleChangeForTransport.cc,v 1.4 1999/05/06 11:42:57 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -31,14 +31,14 @@
|
||||
G4ParticleChangeForTransport::G4ParticleChangeForTransport():G4ParticleChange()
|
||||
{
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << "G4ParticleChangeForTransport::G4ParticleChangeForTransport() " << endl;
|
||||
G4cout << "G4ParticleChangeForTransport::G4ParticleChangeForTransport() " << endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4ParticleChangeForTransport::~G4ParticleChangeForTransport()
|
||||
{
|
||||
if (verboseLevel>2) {
|
||||
G4cerr << "G4ParticleChangeForTransport::~G4ParticleChangeForTransport() " << endl;
|
||||
G4cout << "G4ParticleChangeForTransport::~G4ParticleChangeForTransport() " << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ G4ParticleChangeForTransport::~G4ParticleChangeForTransport()
|
||||
G4ParticleChangeForTransport::G4ParticleChangeForTransport(const G4ParticleChangeForTransport &right):G4ParticleChange(right)
|
||||
{
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << "G4ParticleChangeForTransport:: copy constructor is called " << endl;
|
||||
G4cout << "G4ParticleChangeForTransport:: copy constructor is called " << endl;
|
||||
}
|
||||
theTouchableChange = right.theTouchableChange;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ G4ParticleChangeForTransport::G4ParticleChangeForTransport(const G4ParticleChang
|
||||
G4ParticleChangeForTransport & G4ParticleChangeForTransport::operator=(const G4ParticleChangeForTransport &right)
|
||||
{
|
||||
if (verboseLevel>1) {
|
||||
G4cerr << "G4ParticleChangeForTransport:: assignment operator is called " << endl;
|
||||
G4cout << "G4ParticleChangeForTransport:: assignment operator is called " << endl;
|
||||
}
|
||||
if (this != &right)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ G4ParticleChangeForTransport & G4ParticleChangeForTransport::operator=(const G4P
|
||||
theNumberOfSecondaries = right.theNumberOfSecondaries;
|
||||
theStatusChange = right.theStatusChange;
|
||||
theTouchableChange = right.theTouchableChange;
|
||||
theMomentumChange = right.theMomentumChange;
|
||||
theMomentumDirectionChange = right.theMomentumDirectionChange;
|
||||
thePolarizationChange = right.thePolarizationChange;
|
||||
thePositionChange = right.thePositionChange;
|
||||
theTimeChange = right.theTimeChange;
|
||||
@@ -84,8 +84,8 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForAtRest(G4Step* pStep)
|
||||
{
|
||||
// Nothing happens for AtRestDoIt
|
||||
if (verboseLevel>0) {
|
||||
G4cerr << "G4ParticleChangeForTransport::UpdateStepForAtRest() is called" << endl;
|
||||
G4cerr << " Nothing happens for this method " << endl;
|
||||
G4cout << "G4ParticleChangeForTransport::UpdateStepForAtRest() is called" << endl;
|
||||
G4cout << " Nothing happens for this method " << endl;
|
||||
}
|
||||
// Update the G4Step specific attributes
|
||||
return UpdateStepInfo(pStep);
|
||||
@@ -105,13 +105,13 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForAlongStep(G4Step* pStep)
|
||||
// calculated and be accumulated in PostStepPoint.
|
||||
|
||||
// Take note that the return type of GetMomentumChange is a
|
||||
// pointer to G4ParticleMomentum. Also it is a normalized
|
||||
// pointer to G4ThreeVector. Also it is a normalized
|
||||
// momentum vector.
|
||||
|
||||
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
|
||||
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
|
||||
G4Track* aTrack = pStep->GetTrack();
|
||||
G4double mass = mass = aTrack->GetDynamicParticle()->GetMass();
|
||||
G4double mass = aTrack->GetDynamicParticle()->GetMass();
|
||||
|
||||
// uodate kinetic energy
|
||||
// now assume that no energy change in transportation
|
||||
@@ -127,7 +127,7 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForAlongStep(G4Step* pStep)
|
||||
|
||||
// calculate new momentum
|
||||
G4ThreeVector pMomentum = pPostStepPoint->GetMomentum()
|
||||
+ ( CalcMomentum(theEnergyChange, theMomentumChange, mass)
|
||||
+ ( CalcMomentum(theEnergyChange, theMomentumDirectionChange, mass)
|
||||
- pPreStepPoint->GetMomentum());
|
||||
G4double tMomentum_inv = 1.0 / pMomentum.mag();
|
||||
pPostStepPoint->SetMomentumDirection(pMomentum*tMomentum_inv);
|
||||
@@ -205,4 +205,3 @@ void G4ParticleChangeForTransport::DumpInfo() const
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user