From 750990273ecf8d4ce1a9d9de527516389c934576 Mon Sep 17 00:00:00 2001 From: Ksawi <66205430+Ksawi999@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:48:31 +0100 Subject: [PATCH] Add LITH charge serialization with DTEC --- src/simulation/elements/DTEC.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp index ceaa1cc7c..39273118e 100644 --- a/src/simulation/elements/DTEC.cpp +++ b/src/simulation/elements/DTEC.cpp @@ -92,6 +92,14 @@ static int update(UPDATE_FUNC_ARGS) setFilt = true; photonWl = parts[ID(r)].ctype; } + if (TYP(r) == PT_LITH) + { + int wl_bin = parts[ID(r)].ctype / 4; + if (wl_bin < 0) wl_bin = 0; + if (wl_bin > 25) wl_bin = 25; + setFilt = true; + photonWl = (0x1F << wl_bin); + } } if (setFilt) {