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