Loading...
Searching...
No Matches
Public Member Functions | List of all members
F04SteppingVerbose Class Reference

#include <Doxymodules_field.h>

Inheritance diagram for F04SteppingVerbose:
G4SteppingVerbose G4VSteppingVerbose

Public Member Functions

 F04SteppingVerbose ()
 
 ~F04SteppingVerbose () override=default
 
void StepInfo () override
 
void TrackingStarted () override
 

Detailed Description

Definition at line 121 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F04SteppingVerbose()

F04SteppingVerbose::F04SteppingVerbose ( )

Definition at line 37 of file F04SteppingVerbose.cc.

38{
39 G4VSteppingVerbose::SetSilent(1);
40}

◆ ~F04SteppingVerbose()

F04SteppingVerbose::~F04SteppingVerbose ( )
overridedefault

Member Function Documentation

◆ StepInfo()

void F04SteppingVerbose::StepInfo ( )
override

Definition at line 44 of file F04SteppingVerbose.cc.

45{
46 CopyState();
47
48 G4int prec = G4cout.precision(8);
49
50 if (fTrack->GetDefinition()->GetParticleName() == "proton") return;
51// if (fTrack->GetDefinition()->GetParticleName() == "pi+") return;
52// if (fTrack->GetDefinition()->GetParticleName() == "mu+") return;
53 if (fTrack->GetDefinition()->GetParticleName() == "e+") return;
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(10) << "X" << " "
61 << std::setw(10) << "Y" << " "
62 << std::setw(10) << "Z" << " "
63 << std::setw(10) << "KineE" << " "
64 << std::setw(10) << "dEStep" << " "
65 << std::setw(10) << "StepLeng"
66 << std::setw(10) << "TrakLeng"
67 << std::setw(10) << "NextVolu"
68 << std::setw(10) << "Process"
69 << std::setw(10) << "Dir_x" << " "
70 << std::setw(10) << "Dir_y" << " "
71 << std::setw(10) << "Dir_z" << " "
72 << G4endl;
73 }
74
75 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
76 << std::setw(10) << G4BestUnit(fTrack->GetPosition().x(),"Length")
77 << std::setw(10) << G4BestUnit(fTrack->GetPosition().y(),"Length")
78 << std::setw(10) << G4BestUnit(fTrack->GetPosition().z(),"Length")
79 << std::setw(10) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
80 << std::setw(10) << G4BestUnit(fStep->
81 GetTotalEnergyDeposit(),"Energy")
82 << std::setw(10) << G4BestUnit(fStep->GetStepLength(),"Length")
83 << std::setw(10) << G4BestUnit(fTrack->GetTrackLength(),"Length");
84
85 if( fTrack->GetNextVolume() != nullptr ) {
86 G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
87 } else {
88 G4cout << std::setw(10) << "OutOfWorld";
89 }
90
91 if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr){
92 G4cout << " "
93 << std::setw(10) << fStep->GetPostStepPoint()->
94 GetProcessDefinedStep()->GetProcessName();
95 } else {
96 G4cout << " UserLimit";
97 }
98
99// G4cout << std::setw(12) <<
100// G4BestUnit(fTrack->GetMomentumDirection().x(),"Length")
101// << std::setw(12) <<
102// G4BestUnit(fTrack->GetMomentumDirection().y(),"Length")
103// << std::setw(12) <<
104// G4BestUnit(fTrack->GetMomentumDirection().z(),"Length");
105
106 G4cout << G4endl;
107
108 if( verboseLevel == 2 ){
109 G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
110 fN2ndariesAlongStepDoIt +
111 fN2ndariesPostStepDoIt;
112 if(tN2ndariesTot>0){
113 G4cout << " :----- List of 2ndaries - "
114 << "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
115 << "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
116 << ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
117 << ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt
118 << "), "
119 << "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
120 << " ---------------"
121 << G4endl;
122
123 for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
124 lp1<(*fSecondary).size(); lp1++){
125 G4cout << " : "
126 << std::setw(6)
127 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
128 << std::setw(6)
129 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
130 << std::setw(6)
131 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
132 << std::setw(6)
133 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
134 << std::setw(10)
135 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
136 G4cout << G4endl;
137 }
138
139 G4cout << " :-----------------------------"
140 << "----------------------------------"
141 << "-- EndOf2ndaries Info ---------------"
142 << G4endl;
143 }
144 }
145
146 }
147 G4cout.precision(prec);
148}

◆ TrackingStarted()

void F04SteppingVerbose::TrackingStarted ( )
override

Definition at line 152 of file F04SteppingVerbose.cc.

153{
154 CopyState();
155
156 G4int prec = G4cout.precision(3);
157
158 if (fTrack->GetDefinition()->GetParticleName() == "proton") return;
159// if (fTrack->GetDefinition()->GetParticleName() == "pi+") return;
160// if (fTrack->GetDefinition()->GetParticleName() == "mu+") return;
161 if (fTrack->GetDefinition()->GetParticleName() == "e+") return;
162
163 G4cout << G4endl;
164 G4cout << "*******************************************************"
165 << "**************************************************"
166 << G4endl;
167 G4cout << "* G4Track Information: "
168 << " Particle = " << fTrack->GetDefinition()->GetParticleName()
169 << ","
170 << " Track ID = " << fTrack->GetTrackID()
171 << ","
172 << " Parent ID = " << fTrack->GetParentID()
173 << G4endl;
174 G4cout << "*******************************************************"
175 << "**************************************************"
176 << G4endl;
177 G4cout << G4endl;
178
179 if( verboseLevel > 0 ){
180
181 G4cout << std::setw( 5) << "Step#" << " "
182 << std::setw( 6) << "X" << " "
183 << std::setw( 6) << "Y" << " "
184 << std::setw( 6) << "Z" << " "
185 << std::setw( 9) << "KineE" << " "
186 << std::setw( 9) << "dEStep" << " "
187 << std::setw(10) << "StepLeng"
188 << std::setw(10) << "TrakLeng"
189 << std::setw(10) << "Volume" << " "
190 << std::setw(10) << "Process" << G4endl;
191
192 G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
193 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
194 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
195 << std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
196 << std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
197 << std::setw( 6) <<
198 G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
199 << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
200 << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
201
202 if(fTrack->GetNextVolume()){
203 G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
204 } else {
205 G4cout << std::setw(10) << "OutOfWorld";
206 }
207 G4cout << " initStep" << G4endl;
208 }
209 G4cout.precision(prec);
210}

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration