DUNE / larnd-sim

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

Feature/limited light backtracking with MAX_MC_TRUTH_IDS = 3 and MC_LIGHT_THRESHOLD=1 #175

Closed marjoleinvannuland closed 11 months ago

marjoleinvannuland commented 11 months ago

Very limited light backtracking. Per light detector per tick true photons per segment are saved. The maximum number of segments per light detector per tick is 3. Only light signals larger than 1 pe are accepted. The segments are sorted in order of the number of photons they contribute to a light detector, so we get only the most relevant segments. NB. these settings cause unpredictable cuda memory errors, setting MAX_MC_TRUTH_IDS=0 will disable the light truth info.

YifanC commented 11 months ago

Hi @marjoleinvannuland , Thank you for the PR. Some very minor comments. I hope it's not too late.

  1. To be able to utilise the default values in "larndsim/consts/light.py", I would suggest something like following: MAX_MC_TRUTH_IDS = detprop.get('max_light_truth_ids',MAX_MC_TRUTH_IDS) MC_TRUTH_THRESHOLD = detprop.get('mc_truth_threshold',MC_TRUTH_THRESHOLD) and maybe also add MC_TRUTH_THRESHOLD as a global variable.
  2. I would suggest to keep the default values for MAX_MC_TRUTH_IDS and MC_TRUTH_THRESHOLD as it is in "larndsim/consts/light.py", but add them in the yaml in the simulation_properties. Therefore the parameter adjustment would be in the configuration file rather hardcoded in the script.

I will follow up on the waveform validation plot on slack, but I think with the above two minor comments addressed. It should be ready to go.