From 8252229a650bf32e094761df36dc227184af1c9c Mon Sep 17 00:00:00 2001 From: Jelle Aalbers Date: Wed, 17 Jan 2018 00:56:04 +0100 Subject: [PATCH] Don't include inactive PMTs in S1 pattern fit --- pax/config/XENON100.ini | 12 ------------ .../interaction_processing/BuildInteractions.py | 4 ++-- pax/simulation.py | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/pax/config/XENON100.ini b/pax/config/XENON100.ini index 3b96402b..50dd62e7 100644 --- a/pax/config/XENON100.ini +++ b/pax/config/XENON100.ini @@ -165,18 +165,6 @@ s2_pairing_threshold = 70 # pe [BuildInteractions.BasicInteractionProperties] include_saturation_correction = True -# Add 'zombie PMTS' here -# These are PMTs who have died, but the loss of light yield has not yet been accounted for in the overall S1 or S2 -# light yield map. These PMTs will be treated just like saturated PMTs: when computing the corrected area, -# the observed area in the zombie channels (which will be 0) is replaced by the expected area based on the other PMTs. -# DO NOT keep PMTs here after the light yield maps have been fixed!!! -# If you don't understand why, stop modifying the file and just fix the light yield map! -zombie_pmts_s1 = [] - -# S2 zombie PMTs will only work on the top, as we have no S2(x,y,pmt) patterns for the bottom array. -# For now, all dead top PMTs are included for the S2, since we don't have the S2(x, y) light yield in pax yet... -zombie_pmts_s2 = [] #[9, 12, 39, 58] - [RobustWeightedMean.PosRecRobustWeightedMean] # Remove PMTs that are more than ... away in each step diff --git a/pax/plugins/interaction_processing/BuildInteractions.py b/pax/plugins/interaction_processing/BuildInteractions.py index bf38abb9..e9b83ca9 100644 --- a/pax/plugins/interaction_processing/BuildInteractions.py +++ b/pax/plugins/interaction_processing/BuildInteractions.py @@ -71,8 +71,8 @@ class BasicInteractionProperties(plugin.TransformPlugin): def startup(self): self.s1_light_yield_map = self.processor.simulator.s1_light_yield_map self.s1_patterns = self.processor.simulator.s1_patterns - self.zombie_pmts_s1 = np.array(self.config.get('zombie_pmts_s1', [])) self.tpc_channels = self.config['channels_in_detector']['tpc'] + self.inactive_pmts = np.where(np.array(self.config['gains'][:len(self.tpc_channels)]) < 1)[0] self.include_saturation_correction = self.config.get('include_saturation_correction', False) def transform_event(self, event): @@ -88,7 +88,7 @@ def transform_event(self, event): ia.s1_spatial_correction /= self.s1_light_yield_map.get_value_at(ia) if self.s1_patterns is not None: - confused_s1_channels = np.union1d(s1.saturated_channels, self.zombie_pmts_s1) + confused_s1_channels = np.union1d(s1.saturated_channels, self.inactive_pmts) # Correct for S1 saturation try: diff --git a/pax/simulation.py b/pax/simulation.py index 9a1be7bb..971befb1 100644 --- a/pax/simulation.py +++ b/pax/simulation.py @@ -140,7 +140,7 @@ def __init__(self, config_to_init): self.uniform_to_pe_arr = None # Init s1 pattern maps - # NB: do NOT adjust patterns for QE, map is data derived, so no need. + # We're assuming the map is MC-derived, so we adjust for QE (just like for the S2 maps) log.debug("Initializing s1 patterns...") if c.get('s1_patterns_file', None) is not None: self.s1_patterns = PatternFitter(filename=utils.data_file_name(c['s1_patterns_file']),