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