icecube.online_filterscripts.online_filters.greco.grecovariables module

Tray Segments for DeepCore L3 Processing.

Adapted from 2012 L3 Scripts to work on newer data.

icecube.online_filterscripts.online_filters.greco.grecovariables.AverageDistance(x, y, z)

Find the average distance between consecutive hits.

Parameters:
  • x (np.array<float>) – Time-sorted lists of x, y, and z positions

  • y (np.array<float>) – Time-sorted lists of x, y, and z positions

  • z (np.array<float>) – Time-sorted lists of x, y, and z positions

Returns:

The mean distance between consecutive hits

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.ChargeRatio(t, q, tWindow=600.0, skip=0, useCharge=True, legacy=False)

Find the fraction of charge contained in the first tWindow ns of the event.

Parameters:
  • t (np.array<float>) – Time-sorted lists of times and charges

  • q (np.array<float>) – Time-sorted lists of times and charges

  • tWindow (float) – Length of the time window to evaluate

  • skip (int) – Skip this number of hits. Useful if there are early hits due to noise

  • useCharge (bool) – If True, return the fraction of the total charge. If False, return the fraction of the total number of hits.

  • legacy (bool) – If True, include the first hit outside the time window in the calculation. If False, do not include the first hit outside the time window.

Returns:

The fraction of the total charge in the window

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.CoGTravel(x, y, z, q, useCharge=True)

Find the apparent distance traveled.

Find the distance between the first quartile and last quartile mean positions. If too few hits are found, return the distance between the first and last hit positions.

Parameters:
  • x (np.array<float>) – Time-sorted lists of x, y, z positions and charges

  • y (np.array<float>) – Time-sorted lists of x, y, z positions and charges

  • z (np.array<float>) – Time-sorted lists of x, y, z positions and charges

  • q (np.array<float>) – Time-sorted lists of x, y, z positions and charges

  • useCharge (bool) – If True, define the quartiles by charge. If False, the first quartile is found by number of hits

Returns:

The distance between the first and last quartile positions

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.DeepCoreCleaning(tray, name, uncleaned_pulses='CleanedInIcePulses', cleaned_srttw_ps='SRTTW_SplitInIcePulses', hlccore_level3_pulses_dc='SRTTWSplitInIcePulsesDC', If=<function <lambda>>)

Clean the pulses for GRECO and LowEn L3.

Run the cleaning modules to produce the hit series needed to start both the GRECO selection and the LowEn L3.

icecube.online_filterscripts.online_filters.greco.grecovariables.DeepCoreCuts(tray, name, splituncleaned='SplitInIcePulses', lowen_level3_prefix='IC2018_LE_L3', useNamePrefix=True, If=<function <lambda>>)

Run the LowEn L3 from 2018.

These cuts are designed to mimic the 2018 LowEnL3 using a cleaner python code interface.

Parameters:
  • tray (I3Tray) – The tray for this segment.

  • name (str) – A unique name for this segment

  • splituncleaned (str) – The name of the trigger-split in-ice pulses in the frame.

  • lowen_level3_prefix (str) – The name to prefix to the “_Vars” and “_bools” returned by this segment.

  • useNamePrefix (bool) – Should the segment name be added to the pulse map?

  • If (function) – A function returning True if an event should be processed and False otherwise.

Returns:

The number of hits causally connected to the trigger

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.GetHitInformation(geometry, hitmap, hitMode=1, indices=False)

Grab the hit information from the hitmap.

We want to grab the x/y/z/t/q from the hit series once and return it for numpy processing of variables. This limits the amount of time we need to spend accessing the frame, making everything slightly more efficient

Parameters:
  • geometry (I3Geometry) – Name of the I3Geometry object to grab the x, y, z information for each hit PMT

  • hitmap (I3RecoPulseSeriesMap) – Pulse map from which to grab information

  • hitMode (int) – Integer referring to how to extract information. Enumeration is: 0: Return information about every individual pulse 1: Return the first hit time and total charge for every PMT

  • indices (bool) – If true, also return an index unique for each dom. Can be used to distinguish between hits on separate doms vs hits on the same dom.

Returns:

  • x, y, z (np.array<float>) – Time-sorted position of each hit from the pulse map

  • t (np.array<float>) – Time-sorted list of times for each hit from the pulse map

  • q (np.array<float>) – Time-sorted list of charges for each hit from the pulse map

