DUNE / larnd-sim

Simulation framework for a pixelated Liquid Argon TPC
Apache License 2.0
10 stars 26 forks source link

Light simulation issue 4: Reproducibility #199

Open YifanC opened 5 months ago

YifanC commented 5 months ago

In my naive understanding, the randomness of the light simulation only comes from the detector noise. However, I am seeing some reproduciblility issues when looking for signals (any peaks). In general, the signals are around the same time and around the same channels with some variation. Taking one channel (ch 150) from simulating the second event of MiniRun5_1E19_RHC.convert2h5.00666.EDEPSIM.hdf5 as an example. The seed is not fixed but I don't think it affect it here...(will test again with fixed seed). Four repeats yield quite different results. signal_ch150_MR5_666_rp4 signal_ch150_MR5_666_rp3 signal_ch150_MR5_666_rp2 signal_ch150_MR5_666_rp1

Tag @mjkramer @krwood @liviocali @AWh1t3 for comments

liviocali commented 5 months ago

There is a randomness in the light simulation: The for the number of photons we apply a poisson smearing based on the calculated incidence. See https://github.com/DUNE/larnd-sim/blob/57d1e09b211ea78760f4d88359540399a4621a2a/larndsim/light_sim.py#L232

AWh1t3 commented 5 months ago

Is it a little weird, Livio, that one of Yifan's events has no peak at all? I understand we want poisson fluctuations for the number of PE per time tick, but that one just looks like the light was completely deleted.

krwood commented 5 months ago

In principle, the random number from the poisson sample should be reproducible if we fix the seed. This was also observed not to be the case in the charge simulation, as in Issue #125

YifanC commented 5 months ago

Will test with fixed seed