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 /// \file field/field02/src/F02SteppingVerbose << 27 /// \brief Implementation of the F02SteppingVe << 28 // 26 // >> 27 // $Id: F02SteppingVerbose.cc,v 1.6 2006/06/29 17:18:31 gunter Exp $ >> 28 // GEANT4 tag $Name: geant4-08-01 $ 29 // 29 // 30 // 30 // >> 31 //--------------------------------------------------------------- 31 // 32 // 32 //....oooOO0OOooo........oooOO0OOooo........oo << 33 // F02SteppingVerbose.cc 33 //....oooOO0OOooo........oooOO0OOooo........oo << 34 // >> 35 // Description: >> 36 // Implementation of the F02SteppingVerbose class >> 37 // Contact: >> 38 // Questions and comments to this code should be sent to >> 39 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp) >> 40 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp) >> 41 // >> 42 //--------------------------------------------------------------- 34 43 35 #include "F02SteppingVerbose.hh" 44 #include "F02SteppingVerbose.hh" 36 << 37 #include "G4SteppingManager.hh" 45 #include "G4SteppingManager.hh" >> 46 38 #include "G4UnitsTable.hh" 47 #include "G4UnitsTable.hh" 39 48 40 //....oooOO0OOooo........oooOO0OOooo........oo << 49 //////////////////////////////////////////////// >> 50 F02SteppingVerbose::F02SteppingVerbose() >> 51 //////////////////////////////////////////////// >> 52 { >> 53 } >> 54 >> 55 ////////////////////////////////////////////////// >> 56 F02SteppingVerbose::~F02SteppingVerbose() >> 57 ////////////////////////////////////////////////// >> 58 { >> 59 } 41 60 >> 61 ///////////////////////////////////////// 42 void F02SteppingVerbose::StepInfo() 62 void F02SteppingVerbose::StepInfo() >> 63 ///////////////////////////////////////// 43 { 64 { 44 CopyState(); 65 CopyState(); 45 << 66 46 G4int prec = G4cout.precision(3); 67 G4int prec = G4cout.precision(3); 47 68 48 if (verboseLevel >= 1) { << 69 if( verboseLevel >= 1 ){ 49 if (verboseLevel >= 4) VerboseTrack(); << 70 if( verboseLevel >= 4 ) VerboseTrack(); 50 if (verboseLevel >= 3) { << 71 if( verboseLevel >= 3 ){ 51 G4cout << G4endl; << 72 G4cout << G4endl; 52 G4cout << std::setw(5) << "#Step#" << 73 G4cout << std::setw( 5) << "#Step#" << " " 53 << " " << std::setw(6) << "X" << 74 << std::setw( 6) << "X" << " " 54 << " " << std::setw(6) << "Y" << 75 << std::setw( 6) << "Y" << " " 55 << " " << std::setw(6) << "Z" << 76 << std::setw( 6) << "Z" << " " 56 << " " << std::setw(9) << "Kin << 77 << std::setw( 9) << "KineE" << " " 57 << " " << std::setw(9) << "dEStep << 78 << std::setw( 9) << "dEStep" << " " 58 << " " << std::setw(10) << "StepL << 79 << std::setw(10) << "StepLeng" 59 << "NextVolu" << std::setw(10) << << 80 << std::setw(10) << "TrakLeng" 60 } << 81 << std::setw(10) << "NextVolu" 61 << 82 << std::setw(10) << "Process" << G4endl; 62 G4cout << std::setw(5) << fTrack->GetCurre << 83 } 63 << G4BestUnit(fTrack->GetPosition() << 84 64 << G4BestUnit(fTrack->GetPosition() << 85 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " " 65 << G4BestUnit(fTrack->GetPosition() << 86 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length") 66 << G4BestUnit(fTrack->GetKineticEne << 87 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length") 67 << G4BestUnit(fStep->GetTotalEnergy << 88 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length") 68 << G4BestUnit(fStep->GetStepLength( << 89 << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") 69 << G4BestUnit(fTrack->GetTrackLengt << 90 << std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") >> 91 << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length") >> 92 << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length"); 70 93 71 if (fTrack->GetNextVolume() != nullptr) { << 94 // if( fStepStatus != fWorldBoundary){ >> 95 if( fTrack->GetNextVolume() != 0 ) { 72 G4cout << std::setw(10) << fTrack->GetNe 96 G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName(); 73 } << 97 } else { 74 else { << 75 G4cout << std::setw(10) << "OutOfWorld"; 98 G4cout << std::setw(10) << "OutOfWorld"; 76 } 99 } 77 100 78 if (fStep->GetPostStepPoint()->GetProcessD << 101 if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0){ 79 G4cout << std::setw(10) << 102 G4cout << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep() 80 << fStep->GetPostStepPoint()->Get << 103 ->GetProcessName(); 81 } << 104 } else { 82 else { << 105 G4cout << "User Limit"; 83 G4cout << " UserLimit"; << 84 } 106 } 85 107 86 G4cout << G4endl; 108 G4cout << G4endl; 87 109 88 if (verboseLevel == 2) { << 110 if( verboseLevel == 2 ){ 89 G4int tN2ndariesTot = fN2ndariesAtRestDo << 111 G4int tN2ndariesTot = fN2ndariesAtRestDoIt + 90 if (tN2ndariesTot > 0) { << 112 fN2ndariesAlongStepDoIt + 91 G4cout << " :----- List of 2ndaries << 113 fN2ndariesPostStepDoIt; 92 << "#SpawnInStep=" << std::setw << 114 if(tN2ndariesTot>0){ 93 << fN2ndariesAtRestDoIt << ",Al << 115 G4cout << " :----- List of 2ndaries - " 94 << ",Post=" << std::setw(2) << << 116 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot 95 << " ---------------" << G4endl << 117 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt 96 G4cout << " :---------------------- << 118 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt 97 << "--------------------------- << 119 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt 98 << "-- EndOf2ndaries Info ----- << 120 << "), " >> 121 << " ---------------" >> 122 << G4endl; >> 123 G4cout << " :-----------------------------" >> 124 << "----------------------------------" >> 125 << "-- EndOf2ndaries Info ---------------" >> 126 << G4endl; 99 } 127 } 100 } 128 } >> 129 101 } 130 } 102 G4cout.precision(prec); 131 G4cout.precision(prec); 103 } 132 } 104 133 105 //....oooOO0OOooo........oooOO0OOooo........oo << 134 //////////////////////////////////////////////// 106 << 107 void F02SteppingVerbose::TrackingStarted() 135 void F02SteppingVerbose::TrackingStarted() >> 136 //////////////////////////////////////////////// 108 { 137 { >> 138 109 CopyState(); 139 CopyState(); 110 G4int prec = G4cout.precision(3); << 140 G4int prec = G4cout.precision(3); 111 if (verboseLevel > 0) { << 141 if( verboseLevel > 0 ){ 112 G4cout << std::setw(5) << "Step#" << 142 113 << " " << std::setw(6) << "X" << 143 G4cout << std::setw( 5) << "Step#" << " " 114 << " " << std::setw(6) << "Y" << 144 << std::setw( 6) << "X" << " " 115 << " " << std::setw(6) << "Z" << 145 << std::setw( 6) << "Y" << " " 116 << " " << std::setw(9) << "KineE << 146 << std::setw( 6) << "Z" << " " 117 << " " << std::setw(9) << "dEStep" << 147 << std::setw( 9) << "KineE" << " " 118 << " " << std::setw(10) << "StepLen << 148 << std::setw( 9) << "dEStep" << " " 119 << "NextVolu" << std::setw(10) << " << 149 << std::setw(10) << "StepLeng" 120 << 150 << std::setw(10) << "TrakLeng" 121 G4cout << std::setw(5) << fTrack->GetCurre << 151 << std::setw(10) << "NextVolu" 122 << G4BestUnit(fTrack->GetPosition() << 152 << std::setw(10) << "Process" << G4endl; 123 << G4BestUnit(fTrack->GetPosition() << 153 124 << G4BestUnit(fTrack->GetPosition() << 154 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " " 125 << G4BestUnit(fTrack->GetKineticEne << 155 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length") 126 << G4BestUnit(fStep->GetTotalEnergy << 156 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length") 127 << G4BestUnit(fStep->GetStepLength( << 157 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length") 128 << G4BestUnit(fTrack->GetTrackLengt << 158 << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") >> 159 << std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") >> 160 << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length") >> 161 << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length"); 129 162 130 if (fTrack->GetNextVolume()) { << 163 if(fTrack->GetNextVolume()){ 131 G4cout << std::setw(10) << fTrack->GetNe 164 G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName() << " "; 132 } << 165 } else { 133 else { << 166 G4cout << std::setw(10) << "OutOfWorld" << " "; 134 G4cout << std::setw(10) << "OutOfWorld" << 135 << " "; << 136 } 167 } 137 G4cout << std::setw(10) << "initStep" << G 168 G4cout << std::setw(10) << "initStep" << G4endl; 138 } 169 } 139 G4cout.precision(prec); 170 G4cout.precision(prec); 140 } 171 } 141 << 142 //....oooOO0OOooo........oooOO0OOooo........oo << 143 172