00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "G4SteppingVerbose.hh"
00043 #include "G4SteppingManager.hh"
00044 #include "G4SystemOfUnits.hh"
00045 #include "G4VSensitiveDetector.hh"
00046 #include "G4StepStatus.hh"
00047
00049
00050 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00051 #include "G4UnitsTable.hh"
00052 #else
00053 #define G4BestUnit(a,b) a
00054 #endif
00055
00057 G4SteppingVerbose::G4SteppingVerbose()
00059 {
00060 #ifdef G4_TRACKING_DEBUG
00061 G4cout << "G4SteppingVerbose has instantiated" << G4endl;
00062 #endif
00063 }
00064
00066 G4SteppingVerbose::~G4SteppingVerbose()
00068 {
00069 }
00070
00072 void G4SteppingVerbose::NewStep()
00074 {
00075 }
00076
00078 void G4SteppingVerbose::AtRestDoItInvoked()
00080 {
00081 if(Silent==1){ return; }
00082
00083 G4VProcess* ptProcManager;
00084 CopyState();
00085
00086 if(verboseLevel >= 3 ){
00087 G4int npt=0;
00088 G4cout << " **List of AtRestDoIt invoked:" << G4endl;
00089 for(size_t np=0; np < MAXofAtRestLoops; np++){
00090 size_t npGPIL = MAXofAtRestLoops-np-1;
00091 if( (*fSelectedAtRestDoItVector)[npGPIL] == 2 ){
00092 npt++;
00093 ptProcManager = (*fAtRestDoItVector)[np];
00094 G4cout << " # " << npt << " : "
00095 << ptProcManager->GetProcessName()
00096 << " (Forced)" << G4endl;
00097 } else if ( (*fSelectedAtRestDoItVector)[npGPIL] == 1 ){
00098 npt++;
00099 ptProcManager = (*fAtRestDoItVector)[np];
00100 G4cout << " # " << npt << " : " << ptProcManager->GetProcessName() << G4endl;
00101 }
00102 }
00103
00104 G4cout << " Generated secondries # : " << fN2ndariesAtRestDoIt << G4endl;
00105
00106 if( fN2ndariesAtRestDoIt > 0 ){
00107 G4cout << " -- List of secondaries generated : " << "(x,y,z,kE,t,PID) --" << G4endl;
00108 for( size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
00109 lp1<(*fSecondary).size(); lp1++) {
00110 G4cout << " "
00111 << std::setw( 9)
00112 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
00113 << std::setw( 9)
00114 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
00115 << std::setw( 9)
00116 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
00117 << std::setw( 9)
00118 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
00119 << std::setw( 9)
00120 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
00121 << std::setw(18)
00122 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00123 }
00124 }
00125 }
00126
00127 if( verboseLevel >= 4 ){
00128 ShowStep();
00129 G4cout << G4endl;
00130 }
00131 }
00133 void G4SteppingVerbose::AlongStepDoItAllDone()
00135 {
00136 if(Silent==1){ return; }
00137
00138 G4VProcess* ptProcManager;
00139
00140 CopyState();
00141
00142 if(verboseLevel >= 3){
00143 G4cout << G4endl;
00144 G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
00145 G4cout << " ++List of invoked processes " << G4endl;
00146
00147 for(size_t ci=0; ci<MAXofAlongStepLoops; ci++){
00148 ptProcManager = (*fAlongStepDoItVector)(ci);
00149 G4cout << " " << ci+1 << ") ";
00150 if(ptProcManager != 0){
00151 G4cout << ptProcManager->GetProcessName() << G4endl;
00152 }
00153 }
00154
00155 ShowStep();
00156 G4cout << G4endl;
00157 G4cout << " ++List of secondaries generated "
00158 << "(x,y,z,kE,t,PID):"
00159 << " No. of secodaries = "
00160 << (*fSecondary).size() << G4endl;
00161
00162 if((*fSecondary).size()>0){
00163 for(size_t lp1=0; lp1<(*fSecondary).size(); lp1++){
00164 G4cout << " "
00165 << std::setw( 9)
00166 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length") << " "
00167 << std::setw( 9)
00168 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length") << " "
00169 << std::setw( 9)
00170 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length") << " "
00171 << std::setw( 9)
00172 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy") << " "
00173 << std::setw( 9)
00174 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time") << " "
00175 << std::setw(18)
00176 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00177 }
00178 }
00179 }
00180 }
00182 void G4SteppingVerbose::PostStepDoItAllDone()
00184 {
00185 if(Silent==1){ return; }
00186
00187 G4VProcess* ptProcManager;
00188
00189 CopyState();
00190
00191 if( (fStepStatus == fPostStepDoItProc) |
00192 (fCondition == Forced) |
00193 (fCondition == Conditionally) |
00194 (fCondition == ExclusivelyForced) |
00195 (fCondition == StronglyForced) ){
00196
00197 if(verboseLevel >= 3){
00198 G4int npt=0;
00199 G4cout << G4endl;
00200 G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
00201 G4cout << " ++List of invoked processes " << G4endl;
00202
00203 for(size_t np=0; np < MAXofPostStepLoops; np++){
00204 size_t npGPIL = MAXofPostStepLoops-np-1;
00205 if( (*fSelectedPostStepDoItVector)[npGPIL] == 2){
00206 npt++;
00207 ptProcManager = (*fPostStepDoItVector)[np];
00208 G4cout << " " << npt << ") "
00209 << ptProcManager->GetProcessName()
00210 << " (Forced)" << G4endl;
00211 } else if ( (*fSelectedPostStepDoItVector)[npGPIL] == 1){
00212 npt++;
00213 ptProcManager = (*fPostStepDoItVector)[np];
00214 G4cout << " " << npt << ") " << ptProcManager->GetProcessName() << G4endl;
00215 }
00216 }
00217
00218 ShowStep();
00219 G4cout << G4endl;
00220 G4cout << " ++List of secondaries generated "
00221 << "(x,y,z,kE,t,PID):"
00222 << " No. of secodaries = "
00223 << (*fSecondary).size() << G4endl;
00224 G4cout << " [Note]Secondaries from AlongStepDoIt included." << G4endl;
00225
00226 if((*fSecondary).size()>0){
00227 for(size_t lp1=0; lp1<(*fSecondary).size(); lp1++){
00228 G4cout << " "
00229 << std::setw( 9)
00230 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length") << " "
00231 << std::setw( 9)
00232 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length") << " "
00233 << std::setw( 9)
00234 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
00235 << std::setw( 9)
00236 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy") << " "
00237 << std::setw( 9)
00238 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime() , "Time") << " "
00239 << std::setw(18)
00240 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00241 }
00242 }
00243 }
00244 }
00245 }
00246
00248 void G4SteppingVerbose::StepInfo()
00250 {
00251 if(Silent==1){ return; }
00252 if(SilentStepInfo==1){ return; }
00253
00254 CopyState();
00255 G4cout.precision(16);
00256 G4int prec = G4cout.precision(3);
00257
00258 if( verboseLevel >= 1 ){
00259 if( verboseLevel >= 4 ) VerboseTrack();
00260 if( verboseLevel >= 3 ){
00261 G4cout << G4endl;
00262 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00263 G4cout << std::setw( 5) << "#Step#" << " "
00264 << std::setw( 8) << "X" << " " << std::setw( 8) << "Y" << " "
00265 << std::setw( 8) << "Z" << " "
00266 << std::setw( 9) << "KineE" << " " << std::setw( 8) << "dE" << " "
00267 << std::setw(12) << "StepLeng" << " " << std::setw(12) << "TrackLeng" << " "
00268 << std::setw(12) << "NextVolume" << " " << std::setw( 8) << "ProcName" << G4endl;
00269 #else
00270 G4cout << std::setw( 5) << "#Step#" << " "
00271 << std::setw( 8) << "X(mm)" << " " << std::setw( 8) << "Y(mm)" << " "
00272 << std::setw( 8) << "Z(mm)" << " "
00273 << std::setw( 9) << "KinE(MeV)" << " " << std::setw( 8) << "dE(MeV)" << " "
00274 << std::setw( 8) << "StepLeng" << " " << std::setw( 9) << "TrackLeng" << " "
00275 << std::setw(11) << "NextVolume" << " " << std::setw( 8) << "ProcName" << G4endl;
00276 #endif
00277 }
00278 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
00279 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().x() , "Length") << " "
00280 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().y() , "Length") << " "
00281 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().z() , "Length") << " "
00282 << std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy() , "Energy") << " "
00283 << std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
00284 << std::setw( 8) << G4BestUnit(fStep->GetStepLength() , "Length") << " "
00285 << std::setw( 9) << G4BestUnit(fTrack->GetTrackLength() , "Length") << " ";
00286
00287
00288 if( fTrack->GetNextVolume() != 0 ) {
00289 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
00290 } else {
00291 G4cout << std::setw(11) << "OutOfWorld" << " ";
00292 }
00293 if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0){
00294 G4cout << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
00295 } else {
00296 G4cout << "User Limit";
00297 }
00298 G4cout << G4endl;
00299 if( verboseLevel == 2 )
00300 {
00301 G4int tN2ndariesTot = fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt + fN2ndariesPostStepDoIt;
00302 if(tN2ndariesTot>0){
00303 G4cout << " :----- List of 2ndaries - "
00304 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
00305 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
00306 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
00307 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
00308 << "), "
00309 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
00310 << " ---------------"
00311 << G4endl;
00312
00313 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; lp1<(*fSecondary).size(); lp1++){
00314 G4cout << " : "
00315 << std::setw( 9)
00316 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
00317 << std::setw( 9)
00318 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
00319 << std::setw( 9)
00320 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length") << " "
00321 << std::setw( 9)
00322 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
00323 << std::setw(18)
00324 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00325 }
00326 G4cout << " :-----------------------------" << "----------------------------------"
00327 << "-- EndOf2ndaries Info ---------------" << G4endl;
00328 }
00329 }
00330 }
00331 G4cout.precision(prec);
00332 }
00333
00334
00336 void G4SteppingVerbose::DPSLStarted()
00338 {
00339 if(Silent==1){ return; }
00340 CopyState();
00341
00342 if( verboseLevel > 5 ){
00343 G4cout << G4endl << " >>DefinePhysicalStepLength (List of proposed StepLengths): " << G4endl;
00344 }
00345 }
00347 void G4SteppingVerbose::DPSLUserLimit()
00349 {
00350 if(Silent==1){ return; }
00351 CopyState();
00352
00353 if( verboseLevel > 5 ){
00354 G4cout << G4endl << G4endl;
00355 G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
00356 G4cout << " ++ProposedStep(UserLimit) = " << std::setw( 9) << physIntLength
00357 << " : ProcName = User defined maximum allowed Step" << G4endl;
00358 }
00359 }
00361 void G4SteppingVerbose::DPSLPostStep()
00363 {
00364 if(Silent==1){ return; }
00365 CopyState();
00366
00367 if( verboseLevel > 5 ){
00368 G4cout << " ++ProposedStep(PostStep ) = " << std::setw( 9) << physIntLength
00369 << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
00370 if(fCondition==ExclusivelyForced){
00371 G4cout << "ExclusivelyForced)" << G4endl;
00372 }
00373 else if(fCondition==StronglyForced){
00374 G4cout << "StronglyForced)" << G4endl;
00375 }
00376 else if(fCondition==Conditionally){
00377 G4cout << "Conditionally)" << G4endl;
00378 }
00379 else if(fCondition==Forced){
00380 G4cout << "Forced)" << G4endl;
00381 }
00382 else{
00383 G4cout << "No ForceCondition)" << G4endl;
00384 }
00385 }
00386 }
00388 void G4SteppingVerbose::DPSLAlongStep()
00390 {
00391 if(Silent==1){ return; }
00392 CopyState();
00393
00394 if( verboseLevel > 5 ){
00395 G4cout << " ++ProposedStep(AlongStep) = "
00396 << std::setw( 9) << G4BestUnit(physIntLength , "Length")
00397 << " : ProcName = "
00398 << fCurrentProcess->GetProcessName()
00399 << " (";
00400 if(fGPILSelection==CandidateForSelection){
00401 G4cout << "CandidateForSelection)" << G4endl;
00402 }
00403 else if(fGPILSelection==NotCandidateForSelection){
00404 G4cout << "NotCandidateForSelection)" << G4endl;
00405 }
00406 else{
00407 G4cout << "?!?)" << G4endl;
00408 }
00409 }
00410 }
00411
00412
00414 void G4SteppingVerbose::TrackingStarted()
00416 {
00417 if(Silent==1){ return; }
00418
00419 CopyState();
00420
00421 G4int prec = G4cout.precision(3);
00422 if( verboseLevel > 0 ){
00423
00424 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00425 G4cout << std::setw( 5) << "Step#" << " "
00426 << std::setw( 8) << "X" << " "
00427 << std::setw( 8) << "Y" << " "
00428 << std::setw( 8) << "Z" << " "
00429 << std::setw( 9) << "KineE" << " "
00430 << std::setw( 8) << "dE" << " "
00431 << std::setw(12) << "StepLeng" << " "
00432 << std::setw(12) << "TrackLeng" << " "
00433 << std::setw(12) << "NextVolume" << " "
00434 << std::setw( 8) << "ProcName" << G4endl;
00435 #else
00436 G4cout << std::setw( 5) << "Step#" << " "
00437 << std::setw( 8) << "X(mm)" << " "
00438 << std::setw( 8) << "Y(mm)" << " "
00439 << std::setw( 8) << "Z(mm)" << " "
00440 << std::setw( 9) << "KinE(MeV)" << " "
00441 << std::setw( 8) << "dE(MeV)" << " "
00442 << std::setw( 8) << "StepLeng" << " "
00443 << std::setw( 9) << "TrackLeng" << " "
00444 << std::setw(11) << "NextVolume" << " "
00445 << std::setw( 8) << "ProcName" << G4endl;
00446 #endif
00447
00448 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
00449 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().x(),"Length")<< " "
00450 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
00451 << std::setw( 8) << G4BestUnit(fTrack->GetPosition().z(),"Length")<< " "
00452 << std::setw( 9) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< " "
00453 << std::setw( 8) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
00454 << std::setw( 8) << G4BestUnit(fStep->GetStepLength(),"Length")<< " "
00455 << std::setw( 9) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
00456
00457 if(fTrack->GetNextVolume()){
00458 G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
00459 } else {
00460 G4cout << std::setw(11) << "OutOfWorld" << " ";
00461 }
00462 G4cout << "initStep" << G4endl;
00463 }
00464 G4cout.precision(prec);
00465 }
00467 void G4SteppingVerbose::AlongStepDoItOneByOne()
00469 {
00470 if(Silent==1){ return; }
00471
00472 CopyState();
00473
00474 if(verboseLevel >= 4){
00475 G4cout << G4endl;
00476 G4cout << " >>AlongStepDoIt (process by process): "
00477 << " Process Name = "
00478 << fCurrentProcess->GetProcessName() << G4endl;
00479
00480 ShowStep();
00481 G4cout << " "
00482 << "!Note! Safety of PostStep is only valid "
00483 << "after all DoIt invocations."
00484 << G4endl;
00485
00486 VerboseParticleChange();
00487 G4cout << G4endl;
00488
00489 G4cout << " ++List of secondaries generated "
00490 << "(x,y,z,kE,t,PID):"
00491 << " No. of secodaries = "
00492 << fN2ndariesAlongStepDoIt << G4endl;
00493
00494 if(fN2ndariesAlongStepDoIt>0){
00495 for(size_t lp1=(*fSecondary).size()-fN2ndariesAlongStepDoIt; lp1<(*fSecondary).size(); lp1++){
00496 G4cout << " "
00497 << std::setw( 9)
00498 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
00499 << std::setw( 9)
00500 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y() , "Length")<< " "
00501 << std::setw( 9)
00502 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z() , "Length")<< " "
00503 << std::setw( 9)
00504 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy() , "Energy")<< " "
00505 << std::setw( 9)
00506 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime() , "Time")<< " "
00507 << std::setw(18)
00508 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00509 }
00510 }
00511 }
00512 }
00514 void G4SteppingVerbose::PostStepDoItOneByOne()
00516 {
00517 if(Silent==1){ return; }
00518
00519 CopyState();
00520
00521 if(verboseLevel >= 4){
00522 G4cout << G4endl;
00523 G4cout << " >>PostStepDoIt (process by process): "
00524 << " Process Name = "
00525 << fCurrentProcess->GetProcessName() << G4endl;
00526
00527 ShowStep();
00528 G4cout << G4endl;
00529 VerboseParticleChange();
00530 G4cout << G4endl;
00531
00532 G4cout << " ++List of secondaries generated "
00533 << "(x,y,z,kE,t,PID):"
00534 << " No. of secodaries = "
00535 << fN2ndariesPostStepDoIt << G4endl;
00536
00537 if(fN2ndariesPostStepDoIt>0){
00538 for(size_t lp1=(*fSecondary).size()-fN2ndariesPostStepDoIt; lp1<(*fSecondary).size(); lp1++){
00539 G4cout << " "
00540 << std::setw( 9)
00541 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x() , "Length")<< " "
00542 << std::setw( 9)
00543 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length") << " "
00544 << std::setw( 9)
00545 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length") << " "
00546 << std::setw( 9)
00547 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy") << " "
00548 << std::setw( 9)
00549 << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time") << " "
00550 << std::setw(18)
00551 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName() << G4endl;
00552 }
00553 }
00554 }
00555 }
00556
00557
00559 void G4SteppingVerbose::VerboseTrack()
00561 {
00562 if(Silent==1){ return; }
00563
00564 CopyState();
00565
00566 G4cout << G4endl;
00567 G4cout << " ++G4Track Information " << G4endl;
00568 G4int prec = G4cout.precision(3);
00569
00570
00571 G4cout << " -----------------------------------------------"
00572 << G4endl;
00573 G4cout << " G4Track Information " << std::setw(20) << G4endl;
00574 G4cout << " -----------------------------------------------"
00575 << G4endl;
00576
00577 G4cout << " Step number : "
00578 << std::setw(20) << fTrack->GetCurrentStepNumber()
00579 << G4endl;
00580 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00581 G4cout << " Position - x : "
00582 << std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
00583 << G4endl;
00584 G4cout << " Position - y : "
00585 << std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
00586 << G4endl;
00587 G4cout << " Position - z : "
00588 << std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
00589 << G4endl;
00590 G4cout << " Global Time : "
00591 << std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
00592 << G4endl;
00593 G4cout << " Local Time : "
00594 << std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
00595 << G4endl;
00596 #else
00597 G4cout << " Position - x (mm) : "
00598 << std::setw(20) << fTrack->GetPosition().x() /mm
00599 << G4endl;
00600 G4cout << " Position - y (mm) : "
00601 << std::setw(20) << fTrack->GetPosition().y() /mm
00602 << G4endl;
00603 G4cout << " Position - z (mm) : "
00604 << std::setw(20) << fTrack->GetPosition().z() /mm
00605 << G4endl;
00606 G4cout << " Global Time (ns) : "
00607 << std::setw(20) << fTrack->GetGlobalTime() /ns
00608 << G4endl;
00609 G4cout << " Local Time (ns) : "
00610 << std::setw(20) << fTrack->GetLocalTime() /ns
00611 << G4endl;
00612 #endif
00613 G4cout << " Momentum Direct - x : "
00614 << std::setw(20) << fTrack->GetMomentumDirection().x()
00615 << G4endl;
00616 G4cout << " Momentum Direct - y : "
00617 << std::setw(20) << fTrack->GetMomentumDirection().y()
00618 << G4endl;
00619 G4cout << " Momentum Direct - z : "
00620 << std::setw(20) << fTrack->GetMomentumDirection().z()
00621 << G4endl;
00622 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00623 G4cout << " Kinetic Energy : "
00624 #else
00625 G4cout << " Kinetic Energy (MeV): "
00626 #endif
00627 << std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
00628 << G4endl;
00629 G4cout << " Polarization - x : "
00630 << std::setw(20) << fTrack->GetPolarization().x()
00631 << G4endl;
00632 G4cout << " Polarization - y : "
00633 << std::setw(20) << fTrack->GetPolarization().y()
00634 << G4endl;
00635 G4cout << " Polarization - z : "
00636 << std::setw(20) << fTrack->GetPolarization().z()
00637 << G4endl;
00638 G4cout << " Track Length : "
00639 << std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
00640 << G4endl;
00641 G4cout << " Track ID # : "
00642 << std::setw(20) << fTrack->GetTrackID()
00643 << G4endl;
00644 G4cout << " Parent Track ID # : "
00645 << std::setw(20) << fTrack->GetParentID()
00646 << G4endl;
00647 G4cout << " Next Volume : "
00648 << std::setw(20);
00649 if( fTrack->GetNextVolume() != 0 ) {
00650 G4cout << fTrack->GetNextVolume()->GetName() << " ";
00651 } else {
00652 G4cout << "OutOfWorld" << " ";
00653 }
00654 G4cout << G4endl;
00655 G4cout << " Track Status : "
00656 << std::setw(20);
00657 if( fTrack->GetTrackStatus() == fAlive ){
00658 G4cout << " Alive";
00659 } else if( fTrack->GetTrackStatus() == fStopButAlive ){
00660 G4cout << " StopButAlive";
00661 } else if( fTrack->GetTrackStatus() == fStopAndKill ){
00662 G4cout << " StopAndKill";
00663 } else if( fTrack->GetTrackStatus() == fKillTrackAndSecondaries ){
00664 G4cout << " KillTrackAndSecondaries";
00665 } else if( fTrack->GetTrackStatus() == fSuspend ){
00666 G4cout << " Suspend";
00667 } else if( fTrack->GetTrackStatus() == fPostponeToNextEvent ){
00668 G4cout << " PostponeToNextEvent";
00669 }
00670 G4cout << G4endl;
00671 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00672 G4cout << " Vertex - x : "
00673 << std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
00674 << G4endl;
00675 G4cout << " Vertex - y : "
00676 << std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
00677 << G4endl;
00678 G4cout << " Vertex - z : "
00679 << std::setw(20) << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
00680 << G4endl;
00681 #else
00682 G4cout << " Vertex - x (mm) : "
00683 << std::setw(20) << fTrack->GetVertexPosition().x()/mm
00684 << G4endl;
00685 G4cout << " Vertex - y (mm) : "
00686 << std::setw(20) << fTrack->GetVertexPosition().y()/mm
00687 << G4endl;
00688 G4cout << " Vertex - z (mm) : "
00689 << std::setw(20) << fTrack->GetVertexPosition().z()/mm
00690 << G4endl;
00691 #endif
00692 G4cout << " Vertex - Px (MomDir): "
00693 << std::setw(20) << fTrack->GetVertexMomentumDirection().x()
00694 << G4endl;
00695 G4cout << " Vertex - Py (MomDir): "
00696 << std::setw(20) << fTrack->GetVertexMomentumDirection().y()
00697 << G4endl;
00698 G4cout << " Vertex - Pz (MomDir): "
00699 << std::setw(20) << fTrack->GetVertexMomentumDirection().z()
00700 << G4endl;
00701 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
00702 G4cout << " Vertex - KineE : "
00703 #else
00704 G4cout << " Vertex - KineE (MeV): "
00705 #endif
00706 << std::setw(20) << G4BestUnit(fTrack->GetVertexKineticEnergy(),"Energy")
00707 << G4endl;
00708
00709 G4cout << " Creator Process : "
00710 << std::setw(20);
00711 if( fTrack->GetCreatorProcess() == 0){
00712 G4cout << " Event Generator" << G4endl;
00713 } else {
00714 G4cout << fTrack->GetCreatorProcess()->GetProcessName() << G4endl;
00715 }
00716
00717 G4cout << " -----------------------------------------------"
00718 << G4endl;
00719
00720 G4cout.precision(prec);
00721 }
00722
00723
00725 void G4SteppingVerbose::VerboseParticleChange()
00727 {
00728 if(Silent==1){ return; }
00729
00730 G4cout << G4endl;
00731 G4cout << " ++G4ParticleChange Information " << G4endl;
00732 fParticleChange->DumpInfo();
00733 }
00735 void G4SteppingVerbose::ShowStep() const
00737 {
00738 if(Silent==1){ return; }
00739 G4String volName;
00740 G4int oldprc;
00741
00742
00743 G4cout << G4endl;
00744 G4cout << " ++G4Step Information " << G4endl;
00745 oldprc = G4cout.precision(16);
00746
00747
00748 G4cout << " Address of G4Track : " << fStep->GetTrack() << G4endl;
00749 G4cout << " Step Length (mm) : " << fStep->GetTrack()->GetStepLength() << G4endl;
00750 G4cout << " Energy Deposit (MeV) : " << fStep->GetTotalEnergyDeposit() << G4endl;
00751
00752
00753 G4cout << " -------------------------------------------------------"
00754 << "----------------" << G4endl;
00755 G4cout << " StepPoint Information " << std::setw(20) << "PreStep"
00756 << std::setw(20) << "PostStep" << G4endl;
00757 G4cout << " -------------------------------------------------------"
00758 << "----------------" << G4endl;
00759 G4cout << " Position - x (mm) : "
00760 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().x()
00761 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().x() << G4endl;
00762 G4cout << " Position - y (mm) : "
00763 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().y()
00764 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().y() << G4endl;
00765 G4cout << " Position - z (mm) : "
00766 << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().z()
00767 << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().z() << G4endl;
00768 G4cout << " Global Time (ns) : "
00769 << std::setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
00770 << std::setw(20) << fStep->GetPostStepPoint()->GetGlobalTime() << G4endl;
00771 G4cout << " Local Time (ns) : "
00772 << std::setw(20) << fStep->GetPreStepPoint()->GetLocalTime()
00773 << std::setw(20) << fStep->GetPostStepPoint()->GetLocalTime() << G4endl;
00774 G4cout << " Proper Time (ns) : "
00775 << std::setw(20) << fStep->GetPreStepPoint()->GetProperTime()
00776 << std::setw(20) << fStep->GetPostStepPoint()->GetProperTime() << G4endl;
00777 G4cout << " Momentum Direct - x : "
00778 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
00779 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x() << G4endl;
00780 G4cout << " Momentum Direct - y : "
00781 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
00782 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y() << G4endl;
00783 G4cout << " Momentum Direct - z : "
00784 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
00785 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z() << G4endl;
00786 G4cout << " Momentum - x (MeV/c): "
00787 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
00788 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().x() << G4endl;
00789 G4cout << " Momentum - y (MeV/c): "
00790 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
00791 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().y() << G4endl;
00792 G4cout << " Momentum - z (MeV/c): "
00793 << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
00794 << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().z() << G4endl;
00795 G4cout << " Total Energy (MeV) : "
00796 << std::setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
00797 << std::setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy() << G4endl;
00798 G4cout << " Kinetic Energy (MeV): "
00799 << std::setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
00800 << std::setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy() << G4endl;
00801 G4cout << " Velocity (mm/ns) : "
00802 << std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
00803 << std::setw(20) << fStep->GetPostStepPoint()->GetVelocity() << G4endl;
00804 G4cout << " Volume Name : "
00805 << std::setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
00806 if (fStep->GetPostStepPoint()->GetPhysicalVolume())
00807 {
00808 volName = fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName();
00809 }
00810 else
00811 {
00812 volName = "OutOfWorld";
00813 }
00814 G4cout << std::setw(20) << volName << G4endl;
00815 G4cout << " Safety (mm) : "
00816 << std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
00817 << std::setw(20) << fStep->GetPostStepPoint()->GetSafety() << G4endl;
00818 G4cout << " Polarization - x : "
00819 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
00820 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x() << G4endl;
00821 G4cout << " Polarization - y : "
00822 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
00823 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y() << G4endl;
00824 G4cout << " Polarization - Z : "
00825 << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
00826 << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z() << G4endl;
00827 G4cout << " Weight : "
00828 << std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
00829 << std::setw(20) << fStep->GetPostStepPoint()->GetWeight() << G4endl;
00830 G4cout << " Step Status : " ;
00831 G4StepStatus tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
00832 if( tStepStatus == fGeomBoundary ){
00833 G4cout << std::setw(20) << "Geom Limit";
00834 } else if ( tStepStatus == fAlongStepDoItProc ){
00835 G4cout << std::setw(20) << "AlongStep Proc.";
00836 } else if ( tStepStatus == fPostStepDoItProc ){
00837 G4cout << std::setw(20) << "PostStep Proc";
00838 } else if ( tStepStatus == fAtRestDoItProc ){
00839 G4cout << std::setw(20) << "AtRest Proc";
00840 } else if ( tStepStatus == fUndefined ){
00841 G4cout << std::setw(20) << "Undefined";
00842 }
00843
00844 tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
00845 if( tStepStatus == fGeomBoundary ){
00846 G4cout << std::setw(20) << "Geom Limit";
00847 } else if ( tStepStatus == fAlongStepDoItProc ){
00848 G4cout << std::setw(20) << "AlongStep Proc.";
00849 } else if ( tStepStatus == fPostStepDoItProc ){
00850 G4cout << std::setw(20) << "PostStep Proc";
00851 } else if ( tStepStatus == fAtRestDoItProc ){
00852 G4cout << std::setw(20) << "AtRest Proc";
00853 } else if ( tStepStatus == fUndefined ){
00854 G4cout << std::setw(20) << "Undefined";
00855 }
00856
00857 G4cout << G4endl;
00858 G4cout << " Process defined Step: " ;
00859 if( fStep->GetPreStepPoint()->GetProcessDefinedStep() == 0 ){
00860 G4cout << std::setw(20) << "Undefined";
00861 } else {
00862 G4cout << std::setw(20) << fStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
00863 }
00864 if( fStep->GetPostStepPoint()->GetProcessDefinedStep() == 0){
00865 G4cout << std::setw(20) << "Undefined";
00866 } else {
00867 G4cout << std::setw(20) << fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
00868 }
00869 G4cout.precision(oldprc);
00870
00871 G4cout << G4endl;
00872 G4cout << " -------------------------------------------------------"
00873 << "----------------" << G4endl;
00874 }
00875
00876