gondola.tof.analysis#

Classes

TofAnalysis([skip_mangled, skip_timeout, ...])

A container (yeah I know, don't like it either) to keep a bunch of plots together.

class gondola.tof.analysis.TofAnalysis(skip_mangled=True, skip_timeout=True, beta_analysis=True, nbins=90, cuts=<TofCuts: <TofCuts: (void)>>, use_offsets=False, pid_inner=None, pid_outer=None, active=False)#

A container (yeah I know, don't like it either) to keep a bunch of plots together.

This does have some use as a pre-compiled analysis for gander, and as a quick look kind of thing.

The gist here it is independent of the data source, as long as some kind of TofEvent can be plugged in.

define_bins(nbins=70)#

Set the bins for the different histograms for the variables. Only the number of bins can be set

pretty_print_statistics()#

A textual representation for some important numbers, e.g. seen events, cut efficiencies, etc.

property rate#
property rate_nocut#
property run_time#

Get run time from last - first event in seconds

reinit(nbins=90)#

Re-run the initialization routine. This will clear all plots, and reset the binning. This needs to be run in case the binning has been changed

__init__(skip_mangled=True, skip_timeout=True, beta_analysis=True, nbins=90, cuts=<TofCuts: <TofCuts: (void)>>, use_offsets=False, pid_inner=None, pid_outer=None, active=False)#

Start a new TofAnalysis. This will add create histograms for 'interesting' variables and count mangled and timed out events. While not complete, this can provide a conciese, first look for a run. Events can be added to this analysis through the .add_event(ev) method. When all events are added, a call to .finish() is needed to make sure all events in the caches are added to the histograms. Caching is used to massively improve performance, since adding individual numbers to dashi.histograms is painfully slow.

# Arguments:

skip_mangledIgnore events which have the "AnyDataMangling"

flag set

skip_timeoutIgnore events which have the "EventTimedOut"

flag set

beta_analysisLook for first hit on outer tof/inner tof and

use these for a beta calculation. If pid_outer and pid_inner are given, use these paddles instead.

nbinsThe number of bins for the histograms getting

created

cutsGive a cut instance to reject events & hits.

Default: None (no cuts)

pid_outerSelect a specific paddle instead of the first on the outer TOF

for the beta/timing analysis

pid_innerSelect a specific paddle instead of the first on the inner TOF

for the beta/timing analysis

activeif True, this analysis will actually "do something"

and acquire events

property n_mangled_frac#
property n_timed_out_frac#
fill_histograms()#

Fill the histograms with the cached values

finish()#

Ensure the remainder in the caches is histogrammed

add_event(ev)#

Fills the associated histograms

# Arguments:
  • ev : Any kind of TofEvent or TofEventSummary