Geant4  10.00.p03
eRositaSteppingVerbose.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 //
27 // $Id$
28 //
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 
33 
34 #include "G4SteppingManager.hh"
35 #include "G4UnitsTable.hh"
36 
37 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38 
40 {}
41 
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
45 {}
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 
50 {
51  CopyState();
52 
53  G4int prec = G4cout.precision(3);
54 
55  if( verboseLevel >= 1 ){
56  if( verboseLevel >= 4 ) VerboseTrack();
57  if( verboseLevel >= 3 ){
58  G4cout << G4endl;
59  G4cout << std::setw( 5) << "#Step#" << " "
60  << std::setw( 6) << "X" << " "
61  << std::setw( 6) << "Y" << " "
62  << std::setw( 6) << "Z" << " "
63  << std::setw( 9) << "KineE" << " "
64  << std::setw( 9) << "dEStep" << " "
65  << std::setw(10) << "StepLeng"
66  << std::setw(10) << "TrakLeng"
67  << std::setw(10) << "Volume" << " "
68  << std::setw(10) << "Process" << G4endl;
69  }
70 
71  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
72  << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
73  << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
74  << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
75  << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
76  << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
77  << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
78  << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
79  << " ";
80 
81  // if( fStepStatus != fWorldBoundary){
82  if( fTrack->GetNextVolume() != 0 ) {
83  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
84  } else {
85  G4cout << std::setw(10) << "OutOfWorld";
86  }
87 
89  G4cout << " "
90  << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
91  ->GetProcessName();
92  } else {
93  G4cout << " UserLimit";
94  }
95 
96  G4cout << G4endl;
97 
98  if( verboseLevel == 2 ){
99  G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
102  if(tN2ndariesTot>0){
103  G4cout << " :----- List of 2ndaries - "
104  << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
105  << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
106  << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
107  << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
108  << "), "
109  << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
110  << " ---------------"
111  << G4endl;
112 
113  for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
114  lp1<(*fSecondary).size(); lp1++){
115  G4cout << " : "
116  << std::setw(6)
117  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
118  << std::setw(6)
119  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
120  << std::setw(6)
121  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
122  << std::setw(6)
123  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
124  << std::setw(10)
125  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
126  G4cout << G4endl;
127  }
128 
129  G4cout << " :-----------------------------"
130  << "----------------------------------"
131  << "-- EndOf2ndaries Info ---------------"
132  << G4endl;
133  }
134  }
135 
136  }
137  G4cout.precision(prec);
138 }
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141 
143 {
144 
145  CopyState();
146 G4int prec = G4cout.precision(3);
147  if( verboseLevel > 0 ){
148 
149  G4cout << std::setw( 5) << "Step#" << " "
150  << std::setw( 6) << "X" << " "
151  << std::setw( 6) << "Y" << " "
152  << std::setw( 6) << "Z" << " "
153  << std::setw( 9) << "KineE" << " "
154  << std::setw( 9) << "dEStep" << " "
155  << std::setw(10) << "StepLeng"
156  << std::setw(10) << "TrakLeng"
157  << std::setw(10) << "Volume" << " "
158  << std::setw(10) << "Process" << G4endl;
159 
160  G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
161  << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
162  << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
163  << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
164  << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
165  << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
166  << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
167  << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
168  << " ";
169 
170  if(fTrack->GetNextVolume()){
171  G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
172  } else {
173  G4cout << std::setw(10) << "OutOfWorld";
174  }
175  G4cout << " initStep" << G4endl;
176  }
177  G4cout.precision(prec);
178 }
179 
180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double GetStepLength() const
G4double z
Definition: TRTMaterials.hh:39
const G4ThreeVector & GetPosition() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
G4VPhysicalVolume * GetNextVolume() const
static const double prec
Definition: RanecuEngine.cc:51
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4int GetCurrentStepNumber() const
G4TrackVector * fSecondary
const G4String & GetName() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4double GetTotalEnergyDeposit() const
G4double GetTrackLength() const
const G4VProcess * GetProcessDefinedStep() const
G4StepPoint * GetPostStepPoint() const
G4VPhysicalVolume * GetVolume() const
#define G4endl
Definition: G4ios.hh:61