gaps_online.events#

Event classes#

class gaps_online.events.MergedEvent#
from_telemetrypacket(packet)#

Populate a merged event from a TelemetryPacket.

Telemetry packet type should be 90 (MergedEvent)

tof#
tracker_pointcloud#
tracker_v1#
tracker_v2#
version#
class gaps_online.events.TofEvent#
event_id#
from_file(filename, start=0, nevents=0)#
from_tofpacket(packet)#
get_missing_paddles_hg(mapping)#
get_missing_paddles_wf(mapping)#
get_summary()#
hits#
mastertriggerevent#
nhits#
nhits_umb#
pack()#
pointcloud#

RB Link IDS (not RB ids) which fall into the trigger window

rbevents#
trigger_hits#

Get the combination of triggered DSI/J/CH on the MTB which formed the trigger. This does not include further hits which fall into the integration window. For those, se rb_link_mask

The returned values follow the TOF convention to start with 1, so that we can use them to look up LTB ids in the db.

# Returns

Vec<(hit)> where hit is (DSI, J, (CH, CH), LTBThreshold)

waveforms#
class gaps_online.events.TofEventSummary#
edep#

Total energy depostion in the complete TOF

Utilizes Philip's formula based on peak height

edep_cortina#

Total energy depostion in the Cortina

Utilizes Philip's formula based on peak height

edep_cube#

Total energy depostion in the Cube

Utilizes Philip's formula based on peak height

edep_umbrella#

Total energy depostion in the Umbrella

Utilizes Philip's formula based on peak height

event_id#
event_status#
from_tofeventpacket(packet)#

This can get a PyTofEventSummary from a TofPacket of Type "TofEvent" and will discard all the waveforms from that packet

from_tofpacket(packet)#

Unpack a tofpacket

get_missing_paddles_hg(mapping)#

Compare the hg hits of the event with the triggered paddles and return the paddles which have at least a missing HG hit

get_triggered_paddles(mapping)#

Get all the paddle ids which have been triggered

hits#
lightspeed_cleaning(t_err)#

Remove hits from the hitseries which can not be caused by the same particle, which means that for these two specific hits beta with respect to the first hit in the event is larger than one That this works, first hits need to be "normalized" by calling normalize_hit_times

lost_hits#

The hits we were not able to read out because the DRS4 chip on the RBs was busy

nhits#
nhits_cbe#
nhits_cor#
nhits_umb#
normalize_hit_times()#
pack()#

Pack a TofEventSummary into its corresponding TofPacket

pointcloud#

RB Link IDS (not RB ids) which fall into the trigger window

remove_non_causal_hits()#

Remove all hits from the event's hit series which do NOT obey causality. that is where the timings measured at ends A and B can not be correlated by the assumed speed of light in the paddle

set_timing_offsets(timing_offsets)#
status#
timestamp16#
timestamp32#
timestamp48#
trigger_hits#

Hits which formed a trigger

trigger_sources#

The active triggers in this event. This can be more than one, if multiple trigger conditions are satisfied.

class gaps_online.events.TofHit#
baseline_a#
baseline_a_rms#
baseline_b#
baseline_b_rms#
cable_delay#
charge_a#
charge_b#
coax_cbl_time#
distance(other)#

Calculate the distance to another hit. For this to work, the hit coordinates have had to be determined, so this will only return a propper result after the paddle information is added

edep#
event_t0#

Event t0 is the calculated interaction time based on the RELATIVE phase shifts consdering ALL hits in this event. This might be of importance to catch rollovers in the phase of channel9. In total, we are restricting ourselves to a time of 50ns per events and adjust the phase in such a way that everything fits into this interval. This will significantly import the beta reconstruction for particles which hit the TOF within this timing window.

If a timing offset is set, this will be added

hart_cbl_time#
obeys_causality#
paddle_id#

The paddle id (1-160) of the hit paddle

paddle_len#
peak_a#
peak_b#
phase#
phase_delay#
pos#

Reconstructed particle interaction position along the long axis of the paddle. For the other dimensions, there is no information about the position. Reconstructed with the waveforms of both paddle ends.

set_paddle(plen, clen, coax_cbl_time, hart_cbl_time)#

Set the length and cable length for the paddle FIXME - take gaps_online.db.Paddle as argument

set_timing_offset(offset)#
t0#

Reconstructed particle interaction time, calculated from the waveforms of the two different paddle ends. If the paddle has been set, this takes phase and cable length into account

t0_uncorrected#
time_a#
time_b#
version#
x#
y#
z#
class gaps_online.events.RBCalibration#
d_v#
from_file(filename, discard_data=True)#

Load the calibration from a file with a TofPacket of type RBCalibration in it

# Arguments:

  • filename : File with a TofPacket of type RBCalibration in it

  • discard_data : Throw away event data after loading

noi_data#
rb_id#
tbin#
tcal_data#
v_dips#
v_inc#
v_offsets#
vcal_data#
class gaps_online.events.TriggerType#
Any = TriggerType.Any#
ConfigurableTrigger = TriggerType.ConfigurableTrigger#
CorCubeSide = TriggerType.CorCubeSide#
FixedRate = TriggerType.FixedRate#
Forced = TriggerType.Forced#
Gaps = TriggerType.Gaps#
Gaps211 = TriggerType.Gaps211#
Gaps422 = TriggerType.Gaps422#
Gaps633 = TriggerType.Gaps633#
Poisson = TriggerType.Poisson#
Track = TriggerType.Track#
TrackCentral = TriggerType.TrackCentral#
TrackUmbCentral = TriggerType.TrackUmbCentral#
Umb3Cube = TriggerType.Umb3Cube#
UmbCorCube = TriggerType.UmbCorCube#
UmbCube = TriggerType.UmbCube#
UmbCubeZ = TriggerType.UmbCubeZ#
Unknown = TriggerType.Unknown#
class gaps_online.events.RBWaveform#
adc_a#
adc_b#
apply_spike_filter()#
calibrate(cali)#

Apply the readoutboard calibration to convert adc/bins to millivolts and nanoseconds

event_id#
from_tofpacket(packet)#
paddle_id#

Paddle ID of this wveform (1-160)

rb_channel_a#
rb_channel_b#
rb_id#
stop_cell#
times_a#
times_b#
voltages_a#
voltages_b#
class gaps_online.events.EventStatus#
AnyDataMangling = EventStatus.AnyDataMangling#
CRC32Wrong = EventStatus.CRC32Wrong#
CellAndChnSyncErrors = EventStatus.CellAndChnSyncErrors#
CellSyncErrors = EventStatus.CellSyncErrors#
ChannelIDWrong = EventStatus.ChannelIDWrong#
ChnSyncErrors = EventStatus.ChnSyncErrors#
EventTimeOut = EventStatus.EventTimeOut#
GoodNoCRCCheck = EventStatus.GoodNoCRCCheck#
GoodNoCRCOrErrBitCheck = EventStatus.GoodNoCRCOrErrBitCheck#
GoodNoErrBitCheck = EventStatus.GoodNoErrBitCheck#
IncompatibleData = EventStatus.IncompatibleData#
IncompleteReadout = EventStatus.IncompleteReadout#
NoChannel9 = EventStatus.NoChannel9#
Perfect = EventStatus.Perfect#
TailWrong = EventStatus.TailWrong#
Unknown = EventStatus.Unknown#