Dear G4 users,
I’m running a very simple example consisting of gamma rays going through on an optical fibre from which I’m detecting Cherenkov light production.
The optical fibre consists in three layers:
-Silica core
-Silica Cladding
-Aluminium coating
I define optical surface between core and clad and between clad an coat as follows:
// Surface between core & clad
coreCladSurface = new G4OpticalSurface("coreCladSurface");
coreCladSurface->SetType(dielectric_dielectric);
coreCladSurface->SetFinish(ground);
coreCladSurface->SetModel(unified);
// Surface between core & coating
cladCoatSurface = new G4OpticalSurface("cladCoatSurface");
cladCoatSurface->SetType(dielectric_metal);
cladCoatSurface->SetFinish(ground);
cladCoatSurface->SetModel(unified);
G4MaterialPropertiesTable * mptSurfaceCoreClad = new G4MaterialPropertiesTable();
G4MaterialPropertiesTable * mptSurfaceCladCoat = new G4MaterialPropertiesTable();
mptSurfaceCoreClad->AddProperty("REFLECTIVITY", energy, reflectivityClad, 2);
mptSurfaceCladCoat->AddProperty("REFLECTIVITY", energy, reflectivityCoat, 2);
coreCladSurface->SetMaterialPropertiesTable(mptSurfaceCoreClad);
cladCoatSurface->SetMaterialPropertiesTable(mptSurfaceCladCoat);
G4LogicalSkinSurface *skinCore = new G4LogicalSkinSurface("skinCore", logicFiberCore, coreCladSurface);
G4LogicalSkinSurface *skinClad = new G4LogicalSkinSurface("skinClad", logicFiberClad, cladCoatSurface);
I’ve noticed that my simulations are stucked when I define a polished surface Surface->SetFinish(polished)
(by setting /run/printProgress x
, every simulations being run on 20 threads ) :
- Launching 500 run get me stucked on the 200th run
- 5000 runs get me stucked at the 2800th run
- 30000 runs get me stucked at the 18000th run and so on… every time I increase the total number of run, G4 seems to manage to complete a larger amount of runs than when I tell it to simulate fewer runs.
When I set a ground surface Surface->SetFinish(ground)
the calculations run perfectly fine in a few seconds.
I know that it’s not mandatory to define an optical surface as long as we want the interface to be perfectly smooth with refractive index defined in both volumes at each side of the interface, but even with no optical surface definition, my simulations get stuck…
I have the same problem by defining G4LogicalBorderSurface
instead of G4LogicalSkinSurface
.
I guess it’s either a problem with multi-threading, even if I get the same problem with single thread ?
If you have any hint on how to check where does this problem comes from or if you think there is a mistake somewhere else, could you please help me with that ?
Thank you for your help,
Geogeo