Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/tracking/src/G4SteppingVerbose.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /tracking/src/G4SteppingVerbose.cc (Version 11.3.0) and /tracking/src/G4SteppingVerbose.cc (Version 10.7.p1)


  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 // G4SteppingVerbose class implementation          26 // G4SteppingVerbose class implementation
 27 //                                                 27 //
 28 // Contact:                                        28 // Contact:
 29 //   Questions and comments to this code shoul     29 //   Questions and comments to this code should be sent to
 30 //     Katsuya Amako  (e-mail: Katsuya.Amako@k     30 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
 31 //     Takashi Sasaki (e-mail: Takashi.Sasaki@     31 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
 32 // -------------------------------------------     32 // --------------------------------------------------------------------
 33                                                    33 
 34 #include "G4SteppingVerbose.hh"                    34 #include "G4SteppingVerbose.hh"
 35                                                << 
 36 #include "G4StepStatus.hh"  // Include from 't << 
 37 #include "G4SteppingManager.hh"                    35 #include "G4SteppingManager.hh"
 38 #include "G4SystemOfUnits.hh"                      36 #include "G4SystemOfUnits.hh"
 39 #include "G4VSensitiveDetector.hh"  // Include <<  37 #include "G4VSensitiveDetector.hh"    // Include from 'hits/digi'
                                                   >>  38 #include "G4StepStatus.hh"            // Include from 'tracking'
 40                                                    39 
 41 // #define G4_USE_G4BESTUNIT_FOR_VERBOSE 1         40 // #define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
 42                                                    41 
 43 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE               42 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
 44 #  include "G4UnitsTable.hh"                   <<  43 #include "G4UnitsTable.hh"
 45 #else                                              44 #else
 46 #  define G4BestUnit(a, b) a                   <<  45 #define G4BestUnit(a,b) a
 47 #endif                                             46 #endif
 48                                                    47 
 49 G4int G4SteppingVerbose::useBestUnitPrecision  <<  48 //////////////////////////////////////////////////
                                                   >>  49 G4SteppingVerbose::G4SteppingVerbose()
                                                   >>  50 //////////////////////////////////////////////////
                                                   >>  51 {
                                                   >>  52 #ifdef G4_TRACKING_DEBUG
                                                   >>  53   G4cout << "G4SteppingVerbose has instantiated" << G4endl;
                                                   >>  54 #endif
                                                   >>  55 }
                                                   >>  56 
                                                   >>  57 //////////////////////////////////////////////////
                                                   >>  58 G4SteppingVerbose::~G4SteppingVerbose()
                                                   >>  59 //////////////////////////////////////////////////
                                                   >>  60 {
                                                   >>  61 }
 50                                                    62 
 51 //////////////////////////////////////////////     63 //////////////////////////////////////////////////
 52 void G4SteppingVerbose::NewStep()                  64 void G4SteppingVerbose::NewStep()
 53 //////////////////////////////////////////////     65 //////////////////////////////////////////////////
 54 {}                                             <<  66 {
                                                   >>  67 }
 55                                                    68 
 56 //////////////////////////////////////////////     69 //////////////////////////////////////////////////
 57 void G4SteppingVerbose::AtRestDoItInvoked()        70 void G4SteppingVerbose::AtRestDoItInvoked()
 58 //////////////////////////////////////////////     71 //////////////////////////////////////////////////
 59 {                                                  72 {
 60   if (Silent == 1) {                           <<  73   if(Silent==1) { return; }
 61     return;                                    << 
 62   }                                            << 
 63                                                    74 
 64   G4VProcess* ptProcManager;                       75   G4VProcess* ptProcManager;
 65   CopyState();                                     76   CopyState();
 66                                                    77 
 67   if (verboseLevel >= 3) {                     <<  78   if(verboseLevel >= 3)
 68     G4int npt = 0;                             <<  79   {
                                                   >>  80     G4int npt=0;
 69     G4cout << " **List of AtRestDoIt invoked:"     81     G4cout << " **List of AtRestDoIt invoked:" << G4endl;
 70     for (std::size_t np = 0; np < MAXofAtRestL <<  82     for(std::size_t np=0; np<MAXofAtRestLoops; ++np)
 71       std::size_t npGPIL = MAXofAtRestLoops -  <<  83     {
 72       if ((*fSelectedAtRestDoItVector)[npGPIL] <<  84       std::size_t npGPIL = MAXofAtRestLoops-np-1;
 73         ++npt;                                 <<  85       if( (*fSelectedAtRestDoItVector)[npGPIL] == 2 )
 74         ptProcManager = (*fAtRestDoItVector)[( <<  86       {
 75         G4cout << "   # " << npt << " : " << p <<  87         ++npt;                
 76                << G4endl;                      <<  88         ptProcManager = (*fAtRestDoItVector)[np];
                                                   >>  89         G4cout << "   # " << npt << " : " 
                                                   >>  90                << ptProcManager->GetProcessName() 
                                                   >>  91                << " (Forced)" << G4endl;
 77       }                                            92       }
 78       else if ((*fSelectedAtRestDoItVector)[np <<  93       else if ( (*fSelectedAtRestDoItVector)[npGPIL] == 1 )
 79         ++npt;                                 <<  94       {
 80         ptProcManager = (*fAtRestDoItVector)[( <<  95         ++npt;                
 81         G4cout << "   # " << npt << " : " << p <<  96         ptProcManager = (*fAtRestDoItVector)[np];
                                                   >>  97         G4cout << "   # " << npt << " : "  << ptProcManager->GetProcessName()
                                                   >>  98                << G4endl;
 82       }                                            99       }
 83     }                                             100     }
 84                                                << 101      
 85     G4cout << "   Generated secondries # : " <    102     G4cout << "   Generated secondries # : " << fN2ndariesAtRestDoIt << G4endl;
 86                                                << 103      
 87     if (fN2ndariesAtRestDoIt > 0) {            << 104     if( fN2ndariesAtRestDoIt > 0 )
                                                   >> 105     {
 88       G4cout << "   -- List of secondaries gen    106       G4cout << "   -- List of secondaries generated : "
 89              << "(x,y,z,kE,t,PID) --" << G4end << 107              << "(x,y,z,kE,t,PID) --" << G4endl; 
 90       for (std::size_t lp1 = (*fSecondary).siz << 108       for( std::size_t lp1=(*fSecondary).size()-fN2ndariesAtRestDoIt;
 91            lp1 < (*fSecondary).size(); ++lp1)  << 109                        lp1<(*fSecondary).size(); ++lp1)
 92       {                                           110       {
 93         G4cout << "      " << std::setw(9)     << 111         G4cout << "      "
 94                << G4BestUnit((*fSecondary)[lp1 << 112                << std::setw( 9)
 95                << G4BestUnit((*fSecondary)[lp1 << 113                << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
 96                << G4BestUnit((*fSecondary)[lp1 << 114                << " " << std::setw( 9)
 97                << G4BestUnit((*fSecondary)[lp1 << 115                << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
 98                << std::setw(9) << G4BestUnit(( << 116                << " " << std::setw( 9)
 99                << std::setw(18) << (*fSecondar << 117                << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
                                                   >> 118                << " " << std::setw( 9)
                                                   >> 119                << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
                                                   >> 120                << " " << std::setw( 9)
                                                   >> 121                << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
                                                   >> 122                << " " << std::setw(18)
                                                   >> 123                << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
                                                   >> 124                << G4endl;
100       }                                           125       }
101     }                                             126     }
102   }                                               127   }
103                                                << 128    
104   if (verboseLevel >= 4) {                     << 129   if( verboseLevel >= 4 )
                                                   >> 130   { 
105     ShowStep();                                   131     ShowStep();
106     G4cout << G4endl;                             132     G4cout << G4endl;
107   }                                               133   }
108 }                                                 134 }
109                                                   135 
110 //////////////////////////////////////////////    136 /////////////////////////////////////////////////////
111 void G4SteppingVerbose::AlongStepDoItAllDone()    137 void G4SteppingVerbose::AlongStepDoItAllDone()
112 //////////////////////////////////////////////    138 /////////////////////////////////////////////////////
113 {                                                 139 {
114   if (Silent == 1) {                           << 140   if(Silent==1){ return; }
115     return;                                    << 
116   }                                            << 
117                                                   141 
118   G4VProcess* ptProcManager;                      142   G4VProcess* ptProcManager;
119                                                   143 
120   CopyState();                                    144   CopyState();
121                                                   145 
122   if (verboseLevel >= 3) {                     << 146   if(verboseLevel >= 3)
                                                   >> 147   {
123     G4cout << G4endl;                             148     G4cout << G4endl;
124     G4cout << " >>AlongStepDoIt (after all inv    149     G4cout << " >>AlongStepDoIt (after all invocations):" << G4endl;
125     G4cout << "    ++List of invoked processes    150     G4cout << "    ++List of invoked processes " << G4endl;
126                                                   151 
127     for (std::size_t ci = 0; ci < MAXofAlongSt << 152     for(std::size_t ci=0; ci<MAXofAlongStepLoops; ++ci)
128       ptProcManager = (*fAlongStepDoItVector)( << 153     {
129       G4cout << "      " << ci + 1 << ") ";    << 154       ptProcManager = (*fAlongStepDoItVector)(ci);
130       if (ptProcManager != nullptr) {          << 155       G4cout << "      " << ci+1 << ") ";
                                                   >> 156       if(ptProcManager != nullptr)
                                                   >> 157       {
131         G4cout << ptProcManager->GetProcessNam    158         G4cout << ptProcManager->GetProcessName() << G4endl;
132       }                                           159       }
133     }                                             160     }
134                                                   161 
135     ShowStep();                                   162     ShowStep();
136     G4cout << G4endl;                             163     G4cout << G4endl;
137     G4cout << "    ++List of secondaries gener << 164     G4cout << "    ++List of secondaries generated " 
138            << "(x,y,z,kE,t,PID):"                 165            << "(x,y,z,kE,t,PID):"
139            << "  No. of secondaries = " << (*f << 166            << "  No. of secondaries = " 
                                                   >> 167            << (*fSecondary).size() << G4endl;
140                                                   168 
141     if (! (*fSecondary).empty()) {             << 169     if((*fSecondary).size()>0)
142       for (auto& lp1 : *fSecondary) {          << 170     {
143         G4cout << "      " << std::setw(9) <<  << 171       for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
144                << std::setw(9) << G4BestUnit(l << 172       {
145                << std::setw(9) << G4BestUnit(l << 173         G4cout << "      "
146                << std::setw(9) << G4BestUnit(l << 174                << std::setw( 9)
147                << std::setw(9) << G4BestUnit(l << 175                << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
148                << lp1->GetDefinition()->GetPar << 176                << " " << std::setw( 9)
                                                   >> 177                << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
                                                   >> 178                << " " << std::setw( 9)
                                                   >> 179                << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
                                                   >> 180                << " " << std::setw( 9)
                                                   >> 181                << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
                                                   >> 182                << " " << std::setw( 9)
                                                   >> 183                << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time")
                                                   >> 184                << " " << std::setw(18)
                                                   >> 185                << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
                                                   >> 186                << G4endl;
149       }                                           187       }
150     }                                             188     }
151   }                                               189   }
152 }                                                 190 }
153                                                   191 
154 //////////////////////////////////////////////    192 ////////////////////////////////////////////////////
155 void G4SteppingVerbose::PostStepDoItAllDone()     193 void G4SteppingVerbose::PostStepDoItAllDone()
156 //////////////////////////////////////////////    194 ////////////////////////////////////////////////////
157 {                                                 195 {
158   if (Silent == 1) {                           << 196   if(Silent==1) { return; }
159     return;                                    << 
160   }                                            << 
161                                                   197 
162   G4VProcess* ptProcManager;                      198   G4VProcess* ptProcManager;
163                                                   199 
164   CopyState();                                    200   CopyState();
165                                                   201 
166   if ((fStepStatus == fPostStepDoItProc) || (f << 202   if( (fStepStatus == fPostStepDoItProc) |
167       (fCondition == Conditionally) || (fCondi << 203       (fCondition  == Forced)            |
168       (fCondition == StronglyForced))          << 204       (fCondition  == Conditionally)     |
                                                   >> 205       (fCondition  == ExclusivelyForced) |
                                                   >> 206       (fCondition  == StronglyForced) )
169   {                                               207   {
170     if (verboseLevel >= 3) {                   << 208     if(verboseLevel >= 3)
171       G4int npt = 0;                           << 209     {
                                                   >> 210       G4int npt=0;
172       G4cout << G4endl;                           211       G4cout << G4endl;
173       G4cout << " **PostStepDoIt (after all in    212       G4cout << " **PostStepDoIt (after all invocations):" << G4endl;
174       G4cout << "    ++List of invoked process    213       G4cout << "    ++List of invoked processes " << G4endl;
175                                                   214 
176       for (std::size_t np = 0; np < MAXofPostS << 215       for(std::size_t np=0; np<MAXofPostStepLoops; ++np)
177         std::size_t npGPIL = MAXofPostStepLoop << 216       {
178         if ((*fSelectedPostStepDoItVector)[npG << 217         std::size_t npGPIL = MAXofPostStepLoops-np-1;
                                                   >> 218         if( (*fSelectedPostStepDoItVector)[npGPIL] == 2)
                                                   >> 219         {
179           ++npt;                                  220           ++npt;
180           ptProcManager = (*fPostStepDoItVecto << 221           ptProcManager = (*fPostStepDoItVector)[np];
181           G4cout << "      " << npt << ") " << << 222           G4cout << "      " << npt << ") "
182                  << G4endl;                    << 223                  << ptProcManager->GetProcessName()
                                                   >> 224                  << " (Forced)" << G4endl;
183         }                                         225         }
184         else if ((*fSelectedPostStepDoItVector << 226         else if ( (*fSelectedPostStepDoItVector)[npGPIL] == 1)
                                                   >> 227         {
185           ++npt;                                  228           ++npt;
186           ptProcManager = (*fPostStepDoItVecto << 229           ptProcManager = (*fPostStepDoItVector)[np];
187           G4cout << "      " << npt << ") " << << 230           G4cout << "      " << npt << ") " << ptProcManager->GetProcessName()
                                                   >> 231                  << G4endl;
188         }                                         232         }
189       }                                           233       }
190                                                   234 
191       ShowStep();                                 235       ShowStep();
192       G4cout << G4endl;                           236       G4cout << G4endl;
193       G4cout << "    ++List of secondaries gen    237       G4cout << "    ++List of secondaries generated "
194              << "(x,y,z,kE,t,PID):"               238              << "(x,y,z,kE,t,PID):"
195              << "  No. of secodaries = " << (* << 239              << "  No. of secodaries = "
196       G4cout << "      [Note]Secondaries from  << 240              << (*fSecondary).size() << G4endl;
                                                   >> 241       G4cout << "      [Note]Secondaries from AlongStepDoIt included."
                                                   >> 242              << G4endl;
197                                                   243 
198       if (! (*fSecondary).empty()) {           << 244       if((*fSecondary).size()>0)
199         for (auto& lp1 : *fSecondary) {        << 245       {
200           G4cout << "      " << std::setw(9) < << 246         for(std::size_t lp1=0; lp1<(*fSecondary).size(); ++lp1)
201                  << std::setw(9) << G4BestUnit << 247         {
202                  << std::setw(9) << G4BestUnit << 248           G4cout << "      "
203                  << std::setw(9) << G4BestUnit << 249                  << std::setw( 9)
204                  << std::setw(9) << G4BestUnit << 250                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
205                  << lp1->GetDefinition()->GetP << 251                  << " " << std::setw( 9)
                                                   >> 252                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
                                                   >> 253                  << " " << std::setw( 9)
                                                   >> 254                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
                                                   >> 255                  << " " << std::setw( 9)
                                                   >> 256                  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
                                                   >> 257                  << " " << std::setw( 9)
                                                   >> 258                  << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
                                                   >> 259                  << " " << std::setw(18)
                                                   >> 260                  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
                                                   >> 261                  << G4endl;
206         }                                         262         }
207       }                                           263       }
208     }                                             264     }
209   }                                               265   }
210 }                                                 266 }
211                                                   267 
212 /////////////////////////////////////////         268 /////////////////////////////////////////
213 void G4SteppingVerbose::StepInfo()                269 void G4SteppingVerbose::StepInfo()
214 /////////////////////////////////////////         270 /////////////////////////////////////////
215 {                                                 271 {
216   if (Silent == 1) {                           << 272   if(Silent==1) { return; }
217     return;                                    << 273   if(SilentStepInfo==1) { return; }
218   }                                            << 
219   if (SilentStepInfo == 1) {                   << 
220     return;                                    << 
221   }                                            << 
222                                                   274 
223   CopyState();                                    275   CopyState();
224   G4cout.precision(16);                        << 276   G4cout.precision(16); 
225   G4long prec = G4cout.precision(3);           << 277   G4int prec = G4cout.precision(3);
226                                                   278 
227   if (verboseLevel >= 1) {                     << 279   if( verboseLevel >= 1 )
228     if (verboseLevel >= 4) VerboseTrack();     << 280   {
229     if (verboseLevel >= 3) {                   << 281     if( verboseLevel >= 4 ) VerboseTrack();
                                                   >> 282     if( verboseLevel >= 3 )
                                                   >> 283     {
230       G4cout << G4endl;                           284       G4cout << G4endl;
231 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE           << 285 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE      
232       G4cout << std::setw(5) << "#Step#"       << 286       G4cout << std::setw( 5) << "#Step#" << " "
233              << " " << std::setw(8) << "X"     << 287              << std::setw( 8) << "X"      << "     "
234              << "     " << std::setw(8) << "Y" << 288              << std::setw( 8) << "Y"      << "     "
235              << "     " << std::setw(8) << "Z" << 289              << std::setw( 8) << "Z"      << "     "
236              << "     " << std::setw(9) << "Ki << 290              << std::setw( 9) << "KineE"  << "     "
237              << "     " << std::setw(8) << "dE << 291              << std::setw( 8) << "dE"     << "     "
238              << "     " << std::setw(12) << "S << 292              << std::setw(12) << "StepLeng"   << " "
239              << " " << std::setw(12) << "Track << 293              << std::setw(12) << "TrackLeng"  << " "
240              << " " << std::setw(12) << "NextV << 294              << std::setw(12) << "NextVolume" << " "
241              << " " << std::setw(8) << "ProcNa << 295              << std::setw( 8) << "ProcName"   << G4endl;
242 #else                                             296 #else
243       G4cout << std::setw(5) << "#Step#"       << 297       G4cout << std::setw( 5) << "#Step#"      << " "
244              << " " << std::setw(8) << "X(mm)" << 298              << std::setw( 8) << "X(mm)"      << " "
245              << " " << std::setw(8) << "Y(mm)" << 299              << std::setw( 8) << "Y(mm)"      << " "  
246              << " " << std::setw(8) << "Z(mm)" << 300              << std::setw( 8) << "Z(mm)"      << " "
247              << " " << std::setw(9) << "KinE(M << 301              << std::setw( 9) << "KinE(MeV)"  << " "
248              << " " << std::setw(8) << "dE(MeV << 302              << std::setw( 8) << "dE(MeV)"    << " "  
249              << " " << std::setw(8) << "StepLe << 303              << std::setw( 8) << "StepLeng"   << " "
250              << " " << std::setw(9) << "TrackL << 304              << std::setw( 9) << "TrackLeng"  << " "
251              << " " << std::setw(11) << "NextV << 305              << std::setw(11) << "NextVolume" << " "
252              << " " << std::setw(8) << "ProcNa << 306              << std::setw( 8) << "ProcName"   << G4endl;
253 #endif                                         << 307 #endif     
254     }                                          << 308     }
255     G4cout << std::setw(5) << fTrack->GetCurre << 309     G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
256            << G4BestUnit(fTrack->GetPosition() << 310            << std::setw( 8)
257            << G4BestUnit(fTrack->GetPosition() << 311            << G4BestUnit(fTrack->GetPosition().x(), "Length") << " "
258            << G4BestUnit(fTrack->GetPosition() << 312            << std::setw( 8)
259            << G4BestUnit(fTrack->GetKineticEne << 313            << G4BestUnit(fTrack->GetPosition().y(), "Length") << " "
260            << G4BestUnit(fStep->GetTotalEnergy << 314            << std::setw( 8)
261            << G4BestUnit(fStep->GetStepLength( << 315            << G4BestUnit(fTrack->GetPosition().z(), "Length") << " "
                                                   >> 316            << std::setw( 9)
                                                   >> 317            << G4BestUnit(fTrack->GetKineticEnergy(), "Energy") << " "
                                                   >> 318            << std::setw( 8)
                                                   >> 319            << G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy") << " "
                                                   >> 320            << std::setw( 8)
                                                   >> 321            << G4BestUnit(fStep->GetStepLength(), "Length") << " "
                                                   >> 322            << std::setw( 9)
262            << G4BestUnit(fTrack->GetTrackLengt    323            << G4BestUnit(fTrack->GetTrackLength(), "Length") << " ";
263                                                   324 
264     if (fTrack->GetNextVolume() != nullptr) {  << 325     if( fTrack->GetNextVolume() != 0 )
                                                   >> 326     { 
265       G4cout << std::setw(11) << fTrack->GetNe    327       G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
266     }                                             328     }
267     else {                                     << 329     else
268       G4cout << std::setw(11) << "OutOfWorld"  << 330     {
269              << " ";                           << 331       G4cout << std::setw(11) << "OutOfWorld" << " ";
270     }                                          << 332     }
271     if (fStep->GetPostStepPoint()->GetProcessD << 333     if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0)
272       G4cout << fStep->GetPostStepPoint()->Get << 334     {
                                                   >> 335       G4cout << fStep->GetPostStepPoint()
                                                   >> 336                      ->GetProcessDefinedStep()->GetProcessName();
273     }                                             337     }
274     else {                                     << 338     else
                                                   >> 339     {
275       G4cout << "User Limit";                     340       G4cout << "User Limit";
276     }                                             341     }
277     G4cout << G4endl;                             342     G4cout << G4endl;
278     if (verboseLevel == 2) {                   << 343     if( verboseLevel == 2 )
279       G4int tN2ndariesTot = fN2ndariesAtRestDo << 344     {
280       if (tN2ndariesTot > 0) {                 << 345       G4int tN2ndariesTot = fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt
                                                   >> 346                           + fN2ndariesPostStepDoIt;
                                                   >> 347       if(tN2ndariesTot>0)
                                                   >> 348       {
281         G4cout << "    :----- List of 2ndaries    349         G4cout << "    :----- List of 2ndaries - "
282                << "#SpawnInStep=" << std::setw << 350                << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot 
283                << fN2ndariesAtRestDoIt << ",Al << 351                << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
284                << ",Post=" << std::setw(2) <<  << 352                << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
285                << "#SpawnTotal=" << std::setw( << 353                << ",Post="  << std::setw(2) << fN2ndariesPostStepDoIt
                                                   >> 354                << "), "
                                                   >> 355                << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
                                                   >> 356                << " ---------------"
286                << G4endl;                         357                << G4endl;
287                                                   358 
288         for (std::size_t lp1 = (*fSecondary).s << 359         for(std::size_t lp1=(*fSecondary).size()-tN2ndariesTot;
289              ++lp1)                            << 360                         lp1<(*fSecondary).size(); ++lp1)
290         {                                         361         {
291           G4cout << "    : " << std::setw(9)   << 362           G4cout << "    : "
292                  << G4BestUnit((*fSecondary)[l << 363                  << std::setw( 9)
293                  << std::setw(9) << G4BestUnit << 364                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
294                  << " " << std::setw(9)        << 365                  << " " << std::setw( 9)
295                  << G4BestUnit((*fSecondary)[l << 366                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
296                  << std::setw(9) << G4BestUnit << 367                  << " " << std::setw( 9)
297                  << " " << std::setw(18) << (* << 368                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
                                                   >> 369                  << " " << std::setw( 9)
                                                   >> 370                  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
                                                   >> 371                  << " " << std::setw(18)
                                                   >> 372                  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
298                  << G4endl;                       373                  << G4endl;
299         }                                         374         }
300         G4cout << "    :----------------------    375         G4cout << "    :-----------------------------"
301                << "---------------------------    376                << "----------------------------------"
302                << "-- EndOf2ndaries Info ----- << 377                << "-- EndOf2ndaries Info ---------------"  << G4endl;
303       }                                           378       }
304     }                                             379     }
305   }                                               380   }
306   G4cout.precision(prec);                         381   G4cout.precision(prec);
307 }                                                 382 }
308                                                   383 
309 ////////////////////////////////////////////      384 ////////////////////////////////////////////
310 void G4SteppingVerbose::DPSLStarted()             385 void G4SteppingVerbose::DPSLStarted()
311 ////////////////////////////////////////////      386 ////////////////////////////////////////////
312 {                                                 387 {
313   if (Silent == 1) {                           << 388   if(Silent==1){ return; }
314     return;                                    << 
315   }                                            << 
316   CopyState();                                    389   CopyState();
317                                                   390 
318   if (verboseLevel > 5) {                      << 391   if( verboseLevel > 5 )
319     G4cout << G4endl << " >>DefinePhysicalStep << 392   {
                                                   >> 393     G4cout << G4endl
                                                   >> 394            << " >>DefinePhysicalStepLength (List of proposed StepLengths): "
                                                   >> 395            << G4endl;
320   }                                               396   }
321 }                                                 397 }
322                                                   398 
323 //////////////////////////////////////////////    399 //////////////////////////////////////////////
324 void G4SteppingVerbose::DPSLUserLimit()           400 void G4SteppingVerbose::DPSLUserLimit()
325 //////////////////////////////////////////////    401 //////////////////////////////////////////////
326 {                                                 402 {
327   if (Silent == 1) {                           << 403   if(Silent==1){ return; }
328     return;                                    << 
329   }                                            << 
330   CopyState();                                    404   CopyState();
331                                                   405 
332   if (verboseLevel > 5) {                      << 406   if( verboseLevel > 5 )
                                                   >> 407   {
333     G4cout << G4endl << G4endl;                   408     G4cout << G4endl << G4endl;
334     G4cout << "=== Defined Physical Step Lengt    409     G4cout << "=== Defined Physical Step Length (DPSL)" << G4endl;
335     G4cout << "    ++ProposedStep(UserLimit) = << 410     G4cout << "    ++ProposedStep(UserLimit) = "
                                                   >> 411            << std::setw( 9) << physIntLength
336            << " : ProcName = User defined maxi    412            << " : ProcName = User defined maximum allowed Step" << G4endl;
337   }                                               413   }
338 }                                                 414 }
339                                                   415 
340 /////////////////////////////////////////////     416 /////////////////////////////////////////////
341 void G4SteppingVerbose::DPSLPostStep()            417 void G4SteppingVerbose::DPSLPostStep()
342 /////////////////////////////////////////////     418 /////////////////////////////////////////////
343 {                                                 419 {
344   if (Silent == 1) {                           << 420   if(Silent==1){ return; }
345     return;                                    << 
346   }                                            << 
347   CopyState();                                    421   CopyState();
348                                                   422 
349   if (verboseLevel > 5) {                      << 423   if( verboseLevel > 5 )
350     G4cout << "    ++ProposedStep(PostStep ) = << 424   {
                                                   >> 425     G4cout << "    ++ProposedStep(PostStep ) = "
                                                   >> 426            << std::setw( 9) << physIntLength
351            << " : ProcName = " << fCurrentProc    427            << " : ProcName = " << fCurrentProcess->GetProcessName() << " (";
352     if (fCondition == ExclusivelyForced) {     << 428     if(fCondition==ExclusivelyForced)
                                                   >> 429     {
353       G4cout << "ExclusivelyForced)" << G4endl    430       G4cout << "ExclusivelyForced)" << G4endl;
354     }                                             431     }
355     else if (fCondition == StronglyForced) {   << 432     else if(fCondition==StronglyForced)
                                                   >> 433     {
356       G4cout << "StronglyForced)" << G4endl;      434       G4cout << "StronglyForced)" << G4endl;
357     }                                             435     }
358     else if (fCondition == Conditionally) {    << 436     else if(fCondition==Conditionally)
                                                   >> 437     {
359       G4cout << "Conditionally)" << G4endl;       438       G4cout << "Conditionally)" << G4endl;
360     }                                             439     }
361     else if (fCondition == Forced) {           << 440     else if(fCondition==Forced)
                                                   >> 441     {
362       G4cout << "Forced)" << G4endl;              442       G4cout << "Forced)" << G4endl;
363     }                                             443     }
364     else {                                     << 444     else
                                                   >> 445     {
365       G4cout << "No ForceCondition)" << G4endl    446       G4cout << "No ForceCondition)" << G4endl;
366     }                                             447     }
367   }                                               448   }
368 }                                                 449 }
369                                                   450 
370 /////////////////////////////////////////////     451 /////////////////////////////////////////////
371 void G4SteppingVerbose::DPSLAlongStep()           452 void G4SteppingVerbose::DPSLAlongStep()
372 /////////////////////////////////////////////     453 /////////////////////////////////////////////
373 {                                                 454 {
374   if (Silent == 1) {                           << 455   if(Silent==1){ return; }
375     return;                                    << 
376   }                                            << 
377   CopyState();                                    456   CopyState();
378                                                   457 
379   if (verboseLevel > 5) {                      << 458   if( verboseLevel > 5 )
380     G4cout << "    ++ProposedStep(AlongStep) = << 459   {
381            << G4BestUnit(physIntLength, "Lengt << 460     G4cout << "    ++ProposedStep(AlongStep) = " 
382            << " : ProcName = " << fCurrentProc << 461            << std::setw( 9) << G4BestUnit(physIntLength , "Length")
383     if (fGPILSelection == CandidateForSelectio << 462            << " : ProcName = "
                                                   >> 463            << fCurrentProcess->GetProcessName() 
                                                   >> 464            << " (";
                                                   >> 465     if(fGPILSelection==CandidateForSelection)
                                                   >> 466     {
384       G4cout << "CandidateForSelection)" << G4    467       G4cout << "CandidateForSelection)" << G4endl;
385     }                                             468     }
386     else if (fGPILSelection == NotCandidateFor << 469     else if(fGPILSelection==NotCandidateForSelection)
                                                   >> 470     {
387       G4cout << "NotCandidateForSelection)" <<    471       G4cout << "NotCandidateForSelection)" << G4endl;
388     }                                             472     }
389     else {                                     << 473     else
                                                   >> 474     {
390       G4cout << "?!?)" << G4endl;                 475       G4cout << "?!?)" << G4endl;
391     }                                             476     }
392   }                                               477   }
393 }                                                 478 }
394                                                   479 
395 //////////////////////////////////////////////    480 ////////////////////////////////////////////////
396 void G4SteppingVerbose::TrackingStarted()         481 void G4SteppingVerbose::TrackingStarted()
397 //////////////////////////////////////////////    482 ////////////////////////////////////////////////
398 {                                                 483 {
399   if (Silent == 1) {                           << 484   if(Silent==1){ return; }
400     return;                                    << 
401   }                                            << 
402                                                   485 
403   CopyState();                                    486   CopyState();
404                                                   487 
405   G4long prec = G4cout.precision(3);           << 488   G4int prec = G4cout.precision(3);
406   if (verboseLevel > 0) {                      << 489   if( verboseLevel > 0 )
                                                   >> 490   {
407 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE              491 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
408     G4cout << std::setw(5) << "Step#"          << 492     G4cout << std::setw( 5) << "Step#"  << " "
409            << " " << std::setw(8) << "X"       << 493            << std::setw( 8) << "X"      << "     "
410            << "     " << std::setw(8) << "Y"   << 494            << std::setw( 8) << "Y"      << "     "  
411            << "     " << std::setw(8) << "Z"   << 495            << std::setw( 8) << "Z"      << "     "
412            << "     " << std::setw(9) << "Kine << 496            << std::setw( 9) << "KineE"  << "     "
413            << "     " << std::setw(8) << "dE"  << 497            << std::setw( 8) << "dE"     << "     "  
414            << "     " << std::setw(12) << "Ste << 498            << std::setw(12) << "StepLeng"   << " "  
415            << " " << std::setw(12) << "TrackLe << 499            << std::setw(12) << "TrackLeng"  << " "
416            << " " << std::setw(12) << "NextVol << 500            << std::setw(12) << "NextVolume" << " "
417            << " " << std::setw(8) << "ProcName << 501            << std::setw( 8) << "ProcName"   << G4endl;     
418 #else                                             502 #else
419     G4cout << std::setw(5) << "Step#"          << 503     G4cout << std::setw( 5) << "Step#"      << " "
420            << " " << std::setw(8) << "X(mm)"   << 504            << std::setw( 8) << "X(mm)"      << " "
421            << " " << std::setw(8) << "Y(mm)"   << 505            << std::setw( 8) << "Y(mm)"      << " "  
422            << " " << std::setw(8) << "Z(mm)"   << 506            << std::setw( 8) << "Z(mm)"      << " "
423            << " " << std::setw(9) << "KinE(MeV << 507            << std::setw( 9) << "KinE(MeV)"  << " "
424            << " " << std::setw(8) << "dE(MeV)" << 508            << std::setw( 8) << "dE(MeV)"    << " "  
425            << " " << std::setw(8) << "StepLeng << 509            << std::setw( 8) << "StepLeng"   << " "  
426            << " " << std::setw(9) << "TrackLen << 510            << std::setw( 9) << "TrackLeng"  << " "
427            << " " << std::setw(11) << "NextVol << 511            << std::setw(11) << "NextVolume" << " "
428            << " " << std::setw(8) << "ProcName << 512            << std::setw( 8) << "ProcName"   << G4endl;     
429 #endif                                            513 #endif
430                                                   514 
431     G4cout << std::setw(5) << fTrack->GetCurre << 515     G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
432            << G4BestUnit(fTrack->GetPosition() << 516            << std::setw( 8)
433            << G4BestUnit(fTrack->GetPosition() << 517            << G4BestUnit(fTrack->GetPosition().x(),"Length") << " "
434            << G4BestUnit(fTrack->GetPosition() << 518            << std::setw( 8)
435            << G4BestUnit(fTrack->GetKineticEne << 519            << G4BestUnit(fTrack->GetPosition().y(),"Length") << " "
436            << G4BestUnit(fStep->GetTotalEnergy << 520            << std::setw( 8)
437            << G4BestUnit(fStep->GetStepLength( << 521            << G4BestUnit(fTrack->GetPosition().z(),"Length") << " "
438            << G4BestUnit(fTrack->GetTrackLengt << 522            << std::setw( 9)
                                                   >> 523            << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") << " "
                                                   >> 524            << std::setw( 8)
                                                   >> 525            << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << " "
                                                   >> 526            << std::setw( 8)
                                                   >> 527            << G4BestUnit(fStep->GetStepLength(),"Length") << " "
                                                   >> 528            << std::setw( 9)
                                                   >> 529            << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
439                                                   530 
440     if (fTrack->GetNextVolume() != nullptr) {  << 531     if(fTrack->GetNextVolume())
                                                   >> 532     {
441       G4cout << std::setw(11) << fTrack->GetNe    533       G4cout << std::setw(11) << fTrack->GetNextVolume()->GetName() << " ";
442     }                                             534     }
443     else {                                     << 535     else
444       G4cout << std::setw(11) << "OutOfWorld"  << 536     {
445              << " ";                           << 537       G4cout << std::setw(11) << "OutOfWorld" << " ";
446     }                                             538     }
447     G4cout << "initStep" << G4endl;               539     G4cout << "initStep" << G4endl;
448   }                                               540   }
449   G4cout.precision(prec);                         541   G4cout.precision(prec);
450 }                                                 542 }
451                                                   543 
452 //////////////////////////////////////////////    544 //////////////////////////////////////////////////////
453 void G4SteppingVerbose::AlongStepDoItOneByOne(    545 void G4SteppingVerbose::AlongStepDoItOneByOne()
454 //////////////////////////////////////////////    546 //////////////////////////////////////////////////////
455 {                                              << 547 { 
456   if (Silent == 1) {                           << 548   if(Silent==1){ return; }
457     return;                                    << 
458   }                                            << 
459                                                   549 
460   CopyState();                                    550   CopyState();
461                                                   551 
462   if (verboseLevel >= 4) {                     << 552   if(verboseLevel >= 4)
                                                   >> 553   { 
463     G4cout << G4endl;                             554     G4cout << G4endl;
464     G4cout << " >>AlongStepDoIt (process by pr    555     G4cout << " >>AlongStepDoIt (process by process): "
465            << "   Process Name = " << fCurrent << 556            << "   Process Name = " 
                                                   >> 557            << fCurrentProcess->GetProcessName() << G4endl;
466                                                   558 
467     ShowStep();                                   559     ShowStep();
468     G4cout << "          "                        560     G4cout << "          "
469            << "!Note! Safety of PostStep is on    561            << "!Note! Safety of PostStep is only valid "
470            << "after all DoIt invocations." << << 562            << "after all DoIt invocations."
                                                   >> 563            << G4endl; 
471                                                   564 
472     VerboseParticleChange();                   << 565     VerboseParticleChange();    
473     G4cout << G4endl;                             566     G4cout << G4endl;
474                                                   567 
475     G4cout << "    ++List of secondaries gener << 568     G4cout << "    ++List of secondaries generated " 
476            << "(x,y,z,kE,t,PID):"                 569            << "(x,y,z,kE,t,PID):"
477            << "  No. of secodaries = " << fN2n << 570            << "  No. of secodaries = " 
                                                   >> 571            << fN2ndariesAlongStepDoIt << G4endl;
478                                                   572 
479     if (fN2ndariesAlongStepDoIt > 0) {         << 573     if(fN2ndariesAlongStepDoIt>0)
480       for (std::size_t lp1 = (*fSecondary).siz << 574     {
481            lp1 < (*fSecondary).size(); ++lp1)  << 575       for(std::size_t lp1=(*fSecondary).size()-fN2ndariesAlongStepDoIt;
                                                   >> 576                       lp1<(*fSecondary).size(); ++lp1)
482       {                                           577       {
483         G4cout << "      " << std::setw(9)     << 578          G4cout  << "      "
484                << G4BestUnit((*fSecondary)[lp1 << 579                  << std::setw( 9)
485                << G4BestUnit((*fSecondary)[lp1 << 580                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
486                << G4BestUnit((*fSecondary)[lp1 << 581                  << " " << std::setw( 9)
487                << G4BestUnit((*fSecondary)[lp1 << 582                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
488                << std::setw(9) << G4BestUnit(( << 583                  << " " << std::setw( 9)
489                << std::setw(18) << (*fSecondar << 584                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
                                                   >> 585                  << " " << std::setw( 9)
                                                   >> 586                  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
                                                   >> 587                  << " " << std::setw( 9)
                                                   >> 588                  << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
                                                   >> 589                  << " " << std::setw(18)
                                                   >> 590                  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
                                                   >> 591                  << G4endl;
490       }                                           592       }
491     }                                             593     }
492   }                                               594   }
493 }                                                 595 }
494                                                   596 
495 //////////////////////////////////////////////    597 //////////////////////////////////////////////////////
496 void G4SteppingVerbose::PostStepDoItOneByOne()    598 void G4SteppingVerbose::PostStepDoItOneByOne()
497 //////////////////////////////////////////////    599 //////////////////////////////////////////////////////
498 {                                                 600 {
499   if (Silent == 1) {                           << 601   if(Silent==1) { return; }
500     return;                                    << 
501   }                                            << 
502                                                   602 
503   CopyState();                                    603   CopyState();
504                                                   604 
505   if (verboseLevel >= 4) {                     << 605   if(verboseLevel >= 4)
                                                   >> 606   { 
506     G4cout << G4endl;                             607     G4cout << G4endl;
507     G4cout << " >>PostStepDoIt (process by pro    608     G4cout << " >>PostStepDoIt (process by process): "
508            << "   Process Name = " << fCurrent << 609            << "   Process Name = " 
                                                   >> 610            << fCurrentProcess->GetProcessName() << G4endl;
509                                                   611 
510     ShowStep();                                   612     ShowStep();
511     G4cout << G4endl;                             613     G4cout << G4endl;
512     VerboseParticleChange();                   << 614     VerboseParticleChange();    
513     G4cout << G4endl;                             615     G4cout << G4endl;
514                                                   616 
515     G4cout << "    ++List of secondaries gener << 617     G4cout << "    ++List of secondaries generated " 
516            << "(x,y,z,kE,t,PID):"                 618            << "(x,y,z,kE,t,PID):"
517            << "  No. of secodaries = " << fN2n << 619            << "  No. of secodaries = " 
                                                   >> 620            << fN2ndariesPostStepDoIt << G4endl;
518                                                   621 
519     if (fN2ndariesPostStepDoIt > 0) {          << 622     if(fN2ndariesPostStepDoIt>0)
520       for (std::size_t lp1 = (*fSecondary).siz << 623     {
521            lp1 < (*fSecondary).size(); ++lp1)  << 624       for(std::size_t lp1=(*fSecondary).size()-fN2ndariesPostStepDoIt;
                                                   >> 625                       lp1<(*fSecondary).size(); ++lp1)
522       {                                           626       {
523         G4cout << "      " << std::setw(9)     << 627         G4cout << "      "
524                << G4BestUnit((*fSecondary)[lp1 << 628                << std::setw( 9)
525                << G4BestUnit((*fSecondary)[lp1 << 629                << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
526                << G4BestUnit((*fSecondary)[lp1 << 630                << " " << std::setw( 9)
527                << G4BestUnit((*fSecondary)[lp1 << 631                << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
528                << std::setw(9) << G4BestUnit(( << 632                << " " << std::setw( 9)
529                << std::setw(18) << (*fSecondar << 633                << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
                                                   >> 634                << " " << std::setw( 9)
                                                   >> 635                << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
                                                   >> 636                << " " << std::setw( 9)
                                                   >> 637                << G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(), "Time")
                                                   >> 638                << " " << std::setw(18)
                                                   >> 639                << (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
                                                   >> 640                << G4endl;
530       }                                           641       }
531     }                                             642     }
532   }                                               643   }
533 }                                                 644 }
534                                                   645 
535 //////////////////////////////////////            646 //////////////////////////////////////
536 void G4SteppingVerbose::VerboseTrack()            647 void G4SteppingVerbose::VerboseTrack()
537 //////////////////////////////////////            648 //////////////////////////////////////
538 {                                                 649 {
539   if (Silent == 1) {                           << 650   if(Silent==1){ return; }
540     return;                                    << 
541   }                                            << 
542                                                   651 
543   CopyState();                                    652   CopyState();
544                                                   653 
545   G4cout << G4endl;                               654   G4cout << G4endl;
546   G4cout << "    ++G4Track Information " << G4    655   G4cout << "    ++G4Track Information " << G4endl;
547   G4long prec = G4cout.precision(3);           << 656   G4int prec = G4cout.precision(3);
548                                                   657 
549   G4cout << "      --------------------------- << 
550   G4cout << "        G4Track Information  " << << 
551   G4cout << "      --------------------------- << 
552                                                   658 
553   G4cout << "        Step number         : " < << 659   G4cout << "      -----------------------------------------------" 
554          << G4endl;                               660          << G4endl;
                                                   >> 661   G4cout << "        G4Track Information  " << std::setw(20) << G4endl;
                                                   >> 662   G4cout << "      -----------------------------------------------" 
                                                   >> 663          << G4endl;
                                                   >> 664 
                                                   >> 665   G4cout << "        Step number         : " 
                                                   >> 666          << std::setw(20) << fTrack->GetCurrentStepNumber()
                                                   >> 667          << G4endl; 
555 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE              668 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
556   G4cout << "        Position - x        : " < << 669   G4cout << "        Position - x        : " 
557          << G4BestUnit(fTrack->GetPosition().x << 670          << std::setw(20) << G4BestUnit(fTrack->GetPosition().x(), "Length")
558   G4cout << "        Position - y        : " < << 671          << G4endl; 
559          << G4BestUnit(fTrack->GetPosition().y << 672   G4cout << "        Position - y        : " 
560   G4cout << "        Position - z        : " < << 673          << std::setw(20) << G4BestUnit(fTrack->GetPosition().y(), "Length")
561          << G4BestUnit(fTrack->GetPosition().z << 674          << G4endl; 
562   G4cout << "        Global Time         : " < << 675   G4cout << "        Position - z        : " 
563          << G4BestUnit(fTrack->GetGlobalTime() << 676          << std::setw(20) << G4BestUnit(fTrack->GetPosition().z(), "Length")
564   G4cout << "        Local Time          : " < << 
565          << G4BestUnit(fTrack->GetLocalTime(), << 
566 #else                                          << 
567   G4cout << "        Position - x (mm)   : " < << 
568          << G4endl;                               677          << G4endl;
569   G4cout << "        Position - y (mm)   : " < << 678   G4cout << "        Global Time         : " 
                                                   >> 679          << std::setw(20) << G4BestUnit(fTrack->GetGlobalTime(), "Time")
570          << G4endl;                               680          << G4endl;
571   G4cout << "        Position - z (mm)   : " < << 681   G4cout << "        Local Time          : " 
                                                   >> 682          << std::setw(20) << G4BestUnit(fTrack->GetLocalTime(), "Time")
572          << G4endl;                               683          << G4endl;
573   G4cout << "        Global Time (ns)    : " < << 684 #else
                                                   >> 685   G4cout << "        Position - x (mm)   : " 
                                                   >> 686          << std::setw(20) << fTrack->GetPosition().x() /mm
                                                   >> 687          << G4endl; 
                                                   >> 688   G4cout << "        Position - y (mm)   : " 
                                                   >> 689          << std::setw(20) << fTrack->GetPosition().y() /mm
                                                   >> 690          << G4endl; 
                                                   >> 691   G4cout << "        Position - z (mm)   : " 
                                                   >> 692          << std::setw(20) << fTrack->GetPosition().z() /mm
                                                   >> 693          << G4endl;
                                                   >> 694   G4cout << "        Global Time (ns)    : " 
                                                   >> 695          << std::setw(20) << fTrack->GetGlobalTime() /ns
574          << G4endl;                               696          << G4endl;
575   G4cout << "        Local Time (ns)     : " < << 697   G4cout << "        Local Time (ns)     : " 
                                                   >> 698          << std::setw(20) << fTrack->GetLocalTime() /ns
576          << G4endl;                               699          << G4endl;
577 #endif                                            700 #endif
578   G4cout << "        Momentum Direct - x : " < << 701   G4cout << "        Momentum Direct - x : " 
                                                   >> 702          << std::setw(20) << fTrack->GetMomentumDirection().x()
579          << G4endl;                               703          << G4endl;
580   G4cout << "        Momentum Direct - y : " < << 704   G4cout << "        Momentum Direct - y : " 
                                                   >> 705          << std::setw(20) << fTrack->GetMomentumDirection().y()
581          << G4endl;                               706          << G4endl;
582   G4cout << "        Momentum Direct - z : " < << 707   G4cout << "        Momentum Direct - z : " 
                                                   >> 708          << std::setw(20) << fTrack->GetMomentumDirection().z()
583          << G4endl;                               709          << G4endl;
584 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE              710 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
585   G4cout << "        Kinetic Energy      : "   << 711   G4cout << "        Kinetic Energy      : " 
586 #else                                             712 #else
587   G4cout << "        Kinetic Energy (MeV): "   << 713   G4cout << "        Kinetic Energy (MeV): " 
588 #endif                                            714 #endif
589          << std::setw(20) << G4BestUnit(fTrack << 715          << std::setw(20) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
590   G4cout << "        Polarization - x    : " < << 716          << G4endl;
                                                   >> 717   G4cout << "        Polarization - x    : " 
                                                   >> 718          << std::setw(20) << fTrack->GetPolarization().x()
                                                   >> 719          << G4endl;
                                                   >> 720   G4cout << "        Polarization - y    : " 
                                                   >> 721          << std::setw(20) << fTrack->GetPolarization().y()
591          << G4endl;                               722          << G4endl;
592   G4cout << "        Polarization - y    : " < << 723   G4cout << "        Polarization - z    : " 
                                                   >> 724          << std::setw(20) << fTrack->GetPolarization().z()
593          << G4endl;                               725          << G4endl;
594   G4cout << "        Polarization - z    : " < << 726   G4cout << "        Track Length        : " 
                                                   >> 727          << std::setw(20) << G4BestUnit(fTrack->GetTrackLength(), "Length")
595          << G4endl;                               728          << G4endl;
596   G4cout << "        Track Length        : " < << 729   G4cout << "        Track ID #          : " 
597          << G4BestUnit(fTrack->GetTrackLength( << 730          << std::setw(20) << fTrack->GetTrackID()
598   G4cout << "        Track ID #          : " < << 731          << G4endl;
599   G4cout << "        Parent Track ID #   : " < << 732   G4cout << "        Parent Track ID #   : " 
600   G4cout << "        Next Volume         : " < << 733          << std::setw(20) << fTrack->GetParentID()
601   if (fTrack->GetNextVolume() != nullptr) {    << 734          << G4endl;
                                                   >> 735   G4cout << "        Next Volume         : " 
                                                   >> 736          << std::setw(20);
                                                   >> 737   if( fTrack->GetNextVolume() != 0 )
                                                   >> 738   { 
602     G4cout << fTrack->GetNextVolume()->GetName    739     G4cout << fTrack->GetNextVolume()->GetName() << " ";
603   }                                               740   }
604   else {                                       << 741   else
605     G4cout << "OutOfWorld"                     << 742   {
606            << " ";                             << 743     G4cout << "OutOfWorld" << " ";
607   }                                               744   }
608   G4cout << G4endl;                               745   G4cout << G4endl;
609   G4cout << "        Track Status        : " < << 746   G4cout << "        Track Status        : " 
610   if (fTrack->GetTrackStatus() == fAlive) {    << 747          << std::setw(20);
                                                   >> 748   if( fTrack->GetTrackStatus() == fAlive )
                                                   >> 749   {
611     G4cout << " Alive";                           750     G4cout << " Alive";
612   }                                               751   }
613   else if (fTrack->GetTrackStatus() == fStopBu << 752   else if( fTrack->GetTrackStatus() == fStopButAlive )
                                                   >> 753   {
614     G4cout << " StopButAlive";                    754     G4cout << " StopButAlive";
615   }                                               755   }
616   else if (fTrack->GetTrackStatus() == fStopAn << 756   else if( fTrack->GetTrackStatus() == fStopAndKill )
                                                   >> 757   {
617     G4cout << " StopAndKill";                     758     G4cout << " StopAndKill";
618   }                                               759   }
619   else if (fTrack->GetTrackStatus() == fKillTr << 760   else if( fTrack->GetTrackStatus() == fKillTrackAndSecondaries )
                                                   >> 761   {
620     G4cout << " KillTrackAndSecondaries";         762     G4cout << " KillTrackAndSecondaries";
621   }                                               763   }
622   else if (fTrack->GetTrackStatus() == fSuspen << 764   else if( fTrack->GetTrackStatus() == fSuspend )
                                                   >> 765   {
623     G4cout << " Suspend";                         766     G4cout << " Suspend";
624   }                                               767   }
625   else if (fTrack->GetTrackStatus() == fPostpo << 768   else if( fTrack->GetTrackStatus() == fPostponeToNextEvent )
                                                   >> 769   {
626     G4cout << " PostponeToNextEvent";             770     G4cout << " PostponeToNextEvent";
627   }                                               771   }
628   G4cout << G4endl;                               772   G4cout << G4endl;
629 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE              773 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
630   G4cout << "        Vertex - x          : " < << 774   G4cout << "        Vertex - x          : " 
631          << G4BestUnit(fTrack->GetVertexPositi << 775          << std::setw(20)
632   G4cout << "        Vertex - y          : " < << 776          << G4BestUnit(fTrack->GetVertexPosition().x(),"Length")
633          << G4BestUnit(fTrack->GetVertexPositi << 777          << G4endl; 
634   G4cout << "        Vertex - z          : " < << 778   G4cout << "        Vertex - y          : " 
635          << G4BestUnit(fTrack->GetVertexPositi << 779          << std::setw(20)
                                                   >> 780          << G4BestUnit(fTrack->GetVertexPosition().y(),"Length")
                                                   >> 781          << G4endl; 
                                                   >> 782   G4cout << "        Vertex - z          : " 
                                                   >> 783          << std::setw(20)
                                                   >> 784          << G4BestUnit(fTrack->GetVertexPosition().z(),"Length")
                                                   >> 785          << G4endl;
636 #else                                             786 #else
637   G4cout << "        Vertex - x (mm)     : " < << 787   G4cout << "        Vertex - x (mm)     : " 
638          << fTrack->GetVertexPosition().x() /  << 788          << std::setw(20) << fTrack->GetVertexPosition().x()/mm
639   G4cout << "        Vertex - y (mm)     : " < << 789          << G4endl; 
640          << fTrack->GetVertexPosition().y() /  << 790   G4cout << "        Vertex - y (mm)     : " 
641   G4cout << "        Vertex - z (mm)     : " < << 791          << std::setw(20) << fTrack->GetVertexPosition().y()/mm
642          << fTrack->GetVertexPosition().z() /  << 792          << G4endl; 
                                                   >> 793   G4cout << "        Vertex - z (mm)     : " 
                                                   >> 794          << std::setw(20) << fTrack->GetVertexPosition().z()/mm
                                                   >> 795          << G4endl;
643 #endif                                            796 #endif
644   G4cout << "        Vertex - Px (MomDir): " < << 797   G4cout << "        Vertex - Px (MomDir): " 
645          << fTrack->GetVertexMomentumDirection << 798          << std::setw(20) << fTrack->GetVertexMomentumDirection().x()
646   G4cout << "        Vertex - Py (MomDir): " < << 799          << G4endl;
647          << fTrack->GetVertexMomentumDirection << 800   G4cout << "        Vertex - Py (MomDir): " 
648   G4cout << "        Vertex - Pz (MomDir): " < << 801          << std::setw(20) << fTrack->GetVertexMomentumDirection().y()
649          << fTrack->GetVertexMomentumDirection << 802          << G4endl;
                                                   >> 803   G4cout << "        Vertex - Pz (MomDir): " 
                                                   >> 804          << std::setw(20) << fTrack->GetVertexMomentumDirection().z()
                                                   >> 805          << G4endl;
650 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE              806 #ifdef G4_USE_G4BESTUNIT_FOR_VERBOSE
651   G4cout << "        Vertex - KineE      : "   << 807   G4cout << "        Vertex - KineE      : " 
652 #else                                             808 #else
653   G4cout << "        Vertex - KineE (MeV): "   << 809   G4cout << "        Vertex - KineE (MeV): " 
654 #endif                                            810 #endif
655          << std::setw(20) << G4BestUnit(fTrack << 811          << std::setw(20)
656                                                << 812          << G4BestUnit(fTrack->GetVertexKineticEnergy(),"Energy")
657   G4cout << "        Creator Process     : " < << 813          << G4endl;
658   if (fTrack->GetCreatorProcess() == nullptr)  << 814   
                                                   >> 815   G4cout << "        Creator Process     : " 
                                                   >> 816          << std::setw(20);
                                                   >> 817   if( fTrack->GetCreatorProcess() == 0)
                                                   >> 818   {
659     G4cout << " Event Generator" << G4endl;       819     G4cout << " Event Generator" << G4endl;
660   }                                               820   }
661   else {                                       << 821   else
                                                   >> 822   {
662     G4cout << fTrack->GetCreatorProcess()->Get    823     G4cout << fTrack->GetCreatorProcess()->GetProcessName() << G4endl;
663   }                                               824   }
664                                                   825 
665   G4cout << "      --------------------------- << 826   G4cout << "      -----------------------------------------------" 
666   G4cout.precision(prec);                      << 827          << G4endl;
                                                   >> 828   G4cout.precision(prec);      
667 }                                                 829 }
668                                                   830 
669 //////////////////////////////////////////////    831 ///////////////////////////////////////////////
670 void G4SteppingVerbose::VerboseParticleChange(    832 void G4SteppingVerbose::VerboseParticleChange()
671 //////////////////////////////////////////////    833 ///////////////////////////////////////////////
672 {                                                 834 {
673   if (Silent == 1) {                           << 835   if(Silent==1) { return; }
674     return;                                    << 
675   }                                            << 
676                                                   836 
677   G4cout << G4endl;                               837   G4cout << G4endl;
678   G4cout << "    ++G4ParticleChange Informatio    838   G4cout << "    ++G4ParticleChange Information " << G4endl;
679   fParticleChange->DumpInfo();                    839   fParticleChange->DumpInfo();
680 }                                                 840 }
681                                                   841 
682 /////////////////////////////////////////         842 /////////////////////////////////////////
683 void G4SteppingVerbose::ShowStep() const          843 void G4SteppingVerbose::ShowStep() const
684 ////////////////////////////////////////          844 ////////////////////////////////////////
685 {                                                 845 {
686   if (Silent == 1) {                           << 846   if(Silent==1){ return; }
687     return;                                    << 847    G4String volName;
688   }                                            << 848    G4int oldprc;
689   G4String volName;                            << 849 
690   G4long oldprc;                               << 850    // Show header
691                                                << 851    G4cout << G4endl;
692   // Show header                               << 852    G4cout << "    ++G4Step Information " << G4endl;
693   G4cout << G4endl;                            << 853    oldprc = G4cout.precision(16);
694   G4cout << "    ++G4Step Information " << G4e << 854 
695   oldprc = G4cout.precision(16);               << 855    // Show G4Step specific information
696                                                << 856    G4cout << "      Address of G4Track    : "
697   // Show G4Step specific information          << 857           << fStep->GetTrack() << G4endl;
698   G4cout << "      Address of G4Track    : " < << 858    G4cout << "      Step Length (mm)      : "
699   G4cout << "      Step Length (mm)      : " < << 859           << fStep->GetTrack()->GetStepLength() << G4endl;
700   G4cout << "      Energy Deposit (MeV)  : " < << 860    G4cout << "      Energy Deposit (MeV)  : "
701                                                << 861           << fStep->GetTotalEnergyDeposit() << G4endl;
702   // Show G4StepPoint specific information     << 862 
703   G4cout << "      --------------------------- << 863    // Show G4StepPoint specific information
704          << "----------------" << G4endl;      << 864    G4cout << "      -------------------------------------------------------" 
705   G4cout << "        StepPoint Information  "  << 865           << "----------------" <<  G4endl;
706          << "PostStep" << G4endl;              << 866    G4cout << "        StepPoint Information  "
707   G4cout << "      --------------------------- << 867           << std::setw(20) << "PreStep" 
708          << "----------------" << G4endl;      << 868           << std::setw(20) << "PostStep" << G4endl;
709   G4cout << "         Position - x (mm)   : "  << 869    G4cout << "      -------------------------------------------------------" 
710          << fStep->GetPreStepPoint()->GetPosit << 870           << "----------------" <<  G4endl;
711          << fStep->GetPostStepPoint()->GetPosi << 871    G4cout << "         Position - x (mm)   : " 
712   G4cout << "         Position - y (mm)   : "  << 872           << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().x() 
713          << fStep->GetPreStepPoint()->GetPosit << 873           << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().x()
714          << fStep->GetPostStepPoint()->GetPosi << 874           << G4endl;
715   G4cout << "         Position - z (mm)   : "  << 875    G4cout << "         Position - y (mm)   : " 
716          << fStep->GetPreStepPoint()->GetPosit << 876           << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().y() 
717          << fStep->GetPostStepPoint()->GetPosi << 877           << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().y()
718   G4cout << "         Global Time (ns)    : "  << 878           << G4endl;
719          << fStep->GetPreStepPoint()->GetGloba << 879    G4cout << "         Position - z (mm)   : " 
720          << fStep->GetPostStepPoint()->GetGlob << 880           << std::setw(20) << fStep->GetPreStepPoint()->GetPosition().z() 
721   G4cout << "         Local Time (ns)     : "  << 881           << std::setw(20) << fStep->GetPostStepPoint()->GetPosition().z()
722          << fStep->GetPreStepPoint()->GetLocal << 882           << G4endl;
723          << fStep->GetPostStepPoint()->GetLoca << 883    G4cout << "         Global Time (ns)    : " 
724   G4cout << "         Proper Time (ns)    : "  << 884           << std::setw(20) << fStep->GetPreStepPoint()->GetGlobalTime()
725          << fStep->GetPreStepPoint()->GetPrope << 885           << std::setw(20) << fStep->GetPostStepPoint()->GetGlobalTime()
726          << fStep->GetPostStepPoint()->GetProp << 886           << G4endl;
727   G4cout << "         Momentum Direct - x : "  << 887    G4cout << "         Local Time (ns)     : " 
728          << fStep->GetPreStepPoint()->GetMomen << 888           << std::setw(20) << fStep->GetPreStepPoint()->GetLocalTime() 
729          << fStep->GetPostStepPoint()->GetMome << 889           << std::setw(20) << fStep->GetPostStepPoint()->GetLocalTime()
730   G4cout << "         Momentum Direct - y : "  << 890           << G4endl;
731          << fStep->GetPreStepPoint()->GetMomen << 891    G4cout << "         Proper Time (ns)    : " 
732          << fStep->GetPostStepPoint()->GetMome << 892           << std::setw(20) << fStep->GetPreStepPoint()->GetProperTime()
733   G4cout << "         Momentum Direct - z : "  << 893           << std::setw(20) << fStep->GetPostStepPoint()->GetProperTime()
734          << fStep->GetPreStepPoint()->GetMomen << 894           << G4endl;
735          << fStep->GetPostStepPoint()->GetMome << 895    G4cout << "         Momentum Direct - x : " 
736   G4cout << "         Momentum - x (MeV/c): "  << 896        << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().x()
737          << fStep->GetPreStepPoint()->GetMomen << 897        << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().x()
738          << fStep->GetPostStepPoint()->GetMome << 898           << G4endl;
739   G4cout << "         Momentum - y (MeV/c): "  << 899    G4cout << "         Momentum Direct - y : " 
740          << fStep->GetPreStepPoint()->GetMomen << 900        << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().y()
741          << fStep->GetPostStepPoint()->GetMome << 901        << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().y()
742   G4cout << "         Momentum - z (MeV/c): "  << 902           << G4endl;
743          << fStep->GetPreStepPoint()->GetMomen << 903    G4cout << "         Momentum Direct - z : " 
744          << fStep->GetPostStepPoint()->GetMome << 904        << std::setw(20) << fStep->GetPreStepPoint()->GetMomentumDirection().z()
745   G4cout << "         Total Energy (MeV)  : "  << 905        << std::setw(20) << fStep->GetPostStepPoint()->GetMomentumDirection().z()
746          << fStep->GetPreStepPoint()->GetTotal << 906           << G4endl;
747          << fStep->GetPostStepPoint()->GetTota << 907    G4cout << "         Momentum - x (MeV/c): " 
748   G4cout << "         Kinetic Energy (MeV): "  << 908           << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().x()
749          << fStep->GetPreStepPoint()->GetKinet << 909           << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().x()
750          << fStep->GetPostStepPoint()->GetKine << 910           << G4endl;
751   G4cout << "         Velocity (mm/ns)    : "  << 911    G4cout << "         Momentum - y (MeV/c): " 
752          << fStep->GetPreStepPoint()->GetVeloc << 912           << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().y()
753          << fStep->GetPostStepPoint()->GetVelo << 913           << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().y()
754   G4cout << "         Volume Name         : "  << 914           << G4endl;
755          << fStep->GetPreStepPoint()->GetPhysi << 915    G4cout << "         Momentum - z (MeV/c): " 
756   if (fStep->GetPostStepPoint()->GetPhysicalVo << 916           << std::setw(20) << fStep->GetPreStepPoint()->GetMomentum().z()
757     volName = fStep->GetPostStepPoint()->GetPh << 917           << std::setw(20) << fStep->GetPostStepPoint()->GetMomentum().z()
758   }                                            << 918           << G4endl;
759   else {                                       << 919    G4cout << "         Total Energy (MeV)  : " 
760     volName = "OutOfWorld";                    << 920           << std::setw(20) << fStep->GetPreStepPoint()->GetTotalEnergy()
761   }                                            << 921           << std::setw(20) << fStep->GetPostStepPoint()->GetTotalEnergy()
762   G4cout << std::setw(20) << volName << G4endl << 922           << G4endl;
763   G4cout << "         Safety (mm)         : "  << 923    G4cout << "         Kinetic Energy (MeV): " 
764          << fStep->GetPreStepPoint()->GetSafet << 924           << std::setw(20) << fStep->GetPreStepPoint()->GetKineticEnergy()
765          << fStep->GetPostStepPoint()->GetSafe << 925           << std::setw(20) << fStep->GetPostStepPoint()->GetKineticEnergy()
766   G4cout << "         Polarization - x    : "  << 926           << G4endl;
767          << fStep->GetPreStepPoint()->GetPolar << 927    G4cout << "         Velocity (mm/ns)    : " 
768          << fStep->GetPostStepPoint()->GetPola << 928           << std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
769   G4cout << "         Polarization - y    : "  << 929           << std::setw(20) << fStep->GetPostStepPoint()->GetVelocity()
770          << fStep->GetPreStepPoint()->GetPolar << 930           << G4endl;
771          << fStep->GetPostStepPoint()->GetPola << 931    G4cout << "         Volume Name         : "
772   G4cout << "         Polarization - Z    : "  << 932           << std::setw(20)
773          << fStep->GetPreStepPoint()->GetPolar << 933           << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
774          << fStep->GetPostStepPoint()->GetPola << 934    if (fStep->GetPostStepPoint()->GetPhysicalVolume())
775   G4cout << "         Weight              : "  << 935    {
776          << fStep->GetPreStepPoint()->GetWeigh << 936      volName = fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName();
777          << fStep->GetPostStepPoint()->GetWeig << 937    }
778   G4cout << "         Step Status         : "; << 938    else
779   G4StepStatus tStepStatus = fStep->GetPreStep << 939    {
780   if (tStepStatus == fGeomBoundary) {          << 940      volName = "OutOfWorld";
781     G4cout << std::setw(20) << "Geom Limit";   << 941    }
782   }                                            << 942    G4cout << std::setw(20) << volName << G4endl;
783   else if (tStepStatus == fAlongStepDoItProc)  << 943    G4cout << "         Safety (mm)         : " 
784     G4cout << std::setw(20) << "AlongStep Proc << 944           << std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
785   }                                            << 945           << std::setw(20) << fStep->GetPostStepPoint()->GetSafety()
786   else if (tStepStatus == fPostStepDoItProc) { << 946           << G4endl;
787     G4cout << std::setw(20) << "PostStep Proc" << 947    G4cout << "         Polarization - x    : " 
788   }                                            << 948           << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().x()
789   else if (tStepStatus == fAtRestDoItProc) {   << 949           << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().x()
790     G4cout << std::setw(20) << "AtRest Proc";  << 950           << G4endl;
791   }                                            << 951    G4cout << "         Polarization - y    : " 
792   else if (tStepStatus == fUndefined) {        << 952           << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().y()
793     G4cout << std::setw(20) << "Undefined";    << 953           << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().y()
794   }                                            << 954           << G4endl;
795                                                << 955    G4cout << "         Polarization - Z    : " 
796   tStepStatus = fStep->GetPostStepPoint()->Get << 956           << std::setw(20) << fStep->GetPreStepPoint()->GetPolarization().z()
797   if (tStepStatus == fGeomBoundary) {          << 957           << std::setw(20) << fStep->GetPostStepPoint()->GetPolarization().z()
798     G4cout << std::setw(20) << "Geom Limit";   << 958           << G4endl;
799   }                                            << 959    G4cout << "         Weight              : " 
800   else if (tStepStatus == fAlongStepDoItProc)  << 960           << std::setw(20) << fStep->GetPreStepPoint()->GetWeight()
801     G4cout << std::setw(20) << "AlongStep Proc << 961           << std::setw(20) << fStep->GetPostStepPoint()->GetWeight()
802   }                                            << 962           << G4endl;
803   else if (tStepStatus == fPostStepDoItProc) { << 963    G4cout << "         Step Status         : " ;
804     G4cout << std::setw(20) << "PostStep Proc" << 964    G4StepStatus  tStepStatus = fStep->GetPreStepPoint()->GetStepStatus();
805   }                                            << 965    if( tStepStatus == fGeomBoundary )
806   else if (tStepStatus == fAtRestDoItProc) {   << 966    {
807     G4cout << std::setw(20) << "AtRest Proc";  << 967      G4cout << std::setw(20) << "Geom Limit";
808   }                                            << 968    }
809   else if (tStepStatus == fUndefined) {        << 969    else if ( tStepStatus == fAlongStepDoItProc )
810     G4cout << std::setw(20) << "Undefined";    << 970    {
811   }                                            << 971      G4cout << std::setw(20) << "AlongStep Proc.";
812                                                << 972    }
813   G4cout << G4endl;                            << 973    else if ( tStepStatus == fPostStepDoItProc )
814   G4cout << "         Process defined Step: "; << 974    {
815   if (fStep->GetPreStepPoint()->GetProcessDefi << 975      G4cout << std::setw(20) << "PostStep Proc";
816     G4cout << std::setw(20) << "Undefined";    << 976    }
817   }                                            << 977    else if ( tStepStatus == fAtRestDoItProc )
818   else {                                       << 978    {
819     G4cout << std::setw(20) << fStep->GetPreSt << 979      G4cout << std::setw(20) << "AtRest Proc";
820   }                                            << 980    }
821   if (fStep->GetPostStepPoint()->GetProcessDef << 981    else if ( tStepStatus == fUndefined )
822     G4cout << std::setw(20) << "Undefined";    << 982    {
823   }                                            << 983      G4cout << std::setw(20) << "Undefined";
824   else {                                       << 984    }
825     G4cout << std::setw(20) << fStep->GetPostS << 985 
826   }                                            << 986    tStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
827   G4cout.precision(oldprc);                    << 987    if( tStepStatus == fGeomBoundary )
828                                                << 988    {
829   G4cout << G4endl;                            << 989      G4cout << std::setw(20) << "Geom Limit";
830   G4cout << "      --------------------------- << 990    }
831          << "----------------" << G4endl;      << 991    else if ( tStepStatus == fAlongStepDoItProc )
832 }                                              << 992    {
833                                                << 993      G4cout << std::setw(20) << "AlongStep Proc.";
834 ////////////////////////////////////////////// << 994    }
835 void G4SteppingVerbose::UseBestUnit(G4int prec << 995    else if ( tStepStatus == fPostStepDoItProc )
836 ////////////////////////////////////////////// << 996    {
837 {                                              << 997      G4cout << std::setw(20) << "PostStep Proc";
838   useBestUnitPrecision = prec;                 << 998    }
839 }                                              << 999    else if ( tStepStatus == fAtRestDoItProc )
840                                                << 1000    {
841 ////////////////////////////////////////////// << 1001      G4cout << std::setw(20) << "AtRest Proc";
842 G4int G4SteppingVerbose::BestUnitPrecision()   << 1002    }
843 ////////////////////////////////////////////// << 1003    else if ( tStepStatus == fUndefined )
844 {                                              << 1004    {
845   return useBestUnitPrecision;                 << 1005      G4cout << std::setw(20) << "Undefined";
                                                   >> 1006    }
                                                   >> 1007 
                                                   >> 1008    G4cout << G4endl;
                                                   >> 1009    G4cout << "         Process defined Step: " ;
                                                   >> 1010    if( fStep->GetPreStepPoint()->GetProcessDefinedStep() == 0 )
                                                   >> 1011    {
                                                   >> 1012      G4cout << std::setw(20) << "Undefined";
                                                   >> 1013    }
                                                   >> 1014    else
                                                   >> 1015    {
                                                   >> 1016      G4cout << std::setw(20)
                                                   >> 1017             << fStep->GetPreStepPoint()
                                                   >> 1018                     ->GetProcessDefinedStep()->GetProcessName();
                                                   >> 1019    }
                                                   >> 1020    if( fStep->GetPostStepPoint()->GetProcessDefinedStep() == 0)
                                                   >> 1021    {
                                                   >> 1022      G4cout << std::setw(20) << "Undefined";
                                                   >> 1023    }
                                                   >> 1024    else
                                                   >> 1025    {
                                                   >> 1026      G4cout << std::setw(20)
                                                   >> 1027             << fStep->GetPostStepPoint()
                                                   >> 1028                     ->GetProcessDefinedStep()->GetProcessName(); 
                                                   >> 1029    }
                                                   >> 1030    G4cout.precision(oldprc);
                                                   >> 1031 
                                                   >> 1032    G4cout << G4endl;
                                                   >> 1033    G4cout << "      -------------------------------------------------------" 
                                                   >> 1034           << "----------------" << G4endl;
846 }                                                 1035 }
847                                                   1036