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