gondola.events#
Every possible event type in GAPS which is relevant for "online" analysis
Functions
|
Calculate an unique identifier for tracker strips from the position in the tracker stack |
Classes
A generic data type |
|
LTB Thresholds as passed on by the MTB [See also](https://gaps1.astro.ucla.edu/wiki/gaps/images/gaps/5/52/LTB_Data_Format.pdf) |
|
|
Event data for each individual ReadoutBoard (RB) |
The RBEvent header gets generated once per event per RB. |
|
Waveform container for Tof waveforms This holds the waveforms for both paddle ends. |
|
|
Main event class for the TOF. |
|
An extracted hit from a TofPaddle, as extracted by the online software and provided algorithm (in v0.11 algorithm is provided by J.Zweerink) |
Hit on a tracker strip |
|
- class gondola.events.TofHit#
An extracted hit from a TofPaddle, as extracted by the online software and provided algorithm (in v0.11 algorithm is provided by J.Zweerink)
A TofHit holds the information for an extracted single hit on a peak, which is defined by a peak in at least one of the two waveforms. The TofHit holds extracted information for both of the waveforms, only if both are available a position reconstruction on the paddle can be attempted.
A and B are the different ends of the paddle
- TOT_high_a#
- TOT_high_b#
- TOT_low_a#
- TOT_low_b#
- TOT_slp_high_a#
- TOT_slp_high_b#
- TOT_slp_low_a#
- TOT_slp_low_b#
- baseline_a#
- baseline_a_rms#
- baseline_b#
- baseline_b_rms#
- cable_delay#
Get the cable correction time
- charge_a#
- charge_b#
- coax_cbl_time#
The time in ns the signal spends in the coax cables from the SiPMs to the RAT
- 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#
Philip's energy deposition based on peak height
- 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#
The time in ns the signal spends in the Harting cables from the RATs to the MTB
- obeys_causality()#
If the two reconstructed pulse times are not related to each other by the paddle length, meaning that they can't be caused by the same event, we dub this hit as "not following causality"
- paddle_id#
The paddle id (1-160) of the hit paddle
- paddle_len#
The length of the paddle, only available after the paddle information has been added through "set_paddle"
- peak_a#
- peak_b#
- phase#
- phase_delay#
Get the delay relative to other readoutboards based on the channel9 sine wave
- pos#
Calculate the position across the paddle from the two times at the paddle ends
This will be measured from the A side
Just to be extra clear, this assumes the two sets of cables for each paddle end have the same length
- set_paddle(plen, coax_cbl_time, hart_cbl_time)#
Set the length and cable length for the paddle FIXME - take gaps_online.db.Paddle as argument
- t0#
That this works, the length of the paddle has to be set before (in mm). This assumes that the cable on both sides of the paddle are the same length
- t0_uncorrected#
Calculate the interaction time based on the peak timings measured at the paddle ends A and B
This does not correct for any cable length or ch9 phase shift
- time_a#
Arrival time of the photons at side A
- time_b#
Arrival time of the photons at side B
- version#
- x#
- y#
- z#
- class gondola.events.TrackerHit#
Hit on a tracker strip
- adc#
- channel#
- energy#
- layer#
- module#
- oscillator#
- row#
- strip_id#
- subtract_pedestal(pedestal)#
Change the ADC value, e.g. if the pedestal should be subtracted
- x#
- y#
- z#
- class gondola.events.RBEventHeader#
The RBEvent header gets generated once per event per RB. Contains information about event id, timestamps, etc.
- channel_mask#
- drs_deadtime#
- drs_lost_trigger#
- event_id#
- fpga_temp#
- get_channels()#
- is_event_fragment#
- is_locked#
- is_locked_last_sec#
- lost_lock#
- lost_lock_last_sec#
- rb_id#
- stop_cell#
- timestamp16#
- timestamp32#
- class gondola.events.RBEvent#
Event data for each individual ReadoutBoard (RB)
- static from_bytestream(bytestream, pos)#
- static from_random()#
- static from_tofpacket(packet)#
- get_waveform(channel)#
Get adc values directly from the RBEvent with zero copy
The channel has to go from 1-9
- get_waveform_slow(channel)#
- header#
- hits#
- pack()#
Pack self into a TofPacket to be written on disk or sent over network
- status#
- waveforms#
- class gondola.events.RBWaveform#
Waveform container for Tof waveforms This holds the waveforms for both paddle ends. Fields are available to hold calibrated waveforms, however, only adc will be saved to disk.
- adc_a#
- adc_b#
- apply_spike_filter()#
- calibrate(cali)#
Apply the readoutboard calibration to convert adc/bins to millivolts and nanoseconds
- charge_a_below_500_trap#
- charge_a_trap#
- charge_b_below_500_trap#
- charge_b_trap#
- event_id#
- static from_bytestream(bytestream, pos)#
- static from_random()#
- static from_tofpacket(packet)#
- get_tot_a(threshold)#
Time over threshold - waveform needs to be calibrated. Paddle end A
- # Arguments:
threshold : value in mV
- get_tot_b(threshold)#
Time over threshold - waveform needs to be calibrated. Paddle end B
- # Arguments:
threshold : value in mV
- max_peak_a_guess#
- max_peak_b_guess#
- pack()#
Pack self into a TofPacket to be written on disk or sent over network
- paddle_id#
Paddle ID of this wveform (1-160)
- rb_channel_a#
- rb_channel_b#
- rb_id#
- stop_cell#
- subtract_pedestals()#
- times_a#
- times_b#
- voltages_a#
- voltages_b#
- class gondola.events.TofEvent#
Main event class for the TOF. This will be sent over telemetry and be written to disk
CHANGELOG: v0.11 (gondola-core): Merges TofEvent, TofEventSummary and MasterTriggerEvent all into a single TofEvent, based on former TofEventSummary. The new TofEvent has the ability to cary RBEvents and thus mimick the "old" TofEvent We are using the version flag to indicate: * ProtocolVersion::Unknown - The "old" TofEventSummary. (now "TofEvent"). No extra
variables for the GCU, no RBEvents
ProtocolVersion::V1 - The version crafted for Antarctica '24/'25 containing a bunch of summary variables for the GCU (e.g. nhits(umbrella)). This version will add these variables to the bytestream and also if ProtocolVersion::V1 is read out from the bytestream, the variables are expected to be in it. This is to keep compatibility with the gcu
ProtocolVersion::V2 - v0.11 (gondola-core) version of TofEvent(Summary). This version will not write out GCU variables and does not expect them to be in the bytestream. If desired, this version can read/write RBEvents.
- ProtocolVersion::V3 - the "latest and greatest". This version has gcuvariables
AND rbevents. RBEvents can be stripped off later on.
- calc_gcu_variables()#
Calculate the TOF part of the interesting events mechanism, whcih is NHIT (CBE, COR, UMB) and EDEP (CBE, COR, UMB)
- copy()#
Emit a copy of self
- event_id#
- event_status#
- static from_bytestream(bytestream, pos)#
- static from_random()#
- static from_tofpacket(packet)#
- get_edep#
Total energy depostion in the complete TOF
Utilizes Philip's formula based on peak height
- get_edep_cortina#
Total energy depostion in the Cortina
Utilizes Philip's formula based on peak height
- get_edep_cube#
Total energy depostion in the Cube
Utilizes Philip's formula based on peak height
- get_edep_umbrella#
Total energy depostion in the Umbrella
Utilizes Philip's formula based on peak height
- 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
- has_any_mangling#
- hitmap#
- 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
- move_hits()#
- nhits#
- nhits_cbe#
- nhits_cor#
- nhits_umb#
- normalize_hit_times()#
- pack()#
Pack self into a TofPacket to be written on disk or sent over network
- pointcloud#
- rb_events#
The event might have RBEvents associated with it
- rb_link_ids#
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
- run_id#
The run id
- static set_packed_status_version(pack, version)#
- set_timing_offsets(timing_offsets)#
- status#
- static strip_packed_rbevents_for_pv3(pack)#
- strip_rbevents()#
- 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.
- static unpack(pack)#
- waveforms#
- class gondola.events.TelemetryEvent#
- event_id#
- static from_telemetrypacket(packet)#
Populate a merged event from a TelemetryPacket.
Telemetry packet type should be 90 (MergedEvent)
- static get_trk_energy(adc, tf)#
- header#
- tof#
- tracker#
- tracker_pointcloud#
- version#
- gondola.events.strip_id(layer, row, module, channel)#
Calculate an unique identifier for tracker strips from the position in the tracker stack
- # Arguments:
layer : tracker layer (0-9)
row : row in layer (0-6)
module : module in row (0-6)
channel : channel in module (0-32)
- class gondola.events.EventQuality#
- Diamond = EventQuality.Diamond#
- FourLeafClover = EventQuality.FourLeafClover#
- Gold = EventQuality.Gold#
- Silver = EventQuality.Silver#
- Unknown = EventQuality.Unknown#
- static from_u8(byte)#
- class gondola.events.TriggerType#
- Any = TriggerType.Any#
- ConfigurableTrigger = TriggerType.ConfigurableTrigger#
- CorCubeSide = TriggerType.CorCubeSide#
- FixedRate = TriggerType.FixedRate#
- Forced = TriggerType.Forced#
- Gaps = TriggerType.Gaps#
- Gaps1044 = TriggerType.Gaps1044#
- 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#
- static from_u8(byte)#
- static transcode_trigger_sources(trigger_sources)#
- class gondola.events.LTBThreshold#
LTB Thresholds as passed on by the MTB [See also](https://gaps1.astro.ucla.edu/wiki/gaps/images/gaps/5/52/LTB_Data_Format.pdf)
- Beta = LTBThreshold.Beta#
- Hit = LTBThreshold.Hit#
- NoHit = LTBThreshold.NoHit#
- Unknown = LTBThreshold.Unknown#
- Veto = LTBThreshold.Veto#
- static from_u8(byte)#
- class gondola.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#
- KnownDeadRB = EventStatus.KnownDeadRB#
- NoChannel9 = EventStatus.NoChannel9#
- Perfect = EventStatus.Perfect#
- RBEventWacky = EventStatus.RBEventWacky#
- TailWrong = EventStatus.TailWrong#
- Unknown = EventStatus.Unknown#
- static from_u8(byte)#
- class gondola.events.DataType#
A generic data type
Describe the purpose of the data. This is the semantics behind it.
- MTBTriggerPoisson = DataType.MTBTriggerPoisson#
- Noi = DataType.Noi#
- Physics = DataType.Physics#
- RBTriggerPeriodic = DataType.RBTriggerPeriodic#
- RBTriggerPoisson = DataType.RBTriggerPoisson#
- TimingCalibration = DataType.TimingCalibration#
- Unknown = DataType.Unknown#
- VoltageCalibration = DataType.VoltageCalibration#
- static from_u8(byte)#