Loading...
Searching...
No Matches
F02SteppingVerbose.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26/// \file field/field02/src/F02SteppingVerbose.cc
27/// \brief Implementation of the F02SteppingVerbose class
28//
29//
30//
31//
32//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35#include "F02SteppingVerbose.hh"
36
37#include "G4SteppingManager.hh"
38#include "G4UnitsTable.hh"
39
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
43{
44 CopyState();
45
46 G4int prec = G4cout.precision(3);
47
48 if( verboseLevel >= 1 ){
49 if( verboseLevel >= 4 ) VerboseTrack();
50 if( verboseLevel >= 3 ){
51 G4cout << G4endl;
52 G4cout << std::setw( 5) << "#Step#" << " "
53 << std::setw( 6) << "X" << " "
54 << std::setw( 6) << "Y" << " "
55 << std::setw( 6) << "Z" << " "
56 << std::setw( 9) << "KineE" << " "
57 << std::setw( 9) << "dEStep" << " "
58 << std::setw(10) << "StepLeng"
59 << std::setw(10) << "TrakLeng"
60 << std::setw(10) << "NextVolu"
61 << std::setw(10) << "Process" << G4endl;
62 }
63
64 G4cout << std::setw( 5)<<fTrack->GetCurrentStepNumber() << " "
65 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().x(),"Length")
66 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().y(),"Length")
67 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().z(),"Length")
68 << std::setw( 6)<<G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
69 << std::setw( 6)<<G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
70 << std::setw( 6)<<G4BestUnit(fStep->GetStepLength(),"Length")
71 << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
72
73 if( fTrack->GetNextVolume() != nullptr ) {
74 G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName();
75 } else {
76 G4cout << std::setw(10) << "OutOfWorld";
77 }
78
79 if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr){
80 G4cout << std::setw(10)
81 << fStep->GetPostStepPoint()->GetProcessDefinedStep()
82 ->GetProcessName();
83 } else {
84 G4cout << " UserLimit";
85 }
86
87 G4cout << G4endl;
88
89 if( verboseLevel == 2 ){
90 G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
91 fN2ndariesAlongStepDoIt +
92 fN2ndariesPostStepDoIt;
93 if(tN2ndariesTot>0){
94 G4cout << " :----- List of 2ndaries - "
95 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
96 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
97 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
98 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
99 << "), "
100 << " ---------------"
101 << G4endl;
102 G4cout << " :-----------------------------"
103 << "----------------------------------"
104 << "-- EndOf2ndaries Info ---------------"
105 << G4endl;
106 }
107 }
108
109 }
110 G4cout.precision(prec);
111}
112
113//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114
116{
117 CopyState();
118 G4int prec = G4cout.precision(3);
119 if( verboseLevel > 0 ){
120
121 G4cout << std::setw( 5) << "Step#" << " "
122 << std::setw( 6) << "X" << " "
123 << std::setw( 6) << "Y" << " "
124 << std::setw( 6) << "Z" << " "
125 << std::setw( 9) << "KineE" << " "
126 << std::setw( 9) << "dEStep" << " "
127 << std::setw(10) << "StepLeng"
128 << std::setw(10) << "TrakLeng"
129 << std::setw(10) << "NextVolu"
130 << std::setw(10) << "Process" << G4endl;
131
132 G4cout << std::setw( 5)<<fTrack->GetCurrentStepNumber() << " "
133 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().x(),"Length")
134 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().y(),"Length")
135 << std::setw( 6)<<G4BestUnit(fTrack->GetPosition().z(),"Length")
136 << std::setw( 6)<<G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
137 << std::setw( 6)<<G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
138 << std::setw( 6)<<G4BestUnit(fStep->GetStepLength(),"Length")
139 << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
140
141 if(fTrack->GetNextVolume()){
142 G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName() << " ";
143 } else {
144 G4cout << std::setw(10) << "OutOfWorld" << " ";
145 }
146 G4cout << std::setw(10) << "initStep" << G4endl;
147 }
148 G4cout.precision(prec);
149}
150
151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Definition of the F02SteppingVerbose class.
void TrackingStarted() override
void StepInfo() override

Applications | User Support | Publications | Collaboration