Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
aborting the wfsim in case of empty instructions from epix
Browse files Browse the repository at this point in the history
  • Loading branch information
Masatoshi Kobayashi committed Jan 24, 2024
1 parent 0364adb commit 473b314
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wfsim/strax_interface.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from copy import deepcopy
from immutabledict import immutabledict
import sys
import logging
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -800,6 +801,10 @@ def get_instructions(self):
epix.run_epix.setup(epix_config),
return_wfsim_instructions=True)

if len(self.instructions_epix)==0 and not 'nveto' in self.config['targets']:
print("the instruction is empty for TPC")
sys.exit(0)

self.g4id.append(self.instructions_epix['g4id'])
log.debug("Epix produced %d instructions in tpc" % (len(self.instructions_epix)))

Expand Down

0 comments on commit 473b314

Please sign in to comment.