Skip to content

Commit

Permalink
Add SR dependent bad PMT list (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeperio authored and feigaodm committed Dec 19, 2017
1 parent 5bf6e1f commit eaea8a1
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions hax/treemakers/posrec.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ def __init__(self):
# Threshold for s1_aft probability calculation
self.low_pe_threshold = 10

self.list_bad_pmts = [1, 2, 12, 26, 34, 62, 65, 79, 86, 88, 102, 118,
130, 134, 135, 139, 148, 150, 152, 162, 178, 183,
190, 198, 206, 213, 214, 234, 239, 244, 27, 73,
91, 137, 167, 203]

self.ntop_pmts = len(self.pax_config['DEFAULT']['channels_top'])

def get_data(self, dataset, event_list=None):
Expand Down Expand Up @@ -187,11 +182,28 @@ def extract_data(self, event):
s2 = event.peaks[interaction.s2]

# Position reconstruction based on NN from TensorFlow

# Hardcode warning, this should come with NN model eventually
# xenon:xenon1t:analysis:sciencerun1:pmt#list_of_pmts_excluded_from_sr1_analysis_shingo
if self.run_number <= 6385: # SR0
list_bad_pmts = [1, 12, 26, 34, 51, 62, 65, 79, 86, 88, 102, 118,
130, 134, 135, 139, 148, 150, 152, 162, 178, 183,
198, 206, 213, 214, 234, 239, 244, 27, 73,
91, 137, 167, 203]

else: # SR1
list_bad_pmts = [1, 2, 12, 26, 34, 62, 65, 79, 86, 88, 102, 118,
130, 134, 135, 139, 148, 150, 152, 162, 178, 183,
190, 198, 206, 213, 214, 234, 239, 244, 27, 73,
91, 137, 167, 203]

s2apc = np.array(list(s2.area_per_channel))
s2apc_clean = []

for ipmt, s2_t in enumerate(s2apc):
if ipmt not in self.list_bad_pmts and ipmt < self.ntop_pmts:
if ipmt not in list_bad_pmts and ipmt < self.ntop_pmts:
s2apc_clean.append(s2_t)

s2apc_clean = np.asarray(s2apc_clean)
s2apc_clean_norm = s2apc_clean / s2apc_clean.sum()
s2apc_clean_norm = s2apc_clean_norm.reshape(1, len(s2apc_clean_norm))
Expand Down

0 comments on commit eaea8a1

Please sign in to comment.