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

adding total deposited energy in the sensitive volume as a new truth instruction dtype #429

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 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 @@ -30,6 +31,7 @@
(('Number of quanta', 'amp'), np.int32),
(('Recoil type of interaction.', 'recoil'), np.int8),
(('Energy deposit of interaction', 'e_dep'), np.float32),
(('Total energy deposit in the sensitive volume', 'tot_e'), np.float32),
(('Eventid like in geant4 output rootfile', 'g4id'), np.int32),
(('Volume id giving the detector subvolume', 'vol_id'), np.int32),
(('Local field [ V / cm ]', 'local_field'), np.float64),
Expand Down Expand Up @@ -799,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
Loading