Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
XrayFluoSteppingVerbose.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 // $Id: XrayFluoSteppingVerbose.cc
28 // GEANT4 tag $Name: xray_fluo-V03-02-00
29 //
30 // Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
31 //
32 // History:
33 // -----------
34 // 28 Nov 2001 Elena Guardincerri Created
35 //
36 // -------------------------------------------------------------------
37 
39 #include "G4SteppingManager.hh"
40 
41 #include "G4UnitsTable.hh"
42 
46 {
47 
48  G4cout << "XrayFluoSteppingVerbose created" << G4endl;
49 
50 }
51 
55 {
56 
57  G4cout << "XrayFluoSteppingVerbose deleted" << G4endl;
58 
59 }
60 
64 {
65  CopyState();
66 
67  G4int prec = G4cout.precision(3);
68 
69  if( verboseLevel >= 1 ){
70  if( verboseLevel >= 4 ) VerboseTrack();
71  if( verboseLevel >= 3 ){
72  G4cout << G4endl;
73  G4cout << std::setw( 5) << "#Step#" << " "
74  << std::setw( 6) << "X" << " "
75  << std::setw( 6) << "Y" << " "
76  << std::setw( 6) << "Z" << " "
77  << std::setw( 9) << "KineE" << " "
78  << std::setw( 9) << "dEStep" << " "
79  << std::setw(10) << "StepLeng"
80  << std::setw(10) << "TrakLeng"
81  << std::setw(10) << "NextVolu"
82  << std::setw(10) << "Process" << G4endl;
83  }
84 
85  G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
86  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
87  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
88  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
89  << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
90  << std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
91  << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
92  << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
93 
94  // if( fStepStatus != fWorldBoundary){
95  if( fTrack->GetNextVolume() != 0 ) {
96  G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName();
97  } else {
98  G4cout << std::setw(10) << "OutOfWorld";
99  }
100 
101  if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
102  G4cout << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
103  ->GetProcessName();
104  } else {
105  G4cout << "User Limit";
106  }
107 
108  G4cout << G4endl;
109 
110  if( verboseLevel == 2 ){
111  G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
114  if(tN2ndariesTot>0){
115  G4cout << " :----- List of 2ndaries - "
116  << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
117  << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
118  << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
119  << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
120  << "), "
121  << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
122  << " ---------------"
123  << G4endl;
124 
125  for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
126  lp1<(*fSecondary).size(); lp1++){
127  G4cout << " : "
128  << std::setw(6)
129  << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
130  << std::setw(6)
131  << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
132  << std::setw(6)
133  << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
134  << std::setw(6)
135  << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
136  << std::setw(10)
137  << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
138  G4cout << G4endl;
139  }
140 
141  G4cout << " :-----------------------------"
142  << "----------------------------------"
143  << "-- EndOf2ndaries Info ---------------"
144  << G4endl;
145  }
146  }
147 
148  }
149  G4cout.precision(prec);
150 }
151 
155 {
156 
157  CopyState();
158 G4int prec = G4cout.precision(3);
159  if( verboseLevel > 0 ){
160 
161  G4cout << std::setw( 5) << "Step#" << " "
162  << std::setw( 6) << "X" << " "
163  << std::setw( 6) << "Y" << " "
164  << std::setw( 6) << "Z" << " "
165  << std::setw( 9) << "KineE" << " "
166  << std::setw( 9) << "dEStep" << " "
167  << std::setw(10) << "StepLeng"
168  << std::setw(10) << "TrakLeng"
169  << std::setw(10) << "NextVolu"
170  << std::setw(10) << "Process" << G4endl;
171 
172  G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
173  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
174  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
175  << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
176  << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
177  << std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
178  << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
179  << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
180 
181  if(fTrack->GetNextVolume()){
182  G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName() << " ";
183  } else {
184  G4cout << std::setw(10) << "OutOfWorld" << " ";
185  }
186  G4cout << std::setw(10) << "initStep" << G4endl;
187  }
188  G4cout.precision(prec);
189 }
190 
191 
192 
193 
194 
195 
196 
197 
Float_t x
Definition: compare.C:6
G4double GetKineticEnergy() const
static const double prec
Definition: RanecuEngine.cc:58
#define G4endl
Definition: G4ios.hh:61
Float_t y
Definition: compare.C:6
Double_t z
double z() const
G4int GetCurrentStepNumber() const
G4VPhysicalVolume * GetNextVolume() const
G4double GetTrackLength() const
G4double GetStepLength() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
const G4ThreeVector & GetPosition() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
G4TrackVector * fSecondary
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
double x() const
double y() const
const G4VProcess * GetProcessDefinedStep() const
const G4String & GetName() const