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

Don't include inactive PMTs in S1 pattern fit #663

Merged
merged 1 commit into from
Jan 17, 2018
Merged
Show file tree
Hide file tree
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
12 changes: 0 additions & 12 deletions pax/config/XENON100.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pax/plugins/interaction_processing/BuildInteractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pax/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down