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: G4SteppingManager.cc,v 2.4 1998/11/25 05:50:44 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingManager.cc,v 1.5 1999/06/29 16:16:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -141,6 +141,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
// Store the Step length (geometrical length) to G4Step and G4Track
|
||||
fStep->SetStepLength( PhysicalStep );
|
||||
fTrack->SetStepLength( PhysicalStep );
|
||||
G4double GeomStepLength = PhysicalStep;
|
||||
|
||||
// Store StepStatus to PostStepPoint
|
||||
fStep->GetPostStepPoint()->SetStepStatus( fStepStatus );
|
||||
@@ -153,11 +154,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
|
||||
// Update safety after invocation of all AlongStepDoIts
|
||||
endpointSafOrigin= fPostStepPoint->GetPosition();
|
||||
endpointSafety= max( proposedSafety -
|
||||
(fPostStepPoint->GetPosition() -
|
||||
fPreStepPoint->GetPosition()
|
||||
).mag(),
|
||||
0.);
|
||||
endpointSafety= max( proposedSafety - GeomStepLength, 0.);
|
||||
|
||||
fStep->GetPostStepPoint()->SetSafety( endpointSafety );
|
||||
|
||||
@@ -200,7 +197,7 @@ G4StepStatus G4SteppingManager::Stepping()
|
||||
// User intervention process.
|
||||
fStep->SetTrack(fTrack);
|
||||
if( fUserSteppingAction != NULL ) {
|
||||
fUserSteppingAction->UserSteppingAction();
|
||||
fUserSteppingAction->UserSteppingAction(fStep);
|
||||
}
|
||||
|
||||
// Stepping process finish. Return the value of the StepStatus.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SteppingVerbose.cc,v 2.8 1998/11/05 17:13:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4SteppingVerbose.cc,v 1.3 1999/03/24 04:46:27 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -34,12 +34,12 @@
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
G4SteppingVerbose::G4SteppingVerbose()
|
||||
//G4SteppingVerbose::G4SteppingVerbose()
|
||||
//////////////////////////////////////////////////
|
||||
{
|
||||
}
|
||||
//{
|
||||
//}
|
||||
//////////////////////////////////////////////////
|
||||
G4SteppingVerbose::G4SteppingVerbose(G4SteppingManager* fMan)
|
||||
G4SteppingVerbose::G4SteppingVerbose(G4SteppingManager* const fMan)
|
||||
:fManager(fMan)
|
||||
//////////////////////////////////////////////////
|
||||
{
|
||||
@@ -190,7 +190,7 @@ void G4SteppingVerbose::AtRestDoItInvoked()
|
||||
}
|
||||
|
||||
if( verboseLevel >= 4 ){
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void G4SteppingVerbose::AlongStepDoItAllDone()
|
||||
}
|
||||
}
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
G4cout << " ++List of secondaries generated "
|
||||
<< "(x,y,z,kE,t,PID):"
|
||||
@@ -275,7 +275,7 @@ void G4SteppingVerbose::PostStepDoItAllDone()
|
||||
}
|
||||
}
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
G4cout << " ++List of secondaries generated "
|
||||
<< "(x,y,z,kE,t,PID):"
|
||||
@@ -411,57 +411,6 @@ void G4SteppingVerbose::StepInfo()
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::TrackingStarted()
|
||||
////////////////////////////////////////////////
|
||||
{
|
||||
|
||||
CopyState();
|
||||
G4int prec = G4cout.precision(3);
|
||||
if( verboseLevel > 0 ){
|
||||
|
||||
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X" << " "
|
||||
<< setw( 8) << "Y" << " "
|
||||
<< setw( 8) << "Z" << " "
|
||||
<< setw( 9) << "KineE" << " "
|
||||
<< setw( 8) << "dE" << " "
|
||||
<< setw(12) << "StepLeng" << " "
|
||||
<< setw(12) << "TrackLeng" << " "
|
||||
<< setw(12) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#else
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X(mm)" << " "
|
||||
<< setw( 8) << "Y(mm)" << " "
|
||||
<< setw( 8) << "Z(mm)" << " "
|
||||
<< setw( 9) << "KinE(MeV)" << " "
|
||||
<< setw( 8) << "dE(MeV)" << " "
|
||||
<< setw( 8) << "StepLeng" << " "
|
||||
<< setw( 9) << "TrackLeng" << " "
|
||||
<< setw(11) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#endif
|
||||
|
||||
G4cout << setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
|
||||
|
||||
if(fTrack->GetNextVolume()){
|
||||
G4cout << setw(11) << fTrack->GetNextVolume()->GetName() << " ";
|
||||
} else {
|
||||
G4cout << setw(11) << "OutOfWorld" << " ";
|
||||
}
|
||||
G4cout << "initStep" << endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
////////////////////////////////////////////
|
||||
void G4SteppingVerbose::DPSLStarted()
|
||||
////////////////////////////////////////////
|
||||
@@ -537,6 +486,59 @@ void G4SteppingVerbose::DPSLAlongStep()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::TrackingStarted()
|
||||
////////////////////////////////////////////////
|
||||
{
|
||||
|
||||
CopyState();
|
||||
G4int prec = G4cout.precision(3);
|
||||
if( verboseLevel > 0 ){
|
||||
|
||||
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X" << " "
|
||||
<< setw( 8) << "Y" << " "
|
||||
<< setw( 8) << "Z" << " "
|
||||
<< setw( 9) << "KineE" << " "
|
||||
<< setw( 8) << "dE" << " "
|
||||
<< setw(12) << "StepLeng" << " "
|
||||
<< setw(12) << "TrackLeng" << " "
|
||||
<< setw(12) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#else
|
||||
G4cout << setw( 5) << "Step#" << " "
|
||||
<< setw( 8) << "X(mm)" << " "
|
||||
<< setw( 8) << "Y(mm)" << " "
|
||||
<< setw( 8) << "Z(mm)" << " "
|
||||
<< setw( 9) << "KinE(MeV)" << " "
|
||||
<< setw( 8) << "dE(MeV)" << " "
|
||||
<< setw( 8) << "StepLeng" << " "
|
||||
<< setw( 9) << "TrackLeng" << " "
|
||||
<< setw(11) << "NextVolume" << " "
|
||||
<< setw( 8) << "ProcName" << endl;
|
||||
#endif
|
||||
|
||||
G4cout << setw( 5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
|
||||
<< setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
|
||||
<< setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
|
||||
<< setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
|
||||
|
||||
if(fTrack->GetNextVolume()){
|
||||
G4cout << setw(11) << fTrack->GetNextVolume()->GetName() << " ";
|
||||
} else {
|
||||
G4cout << setw(11) << "OutOfWorld" << " ";
|
||||
}
|
||||
G4cout << "initStep" << endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
//////////////////////////////////////////////////////
|
||||
void G4SteppingVerbose::AlongStepDoItOneByOne()
|
||||
//////////////////////////////////////////////////////
|
||||
@@ -548,7 +550,7 @@ void G4SteppingVerbose::AlongStepDoItOneByOne()
|
||||
<< " Process Name = "
|
||||
<< fCurrentProcess->GetProcessName() << endl;
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << " "
|
||||
<< "!Note! Safety of PostStep is only valid "
|
||||
<< "after all DoIt invocations."
|
||||
@@ -598,7 +600,7 @@ void G4SteppingVerbose::PostStepDoItOneByOne()
|
||||
<< " Process Name = "
|
||||
<< fCurrentProcess->GetProcessName() << endl;
|
||||
|
||||
fStep->ShowStep();
|
||||
ShowStep();
|
||||
G4cout << endl;
|
||||
VerboseParticleChange();
|
||||
G4cout << endl;
|
||||
@@ -807,3 +809,136 @@ void G4SteppingVerbose::VerboseParticleChange()
|
||||
G4cout << " ++G4ParticleChange Information " << endl;
|
||||
fParticleChange->DumpInfo();
|
||||
}
|
||||
/////////////////////////////////////////
|
||||
void G4SteppingVerbose::ShowStep() const
|
||||
////////////////////////////////////////
|
||||
{
|
||||
|
||||
// Show header
|
||||
G4cout << endl;
|
||||
G4cout << " ++G4Step Information " << endl;
|
||||
G4cout.precision(3);
|
||||
|
||||
// Show G4Step specific information
|
||||
G4cout << " Address of G4Track : " << fStep->GetTrack() << endl;
|
||||
G4cout << " Step Length (mm) : " << fStep->GetTrack()->GetStepLength() << endl;
|
||||
G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit() << endl;
|
||||
|
||||
// Show G4StepPoint specific information
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
G4cout << " StepPoint Information " << setw(20) << "PreStep"
|
||||
<< setw(20) << "PostStep" << endl;
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
G4cout << " Position - x (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().x() << endl;
|
||||
G4cout << " Position - y (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().y() << endl;
|
||||
G4cout << " Position - z (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPosition().z() << endl;
|
||||
G4cout << " Global Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetGlobalTime() << endl;
|
||||
G4cout << " Local Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetLocalTime() << endl;
|
||||
G4cout << " Proper Time (ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetProperTime()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetProperTime() << endl;
|
||||
G4cout << " Momentum Direct - x : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x() << endl;
|
||||
G4cout << " Momentum Direct - y : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y() << endl;
|
||||
G4cout << " Momentum Direct - z : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z() << endl;
|
||||
G4cout << " Momentum - x (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().x() << endl;
|
||||
G4cout << " Momentum - y (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().y() << endl;
|
||||
G4cout << " Momentum - z (MeV/c): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetMomentum().z() << endl;
|
||||
G4cout << " Total Energy (MeV) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy() << endl;
|
||||
G4cout << " Kinetic Energy (MeV): "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy() << endl;
|
||||
G4cout << " Velocity (mm/ns) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetVelocity()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetVelocity() << endl;
|
||||
G4cout << " Volume Name : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName() << endl;
|
||||
G4cout << " Safety (mm) : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetSafety()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetSafety() << endl;
|
||||
G4cout << " Polarization - x : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().x() << endl;
|
||||
G4cout << " Polarization - y : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().y() << endl;
|
||||
G4cout << " Polarization - Z : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetPolarization().z() << endl;
|
||||
G4cout << " Weight : "
|
||||
<< setw(20) << fStep->GetPreStepPoint()->GetWeight()
|
||||
<< setw(20) << fStep->GetPostStepPoint()->GetWeight() << endl;
|
||||
G4cout << " Step Status : " ;
|
||||
G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
|
||||
if( tStepStatus == fGeomBoundary ){
|
||||
G4cout << setw(20) << "Geom Limit";
|
||||
} else if ( tStepStatus == fAlongStepDoItProc ){
|
||||
G4cout << setw(20) << "AlongStep Proc.";
|
||||
} else if ( tStepStatus == fPostStepDoItProc ){
|
||||
G4cout << setw(20) << "PostStep Proc";
|
||||
} else if ( tStepStatus == fAtRestDoItProc ){
|
||||
G4cout << setw(20) << "AtRest Proc";
|
||||
} else if ( tStepStatus == fUndefined ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
}
|
||||
|
||||
tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
|
||||
if( tStepStatus == fGeomBoundary ){
|
||||
G4cout << setw(20) << "Geom Limit";
|
||||
} else if ( tStepStatus == fAlongStepDoItProc ){
|
||||
G4cout << setw(20) << "AlongStep Proc.";
|
||||
} else if ( tStepStatus == fPostStepDoItProc ){
|
||||
G4cout << setw(20) << "PostStep Proc";
|
||||
} else if ( tStepStatus == fAtRestDoItProc ){
|
||||
G4cout << setw(20) << "AtRest Proc";
|
||||
} else if ( tStepStatus == fUndefined ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
}
|
||||
|
||||
G4cout << endl;
|
||||
G4cout << " Process defined Step: " ;
|
||||
if( fStep->GetPreStepPoint()->GetProcessDefinedStep() == NULL ){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
} else {
|
||||
G4cout << setw(20) << fStep->GetPreStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
}
|
||||
if( fStep->GetPostStepPoint()->GetProcessDefinedStep() == NULL){
|
||||
G4cout << setw(20) << "Undefined";
|
||||
} else {
|
||||
G4cout << setw(20) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
}
|
||||
|
||||
G4cout << endl;
|
||||
G4cout << " -------------------------------------------------------"
|
||||
<< "----------------" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingManager.cc,v 2.4 1998/11/25 02:17:00 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingManager.cc,v 1.3 1999/04/15 08:47:22 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "G4TrackingManager.hh"
|
||||
#include "G4TrackingMessenger.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4TrackingMessenger * messenger;
|
||||
@@ -57,16 +58,14 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
GimmeSecondaries()->clearAndDestroy();
|
||||
|
||||
// Pre tracking user intervention process.
|
||||
fpTrajectory = NULL;
|
||||
if( fpUserTrackingAction != NULL ) {
|
||||
fpUserTrackingAction->PreUserTrackingAction();
|
||||
fpUserTrackingAction->PreUserTrackingAction(fpTrack);
|
||||
}
|
||||
#ifdef G4_STORE_TRAJECTORY
|
||||
// Construct a trajectory if it is requested
|
||||
if(StoreTrajectory) {
|
||||
fpTrajectory = new G4Trajectory(fpTrack);
|
||||
}
|
||||
else {
|
||||
fpTrajectory = NULL;
|
||||
if(StoreTrajectory&&(!fpTrajectory)) {
|
||||
fpTrajectory = new G4Trajectory(fpTrack); // default trajectory concrete class object
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -105,7 +104,7 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
|
||||
// Post tracking user intervention process.
|
||||
if( fpUserTrackingAction != NULL ) {
|
||||
fpUserTrackingAction->PostUserTrackingAction();
|
||||
fpUserTrackingAction->PostUserTrackingAction(fpTrack);
|
||||
}
|
||||
|
||||
// Destruct the trajectory if it was created
|
||||
@@ -117,6 +116,14 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
|
||||
}
|
||||
}
|
||||
|
||||
void G4TrackingManager::SetTrajectory(G4VTrajectory* aTrajectory)
|
||||
{
|
||||
#ifndef G4_STORE_TRAJECTORY
|
||||
G4Exception("G4TrackingManager::SetTrajectory is invoked without G4_STORE_TRAJECTORY compilor option");
|
||||
#endif
|
||||
fpTrajectory = aTrajectory;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
void G4TrackingManager::EventAborted()
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackingMessenger.cc,v 2.4 1998/07/13 17:28:59 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrackingMessenger.cc,v 1.2 1999/03/24 04:46:58 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Trajectory.cc,v 2.2 1998/07/13 17:29:00 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Trajectory.cc,v 1.4 1999/05/25 21:04:36 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#include "G4Trajectory.hh"
|
||||
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Polyline.hh"
|
||||
@@ -32,8 +32,23 @@
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
G4Allocator<G4Trajectory> aTrajectoryAllocator;
|
||||
|
||||
///////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(G4Track* aTrack)
|
||||
G4Trajectory::G4Trajectory()
|
||||
///////////////////////////////////////////
|
||||
{
|
||||
G4ParticleDefinition * fpParticleDefinition = 0;
|
||||
ParticleName = "";
|
||||
PDGCharge = 0;
|
||||
PDGEncoding = 0;
|
||||
fTrackID = 0;
|
||||
fParentID = 0;
|
||||
positionRecord = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(const G4Track* aTrack)
|
||||
///////////////////////////////////////////
|
||||
{
|
||||
G4ParticleDefinition * fpParticleDefinition = aTrack->GetDefinition();
|
||||
@@ -42,13 +57,25 @@ G4Trajectory::G4Trajectory(G4Track* aTrack)
|
||||
PDGEncoding = fpParticleDefinition->GetPDGEncoding();
|
||||
fTrackID = aTrack->GetTrackID();
|
||||
fParentID = aTrack->GetParentID();
|
||||
positionRecord.insert(aTrack->GetPosition());
|
||||
positionRecord = new RWTPtrOrderedVector<G4VTrajectoryPoint>;
|
||||
positionRecord->insert(new G4TrajectoryPoint(aTrack->GetPosition()));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
G4Trajectory::G4Trajectory(G4Trajectory &)
|
||||
G4Trajectory::G4Trajectory(G4Trajectory & right)
|
||||
//////////////////////////////////////////
|
||||
{
|
||||
ParticleName = right.ParticleName;
|
||||
PDGCharge = right.PDGCharge;
|
||||
PDGEncoding = right.PDGEncoding;
|
||||
fTrackID = right.fTrackID;
|
||||
fParentID = right.fParentID;
|
||||
positionRecord = new RWTPtrOrderedVector<G4VTrajectoryPoint>;
|
||||
for(int i=0;i<right.positionRecord->entries();i++)
|
||||
{
|
||||
G4TrajectoryPoint* rightPoint = (G4TrajectoryPoint*)((*(right.positionRecord))[i]);
|
||||
positionRecord->insert(new G4TrajectoryPoint(*rightPoint));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,27 +83,30 @@ G4Trajectory::G4Trajectory(G4Trajectory &)
|
||||
G4Trajectory::~G4Trajectory()
|
||||
/////////////////////////////
|
||||
{
|
||||
positionRecord->clearAndDestroy();
|
||||
delete positionRecord;
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
void G4Trajectory::ShowTrajectory()
|
||||
void G4Trajectory::ShowTrajectory() const
|
||||
///////////////////////////////////
|
||||
{
|
||||
G4cout << endl << "TrackID =" << fTrackID
|
||||
<< ":ParentID=" << fParentID << endl;
|
||||
G4cout << "Particle name : " << ParticleName
|
||||
<< " Charge : " << PDGCharge << endl;
|
||||
G4cout << " Current trajectory has " << positionRecord.entries()
|
||||
G4cout << " Current trajectory has " << positionRecord->entries()
|
||||
<< " points." << endl;
|
||||
|
||||
for( size_t i=0 ; i < positionRecord.entries() ; i++){
|
||||
for( size_t i=0 ; i < positionRecord->entries() ; i++){
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[i]);
|
||||
G4cout << "Point[" << i << "]"
|
||||
<< " Position= " << positionRecord[i].GetPosition() << endl;
|
||||
<< " Position= " << aTrajectoryPoint->GetPosition() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////
|
||||
void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
void G4Trajectory::DrawTrajectory(G4int i_mode) const
|
||||
///////////////////////////////////////////////
|
||||
{
|
||||
|
||||
@@ -86,8 +116,9 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
if(i_mode>=0)
|
||||
{
|
||||
G4Polyline pPolyline;
|
||||
for (int i = 0; i < positionRecord.entries() ; i++) {
|
||||
pos = positionRecord[i].GetPosition();
|
||||
for (int i = 0; i < positionRecord->entries() ; i++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[i]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
pPolyline.append( pos );
|
||||
}
|
||||
|
||||
@@ -106,8 +137,9 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
|
||||
if(i_mode!=0)
|
||||
{
|
||||
for(int j=0; j<positionRecord.entries(); j++) {
|
||||
pos = positionRecord[j].GetPosition();
|
||||
for(int j=0; j<positionRecord->entries(); j++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*positionRecord)[j]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
G4Circle circle( pos );
|
||||
circle.SetScreenSize(0.001*i_mode);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
@@ -121,11 +153,11 @@ void G4Trajectory::DrawTrajectory(G4int i_mode)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////
|
||||
void G4Trajectory::AppendStep(G4Step* aStep)
|
||||
void G4Trajectory::AppendStep(const G4Step* aStep)
|
||||
////////////////////////////////////////////
|
||||
{
|
||||
positionRecord.append( aStep->GetPostStepPoint()->
|
||||
GetPosition() );
|
||||
positionRecord->append( new G4TrajectoryPoint(aStep->GetPostStepPoint()->
|
||||
GetPosition() ));
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoryPoint.cc,v 2.0 1998/07/02 17:29:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4TrajectoryPoint.cc,v 1.2 1999/03/24 04:48:10 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserSteppingAction.cc,v 2.0 1998/07/02 17:29:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserSteppingAction.cc,v 1.2 1999/03/24 04:48:23 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserTrackingAction.cc,v 2.0 1998/07/02 17:29:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4UserTrackingAction.cc,v 1.2 1999/03/24 04:48:42 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VSteppingVerbose.cc,v 1.1 1999/03/24 04:49:16 tsasaki Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4VSteppingVerbose.cc
|
||||
//
|
||||
// Description:
|
||||
// This class manages the vervose outputs in G4SteppingManager.
|
||||
//
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#include "G4VSteppingVerbose.hh"
|
||||
|
||||
G4VSteppingVerbose::G4VSteppingVerbose(){;}
|
||||
G4VSteppingVerbose::~G4VSteppingVerbose(){;}
|
||||
|
||||
Reference in New Issue
Block a user