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3 ] [ 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 /examples/extended/runAndEvent/RE05/src/RE05SteppingVerbose.cc (Version 11.3.0) and /examples/extended/runAndEvent/RE05/src/RE05SteppingVerbose.cc (Version 11.1.3)


  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 //                                                 26 //
 27 /// \file RE05/src/RE05SteppingVerbose.cc          27 /// \file RE05/src/RE05SteppingVerbose.cc
 28 /// \brief Implementation of the RE05SteppingV     28 /// \brief Implementation of the RE05SteppingVerbose class
 29 //                                                 29 //
 30                                                    30 
 31 //....oooOO0OOooo........oooOO0OOooo........oo     31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 32 //....oooOO0OOooo........oooOO0OOooo........oo     32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 33                                                    33 
 34 #include "RE05SteppingVerbose.hh"                  34 #include "RE05SteppingVerbose.hh"
 35                                                    35 
 36 #include "G4SteppingManager.hh"                    36 #include "G4SteppingManager.hh"
 37 #include "G4UnitsTable.hh"                         37 #include "G4UnitsTable.hh"
 38                                                    38 
 39 //....oooOO0OOooo........oooOO0OOooo........oo     39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 40                                                    40 
 41 RE05SteppingVerbose::RE05SteppingVerbose() : G <<  41 RE05SteppingVerbose::RE05SteppingVerbose()
                                                   >>  42 : G4SteppingVerbose()
                                                   >>  43 {}
 42                                                    44 
 43 //....oooOO0OOooo........oooOO0OOooo........oo     45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 44                                                    46 
 45 RE05SteppingVerbose::~RE05SteppingVerbose() {} <<  47 RE05SteppingVerbose::~RE05SteppingVerbose()
 46                                                <<  48 {}
                                                   >>  49  
 47 //....oooOO0OOooo........oooOO0OOooo........oo     50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 48                                                    51 
 49 void RE05SteppingVerbose::StepInfo()               52 void RE05SteppingVerbose::StepInfo()
 50 {                                                  53 {
 51   CopyState();                                     54   CopyState();
 52                                                <<  55   
 53   G4int prec = G4cout.precision(3);                56   G4int prec = G4cout.precision(3);
 54                                                    57 
 55   if (verboseLevel >= 1) {                     <<  58   if( verboseLevel >= 1 ){
 56     if (verboseLevel >= 4) VerboseTrack();     <<  59     if( verboseLevel >= 4 ) VerboseTrack();
 57     if (verboseLevel >= 3) {                   <<  60     if( verboseLevel >= 3 ){
 58       G4cout << G4endl;                        <<  61       G4cout << G4endl;    
 59       G4cout << std::setw(5) << "#Step#"       <<  62       G4cout << std::setw( 5) << "#Step#"     << " "
 60              << " " << std::setw(6) << "X"     <<  63              << std::setw( 6) << "X"          << "    "
 61              << "    " << std::setw(6) << "Y"  <<  64              << std::setw( 6) << "Y"          << "    "  
 62              << "    " << std::setw(6) << "Z"  <<  65              << std::setw( 6) << "Z"          << "    "
 63              << "    " << std::setw(9) << "Kin <<  66              << std::setw( 9) << "KineE"      << " "
 64              << " " << std::setw(9) << "dEStep <<  67              << std::setw( 9) << "dEStep"     << " "  
 65              << " " << std::setw(10) << "StepL <<  68              << std::setw(10) << "StepLeng"     
 66              << "Volume"                       <<  69              << std::setw(10) << "TrakLeng" 
 67              << "  " << std::setw(10) << "Proc <<  70              << std::setw(10) << "Volume"    << "  "
 68     }                                          <<  71              << std::setw(10) << "Process"   << G4endl;                  
 69                                                <<  72     }
 70     G4cout << std::setw(5) << fTrack->GetCurre <<  73 
 71            << G4BestUnit(fTrack->GetPosition() <<  74     G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
 72            << G4BestUnit(fTrack->GetPosition() <<  75         << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
 73            << G4BestUnit(fTrack->GetPosition() <<  76         << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
 74            << G4BestUnit(fTrack->GetKineticEne <<  77         << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
 75            << G4BestUnit(fStep->GetTotalEnergy <<  78         << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
 76            << G4BestUnit(fStep->GetStepLength( <<  79         << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
 77            << G4BestUnit(fTrack->GetTrackLengt <<  80         << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
                                                   >>  81         << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
                                                   >>  82         << "  ";
 78                                                    83 
 79     // if( fStepStatus != fWorldBoundary){     <<  84     // if( fStepStatus != fWorldBoundary){ 
 80     if (fTrack->GetNextVolume() != 0) {        <<  85     if( fTrack->GetNextVolume() != 0 ) { 
 81       G4cout << std::setw(10) << fTrack->GetVo     86       G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
 82     }                                          <<  87     } else {
 83     else {                                     << 
 84       G4cout << std::setw(10) << "OutOfWorld";     88       G4cout << std::setw(10) << "OutOfWorld";
 85     }                                              89     }
 86                                                    90 
 87     if (fStep->GetPostStepPoint()->GetProcessD <<  91     if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
 88       G4cout << "  " << std::setw(10)          <<  92       G4cout << "  " 
 89              << fStep->GetPostStepPoint()->Get <<  93         << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
 90     }                                          <<  94                                         ->GetProcessName();
 91     else {                                     <<  95     } else {
 92       G4cout << "   UserLimit";                    96       G4cout << "   UserLimit";
 93     }                                              97     }
 94                                                    98 
 95     G4cout << G4endl;                              99     G4cout << G4endl;
 96                                                   100 
 97     if (verboseLevel == 2) {                   << 101     if( verboseLevel == 2 ){
 98       G4int tN2ndariesTot = fN2ndariesAtRestDo << 102       G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
 99       if (tN2ndariesTot > 0) {                 << 103                             fN2ndariesAlongStepDoIt +
                                                   >> 104                             fN2ndariesPostStepDoIt;
                                                   >> 105       if(tN2ndariesTot>0){
100         G4cout << "    :----- List of 2ndaries    106         G4cout << "    :----- List of 2ndaries - "
101                << "#SpawnInStep=" << std::setw << 107                << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot 
102                << fN2ndariesAtRestDoIt << ",Al << 108                << "(Rest="  << std::setw(2) << fN2ndariesAtRestDoIt
103                << ",Post=" << std::setw(2) <<  << 109                << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
104                << "#SpawnTotal=" << std::setw( << 110                << ",Post="  << std::setw(2) << fN2ndariesPostStepDoIt
                                                   >> 111                << "), "
                                                   >> 112                << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
                                                   >> 113                << " ---------------"
105                << G4endl;                         114                << G4endl;
106                                                   115 
107         for (size_t lp1 = (*fSecondary).size() << 116         for(size_t lp1=(*fSecondary).size()-tN2ndariesTot; 
108           G4cout << "    : " << std::setw(6)   << 117                         lp1<(*fSecondary).size(); lp1++){
109                  << G4BestUnit((*fSecondary)[l << 118           G4cout << "    : "
110                  << G4BestUnit((*fSecondary)[l << 119                  << std::setw(6)
111                  << G4BestUnit((*fSecondary)[l << 120                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
112                  << G4BestUnit((*fSecondary)[l << 121                  << std::setw(6)
                                                   >> 122                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
                                                   >> 123                  << std::setw(6)
                                                   >> 124                  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
                                                   >> 125                  << std::setw(6)
                                                   >> 126                  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
                                                   >> 127                  << std::setw(10)
113                  << (*fSecondary)[lp1]->GetDef    128                  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
114           G4cout << G4endl;                       129           G4cout << G4endl;
115         }                                         130         }
116                                                << 131               
117         G4cout << "    :----------------------    132         G4cout << "    :-----------------------------"
118                << "---------------------------    133                << "----------------------------------"
119                << "-- EndOf2ndaries Info ----- << 134                << "-- EndOf2ndaries Info ---------------"
                                                   >> 135                << G4endl;
120       }                                           136       }
121     }                                             137     }
                                                   >> 138     
122   }                                               139   }
123   G4cout.precision(prec);                         140   G4cout.precision(prec);
124 }                                                 141 }
125                                                   142 
126 //....oooOO0OOooo........oooOO0OOooo........oo    143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127                                                   144 
128 void RE05SteppingVerbose::TrackingStarted()       145 void RE05SteppingVerbose::TrackingStarted()
129 {                                                 146 {
                                                   >> 147 
130   CopyState();                                    148   CopyState();
131   G4int prec = G4cout.precision(3);            << 149 G4int prec = G4cout.precision(3);
132   if (verboseLevel > 0) {                      << 150   if( verboseLevel > 0 ){
133     G4cout << std::setw(5) << "Step#"          << 151 
134            << " " << std::setw(6) << "X"       << 152     G4cout << std::setw( 5) << "Step#"      << " "
135            << "    " << std::setw(6) << "Y"    << 153            << std::setw( 6) << "X"          << "    "
136            << "    " << std::setw(6) << "Z"    << 154            << std::setw( 6) << "Y"          << "    "  
137            << "    " << std::setw(9) << "KineE << 155            << std::setw( 6) << "Z"          << "    "
138            << " " << std::setw(9) << "dEStep"  << 156            << std::setw( 9) << "KineE"      << " "
139            << " " << std::setw(10) << "StepLen << 157            << std::setw( 9) << "dEStep"     << " "  
140            << "Volume"                         << 158            << std::setw(10) << "StepLeng"  
141            << "  " << std::setw(10) << "Proces << 159            << std::setw(10) << "TrakLeng"
142                                                << 160            << std::setw(10) << "Volume"     << "  "
143     G4cout << std::setw(5) << fTrack->GetCurre << 161            << std::setw(10) << "Process"    << G4endl;             
144            << G4BestUnit(fTrack->GetPosition() << 162 
145            << G4BestUnit(fTrack->GetPosition() << 163     G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
146            << G4BestUnit(fTrack->GetPosition() << 164         << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
147            << G4BestUnit(fTrack->GetKineticEne << 165         << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
148            << G4BestUnit(fStep->GetTotalEnergy << 166         << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
149            << G4BestUnit(fStep->GetStepLength( << 167         << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
150            << G4BestUnit(fTrack->GetTrackLengt << 168         << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
                                                   >> 169         << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
                                                   >> 170         << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
                                                   >> 171         << "  ";
151                                                   172 
152     if (fTrack->GetNextVolume()) {             << 173     if(fTrack->GetNextVolume()){
153       G4cout << std::setw(10) << fTrack->GetVo    174       G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
154     }                                          << 175     } else {
155     else {                                     << 
156       G4cout << std::setw(10) << "OutOfWorld";    176       G4cout << std::setw(10) << "OutOfWorld";
157     }                                             177     }
158     G4cout << "    initStep" << G4endl;        << 178     G4cout  << "    initStep" << G4endl;
159   }                                               179   }
160   G4cout.precision(prec);                         180   G4cout.precision(prec);
161 }                                                 181 }
162                                                   182 
163 //....oooOO0OOooo........oooOO0OOooo........oo    183 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164                                                   184