Skip to content

Commit

Permalink
[bug] reset replay.tof when tof exceeds tend, like fangq/mcxcl#57
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 11, 2024
1 parent 026eebf commit 1e7d0f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mcx_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 1e7d0f1

Please sign in to comment.