def setup(self): self.electron_drift_velocity = get_correction_from_cmt( self.run_id, self.config['electron_drift_velocity']) self.electron_drift_time_gate = get_correction_from_cmt( self.run_id, self.config['electron_drift_time_gate']) if isinstance(self.config['fdc_map'], str): self.map = InterpolatingMap( get_resource(self.config['fdc_map'], fmt='binary')) elif is_cmt_option(self.config['fdc_map']): self.map = InterpolatingMap( get_cmt_resource( self.run_id, tuple([ 'suffix', self.config['default_reconstruction_algorithm'], *self.config['fdc_map'] ]), fmt='binary')) self.map.scale_coordinates([1., 1., -self.electron_drift_velocity]) else: raise NotImplementedError('FDC map format not understood.')
def setup(self): self.baseline_samples = self.config['baseline_samples_mv'] # Check config of `hit_min_amplitude_mv` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude_mv']): self.hit_thresholds = straxen.get_correction_from_cmt(self.run_id, self.config['hit_min_amplitude_mv']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude_mv'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude_mv']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude_mv']
def setup(self): self.hev_enabled = False self.config['n_tpc_pmts'] = self.config['n_he_pmts'] # Check config of `hit_min_amplitude` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude_he']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude_he']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude_he'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude_he']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude_he']
def setup(self): self.to_pe = straxen.get_correction_from_cmt(self.run_id, self.config['gain_model']) self.hit_left_extension, self.hit_right_extension = self.config[ 'save_outside_hits'] # Check config of `hit_min_amplitude` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude']
def setup(self): self.hev_enabled = ((self.config['hev_gain_model'][0] != 'disabled') and self.config['tail_veto_threshold']) if self.hev_enabled: self.to_pe = straxen.get_correction_from_cmt( self.run_id, self.config['hev_gain_model']) # Check config of `hit_min_amplitude` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude']
def setup(self): self.to_pe = straxen.get_correction_from_cmt(self.run_id, self.config['gain_model']) buffer_pmts = np.zeros(self.config['he_channel_offset']) self.to_pe = np.concatenate((buffer_pmts, self.to_pe)) self.to_pe *= self.config['le_to_he_amplification'] # Check config of `hit_min_amplitude_he` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude_he']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude_he']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude_he'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude_he']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude_he'] self.channel_range = self.config['channel_map']['he']
def setup(self): self.channel_range = self.config['channel_map']['nveto'] self.n_channel = (self.channel_range[1] - self.channel_range[0]) + 1 to_pe = straxen.get_correction_from_cmt(self.run_id, self.config['gain_model_nv']) # Create to_pe array of size max channel: self.to_pe = np.zeros(self.channel_range[1] + 1, dtype=np.float32) self.to_pe[self.channel_range[0]:] = to_pe[:] # Check config of `hit_min_amplitude_nv` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude_nv']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude_nv']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude_nv'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude_nv']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude_nv']
def setup(self): if self.config['peak_min_pmts'] > 2: # Can fix by re-splitting, raise NotImplementedError( f"Raising the peak_min_pmts to {self.config['peak_min_pmts']} " f"interferes with lone_hit definition. " f"See github.com/XENONnT/straxen/issues/295") self.to_pe = straxen.get_correction_from_cmt(self.run_id, self.config['gain_model']) # Check config of `hit_min_amplitude` and define hit thresholds # if cmt config if is_cmt_option(self.config['hit_min_amplitude']): self.hit_thresholds = straxen.get_correction_from_cmt( self.run_id, self.config['hit_min_amplitude']) # if hitfinder_thresholds config elif isinstance(self.config['hit_min_amplitude'], str): self.hit_thresholds = straxen.hit_min_amplitude( self.config['hit_min_amplitude']) else: # int or array self.hit_thresholds = self.config['hit_min_amplitude'] self.channel_range = self.config['channel_map']['tpc']