Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+22 -22
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectory.cc,v 1.8 2002/11/11 13:13:02 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4SmoothTrajectory.cc,v 1.10 2003/06/16 17:13:17 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
@@ -45,7 +45,7 @@
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UnitsTable.hh"
#include "g4std/strstream"
#include <strstream>
G4Allocator<G4SmoothTrajectory> aSmoothTrajectoryAllocator;
@@ -73,7 +73,7 @@ G4SmoothTrajectory::G4SmoothTrajectory(const G4Track* aTrack)
positionRecord->push_back(new G4SmoothTrajectoryPoint(aTrack->GetPosition(), NULL));
}
G4SmoothTrajectory::G4SmoothTrajectory(G4SmoothTrajectory & right)
G4SmoothTrajectory::G4SmoothTrajectory(G4SmoothTrajectory & right):G4VTrajectory()
{
ParticleName = right.ParticleName;
PDGCharge = right.PDGCharge;
@@ -102,7 +102,7 @@ G4SmoothTrajectory::~G4SmoothTrajectory()
delete positionRecord;
}
void G4SmoothTrajectory::ShowTrajectory(G4std::ostream& os) const
void G4SmoothTrajectory::ShowTrajectory(std::ostream& os) const
{
// Invoke the default implementation in G4VTrajectory...
G4VTrajectory::ShowTrajectory(os);
@@ -116,10 +116,10 @@ void G4SmoothTrajectory::DrawTrajectory(G4int i_mode) const
// ... or override with your own code here.
}
const G4std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
const std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
{
G4bool isNew;
G4std::map<G4String,G4AttDef>* store
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("G4SmoothTrajectory",isNew);
if (isNew) {
@@ -150,37 +150,37 @@ const G4std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
}
G4std::vector<G4AttValue>* G4SmoothTrajectory::CreateAttValues() const
std::vector<G4AttValue>* G4SmoothTrajectory::CreateAttValues() const
{
char c[100];
G4std::ostrstream s(c,100);
std::ostrstream s(c,100);
G4std::vector<G4AttValue>* values = new G4std::vector<G4AttValue>;
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
s.seekp(G4std::ios::beg);
s << fTrackID << G4std::ends;
s.seekp(std::ios::beg);
s << fTrackID << std::ends;
values->push_back(G4AttValue("ID",c,""));
s.seekp(G4std::ios::beg);
s << fParentID << G4std::ends;
s.seekp(std::ios::beg);
s << fParentID << std::ends;
values->push_back(G4AttValue("PID",c,""));
values->push_back(G4AttValue("PN",ParticleName,""));
s.seekp(G4std::ios::beg);
s << PDGCharge << G4std::ends;
s.seekp(std::ios::beg);
s << PDGCharge << std::ends;
values->push_back(G4AttValue("Ch",c,""));
s.seekp(G4std::ios::beg);
s << PDGEncoding << G4std::ends;
s.seekp(std::ios::beg);
s << PDGEncoding << std::ends;
values->push_back(G4AttValue("PDG",c,""));
s.seekp(G4std::ios::beg);
s << G4BestUnit(initialMomentum,"Energy") << G4std::ends;
s.seekp(std::ios::beg);
s << G4BestUnit(initialMomentum,"Energy") << std::ends;
values->push_back(G4AttValue("IMom",c,""));
s.seekp(G4std::ios::beg);
s << GetPointEntries() << G4std::ends;
s.seekp(std::ios::beg);
s << GetPointEntries() << std::ends;
values->push_back(G4AttValue("NTP",c,""));
return values;
+16 -15
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectoryPoint.cc,v 1.8 2002/12/06 12:16:44 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4SmoothTrajectoryPoint.cc,v 1.10 2003/06/16 17:13:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
@@ -37,7 +37,7 @@
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UnitsTable.hh"
#include "g4std/strstream"
#include <strstream>
G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
@@ -54,13 +54,14 @@ G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint(G4ThreeVector pos)
}
G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint(G4ThreeVector pos,
G4std::vector<G4ThreeVector>* auxiliaryPoints)
std::vector<G4ThreeVector>* auxiliaryPoints)
: fPosition(pos),
fAuxiliaryPointVector(auxiliaryPoints)
{}
G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint(const G4SmoothTrajectoryPoint &right)
: fPosition(right.fPosition),fAuxiliaryPointVector(right.fAuxiliaryPointVector)
: G4VTrajectoryPoint(),
fPosition(right.fPosition),fAuxiliaryPointVector(right.fAuxiliaryPointVector)
{
}
@@ -72,11 +73,11 @@ G4SmoothTrajectoryPoint::~G4SmoothTrajectoryPoint()
}
const G4std::map<G4String,G4AttDef>*
const std::map<G4String,G4AttDef>*
G4SmoothTrajectoryPoint::GetAttDefs() const
{
G4bool isNew;
G4std::map<G4String,G4AttDef>* store
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("G4SmoothTrajectoryPoint",isNew);
if (isNew) {
G4String Pos("Pos");
@@ -89,25 +90,25 @@ G4SmoothTrajectoryPoint::GetAttDefs() const
return store;
}
G4std::vector<G4AttValue>* G4SmoothTrajectoryPoint::CreateAttValues() const
std::vector<G4AttValue>* G4SmoothTrajectoryPoint::CreateAttValues() const
{
char c[100];
G4std::ostrstream s(c,100);
std::ostrstream s(c,100);
G4std::vector<G4AttValue>* values = new G4std::vector<G4AttValue>;
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
if (fAuxiliaryPointVector) {
G4std::vector<G4ThreeVector>::iterator iAux;
std::vector<G4ThreeVector>::iterator iAux;
for (iAux = fAuxiliaryPointVector->begin();
iAux != fAuxiliaryPointVector->end(); ++iAux) {
s.seekp(G4std::ios::beg);
s << G4BestUnit(*iAux,"Length") << G4std::ends;
s.seekp(std::ios::beg);
s << G4BestUnit(*iAux,"Length") << std::ends;
values->push_back(G4AttValue("Aux",c,""));
}
}
s.seekp(G4std::ios::beg);
s << G4BestUnit(fPosition,"Length") << G4std::ends;
s.seekp(std::ios::beg);
s << G4BestUnit(fPosition,"Length") << std::ends;
values->push_back(G4AttValue("Pos",c,""));
return values;
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.cc,v 1.30 2002/12/04 23:00:50 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4SteppingManager.cc,v 1.31 2003/06/16 17:13:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -183,7 +183,7 @@ G4StepStatus G4SteppingManager::Stepping()
// Update safety after invocation of all AlongStepDoIts
endpointSafOrigin= fPostStepPoint->GetPosition();
endpointSafety= G4std::max( proposedSafety - GeomStepLength, 0.);
endpointSafety= std::max( proposedSafety - GeomStepLength, 0.);
fStep->GetPostStepPoint()->SetSafety( endpointSafety );
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SteppingManager2.cc,v 1.12 2003/04/11 11:43:30 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
+190 -190
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingVerbose.cc,v 1.13 2003/03/17 11:13:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4SteppingVerbose.cc,v 1.14 2003/06/16 17:13:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -106,17 +106,17 @@ void G4SteppingVerbose::AtRestDoItInvoked()
for( size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
lp1<(*fSecondary).size(); lp1++) {
G4cout << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
}
@@ -158,17 +158,17 @@ void G4SteppingVerbose::AlongStepDoItAllDone()
if((*fSecondary).size()>0){
for(size_t lp1=0; lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
}
@@ -216,17 +216,17 @@ void G4SteppingVerbose::PostStepDoItAllDone()
if((*fSecondary).size()>0){
for(size_t lp1=0; lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime() , "Time") << " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
}
@@ -246,35 +246,35 @@ void G4SteppingVerbose::StepInfo()
if( verboseLevel >= 3 ){
G4cout << G4endl;
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << G4std::setw( 5) << "#Step#" << " "
<< G4std::setw( 8) << "X" << " " << G4std::setw( 8) << "Y" << " "
<< G4std::setw( 8) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " " << G4std::setw( 8) << "dE" << " "
<< G4std::setw(12) << "StepLeng" << " " << G4std::setw(12) << "TrackLeng" << " "
<< G4std::setw(12) << "NextVolume" << " " << G4std::setw( 8) << "ProcName" << G4endl;
G4cout << std::setw( 5) << "#Step#" << " "
<< std::setw( 8) << "X" << " " << std::setw( 8) << "Y" << " "
<< std::setw( 8) << "Z" << " "
<< std::setw( 9) << "KineE" << " " << std::setw( 8) << "dE" << " "
<< std::setw(12) << "StepLeng" << " " << std::setw(12) << "TrackLeng" << " "
<< std::setw(12) << "NextVolume" << " " << std::setw( 8) << "ProcName" << G4endl;
#else
G4cout << G4std::setw( 5) << "#Step#" << " "
<< G4std::setw( 8) << "X(mm)" << " " << G4std::setw( 8) << "Y(mm)" << " "
<< G4std::setw( 8) << "Z(mm)" << " "
<< G4std::setw( 9) << "KinE(MeV)" << " " << G4std::setw( 8) << "dE(MeV)" << " "
<< G4std::setw( 8) << "StepLeng" << " " << G4std::setw( 9) << "TrackLeng" << " "
<< G4std::setw(11) << "NextVolume" << " " << G4std::setw( 8) << "ProcName" << G4endl;
G4cout << std::setw( 5) << "#Step#" << " "
<< std::setw( 8) << "X(mm)" << " " << std::setw( 8) << "Y(mm)" << " "
<< std::setw( 8) << "Z(mm)" << " "
<< std::setw( 9) << "KinE(MeV)" << " " << std::setw( 8) << "dE(MeV)" << " "
<< std::setw( 8) << "StepLeng" << " " << std::setw( 9) << "TrackLeng" << " "
<< std::setw(11) << "NextVolume" << " " << std::setw( 8) << "ProcName" << G4endl;
#endif
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().x() , "Length") << " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().y() , "Length") << " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().z() , "Length") << " "
<< G4std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy() , "Energy") << " "
<< G4std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
<< G4std::setw( 8) << G4BestUnit(fStep->GetStepLength() , "Length") << " "
<< G4std::setw( 9) << G4BestUnit(fTrack->GetTrackLength() , "Length") << " ";
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().x() , "Length") << " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().y() , "Length") << " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().z() , "Length") << " "
<< std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy() , "Energy") << " "
<< std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
<< std::setw( 8) << G4BestUnit(fStep->GetStepLength() , "Length") << " "
<< std::setw( 9) << G4BestUnit(fTrack->GetTrackLength() , "Length") << " ";
// Put cut comment here
if( fTrack->GetNextVolume() != 0 ) {
G4cout << G4std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
} else {
G4cout << G4std::setw(11) << "OutOfWorld" << " ";
G4cout << std::setw(11) << "OutOfWorld" << " ";
}
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
@@ -287,26 +287,26 @@ void G4SteppingVerbose::StepInfo()
G4int tN2ndariesTot = fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt + fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << " :----- List of 2ndaries - "
<< "#SpawnInStep=" << G4std::setw(3) << tN2ndariesTot
<< "(Rest=" << G4std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << G4std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << G4std::setw(2) << fN2ndariesPostStepDoIt
<< "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
<< "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
<< "), "
<< "#SpawnTotal=" << G4std::setw(3) << (*fSecondary).size()
<< "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
<< " ---------------"
<< G4endl;
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; lp1<(*fSecondary).size(); lp1++){
G4cout << " : "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
G4cout << " :-----------------------------" << "----------------------------------"
@@ -337,7 +337,7 @@ void G4SteppingVerbose::DPSLUserLimit()
if( verboseLevel > 5 ){
G4cout << G4endl << G4endl;
G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
G4cout << " ++ProposedStep(UserLimit) = " << G4std::setw( 9) << physIntLength
G4cout << " ++ProposedStep(UserLimit) = " << std::setw( 9) << physIntLength
<< " : ProcName = User defined maximum allowed Step" << G4endl;
}
}
@@ -348,7 +348,7 @@ void G4SteppingVerbose::DPSLPostStep()
CopyState();
if( verboseLevel > 5 ){
G4cout << " ++ProposedStep(PostStep ) = " << G4std::setw( 9) << physIntLength
G4cout << " ++ProposedStep(PostStep ) = " << std::setw( 9) << physIntLength
<< " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
if(fCondition==ExclusivelyForced){
G4cout << "ExclusivelyForced)" << G4endl;
@@ -372,7 +372,7 @@ void G4SteppingVerbose::DPSLAlongStep()
if( verboseLevel > 5 ){
G4cout << " ++ProposedStep(AlongStep) = "
<< G4std::setw( 9) << G4BestUnit(physIntLength , "Length")
<< std::setw( 9) << G4BestUnit(physIntLength , "Length")
<< " : ProcName = "
<< fCurrentProcess->GetProcessName()
<< " (";
@@ -399,42 +399,42 @@ void G4SteppingVerbose::TrackingStarted()
if( verboseLevel > 0 ){
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << G4std::setw( 5) << "Step#" << " "
<< G4std::setw( 8) << "X" << " "
<< G4std::setw( 8) << "Y" << " "
<< G4std::setw( 8) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 8) << "dE" << " "
<< G4std::setw(12) << "StepLeng" << " "
<< G4std::setw(12) << "TrackLeng" << " "
<< G4std::setw(12) << "NextVolume" << " "
<< G4std::setw( 8) << "ProcName" << G4endl;
G4cout << std::setw( 5) << "Step#" << " "
<< std::setw( 8) << "X" << " "
<< std::setw( 8) << "Y" << " "
<< std::setw( 8) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 8) << "dE" << " "
<< std::setw(12) << "StepLeng" << " "
<< std::setw(12) << "TrackLeng" << " "
<< std::setw(12) << "NextVolume" << " "
<< std::setw( 8) << "ProcName" << G4endl;
#else
G4cout << G4std::setw( 5) << "Step#" << " "
<< G4std::setw( 8) << "X(mm)" << " "
<< G4std::setw( 8) << "Y(mm)" << " "
<< G4std::setw( 8) << "Z(mm)" << " "
<< G4std::setw( 9) << "KinE(MeV)" << " "
<< G4std::setw( 8) << "dE(MeV)" << " "
<< G4std::setw( 8) << "StepLeng" << " "
<< G4std::setw( 9) << "TrackLeng" << " "
<< G4std::setw(11) << "NextVolume" << " "
<< G4std::setw( 8) << "ProcName" << G4endl;
G4cout << std::setw( 5) << "Step#" << " "
<< std::setw( 8) << "X(mm)" << " "
<< std::setw( 8) << "Y(mm)" << " "
<< std::setw( 8) << "Z(mm)" << " "
<< std::setw( 9) << "KinE(MeV)" << " "
<< std::setw( 8) << "dE(MeV)" << " "
<< std::setw( 8) << "StepLeng" << " "
<< std::setw( 9) << "TrackLeng" << " "
<< std::setw(11) << "NextVolume" << " "
<< std::setw( 8) << "ProcName" << G4endl;
#endif
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
<< G4std::setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
<< G4std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
<< G4std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
<< G4std::setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
<< G4std::setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
<< std::setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
<< std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
<< std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
<< std::setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
<< std::setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
} else {
G4cout << G4std::setw(11) << "OutOfWorld" << " ";
G4cout << std::setw(11) << "OutOfWorld" << " ";
}
G4cout << "initStep" << G4endl;
}
@@ -469,17 +469,17 @@ void G4SteppingVerbose::AlongStepDoItOneByOne()
if(fN2ndariesAlongStepDoIt>0){
for(size_t lp1=(*fSecondary).size()-fN2ndariesAlongStepDoIt; lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime() , "Time")<< " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
}
@@ -512,17 +512,17 @@ void G4SteppingVerbose::PostStepDoItOneByOne()
if(fN2ndariesPostStepDoIt>0){
for(size_t lp1=(*fSecondary).size()-fN2ndariesPostStepDoIt; lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << " "
<< G4std::setw( 9)
<< std::setw( 9)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
<< G4std::setw(18)
<< std::setw(18)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
}
}
@@ -543,82 +543,82 @@ void G4SteppingVerbose::VerboseTrack()
G4cout << " -----------------------------------------------"
<< G4endl;
G4cout << " G4Track Information " << G4std::setw(20) << G4endl;
G4cout << " G4Track Information " << std::setw(20) << G4endl;
G4cout << " -----------------------------------------------"
<< G4endl;
G4cout << " Step number : "
<< G4std::setw(20) << fTrack->GetCurrentStepNumber()
<< std::setw(20) << fTrack->GetCurrentStepNumber()
<< G4endl;
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << " Position - x : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
<< std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
<< G4endl;
G4cout << " Position - y : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
<< std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
<< G4endl;
G4cout << " Position - z : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
<< std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
<< G4endl;
G4cout << " Global Time : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
<< std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
<< G4endl;
G4cout << " Local Time : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
<< std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
<< G4endl;
#else
G4cout << " Position - x (mm) : "
<< G4std::setw(20) << fTrack->GetPosition().x() /mm
<< std::setw(20) << fTrack->GetPosition().x() /mm
<< G4endl;
G4cout << " Position - y (mm) : "
<< G4std::setw(20) << fTrack->GetPosition().y() /mm
<< std::setw(20) << fTrack->GetPosition().y() /mm
<< G4endl;
G4cout << " Position - z (mm) : "
<< G4std::setw(20) << fTrack->GetPosition().z() /mm
<< std::setw(20) << fTrack->GetPosition().z() /mm
<< G4endl;
G4cout << " Global Time (ns) : "
<< G4std::setw(20) << fTrack->GetGlobalTime() /ns
<< std::setw(20) << fTrack->GetGlobalTime() /ns
<< G4endl;
G4cout << " Local Time (ns) : "
<< G4std::setw(20) << fTrack->GetLocalTime() /ns
<< std::setw(20) << fTrack->GetLocalTime() /ns
<< G4endl;
#endif
G4cout << " Momentum Direct - x : "
<< G4std::setw(20) << fTrack->GetMomentumDirection().x()
<< std::setw(20) << fTrack->GetMomentumDirection().x()
<< G4endl;
G4cout << " Momentum Direct - y : "
<< G4std::setw(20) << fTrack->GetMomentumDirection().y()
<< std::setw(20) << fTrack->GetMomentumDirection().y()
<< G4endl;
G4cout << " Momentum Direct - z : "
<< G4std::setw(20) << fTrack->GetMomentumDirection().z()
<< std::setw(20) << fTrack->GetMomentumDirection().z()
<< G4endl;
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << " Kinetic Energy : "
#else
G4cout << " Kinetic Energy (MeV): "
#endif
<< G4std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
<< std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
<< G4endl;
G4cout << " Polarization - x : "
<< G4std::setw(20) << fTrack->GetPolarization().x()
<< std::setw(20) << fTrack->GetPolarization().x()
<< G4endl;
G4cout << " Polarization - y : "
<< G4std::setw(20) << fTrack->GetPolarization().y()
<< std::setw(20) << fTrack->GetPolarization().y()
<< G4endl;
G4cout << " Polarization - z : "
<< G4std::setw(20) << fTrack->GetPolarization().z()
<< std::setw(20) << fTrack->GetPolarization().z()
<< G4endl;
G4cout << " Track Length : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
<< std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
<< G4endl;
G4cout << " Track ID # : "
<< G4std::setw(20) << fTrack->GetTrackID()
<< std::setw(20) << fTrack->GetTrackID()
<< G4endl;
G4cout << " Parent Track ID # : "
<< G4std::setw(20) << fTrack->GetParentID()
<< std::setw(20) << fTrack->GetParentID()
<< G4endl;
G4cout << " Next Volume : "
<< G4std::setw(20);
<< std::setw(20);
if( fTrack->GetNextVolume() != 0 ) {
G4cout << fTrack->GetNextVolume()->GetName() << " ";
} else {
@@ -626,7 +626,7 @@ void G4SteppingVerbose::VerboseTrack()
}
G4cout << G4endl;
G4cout << " Track Status : "
<< G4std::setw(20);
<< std::setw(20);
if( fTrack->GetTrackStatus() == fAlive ){
G4cout << " Alive";
} else if( fTrack->GetTrackStatus() == fStopButAlive ){
@@ -643,44 +643,44 @@ void G4SteppingVerbose::VerboseTrack()
G4cout << G4endl;
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << " Vertex - x : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
<< std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
<< G4endl;
G4cout << " Vertex - y : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
<< std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
<< G4endl;
G4cout << " Vertex - z : "
<< G4std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
<< std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
<< G4endl;
#else
G4cout << " Vertex - x (mm) : "
<< G4std::setw(20) << fTrack->GetVertexPosition().x()/mm
<< std::setw(20) << fTrack->GetVertexPosition().x()/mm
<< G4endl;
G4cout << " Vertex - y (mm) : "
<< G4std::setw(20) << fTrack->GetVertexPosition().y()/mm
<< std::setw(20) << fTrack->GetVertexPosition().y()/mm
<< G4endl;
G4cout << " Vertex - z (mm) : "
<< G4std::setw(20) << fTrack->GetVertexPosition().z()/mm
<< std::setw(20) << fTrack->GetVertexPosition().z()/mm
<< G4endl;
#endif
G4cout << " Vertex - Px (MomDir): "
<< G4std::setw(20) << fTrack->GetVertexMomentumDirection().x()
<< std::setw(20) << fTrack->GetVertexMomentumDirection().x()
<< G4endl;
G4cout << " Vertex - Py (MomDir): "
<< G4std::setw(20) << fTrack->GetVertexMomentumDirection().y()
<< std::setw(20) << fTrack->GetVertexMomentumDirection().y()
<< G4endl;
G4cout << " Vertex - Pz (MomDir): "
<< G4std::setw(20) << fTrack->GetVertexMomentumDirection().z()
<< std::setw(20) << fTrack->GetVertexMomentumDirection().z()
<< G4endl;
#ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
G4cout << " Vertex - KineE : "
#else
G4cout << " Vertex - KineE (MeV): "
#endif
<< G4std::setw(20) << G4BestUnit(fTrack->GetVertexKineticEnergy(),"Energy")
<< std::setw(20) << G4BestUnit(fTrack->GetVertexKineticEnergy(),"Energy")
<< G4endl;
G4cout << " Creator Process : "
<< G4std::setw(20);
<< std::setw(20);
if( fTrack->GetCreatorProcess() == NULL){
G4cout << " Event Generator" << G4endl;
} else {
@@ -723,57 +723,57 @@ void G4SteppingVerbose::ShowStep() const
// Show G4StepPoint specific information
G4cout << " -------------------------------------------------------"
<< "----------------" << G4endl;
G4cout << " StepPoint Information " << G4std::setw(20) << "PreStep"
<< G4std::setw(20) << "PostStep" << G4endl;
G4cout << " StepPoint Information " << std::setw(20) << "PreStep"
<< std::setw(20) << "PostStep" << G4endl;
G4cout << " -------------------------------------------------------"
<< "----------------" << G4endl;
G4cout << " Position - x (mm) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPosition().x() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPosition().x() << G4endl;
G4cout << " Position - y (mm) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPosition().y() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPosition().y() << G4endl;
G4cout << " Position - z (mm) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPosition().z() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPosition().z() << G4endl;
G4cout << " Global Time (ns) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetGlobalTime() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
<< std::setw(20) << fStep->GetPostStepPoint()->GetGlobalTime() << G4endl;
G4cout << " Local Time (ns) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetLocalTime() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
<< std::setw(20) << fStep->GetPostStepPoint()->GetLocalTime() << G4endl;
G4cout << " Proper Time (ns) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetProperTime()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetProperTime() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetProperTime()
<< std::setw(20) << fStep->GetPostStepPoint()->GetProperTime() << G4endl;
G4cout << " Momentum Direct - x : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x() << G4endl;
G4cout << " Momentum Direct - y : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y() << G4endl;
G4cout << " Momentum Direct - z : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z() << G4endl;
G4cout << " Momentum - x (MeV/c): "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().x() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().x() << G4endl;
G4cout << " Momentum - y (MeV/c): "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().y() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().y() << G4endl;
G4cout << " Momentum - z (MeV/c): "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().z() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
<< std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().z() << G4endl;
G4cout << " Total Energy (MeV) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
<< std::setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy() << G4endl;
G4cout << " Kinetic Energy (MeV): "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
<< std::setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy() << G4endl;
G4cout << " Velocity (mm/ns) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetVelocity() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
<< std::setw(20) << fStep->GetPostStepPoint()->GetVelocity() << G4endl;
G4cout << " Volume Name : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
<< std::setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
if (fStep->GetPostStepPoint()->GetPhysicalVolume())
{
volName = fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName();
@@ -782,60 +782,60 @@ void G4SteppingVerbose::ShowStep() const
{
volName = "OutOfWorld";
}
G4cout << G4std::setw(20) << volName << G4endl;
G4cout << std::setw(20) << volName << G4endl;
G4cout << " Safety (mm) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetSafety() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
<< std::setw(20) << fStep->GetPostStepPoint()->GetSafety() << G4endl;
G4cout << " Polarization - x : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x() << G4endl;
G4cout << " Polarization - y : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y() << G4endl;
G4cout << " Polarization - Z : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
<< std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z() << G4endl;
G4cout << " Weight : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetWeight() << G4endl;
<< std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
<< std::setw(20) << fStep->GetPostStepPoint()->GetWeight() << G4endl;
G4cout << " Step Status : " ;
G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
if( tStepStatus == fGeomBoundary ){
G4cout << G4std::setw(20) << "Geom Limit";
G4cout << std::setw(20) << "Geom Limit";
} else if ( tStepStatus == fAlongStepDoItProc ){
G4cout << G4std::setw(20) << "AlongStep Proc.";
G4cout << std::setw(20) << "AlongStep Proc.";
} else if ( tStepStatus == fPostStepDoItProc ){
G4cout << G4std::setw(20) << "PostStep Proc";
G4cout << std::setw(20) << "PostStep Proc";
} else if ( tStepStatus == fAtRestDoItProc ){
G4cout << G4std::setw(20) << "AtRest Proc";
G4cout << std::setw(20) << "AtRest Proc";
} else if ( tStepStatus == fUndefined ){
G4cout << G4std::setw(20) << "Undefined";
G4cout << std::setw(20) << "Undefined";
}
tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
if( tStepStatus == fGeomBoundary ){
G4cout << G4std::setw(20) << "Geom Limit";
G4cout << std::setw(20) << "Geom Limit";
} else if ( tStepStatus == fAlongStepDoItProc ){
G4cout << G4std::setw(20) << "AlongStep Proc.";
G4cout << std::setw(20) << "AlongStep Proc.";
} else if ( tStepStatus == fPostStepDoItProc ){
G4cout << G4std::setw(20) << "PostStep Proc";
G4cout << std::setw(20) << "PostStep Proc";
} else if ( tStepStatus == fAtRestDoItProc ){
G4cout << G4std::setw(20) << "AtRest Proc";
G4cout << std::setw(20) << "AtRest Proc";
} else if ( tStepStatus == fUndefined ){
G4cout << G4std::setw(20) << "Undefined";
G4cout << std::setw(20) << "Undefined";
}
G4cout << G4endl;
G4cout << " Process defined Step: " ;
if( fStep->GetPreStepPoint()->GetProcessDefinedStep() == NULL ){
G4cout << G4std::setw(20) << "Undefined";
G4cout << std::setw(20) << "Undefined";
} else {
G4cout << G4std::setw(20) << fStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
G4cout << std::setw(20) << fStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
}
if( fStep->GetPostStepPoint()->GetProcessDefinedStep() == NULL){
G4cout << G4std::setw(20) << "Undefined";
G4cout << std::setw(20) << "Undefined";
} else {
G4cout << G4std::setw(20) << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
G4cout << std::setw(20) << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
}
G4cout << G4endl;
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingManager.cc,v 1.13 2002/08/21 22:50:52 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4TrackingManager.cc,v 1.14 2003/06/16 17:13:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -71,7 +71,7 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
// Clear 2ndary particle vector
// GimmeSecondaries()->clearAndDestroy();
// G4std::vector<G4Track*>::iterator itr;
// std::vector<G4Track*>::iterator itr;
size_t itr;
// for(itr=GimmeSecondaries()->begin();itr=GimmeSecondaries()->end();itr++){
for(itr=0;itr<GimmeSecondaries()->size();itr++){
+6 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingMessenger.cc,v 1.8 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4TrackingMessenger.cc,v 1.9 2003/06/16 17:13:23 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
@@ -52,7 +52,7 @@
#include "G4TrackStatus.hh"
#include "G4ios.hh"
#include "g4std/strstream"
#include <strstream>
///////////////////////////////////////////////////////////////////
G4TrackingMessenger::G4TrackingMessenger(G4TrackingManager * trMan)
@@ -118,7 +118,7 @@ void G4TrackingMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
if( command == VerboseCmd ){
G4int vl;
const char* t = newValues;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> vl;
trackingManager->SetVerboseLevel(vl);
}
@@ -135,7 +135,7 @@ void G4TrackingMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
if( command == StoreTrajectoryCmd ){
G4int vl;
const char* t = newValues;
G4std::istrstream is((char*)t);
std::istrstream is((char*)t);
is >> vl;
trackingManager->SetStoreTrajectory(vl!=0);
}
@@ -148,7 +148,7 @@ G4String G4TrackingMessenger::GetCurrentValue(G4UIcommand * command)
{
if( command == VerboseCmd ){
char line[100];
G4std::ostrstream os(line,100);
std::ostrstream os(line,100);
os << trackingManager->GetVerboseLevel() << '\0';
return G4String(line);
}
+22 -22
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trajectory.cc,v 1.20 2002/11/08 18:27:40 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4Trajectory.cc,v 1.22 2003/06/16 17:13:24 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
@@ -45,7 +45,7 @@
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UnitsTable.hh"
#include "g4std/strstream"
#include <strstream>
G4Allocator<G4Trajectory> aTrajectoryAllocator;
@@ -69,7 +69,7 @@ G4Trajectory::G4Trajectory(const G4Track* aTrack)
positionRecord->push_back(new G4TrajectoryPoint(aTrack->GetPosition()));
}
G4Trajectory::G4Trajectory(G4Trajectory & right)
G4Trajectory::G4Trajectory(G4Trajectory & right):G4VTrajectory()
{
ParticleName = right.ParticleName;
PDGCharge = right.PDGCharge;
@@ -98,7 +98,7 @@ G4Trajectory::~G4Trajectory()
delete positionRecord;
}
void G4Trajectory::ShowTrajectory(G4std::ostream& os) const
void G4Trajectory::ShowTrajectory(std::ostream& os) const
{
// Invoke the default implementation in G4VTrajectory...
G4VTrajectory::ShowTrajectory(os);
@@ -112,10 +112,10 @@ void G4Trajectory::DrawTrajectory(G4int i_mode) const
// ... or override with your own code here.
}
const G4std::map<G4String,G4AttDef>* G4Trajectory::GetAttDefs() const
const std::map<G4String,G4AttDef>* G4Trajectory::GetAttDefs() const
{
G4bool isNew;
G4std::map<G4String,G4AttDef>* store
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("G4Trajectory",isNew);
if (isNew) {
@@ -145,37 +145,37 @@ const G4std::map<G4String,G4AttDef>* G4Trajectory::GetAttDefs() const
return store;
}
G4std::vector<G4AttValue>* G4Trajectory::CreateAttValues() const
std::vector<G4AttValue>* G4Trajectory::CreateAttValues() const
{
char c[100];
G4std::ostrstream s(c,100);
std::ostrstream s(c,100);
G4std::vector<G4AttValue>* values = new G4std::vector<G4AttValue>;
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
s.seekp(G4std::ios::beg);
s << fTrackID << G4std::ends;
s.seekp(std::ios::beg);
s << fTrackID << std::ends;
values->push_back(G4AttValue("ID",c,""));
s.seekp(G4std::ios::beg);
s << fParentID << G4std::ends;
s.seekp(std::ios::beg);
s << fParentID << std::ends;
values->push_back(G4AttValue("PID",c,""));
values->push_back(G4AttValue("PN",ParticleName,""));
s.seekp(G4std::ios::beg);
s << PDGCharge << G4std::ends;
s.seekp(std::ios::beg);
s << PDGCharge << std::ends;
values->push_back(G4AttValue("Ch",c,""));
s.seekp(G4std::ios::beg);
s << PDGEncoding << G4std::ends;
s.seekp(std::ios::beg);
s << PDGEncoding << std::ends;
values->push_back(G4AttValue("PDG",c,""));
s.seekp(G4std::ios::beg);
s << G4BestUnit(initialMomentum,"Energy") << G4std::ends;
s.seekp(std::ios::beg);
s << G4BestUnit(initialMomentum,"Energy") << std::ends;
values->push_back(G4AttValue("IMom",c,""));
s.seekp(G4std::ios::beg);
s << GetPointEntries() << G4std::ends;
s.seekp(std::ios::beg);
s << GetPointEntries() << std::ends;
values->push_back(G4AttValue("NTP",c,""));
return values;
+11 -11
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrajectoryPoint.cc,v 1.10 2002/11/08 18:28:29 johna Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4TrajectoryPoint.cc,v 1.12 2003/06/16 17:13:25 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
@@ -37,7 +37,7 @@
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UnitsTable.hh"
#include "g4std/strstream"
#include <strstream>
G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
@@ -52,7 +52,7 @@ G4TrajectoryPoint::G4TrajectoryPoint(G4ThreeVector pos)
}
G4TrajectoryPoint::G4TrajectoryPoint(const G4TrajectoryPoint &right)
: fPosition(right.fPosition)
: G4VTrajectoryPoint(),fPosition(right.fPosition)
{
}
@@ -60,10 +60,10 @@ G4TrajectoryPoint::~G4TrajectoryPoint()
{
}
const G4std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
const std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
{
G4bool isNew;
G4std::map<G4String,G4AttDef>* store
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("G4TrajectoryPoint",isNew);
if (isNew) {
G4String Pos("Pos");
@@ -72,15 +72,15 @@ const G4std::map<G4String,G4AttDef>* G4TrajectoryPoint::GetAttDefs() const
return store;
}
G4std::vector<G4AttValue>* G4TrajectoryPoint::CreateAttValues() const
std::vector<G4AttValue>* G4TrajectoryPoint::CreateAttValues() const
{
char c[100];
G4std::ostrstream s(c,100);
std::ostrstream s(c,100);
G4std::vector<G4AttValue>* values = new G4std::vector<G4AttValue>;
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
s.seekp(G4std::ios::beg);
s << G4BestUnit(fPosition,"Length") << G4std::ends;
s.seekp(std::ios::beg);
s << G4BestUnit(fPosition,"Length") << std::ends;
values->push_back(G4AttValue("Pos",c,""));
return values;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserSteppingAction.cc,v 1.6 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserTrackingAction.cc,v 1.6 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VSteppingVerbose.cc,v 1.9 2002/12/04 23:00:51 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
//
//---------------------------------------------------------------
+12 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VTrajectory.cc,v 1.3 2002/12/12 13:13:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VTrajectory.cc,v 1.4 2003/06/16 17:13:26 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ---------------------------------------------------------------
@@ -48,20 +48,20 @@
#include "G4Polymarker.hh"
#include "G4Colour.hh"
void G4VTrajectory::ShowTrajectory(G4std::ostream& os) const
void G4VTrajectory::ShowTrajectory(std::ostream& os) const
{
// Makes use of attribute values implemented in the concrete class.
// Note: the user needs to follow with new-line or end-of-string,
// depending on the nature of os.
G4std::vector<G4AttValue>* attValues = CreateAttValues();
std::vector<G4AttValue>* attValues = CreateAttValues();
if (!attValues) {
os << "G4VTrajectory::ShowTrajectory: no attribute values defined.";
return;
}
const G4std::map<G4String,G4AttDef>* attDefs = GetAttDefs();
const std::map<G4String,G4AttDef>* attDefs = GetAttDefs();
if (!attDefs) {
os << "G4VTrajectory::ShowTrajectory:"
"\n ERROR: no attribute definitions for attribute values.";
@@ -70,10 +70,10 @@ void G4VTrajectory::ShowTrajectory(G4std::ostream& os) const
os << "Trajectory:";
G4std::vector<G4AttValue>::iterator iAttVal;
std::vector<G4AttValue>::iterator iAttVal;
for (iAttVal = attValues->begin();
iAttVal != attValues->end(); ++iAttVal) {
G4std::map<G4String,G4AttDef>::const_iterator iAttDef =
std::map<G4String,G4AttDef>::const_iterator iAttDef =
attDefs->find(iAttVal->GetName());
if (iAttDef == attDefs->end()) {
os << "G4VTrajectory::ShowTrajectory:"
@@ -92,7 +92,7 @@ void G4VTrajectory::ShowTrajectory(G4std::ostream& os) const
//Now do trajectory points...
for (G4int i = 0; i < GetPointEntries(); i++) {
G4VTrajectoryPoint* aTrajectoryPoint = GetPoint(i);
G4std::vector<G4AttValue>* attValues
std::vector<G4AttValue>* attValues
= aTrajectoryPoint->CreateAttValues();
if (!attValues) {
os <<
@@ -100,7 +100,7 @@ void G4VTrajectory::ShowTrajectory(G4std::ostream& os) const
" for trajectory point defined.";
}
else {
const G4std::map<G4String,G4AttDef>* attDefs
const std::map<G4String,G4AttDef>* attDefs
= aTrajectoryPoint->GetAttDefs();
if (!attDefs) {
os << "\nG4VTrajectory::ShowTrajectory:"
@@ -108,10 +108,10 @@ void G4VTrajectory::ShowTrajectory(G4std::ostream& os) const
" for trajectory point defined.";
}
else {
G4std::vector<G4AttValue>::iterator iAttVal;
std::vector<G4AttValue>::iterator iAttVal;
for (iAttVal = attValues->begin();
iAttVal != attValues->end(); ++iAttVal) {
G4std::map<G4String,G4AttDef>::const_iterator iAttDef =
std::map<G4String,G4AttDef>::const_iterator iAttDef =
attDefs->find(iAttVal->GetName());
if (iAttDef == attDefs->end()) {
os << "\nG4VTrajectory::ShowTrajectory:"
@@ -153,7 +153,7 @@ void G4VTrajectory::DrawTrajectory(G4int i_mode) const
for (G4int i = 0; i < GetPointEntries() ; i++) {
G4VTrajectoryPoint* aTrajectoryPoint = GetPoint(i);
const G4std::vector<G4ThreeVector>* auxiliaries
const std::vector<G4ThreeVector>* auxiliaries
= aTrajectoryPoint->GetAuxiliaryPoints();
if (auxiliaries) {
for (size_t iAux = 0; iAux < auxiliaries->size(); ++iAux) {