icecube.online_filterscripts.online_filters.greco.grecovariables.MeanZ(z, q, useCharge=True)

Find the charge-weighted average Z position of the hits.

Parameters:
  • z (np.array<float>) – Time-sorted lists of z positions and charges

  • q (np.array<float>) – Time-sorted lists of z positions and charges

  • useCharge (bool) – If True, charge-weight the average Z. If False, find the simple mean Z position.

Returns:

The number of hits causally connected to the trigger

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.NAboveTrigger(z, t, q, dom, hierarchy, configIDs=(1010, 1011), tmin=-2000.0, tmax=0.0, minZ=-200, useCharge=True)

Find the veto hits just before the trigger.

Find the number of hits in the upper IceCube region just before the trigger. These are potentially muon hits.

Parameters:
  • z (np.array<float>) – Time-sorted lists of z positions, times, charges, and dom indices

  • t (np.array<float>) – Time-sorted lists of z positions, times, charges, and dom indices

  • q (np.array<float>) – Time-sorted lists of z positions, times, charges, and dom indices

  • dom (np.array<float>) – Time-sorted lists of z positions, times, charges, and dom indices

  • hierarchy (I3TriggerHierarchy) – An I3TriggerHierarchy for the event used to find the trigger times

  • configIDs (list<int>) – A list of trigger configIDs to define the time to search for muon hits

  • tmin (float) – Time window relative to the earliest trigger time. Negative values indicate a time before the trigger, positive values indicate after.

  • tmax (float) – Time window relative to the earliest trigger time. Negative values indicate a time before the trigger, positive values indicate after.

  • minZ (float) – The lowest Z value to use for identifying veto hits

  • useCharge (bool) – If True, return the discovered total charge. If False, return the the total number of hits discovered for the event.

Returns:

The number of hits found satisfying the timing and z criteria

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.TimeToSum(t, q, fraction=0.75, useCharge=True)

Calculate the time to reach fraction% of total charge.

Find the amount of time (in ns) to reach fraction percent of the total charge of the event. Setting useCharge to False disables the use of charge directly and instead just bases the answer on the number of hits.

Parameters:
  • t (np.array<float>) – A time-sorted list of hit times and charges

  • q (np.array<float>) – A time-sorted list of hit times and charges

  • fraction (float) – A value between 0 and 1 giving the fraction of the total charge to find.

  • useCharge (bool) – If True, use the fraction of the total charge of the event. If False, use the fraction of the total number of hits for the event.

Returns:

The time required to reach fraction percent of the total charge.

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.VetoCausalHits(x, y, z, t, q, hierarchy, configIDs=(1010, 1011), useCharge=True)

Find causal hits in the veto.

Find the number of hits in the upper IceCube region causally connected to the triggers. These are potentially muon hits.

Parameters:
  • x (np.array<float>) – Time-sorted lists of positions, times, and charges

  • y (np.array<float>) – Time-sorted lists of positions, times, and charges

  • z (np.array<float>) – Time-sorted lists of positions, times, and charges

  • t (np.array<float>) – Time-sorted lists of positions, times, and charges

  • q (np.array<float>) – Time-sorted lists of positions, times, and charges

  • hierarchy (I3TriggerHierarchy) – An I3TriggerHierarchy for the event used to find the trigger times

  • configIDs (list<int>) – A list of trigger configIDs to define the time to search for muon hits

  • useCharge (bool) – If True, return the discovered total charge. If False, return the the total number of hits discovered for the event.

Returns:

The number of hits causally connected to the trigger

Return type:

float

icecube.online_filterscripts.online_filters.greco.grecovariables.ZTravel(z, q, useCharge=True)

Find the apparent distance traveled in Z.

Find the distance between the first quartile mean z position and average z position of all hits. If too few hits are found, return the distance between the first and mean hit z positions.

Parameters:
  • z (np.array<float>) – Time-sorted lists of z positions and charges

  • q (np.array<float>) – Time-sorted lists of z positions and charges

  • useCharge (bool) – If True, define the quartiles by charge. If False, the first quartile is found by number of hits

Returns:

The distance between the first quartile and average hit z positions

Return type:

float