icecube.filterscripts.grecovariables module¶
- icecube.filterscripts.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:
- icecube.filterscripts.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.
- Returns:
The fraction of the total charge in the window
- Return type:
- icecube.filterscripts.grecovariables.CoGTravel(x, y, z, q, useCharge=True)¶
Find the distance between the first quartile and last quartile mean positions. If too few hits are found, return the distace 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:
- icecube.filterscripts.grecovariables.DCL3MasterSegment(tray, name, year='12')¶
I3Tray segments should have docstrings. This one doesn’t. Fix it.
- icecube.filterscripts.grecovariables.DeepCoreCuts(tray, name, splituncleaned='SplitInIcePulses', year='13', If=<function <lambda>>)¶
I3Tray segments should have docstrings. This one doesn’t. Fix it.
- icecube.filterscripts.grecovariables.GetHitInformation(geometry, hitmap, hitMode=1)¶
Function to grab the hit information from the hitmap and return it once. 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
- 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.filterscripts.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:
- icecube.filterscripts.grecovariables.NAboveTrigger(z, t, q, hierarchy, configIDs=[1010, 1011], tmin=-2000.0, tmax=0.0, minZ=-200, useCharge=True)¶
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, and charges
t (np.array<float>) – Time-sorted lists of z positions, times, and charges
q (np.array<float>) – Time-sorted lists of z 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
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:
- icecube.filterscripts.grecovariables.PassedDCFilter(frame, year)¶
- icecube.filterscripts.grecovariables.TestForFilter(frame, PassedFilterNames=['DeepCoreFilter_13'], FailedFilterNames=['SlopFilter_13', 'FixedRateFilter_13'])¶
- icecube.filterscripts.grecovariables.TimeToSum(t, q, fraction=0.75, useCharge=True)¶
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:
- icecube.filterscripts.grecovariables.VetoCausalHits(x, y, z, t, q, hierarchy, configIDs=[1010, 1011], useCharge=True)¶
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:
- icecube.filterscripts.grecovariables.ZTravel(z, q, useCharge=True)¶
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 distace 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: