| Summary: | Segmentation fault after changing Material of a volume back to the first defined material for this volume | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | David Platten <david.platten> |
| Component: | processes/electromagnetic | Assignee: | Vladimir.Ivantchenko |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | daren.sawkey |
| Priority: | P4 | ||
| Version: | 10.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Macro, detector construction and output files to run with TestEm1 | ||
|
Description
David Platten
2020-11-15 11:20:07 CET
Hello, problem is in your modification inside DetectorConstruction.cc - the line you commented out is needed. In the example itself I do not see any crash if in several runs for this example the 1st material is set (I have checked this with candidate version of Geant4 cand01). VI Hello, to say more: when a material is changed it is not "geometry change" but is "physics change" situation in Geant4, because change of material means different cross sections, dEdx, other values, which should be prepared for the new run. VI (In reply to Vladimir.Ivantchenko from comment #2) > Hello, > > to say more: when a material is changed it is not "geometry change" but is > "physics change" situation in Geant4, because change of material means > different cross sections, dEdx, other values, which should be prepared for > the new run. > > VI Dear Vladimir, Many thanks for your input. My code is now working following the addition of G4RunManager::GetRunManager()->PhysicsHasBeenModified(); before the G4RunManager::GetRunManager()->ReinitializeGeometry(); line. Kind regards, David |