98{
99
100
102 {
105 }
106
107
108
109 G4RunManager* theRunManager = G4RunManager::GetRunManager();
110 auto user_run_action =
112 theRunManager->SetUserAction(this);
113
114 auto user_stepping_action =
117
118 auto userPrimaryAction =
120 if (userPrimaryAction)
123
124 auto user_event_action =
127
128 auto user_tracking_action =
131 theRunManager->SetUserAction(aNullTrackingAction);
132
133 auto user_stacking_action =
136 theRunManager->SetUserAction(aNullStackingAction);
137
138
139
140 std::vector<G4ChordFinder*> user_chord_finders;
141 std::vector<G4double> user_largest_acceptable_step;
143 {
144 user_largest_acceptable_step.push_back(-1.);
146 {
150 }
151 else user_chord_finders.push_back(nullptr);
152 }
153
154
155
156
157
158
159
160
161
162
163
164
165
166
168 G4TransportationManager::GetTransportationManager();
169 G4double previous_largest_acceptable_step =
170 tmanager->GetPropagatorInField()->GetLargestAcceptableStep();
171
172 tmanager->GetPropagatorInField()
174
175
176
177 for (G4int il=0; il<n_of_lines;il++)
178 {
179
180
181
182
183
185 {
188 }
189 theRunManager->BeamOn(1);
190
191
192
194 {
197 }
198 theRunManager->BeamOn(1);
199 }
200
201
202
203
204
205
206
207
208
209 tmanager->GetPropagatorInField()
210 ->SetLargestAcceptableStep(previous_largest_acceptable_step);
211
212
213
214 theRunManager->SetUserAction(user_run_action);
215 theRunManager->SetUserAction(user_event_action);
216 theRunManager->SetUserAction(userPrimaryAction);
217 theRunManager->SetUserAction(user_stepping_action);
218 theRunManager->SetUserAction(user_tracking_action);
219 theRunManager->SetUserAction(user_stacking_action);
220
221
222
224 {
225 if (user_chord_finders[i])
227 }
228}
void SetUserPrimaryAction(G4VUserPrimaryGeneratorAction *anAction)
std::vector< G4FieldManager * > fVecFieldManagers
G4bool fWas_ResetChordFinders_already_called
G4double fMaxTrackingStep