RAYLEIGH: Segmentation fault

Hi all,

I’m trying to investigate the properties of a plastic scintillator. All seems to work more or less fine and now I’m trying to include RAYLEIGH scattering. Since I have no idea of the values that I should use for this property I wanted to start using the same values as ABSLENGTH. However when I include this (second line, using exactly the same values of ABSLENGTH):
scintMPT->AddProperty(“ABSLENGTH”, absorbEnergy_pvt, Absorb_pvt, abs_entries_pvt);
scintMPT->AddProperty(“RAYLEIGH”, absorbEnergy_pvt, Rayleigh_pvt, abs_entries_pvt);

I get a segmentation fault. If I remove the line with RAYLEIGH it works fine. Any idea of what could be the problem? I have included RAYLEIGH in my physics list…

Thanks in advance!

Luis

What do you set these values to?
absorbEnergy_pvt, Rayleigh_pvt, abs_entries_pvt

Also, it is much easier to use the predefined G4OpticalPhysics list rather than creating your own. See the extended/optical examples in main().

I’m reading the values from a txt file, the values are ok since it works for the ABSLENGTH. Attached the txt file of what I get when I do DumpValues () of the RAYLEIGH G4MaterialPropertyVector, so units ev mm.ABS.txt (9.8 KB)
I have used the examples for my physics list. So for Rayleigh:
#include “G4OpRayleigh.hh”

G4ThreadLocal G4OpRayleigh* PhysicsList::fRayleighScatteringProcess = 0;

fRayleighScatteringProcess = new G4OpRayleigh();

pmanager->AddDiscreteProcess(fRayleighScatteringProcess);

Any hint of what should I check?

Thanks in advance!
Luis

I have some more info. The setup that I’m simulating is a PVT sample surrounded by PMTs (see image), then I place a reflector on top of the sample. Well it turns out that if I remove the reflector the simulations runs. However it works ok, with and without reflector if I’m not using the RAYLEIGH property, so maybe that can give some hint, but it’s seems that the problem is related to the reflector, so maybe there is conflict between RAYLEIGH and photons being reflected…

I meant, as a debugging measure at least, use G4OpticalPhysics rather than your own physics list.

If that doesn’t help, run in debug mode and provide the backtrace.