66 fMaxTrackingStep =1000.*
m;
67 fWas_ResetChordFinders_already_called=
false;
75 delete fSteppingAction;
77 delete fPrimaryGeneratorAction;
78 for (
size_t i=0; i< fVecEquationOfMotion.size();i++)
80 if (fVecEquationOfMotion[i])
delete fVecEquationOfMotion[i];
81 if (fVecChordFinders[i])
delete fVecChordFinders[i];
103 if (!fWas_ResetChordFinders_already_called)
106 fWas_ResetChordFinders_already_called=
true;
122 if (userPrimaryAction)
142 std::vector<G4ChordFinder*> user_chord_finders;
143 std::vector<G4double> user_largest_acceptable_step;
144 for (
size_t i=0;i<fVecChordFinders.size();i++)
146 user_largest_acceptable_step.push_back(-1.);
147 if (fVecChordFinders[i])
149 user_chord_finders.push_back(fVecFieldManagers[i]->GetChordFinder());
150 fVecChordFinders[i]->SetDeltaChord(user_chord_finders[i]->GetDeltaChord());
151 fVecFieldManagers[i]->SetChordFinder(fVecChordFinders[i]);
153 else user_chord_finders.push_back(0);
171 G4double previous_largest_acceptable_step =
179 for (
G4int il=0; il<n_of_lines;il++)
186 for (
size_t i=0; i< fVecEquationOfMotion.size();i++)
188 if (fVecEquationOfMotion[i])
189 fVecEquationOfMotion[i]->SetBackwardDirectionOfIntegration(
true);
195 for (
size_t i=0; i < fVecEquationOfMotion.size();i++)
197 if (fVecEquationOfMotion[i])
198 fVecEquationOfMotion[i]->SetBackwardDirectionOfIntegration(
false);
225 for (
size_t i=0;i<fVecFieldManagers.size();i++)
227 if (user_chord_finders[i])
228 fVecFieldManagers[i]->SetChordFinder(user_chord_finders[i]);
271 void G4BlineTracer::ResetChordFinders()
273 for (
size_t i=0; i<fVecEquationOfMotion.size();i++)
275 delete fVecEquationOfMotion[i];
276 delete fVecChordFinders[i];
279 fVecChordFinders.clear();
280 fVecFieldManagers.clear();
281 fVecMagneticFields.clear();
282 fVecEquationOfMotion.clear();
286 fVecChordFinders.push_back(0);
287 fVecMagneticFields.push_back(0);
288 fVecEquationOfMotion.push_back(0);
290 ->GetFieldManager());
291 if (fVecFieldManagers[0])
293 fVecMagneticFields[0] =
295 if (fVecMagneticFields[0])
310 for (
size_t i=0; i<theVolumeStore->size();i++)
312 if ((*theVolumeStore)[i]->GetFieldManager())
315 fVecFieldManagers.push_back(((*theVolumeStore)[i])->GetFieldManager());
317 fVecFieldManagers[j]->GetDetectorField());
318 fVecEquationOfMotion.push_back(0);
319 fVecChordFinders.push_back(0);
320 if (fVecMagneticFields[j])
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
virtual void EndOfRunAction(const G4Run *aRun)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
Definition of the G4BlineEquation class.
const G4UserSteppingAction * GetUserSteppingAction() const
G4int GetNumberOfVariables() const
Definition of the G4BlineSteppingAction class.
const G4UserStackingAction * GetUserStackingAction() const
Definition of the G4BlineTracer class.
const G4UserEventAction * GetUserEventAction() const
static G4LogicalVolumeStore * GetInstance()
const G4UserTrackingAction * GetUserTrackingAction() const
Definition of the G4BlineTracerMessenger class.
virtual void BeginOfRunAction(const G4Run *aRun)
Definition of the G4BlinePrimaryGeneratorAction class.
void ComputeBlines(G4int nlines)
static G4TransportationManager * GetTransportationManager()
static G4RunManager * GetRunManager()
void SetUserPrimaryAction(G4VUserPrimaryGeneratorAction *anAction)
Definition of the G4BlineEventAction class.
const G4UserRunAction * GetUserRunAction() const
void SetLargestAcceptableStep(G4double newBigDist)
G4PropagatorInField * GetPropagatorInField() const
G4double GetLargestAcceptableStep()
virtual void SetUserAction(G4UserRunAction *userAction)