Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SR dependent bad PMT list #184

Merged
merged 2 commits into from
Dec 19, 2017
Merged
Changes from all 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
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