Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 /// \file field/field01/src/F01SteppingVerbose 27 /// \brief Implementation of the F01SteppingVe 28 // 29 // 30 // 31 //....oooOO0OOooo........oooOO0OOooo........oo 32 //....oooOO0OOooo........oooOO0OOooo........oo 33 34 #include "F01SteppingVerbose.hh" 35 36 #include "G4SteppingManager.hh" 37 #include "G4UnitsTable.hh" 38 39 //....oooOO0OOooo........oooOO0OOooo........oo 40 41 void F01SteppingVerbose::StepInfo() 42 { 43 CopyState(); 44 45 G4int prec = G4cout.precision(6); 46 47 if (verboseLevel >= 1) { 48 if (verboseLevel >= 4) VerboseTrack(); 49 if (verboseLevel >= 3) { 50 G4cout << G4endl; 51 G4cout << std::setw(5) << "#Step#" 52 << " " << std::setw(10) << "X" 53 << " " << std::setw(10) << "Y" 54 << " " << std::setw(10) << "Z" 55 << " " << std::setw(10) << "Di 56 << " " << std::setw(10) << "dir y 57 << " " << std::setw(10) << "dir z 58 << " " << std::setw(8) << "KineE" 59 << " " << std::setw(10) << "dESte 60 << " " << std::setw(10) << "StepL 61 << " " << std::setw(10) << "TrakL 62 << " " << std::setw(10) << "NextV 63 << " " << std::setw(10) << "Proce 64 << " " << G4endl; 65 } 66 67 G4cout << std::setw(5) << fTrack->GetCurre 68 << G4BestUnit(fTrack->GetPosition() 69 << G4BestUnit(fTrack->GetPosition() 70 << G4BestUnit(fTrack->GetPosition() 71 G4cout << std::setw(10) << fTrack->GetMome 72 << fTrack->GetMomentumDirection().y 73 << fTrack->GetMomentumDirection().z 74 G4cout << std::setw(8) << G4BestUnit(fTrac 75 << std::setw(10) << G4BestUnit(fSte 76 << std::setw(10) << G4BestUnit(fSte 77 << G4BestUnit(fTrack->GetTrackLengt 78 79 if (fTrack->GetNextVolume() != nullptr) { 80 G4cout << std::setw(10) << fTrack->GetVo 81 } 82 else { 83 G4cout << std::setw(10) << "OutOfWorld"; 84 } 85 86 if (fStep->GetPostStepPoint()->GetProcessD 87 G4cout << " " << std::setw(10) 88 << fStep->GetPostStepPoint()->Get 89 } 90 else { 91 G4cout << " UserLimit"; 92 } 93 G4cout << G4endl; 94 95 if (verboseLevel == 2) { 96 G4int tN2ndariesTot = fN2ndariesAtRestDo 97 if (tN2ndariesTot > 0) { 98 G4cout << " :----- List of 2ndaries 99 << "#SpawnInStep=" << std::setw 100 << fN2ndariesAtRestDoIt << ",Al 101 << ",Post=" << std::setw(2) << 102 << "#SpawnTotal=" << std::setw( 103 << G4endl; 104 105 for (size_t lp1 = (*fSecondary).size() 106 G4cout << " : " << std::setw(6) 107 << G4BestUnit((*fSecondary)[l 108 << G4BestUnit((*fSecondary)[l 109 << G4BestUnit((*fSecondary)[l 110 << G4BestUnit((*fSecondary)[l 111 << (*fSecondary)[lp1]->GetDef 112 G4cout << G4endl; 113 } 114 115 G4cout << " :---------------------- 116 << "--------------------------- 117 << "-- EndOf2ndaries Info ----- 118 } 119 } 120 } 121 G4cout.precision(prec); 122 } 123 124 //....oooOO0OOooo........oooOO0OOooo........oo 125 126 void F01SteppingVerbose::TrackingStarted() 127 { 128 CopyState(); 129 G4int prec = G4cout.precision(6); 130 if (verboseLevel > 0) { 131 G4cout << std::setw(5) << "Step#" 132 << " " << std::setw(10) << "X" 133 << " " << std::setw(10) << "Y" 134 << " " << std::setw(10) << "Z" 135 << " " << std::setw(10) << "Dire 136 << " " << std::setw(10) << "dir y" 137 << " " << std::setw(10) << "dir z" 138 << " " << std::setw(10) << "KineE" 139 << " " << std::setw(10) << "dEStep" 140 << " " << std::setw(10) << "StepLen 141 << "Volume" 142 << " " << std::setw(10) << "Proces 143 144 G4cout << std::setw(5) << fTrack->GetCurre 145 << G4BestUnit(fTrack->GetPosition() 146 << G4BestUnit(fTrack->GetPosition() 147 << G4BestUnit(fTrack->GetPosition() 148 G4cout << std::setw(10) << fTrack->GetMome 149 << fTrack->GetMomentumDirection().y 150 << fTrack->GetMomentumDirection().z 151 G4cout << std::setw(8) << G4BestUnit(fTrac 152 << G4BestUnit(fStep->GetTotalEnergy 153 << G4BestUnit(fStep->GetStepLength( 154 << G4BestUnit(fTrack->GetTrackLengt 155 156 if (fTrack->GetNextVolume()) { 157 G4cout << std::setw(10) << fTrack->GetVo 158 } 159 else { 160 G4cout << std::setw(10) << "OutOfWorld"; 161 } 162 G4cout << " initStep" << G4endl; 163 } 164 G4cout.precision(prec); 165 } 166 167 //....oooOO0OOooo........oooOO0OOooo........oo 168