File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -310,12 +310,12 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* event) {
310310 1.0 ,
311311 -1 * positionOnEllipseRotated.Y (),
312312 };
313- const auto [intersectionFlag, intersection] = IntersectionLineSphere (positionOrigin, direction);
313+ auto [intersectionFlag, intersection] = IntersectionLineSphere (positionOrigin, direction);
314314 if (!intersectionFlag) {
315- cerr << " PrimaryGeneratorAction: cosmic generator intersection not found (this should never "
316- " happen) "
315+ cout << " PrimaryGeneratorAction - ERROR : cosmic generator failed to find intersection. This "
316+ " could happen very rarely. If it happens often, it's a bug. "
317317 << endl;
318- exit ( 1 );
318+ intersection = positionOrigin; // just use the origin position (this should almost never happen)
319319 }
320320
321321 fParticleGun .SetParticleEnergy (particle.GetEnergy () * keV);
You can’t perform that action at this time.
0 commit comments