File indexing completed on 2026-03-28 07:51:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #include "RE05SteppingVerbose.hh"
0030
0031 #include "G4SteppingManager.hh"
0032 #include "G4UnitsTable.hh"
0033
0034
0035
0036 RE05SteppingVerbose::RE05SteppingVerbose() : G4SteppingVerbose() {}
0037
0038
0039
0040 RE05SteppingVerbose::~RE05SteppingVerbose() {}
0041
0042
0043
0044 void RE05SteppingVerbose::StepInfo()
0045 {
0046 CopyState();
0047
0048 G4int prec = G4cout.precision(3);
0049
0050 if (verboseLevel >= 1) {
0051 if (verboseLevel >= 4) VerboseTrack();
0052 if (verboseLevel >= 3) {
0053 G4cout << G4endl;
0054 G4cout << std::setw(5) << "#Step#"
0055 << " " << std::setw(6) << "X"
0056 << " " << std::setw(6) << "Y"
0057 << " " << std::setw(6) << "Z"
0058 << " " << std::setw(9) << "KineE"
0059 << " " << std::setw(9) << "dEStep"
0060 << " " << std::setw(10) << "StepLeng" << std::setw(10) << "TrakLeng" << std::setw(10)
0061 << "Volume"
0062 << " " << std::setw(10) << "Process" << G4endl;
0063 }
0064
0065 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(6)
0066 << G4BestUnit(fTrack->GetPosition().x(), "Length") << std::setw(6)
0067 << G4BestUnit(fTrack->GetPosition().y(), "Length") << std::setw(6)
0068 << G4BestUnit(fTrack->GetPosition().z(), "Length") << std::setw(6)
0069 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << std::setw(6)
0070 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << std::setw(6)
0071 << G4BestUnit(fStep->GetStepLength(), "Length") << std::setw(6)
0072 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
0073
0074
0075 if (fTrack->GetNextVolume() != 0) {
0076 G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
0077 }
0078 else {
0079 G4cout << std::setw(10) << "OutOfWorld";
0080 }
0081
0082 if (fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL) {
0083 G4cout << " " << std::setw(10)
0084 << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
0085 }
0086 else {
0087 G4cout << " UserLimit";
0088 }
0089
0090 G4cout << G4endl;
0091
0092 if (verboseLevel == 2) {
0093 G4int tN2ndariesTot = fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt + fN2ndariesPostStepDoIt;
0094 if (tN2ndariesTot > 0) {
0095 G4cout << " :----- List of 2ndaries - "
0096 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot << "(Rest=" << std::setw(2)
0097 << fN2ndariesAtRestDoIt << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
0098 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt << "), "
0099 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size() << " ---------------"
0100 << G4endl;
0101
0102 for (size_t lp1 = (*fSecondary).size() - tN2ndariesTot; lp1 < (*fSecondary).size(); lp1++) {
0103 G4cout << " : " << std::setw(6)
0104 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length") << std::setw(6)
0105 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << std::setw(6)
0106 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << std::setw(6)
0107 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << std::setw(10)
0108 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
0109 G4cout << G4endl;
0110 }
0111
0112 G4cout << " :-----------------------------"
0113 << "----------------------------------"
0114 << "-- EndOf2ndaries Info ---------------" << G4endl;
0115 }
0116 }
0117 }
0118 G4cout.precision(prec);
0119 }
0120
0121
0122
0123 void RE05SteppingVerbose::TrackingStarted()
0124 {
0125 CopyState();
0126 G4int prec = G4cout.precision(3);
0127 if (verboseLevel > 0) {
0128 G4cout << std::setw(5) << "Step#"
0129 << " " << std::setw(6) << "X"
0130 << " " << std::setw(6) << "Y"
0131 << " " << std::setw(6) << "Z"
0132 << " " << std::setw(9) << "KineE"
0133 << " " << std::setw(9) << "dEStep"
0134 << " " << std::setw(10) << "StepLeng" << std::setw(10) << "TrakLeng" << std::setw(10)
0135 << "Volume"
0136 << " " << std::setw(10) << "Process" << G4endl;
0137
0138 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(6)
0139 << G4BestUnit(fTrack->GetPosition().x(), "Length") << std::setw(6)
0140 << G4BestUnit(fTrack->GetPosition().y(), "Length") << std::setw(6)
0141 << G4BestUnit(fTrack->GetPosition().z(), "Length") << std::setw(6)
0142 << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << std::setw(6)
0143 << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << std::setw(6)
0144 << G4BestUnit(fStep->GetStepLength(), "Length") << std::setw(6)
0145 << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
0146
0147 if (fTrack->GetNextVolume()) {
0148 G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
0149 }
0150 else {
0151 G4cout << std::setw(10) << "OutOfWorld";
0152 }
0153 G4cout << " initStep" << G4endl;
0154 }
0155 G4cout.precision(prec);
0156 }
0157
0158