From 1e7d0f1ee4f0613f42a848305f9a811cba807070 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Tue, 11 Jun 2024 17:53:52 -0400 Subject: [PATCH] [bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57 --- src/mcx_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mcx_utils.c b/src/mcx_utils.c index f07bb3f8..4e96ff92 100644 --- a/src/mcx_utils.c +++ b/src/mcx_utils.c @@ -3653,6 +3653,7 @@ void mcx_replayprep(int* detid, float* ppath, History* his, Config* cfg) { } cfg->replay.weight[cfg->nphoton] = 1.f; + cfg->replay.tof[cfg->nphoton] = 0.f; cfg->replay.detid[cfg->nphoton] = (detid != NULL) ? detid[i] : 1; for (j = 0; j < his->maxmedia; j++) { @@ -3976,6 +3977,7 @@ void mcx_loadseedfile(Config* cfg) { } cfg->replay.weight[cfg->nphoton] = 1.f; + cfg->replay.tof[cfg->nphoton] = 0.f; cfg->replay.detid[cfg->nphoton] = (hasdetid) ? (int)(ppath[i * his.colcount]) : 1; for (j = hasdetid; j < his.maxmedia + hasdetid; j++) {