Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // >> 26 // $Id$ 26 // 27 // 27 /// \file RE05/src/RE05SteppingVerbose.cc 28 /// \file RE05/src/RE05SteppingVerbose.cc 28 /// \brief Implementation of the RE05SteppingV 29 /// \brief Implementation of the RE05SteppingVerbose class 29 // 30 // 30 31 31 //....oooOO0OOooo........oooOO0OOooo........oo 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 //....oooOO0OOooo........oooOO0OOooo........oo 33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 33 34 34 #include "RE05SteppingVerbose.hh" 35 #include "RE05SteppingVerbose.hh" 35 36 36 #include "G4SteppingManager.hh" 37 #include "G4SteppingManager.hh" 37 #include "G4UnitsTable.hh" 38 #include "G4UnitsTable.hh" 38 39 39 //....oooOO0OOooo........oooOO0OOooo........oo 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 40 41 41 RE05SteppingVerbose::RE05SteppingVerbose() : G << 42 RE05SteppingVerbose::RE05SteppingVerbose() >> 43 : G4SteppingVerbose() >> 44 {} 42 45 43 //....oooOO0OOooo........oooOO0OOooo........oo 46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 44 47 45 RE05SteppingVerbose::~RE05SteppingVerbose() {} << 48 RE05SteppingVerbose::~RE05SteppingVerbose() 46 << 49 {} >> 50 47 //....oooOO0OOooo........oooOO0OOooo........oo 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 48 52 49 void RE05SteppingVerbose::StepInfo() 53 void RE05SteppingVerbose::StepInfo() 50 { 54 { 51 CopyState(); 55 CopyState(); 52 << 56 53 G4int prec = G4cout.precision(3); 57 G4int prec = G4cout.precision(3); 54 58 55 if (verboseLevel >= 1) { << 59 if( verboseLevel >= 1 ){ 56 if (verboseLevel >= 4) VerboseTrack(); << 60 if( verboseLevel >= 4 ) VerboseTrack(); 57 if (verboseLevel >= 3) { << 61 if( verboseLevel >= 3 ){ 58 G4cout << G4endl; << 62 G4cout << G4endl; 59 G4cout << std::setw(5) << "#Step#" << 63 G4cout << std::setw( 5) << "#Step#" << " " 60 << " " << std::setw(6) << "X" << 64 << std::setw( 6) << "X" << " " 61 << " " << std::setw(6) << "Y" << 65 << std::setw( 6) << "Y" << " " 62 << " " << std::setw(6) << "Z" << 66 << std::setw( 6) << "Z" << " " 63 << " " << std::setw(9) << "Kin << 67 << std::setw( 9) << "KineE" << " " 64 << " " << std::setw(9) << "dEStep << 68 << std::setw( 9) << "dEStep" << " " 65 << " " << std::setw(10) << "StepL << 69 << std::setw(10) << "StepLeng" 66 << "Volume" << 70 << std::setw(10) << "TrakLeng" 67 << " " << std::setw(10) << "Proc << 71 << std::setw(10) << "Volume" << " " 68 } << 72 << std::setw(10) << "Process" << G4endl; 69 << 73 } 70 G4cout << std::setw(5) << fTrack->GetCurre << 74 71 << G4BestUnit(fTrack->GetPosition() << 75 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " 72 << G4BestUnit(fTrack->GetPosition() << 76 << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length") 73 << G4BestUnit(fTrack->GetPosition() << 77 << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length") 74 << G4BestUnit(fTrack->GetKineticEne << 78 << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length") 75 << G4BestUnit(fStep->GetTotalEnergy << 79 << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") 76 << G4BestUnit(fStep->GetStepLength( << 80 << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") 77 << G4BestUnit(fTrack->GetTrackLengt << 81 << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length") >> 82 << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length") >> 83 << " "; 78 84 79 // if( fStepStatus != fWorldBoundary){ << 85 // if( fStepStatus != fWorldBoundary){ 80 if (fTrack->GetNextVolume() != 0) { << 86 if( fTrack->GetNextVolume() != 0 ) { 81 G4cout << std::setw(10) << fTrack->GetVo 87 G4cout << std::setw(10) << fTrack->GetVolume()->GetName(); 82 } << 88 } else { 83 else { << 84 G4cout << std::setw(10) << "OutOfWorld"; 89 G4cout << std::setw(10) << "OutOfWorld"; 85 } 90 } 86 91 87 if (fStep->GetPostStepPoint()->GetProcessD << 92 if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){ 88 G4cout << " " << std::setw(10) << 93 G4cout << " " 89 << fStep->GetPostStepPoint()->Get << 94 << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep() 90 } << 95 ->GetProcessName(); 91 else { << 96 } else { 92 G4cout << " UserLimit"; 97 G4cout << " UserLimit"; 93 } 98 } 94 99 95 G4cout << G4endl; 100 G4cout << G4endl; 96 101 97 if (verboseLevel == 2) { << 102 if( verboseLevel == 2 ){ 98 G4int tN2ndariesTot = fN2ndariesAtRestDo << 103 G4int tN2ndariesTot = fN2ndariesAtRestDoIt + 99 if (tN2ndariesTot > 0) { << 104 fN2ndariesAlongStepDoIt + >> 105 fN2ndariesPostStepDoIt; >> 106 if(tN2ndariesTot>0){ 100 G4cout << " :----- List of 2ndaries 107 G4cout << " :----- List of 2ndaries - " 101 << "#SpawnInStep=" << std::setw << 108 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot 102 << fN2ndariesAtRestDoIt << ",Al << 109 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt 103 << ",Post=" << std::setw(2) << << 110 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt 104 << "#SpawnTotal=" << std::setw( << 111 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt >> 112 << "), " >> 113 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size() >> 114 << " ---------------" 105 << G4endl; 115 << G4endl; 106 116 107 for (size_t lp1 = (*fSecondary).size() << 117 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; 108 G4cout << " : " << std::setw(6) << 118 lp1<(*fSecondary).size(); lp1++){ 109 << G4BestUnit((*fSecondary)[l << 119 G4cout << " : " 110 << G4BestUnit((*fSecondary)[l << 120 << std::setw(6) 111 << G4BestUnit((*fSecondary)[l << 121 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") 112 << G4BestUnit((*fSecondary)[l << 122 << std::setw(6) >> 123 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") >> 124 << std::setw(6) >> 125 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") >> 126 << std::setw(6) >> 127 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") >> 128 << std::setw(10) 113 << (*fSecondary)[lp1]->GetDef 129 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName(); 114 G4cout << G4endl; 130 G4cout << G4endl; 115 } 131 } 116 << 132 117 G4cout << " :---------------------- 133 G4cout << " :-----------------------------" 118 << "--------------------------- 134 << "----------------------------------" 119 << "-- EndOf2ndaries Info ----- << 135 << "-- EndOf2ndaries Info ---------------" >> 136 << G4endl; 120 } 137 } 121 } 138 } >> 139 122 } 140 } 123 G4cout.precision(prec); 141 G4cout.precision(prec); 124 } 142 } 125 143 126 //....oooOO0OOooo........oooOO0OOooo........oo 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 127 145 128 void RE05SteppingVerbose::TrackingStarted() 146 void RE05SteppingVerbose::TrackingStarted() 129 { 147 { >> 148 130 CopyState(); 149 CopyState(); 131 G4int prec = G4cout.precision(3); << 150 G4int prec = G4cout.precision(3); 132 if (verboseLevel > 0) { << 151 if( verboseLevel > 0 ){ 133 G4cout << std::setw(5) << "Step#" << 152 134 << " " << std::setw(6) << "X" << 153 G4cout << std::setw( 5) << "Step#" << " " 135 << " " << std::setw(6) << "Y" << 154 << std::setw( 6) << "X" << " " 136 << " " << std::setw(6) << "Z" << 155 << std::setw( 6) << "Y" << " " 137 << " " << std::setw(9) << "KineE << 156 << std::setw( 6) << "Z" << " " 138 << " " << std::setw(9) << "dEStep" << 157 << std::setw( 9) << "KineE" << " " 139 << " " << std::setw(10) << "StepLen << 158 << std::setw( 9) << "dEStep" << " " 140 << "Volume" << 159 << std::setw(10) << "StepLeng" 141 << " " << std::setw(10) << "Proces << 160 << std::setw(10) << "TrakLeng" 142 << 161 << std::setw(10) << "Volume" << " " 143 G4cout << std::setw(5) << fTrack->GetCurre << 162 << std::setw(10) << "Process" << G4endl; 144 << G4BestUnit(fTrack->GetPosition() << 163 145 << G4BestUnit(fTrack->GetPosition() << 164 G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " 146 << G4BestUnit(fTrack->GetPosition() << 165 << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length") 147 << G4BestUnit(fTrack->GetKineticEne << 166 << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length") 148 << G4BestUnit(fStep->GetTotalEnergy << 167 << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length") 149 << G4BestUnit(fStep->GetStepLength( << 168 << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") 150 << G4BestUnit(fTrack->GetTrackLengt << 169 << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") >> 170 << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length") >> 171 << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length") >> 172 << " "; 151 173 152 if (fTrack->GetNextVolume()) { << 174 if(fTrack->GetNextVolume()){ 153 G4cout << std::setw(10) << fTrack->GetVo 175 G4cout << std::setw(10) << fTrack->GetVolume()->GetName(); 154 } << 176 } else { 155 else { << 156 G4cout << std::setw(10) << "OutOfWorld"; 177 G4cout << std::setw(10) << "OutOfWorld"; 157 } 178 } 158 G4cout << " initStep" << G4endl; << 179 G4cout << " initStep" << G4endl; 159 } 180 } 160 G4cout.precision(prec); 181 G4cout.precision(prec); 161 } 182 } 162 183 163 //....oooOO0OOooo........oooOO0OOooo........oo 184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 164 185