#include <SteppingVerbose.hh>
Public Member Functions | |
SteppingVerbose () | |
~SteppingVerbose () | |
void | StepInfo () |
void | TrackingStarted () |
Definition at line 43 of file SteppingVerbose.hh.
SteppingVerbose::SteppingVerbose | ( | ) |
Definition at line 40 of file SteppingVerbose.cc.
SteppingVerbose::~SteppingVerbose | ( | ) |
Definition at line 45 of file SteppingVerbose.cc.
void SteppingVerbose::StepInfo | ( | ) |
Definition at line 50 of file SteppingVerbose.cc.
00051 { 00052 CopyState(); 00053 00054 G4int prec = std::cout.precision(3); 00055 00056 std::cout<<"***********************************************************"<<std::endl; 00057 // std::cout<<"verboseLevel = "<<verboseLevel<<std::endl; 00058 // std::cout<<"***********************************************************"<<std::endl; 00059 if( verboseLevel >= 1 ){ 00060 if( verboseLevel >= 4 ) VerboseTrack(); 00061 if( verboseLevel >= 3 ){ 00062 std::cout << std::endl; 00063 std::cout << std::setw( 6) << "#Step#" << " " 00064 << std::setw( 9) << "X" << " " 00065 << std::setw( 9) << "Y" << " " 00066 << std::setw( 9) << "Z" << " " 00067 << std::setw( 9) << "t" << " " 00068 << std::setw( 9) << "pX" << " " 00069 << std::setw( 9) << "pY" << " " 00070 << std::setw( 9) << "pZ" << " " 00071 << std::setw( 9) << "KineE" << " " 00072 << std::setw( 9) << "dEtot" << " " 00073 << std::setw( 9) << "dEIon" << " " 00074 << std::setw( 9) << "dEdel" << " " 00075 << std::setw(10) << "StepLeng" << " " 00076 << std::setw(10) << "TrakLeng" << " " 00077 << std::setw(10) << "Volume" << " " 00078 << std::setw(10) << "Process" << std::endl; 00079 } 00080 00081 std::cout << std::setw(6) << fTrack->GetCurrentStepNumber() << " " 00082 << std::setw(5) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " " 00083 << std::setw(5) << G4BestUnit(fTrack->GetPosition().y(),"Length")<< " " 00084 << std::setw(5) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " " 00085 << std::setw(5) << G4BestUnit(fTrack->GetGlobalTime(),"Time")<< " " 00086 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().x(),"Energy")<< " " 00087 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().y(),"Energy")<< " " 00088 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().z(),"Energy")<< " " 00089 << std::setw(5) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " " 00090 << std::setw(5) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")<< " " 00091 << std::setw(5) << G4BestUnit(fStep->GetTotalEnergyDeposit()-fStep->GetNonIonizingEnergyDeposit(),"Energy")<< " " 00092 << std::setw(5) << G4BestUnit(fStep->GetDeltaEnergy(),"Energy")<< " " 00093 << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")<< " " 00094 << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")<< " " 00095 << std::setw(6) << fTrack->GetVolume()->GetName(); 00096 00097 const G4VProcess* process 00098 = fStep->GetPreStepPoint()->GetProcessDefinedStep(); 00099 G4String procName = " UserLimit"; 00100 if (process) procName = process->GetProcessName(); 00101 if (fStepStatus == fWorldBoundary) procName = "OutOfWorld"; 00102 std::cout << " " << std::setw(10) << procName; 00103 std::cout << std::endl; 00104 00105 if( verboseLevel == 2 ){ 00106 G4int tN2ndariesTot = fN2ndariesAtRestDoIt + 00107 fN2ndariesAlongStepDoIt + 00108 fN2ndariesPostStepDoIt; 00109 if(tN2ndariesTot>0){ 00110 std::cout << "\n :----- List of secondaries ----------------" 00111 << std::endl; 00112 std::cout.precision(4); 00113 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; 00114 lp1<(*fSecondary).size(); lp1++){ 00115 std::cout << " " 00116 << std::setw(13) 00117 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() 00118 << ": energy =" 00119 << std::setw(6) 00120 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") 00121 << " time =" 00122 << std::setw(6) 00123 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time"); 00124 std::cout << std::endl; 00125 } 00126 00127 std::cout << " :------------------------------------------\n" 00128 << std::endl; 00129 } 00130 } 00131 00132 } 00133 std::cout.precision(prec); 00134 }
void SteppingVerbose::TrackingStarted | ( | ) |
Definition at line 138 of file SteppingVerbose.cc.
00139 { 00140 00141 CopyState(); 00142 G4int prec = std::cout.precision(3); 00143 if( verboseLevel > 0 ){ 00144 00145 std::cout << std::setw( 6) << "#Step#" << " " 00146 << std::setw( 9) << "X" << " " 00147 << std::setw( 9) << "Y" << " " 00148 << std::setw( 9) << "Z" << " " 00149 << std::setw( 9) << "t" << " " 00150 << std::setw( 9) << "pX" << " " 00151 << std::setw( 9) << "pY" << " " 00152 << std::setw( 9) << "pZ" << " " 00153 << std::setw( 9) << "KineE" << " " 00154 << std::setw( 9) << "dEtot" << " " 00155 << std::setw( 9) << "dEIon" << " " 00156 << std::setw( 9) << "dEdel" << " " 00157 << std::setw(10) << "StepLeng" << " " 00158 << std::setw(10) << "TrakLeng" << " " 00159 << std::setw(10) << "Volume" << " " 00160 << std::setw(10) << "Process" << std::endl; 00161 00162 std::cout << std::setw(6) << fTrack->GetCurrentStepNumber() << " " 00163 << std::setw(5) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " " 00164 << std::setw(5) << G4BestUnit(fTrack->GetPosition().y(),"Length")<< " " 00165 << std::setw(5) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " " 00166 << std::setw(5) << G4BestUnit(fTrack->GetGlobalTime(),"Time")<< " " 00167 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().x(),"Energy")<< " " 00168 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().y(),"Energy")<< " " 00169 << std::setw(5) << G4BestUnit(fTrack->GetMomentum().z(),"Energy")<< " " 00170 << std::setw(5) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " " 00171 << std::setw(5) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")<< " " 00172 << std::setw(5) << G4BestUnit(fStep->GetTotalEnergyDeposit()-fStep->GetNonIonizingEnergyDeposit(),"Energy")<< " " 00173 << std::setw(5) << G4BestUnit(fStep->GetDeltaEnergy(),"Energy")<< " " 00174 << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")<< " " 00175 << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")<< " " 00176 << std::setw(6) << fTrack->GetVolume()->GetName()<< " " 00177 << std::setw(6) << " initStep" << std::endl; 00178 } 00179 std::cout.precision(prec); 00180 }