Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXeSteppingVerbose.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 //
28 //
29 //
30 #include "LXeSteppingVerbose.hh"
31 
32 #include "G4SteppingManager.hh"
33 #include "G4UnitsTable.hh"
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36 
38 
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40 
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
46 {
47 CopyState();
48 
49  G4int prec = G4cout.precision(3);
50 
51  if( verboseLevel >= 1 ){
52  if( verboseLevel >= 4 ) VerboseTrack();
53  if( verboseLevel >= 3 ){
54  G4cout << G4endl;
55  G4cout << std::setw( 5) << "#Step#" << " "
56  << std::setw( 6) << "X" << " "
57  << std::setw( 6) << "Y" << " "
58  << std::setw( 6) << "Z" << " "
59  << std::setw( 9) << "KineE" << " "
60  << std::setw( 9) << "dEStep" << " "
61  << std::setw(10) << "StepLeng"
62  << std::setw(10) << "TrakLeng"
63  << std::setw(10) << "Volume" << " "
64  << std::setw(10) << "Process" << G4endl;
65  }
66 
67  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
68  << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
69  << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
70  << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
71  << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
72  << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
73  << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
74  << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
75  << " ";
76 
77  // if( fStepStatus != fWorldBoundary){
78  if( fTrack->GetNextVolume() != 0 ) {
79  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
80  } else {
81  G4cout << std::setw(10) << "OutOfWorld";
82  }
83 
85  G4cout << " "
86  << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
87  ->GetProcessName();
88  } else {
89  G4cout << " UserLimit";
90  }
91 
92  G4cout << G4endl;
93 
94  if( verboseLevel == 2 ){
95  G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
98  if(tN2ndariesTot>0){
99  G4cout << " :----- List of 2ndaries - "
100  << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
101  << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
102  << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
103  << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
104  << "), "
105  << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
106  << " ---------------"
107  << G4endl;
108 
109  for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
110  lp1<(*fSecondary).size(); lp1++){
111  G4cout << " : "
112  << std::setw(6)
113  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
114  << std::setw(6)
115  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
116  << std::setw(6)
117  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
118  << std::setw(6)
119  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
120  << std::setw(10)
121  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
122  G4cout << G4endl;
123  }
124 
125  G4cout << " :-----------------------------"
126  << "----------------------------------"
127  << "-- EndOf2ndaries Info ---------------"
128  << G4endl;
129  }
130  }
131  }
132  G4cout.precision(prec);
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136 
138 {
139  CopyState();
140  G4int prec = G4cout.precision(3);
141  if( verboseLevel > 0 ){
142 
143  G4cout << std::setw( 5) << "Step#" << " "
144  << std::setw( 6) << "X" << " "
145  << std::setw( 6) << "Y" << " "
146  << std::setw( 6) << "Z" << " "
147  << std::setw( 9) << "KineE" << " "
148  << std::setw( 9) << "dEStep" << " "
149  << std::setw(10) << "StepLeng"
150  << std::setw(10) << "TrakLeng"
151  << std::setw(10) << "Volume" << " "
152  << std::setw(10) << "Process" << G4endl;
153 
154  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
155  << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
156  << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
157  << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
158  << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
159  << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
160  << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
161  << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
162  << " ";
163 
164  if(fTrack->GetNextVolume()){
165  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
166  } else {
167  G4cout << std::setw(10) << "OutOfWorld";
168  }
169  G4cout << " initStep" << G4endl;
170  }
171  G4cout.precision(prec);
172 }
173 
174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......