gondola.tof.analysis#

Provides one-shot containers for various plots, allowing to apply cuts.

FIXME - the .fill_histograms method is currently a massive performance bottleneck. To mitigate that, we are working on the kanidashi project, so stay tuned.

Functions

format_seconds(seconds)

Return a string in HH:MM:SS format from a given time delta in seconds

Classes

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

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

gondola.tof.analysis.format_seconds(seconds)#

Return a string in HH:MM:SS format from a given time delta in seconds

class gondola.tof.analysis.TofAnalysis(skip_mangled=True, skip_timeout=True, beta_analysis=True, paddle_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.

NBINS = 70#
PADDLE_PEAK_BINS = array([  0.        ,   2.89855072,   5.79710145,   8.69565217,         11.5942029 ,  14.49275362,  17.39130435,  20.28985507,         23.1884058 ,  26.08695652,  28.98550725,  31.88405797,         34.7826087 ,  37.68115942,  40.57971014,  43.47826087,         46.37681159,  49.27536232,  52.17391304,  55.07246377,         57.97101449,  60.86956522,  63.76811594,  66.66666667,         69.56521739,  72.46376812,  75.36231884,  78.26086957,         81.15942029,  84.05797101,  86.95652174,  89.85507246,         92.75362319,  95.65217391,  98.55072464, 101.44927536,        104.34782609, 107.24637681, 110.14492754, 113.04347826,        115.94202899, 118.84057971, 121.73913043, 124.63768116,        127.53623188, 130.43478261, 133.33333333, 136.23188406,        139.13043478, 142.02898551, 144.92753623, 147.82608696,        150.72463768, 153.62318841, 156.52173913, 159.42028986,        162.31884058, 165.2173913 , 168.11594203, 171.01449275,        173.91304348, 176.8115942 , 179.71014493, 182.60869565,        185.50724638, 188.4057971 , 191.30434783, 194.20289855,        197.10144928, 200.        ])#
PADDLE_CHARGE_BINS = array([-2.        , -1.10144928, -0.20289855,  0.69565217,  1.5942029 ,         2.49275362,  3.39130435,  4.28985507,  5.1884058 ,  6.08695652,         6.98550725,  7.88405797,  8.7826087 ,  9.68115942, 10.57971014,        11.47826087, 12.37681159, 13.27536232, 14.17391304, 15.07246377,        15.97101449, 16.86956522, 17.76811594, 18.66666667, 19.56521739,        20.46376812, 21.36231884, 22.26086957, 23.15942029, 24.05797101,        24.95652174, 25.85507246, 26.75362319, 27.65217391, 28.55072464,        29.44927536, 30.34782609, 31.24637681, 32.14492754, 33.04347826,        33.94202899, 34.84057971, 35.73913043, 36.63768116, 37.53623188,        38.43478261, 39.33333333, 40.23188406, 41.13043478, 42.02898551,        42.92753623, 43.82608696, 44.72463768, 45.62318841, 46.52173913,        47.42028986, 48.31884058, 49.2173913 , 50.11594203, 51.01449275,        51.91304348, 52.8115942 , 53.71014493, 54.60869565, 55.50724638,        56.4057971 , 57.30434783, 58.20289855, 59.10144928, 60.        ])#
PADDLE_TIMING_BINS = array([  0.        ,   3.62318841,   7.24637681,  10.86956522,         14.49275362,  18.11594203,  21.73913043,  25.36231884,         28.98550725,  32.60869565,  36.23188406,  39.85507246,         43.47826087,  47.10144928,  50.72463768,  54.34782609,         57.97101449,  61.5942029 ,  65.2173913 ,  68.84057971,         72.46376812,  76.08695652,  79.71014493,  83.33333333,         86.95652174,  90.57971014,  94.20289855,  97.82608696,        101.44927536, 105.07246377, 108.69565217, 112.31884058,        115.94202899, 119.56521739, 123.1884058 , 126.8115942 ,        130.43478261, 134.05797101, 137.68115942, 141.30434783,        144.92753623, 148.55072464, 152.17391304, 155.79710145,        159.42028986, 163.04347826, 166.66666667, 170.28985507,        173.91304348, 177.53623188, 181.15942029, 184.7826087 ,        188.4057971 , 192.02898551, 195.65217391, 199.27536232,        202.89855072, 206.52173913, 210.14492754, 213.76811594,        217.39130435, 221.01449275, 224.63768116, 228.26086957,        231.88405797, 235.50724638, 239.13043478, 242.75362319,        246.37681159, 250.        ])#
PADDLE_BL_BINS = array([-2.5       , -2.42753623, -2.35507246, -2.2826087 , -2.21014493,        -2.13768116, -2.06521739, -1.99275362, -1.92028986, -1.84782609,        -1.77536232, -1.70289855, -1.63043478, -1.55797101, -1.48550725,        -1.41304348, -1.34057971, -1.26811594, -1.19565217, -1.12318841,        -1.05072464, -0.97826087, -0.9057971 , -0.83333333, -0.76086957,        -0.6884058 , -0.61594203, -0.54347826, -0.47101449, -0.39855072,        -0.32608696, -0.25362319, -0.18115942, -0.10869565, -0.03623188,         0.03623188,  0.10869565,  0.18115942,  0.25362319,  0.32608696,         0.39855072,  0.47101449,  0.54347826,  0.61594203,  0.6884058 ,         0.76086957,  0.83333333,  0.9057971 ,  0.97826087,  1.05072464,         1.12318841,  1.19565217,  1.26811594,  1.34057971,  1.41304348,         1.48550725,  1.55797101,  1.63043478,  1.70289855,  1.77536232,         1.84782609,  1.92028986,  1.99275362,  2.06521739,  2.13768116,         2.21014493,  2.2826087 ,  2.35507246,  2.42753623,  2.5       ])#
PADDLE_BLRMS_BINS = array([0.        , 0.02898551, 0.05797101, 0.08695652, 0.11594203,        0.14492754, 0.17391304, 0.20289855, 0.23188406, 0.26086957,        0.28985507, 0.31884058, 0.34782609, 0.37681159, 0.4057971 ,        0.43478261, 0.46376812, 0.49275362, 0.52173913, 0.55072464,        0.57971014, 0.60869565, 0.63768116, 0.66666667, 0.69565217,        0.72463768, 0.75362319, 0.7826087 , 0.8115942 , 0.84057971,        0.86956522, 0.89855072, 0.92753623, 0.95652174, 0.98550725,        1.01449275, 1.04347826, 1.07246377, 1.10144928, 1.13043478,        1.15942029, 1.1884058 , 1.2173913 , 1.24637681, 1.27536232,        1.30434783, 1.33333333, 1.36231884, 1.39130435, 1.42028986,        1.44927536, 1.47826087, 1.50724638, 1.53623188, 1.56521739,        1.5942029 , 1.62318841, 1.65217391, 1.68115942, 1.71014493,        1.73913043, 1.76811594, 1.79710145, 1.82608696, 1.85507246,        1.88405797, 1.91304348, 1.94202899, 1.97101449, 2.        ])#
PADDLE_X0_BINS = array([-0.1       , -0.0826087 , -0.06521739, -0.04782609, -0.03043478,        -0.01304348,  0.00434783,  0.02173913,  0.03913043,  0.05652174,         0.07391304,  0.09130435,  0.10869565,  0.12608696,  0.14347826,         0.16086957,  0.17826087,  0.19565217,  0.21304348,  0.23043478,         0.24782609,  0.26521739,  0.2826087 ,  0.3       ,  0.3173913 ,         0.33478261,  0.35217391,  0.36956522,  0.38695652,  0.40434783,         0.42173913,  0.43913043,  0.45652174,  0.47391304,  0.49130435,         0.50869565,  0.52608696,  0.54347826,  0.56086957,  0.57826087,         0.59565217,  0.61304348,  0.63043478,  0.64782609,  0.66521739,         0.6826087 ,  0.7       ,  0.7173913 ,  0.73478261,  0.75217391,         0.76956522,  0.78695652,  0.80434783,  0.82173913,  0.83913043,         0.85652174,  0.87391304,  0.89130435,  0.90869565,  0.92608696,         0.94347826,  0.96086957,  0.97826087,  0.99565217,  1.01304348,         1.03043478,  1.04782609,  1.06521739,  1.0826087 ,  1.1       ])#
PADDLE_T0_BINS = array([  0.        ,   7.24637681,  14.49275362,  21.73913043,         28.98550725,  36.23188406,  43.47826087,  50.72463768,         57.97101449,  65.2173913 ,  72.46376812,  79.71014493,         86.95652174,  94.20289855, 101.44927536, 108.69565217,        115.94202899, 123.1884058 , 130.43478261, 137.68115942,        144.92753623, 152.17391304, 159.42028986, 166.66666667,        173.91304348, 181.15942029, 188.4057971 , 195.65217391,        202.89855072, 210.14492754, 217.39130435, 224.63768116,        231.88405797, 239.13043478, 246.37681159, 253.62318841,        260.86956522, 268.11594203, 275.36231884, 282.60869565,        289.85507246, 297.10144928, 304.34782609, 311.5942029 ,        318.84057971, 326.08695652, 333.33333333, 340.57971014,        347.82608696, 355.07246377, 362.31884058, 369.56521739,        376.8115942 , 384.05797101, 391.30434783, 398.55072464,        405.79710145, 413.04347826, 420.28985507, 427.53623188,        434.7826087 , 442.02898551, 449.27536232, 456.52173913,        463.76811594, 471.01449275, 478.26086957, 485.50724638,        492.75362319, 500.        ])#
PADDLE_EDEP_BINS = array([ 0.        ,  0.43478261,  0.86956522,  1.30434783,  1.73913043,         2.17391304,  2.60869565,  3.04347826,  3.47826087,  3.91304348,         4.34782609,  4.7826087 ,  5.2173913 ,  5.65217391,  6.08695652,         6.52173913,  6.95652174,  7.39130435,  7.82608696,  8.26086957,         8.69565217,  9.13043478,  9.56521739, 10.        , 10.43478261,        10.86956522, 11.30434783, 11.73913043, 12.17391304, 12.60869565,        13.04347826, 13.47826087, 13.91304348, 14.34782609, 14.7826087 ,        15.2173913 , 15.65217391, 16.08695652, 16.52173913, 16.95652174,        17.39130435, 17.82608696, 18.26086957, 18.69565217, 19.13043478,        19.56521739, 20.        , 20.43478261, 20.86956522, 21.30434783,        21.73913043, 22.17391304, 22.60869565, 23.04347826, 23.47826087,        23.91304348, 24.34782609, 24.7826087 , 25.2173913 , 25.65217391,        26.08695652, 26.52173913, 26.95652174, 27.39130435, 27.82608696,        28.26086957, 28.69565217, 29.13043478, 29.56521739, 30.        ])#
BETA_BINS = array([0.        , 0.02898551, 0.05797101, 0.08695652, 0.11594203,        0.14492754, 0.17391304, 0.20289855, 0.23188406, 0.26086957,        0.28985507, 0.31884058, 0.34782609, 0.37681159, 0.4057971 ,        0.43478261, 0.46376812, 0.49275362, 0.52173913, 0.55072464,        0.57971014, 0.60869565, 0.63768116, 0.66666667, 0.69565217,        0.72463768, 0.75362319, 0.7826087 , 0.8115942 , 0.84057971,        0.86956522, 0.89855072, 0.92753623, 0.95652174, 0.98550725,        1.01449275, 1.04347826, 1.07246377, 1.10144928, 1.13043478,        1.15942029, 1.1884058 , 1.2173913 , 1.24637681, 1.27536232,        1.30434783, 1.33333333, 1.36231884, 1.39130435, 1.42028986,        1.44927536, 1.47826087, 1.50724638, 1.53623188, 1.56521739,        1.5942029 , 1.62318841, 1.65217391, 1.68115942, 1.71014493,        1.73913043, 1.76811594, 1.79710145, 1.82608696, 1.85507246,        1.88405797, 1.91304348, 1.94202899, 1.97101449, 2.        ])#
EDEP_BINS = array([ 0.        ,  0.72463768,  1.44927536,  2.17391304,  2.89855072,         3.62318841,  4.34782609,  5.07246377,  5.79710145,  6.52173913,         7.24637681,  7.97101449,  8.69565217,  9.42028986, 10.14492754,        10.86956522, 11.5942029 , 12.31884058, 13.04347826, 13.76811594,        14.49275362, 15.2173913 , 15.94202899, 16.66666667, 17.39130435,        18.11594203, 18.84057971, 19.56521739, 20.28985507, 21.01449275,        21.73913043, 22.46376812, 23.1884058 , 23.91304348, 24.63768116,        25.36231884, 26.08695652, 26.8115942 , 27.53623188, 28.26086957,        28.98550725, 29.71014493, 30.43478261, 31.15942029, 31.88405797,        32.60869565, 33.33333333, 34.05797101, 34.7826087 , 35.50724638,        36.23188406, 36.95652174, 37.68115942, 38.4057971 , 39.13043478,        39.85507246, 40.57971014, 41.30434783, 42.02898551, 42.75362319,        43.47826087, 44.20289855, 44.92753623, 45.65217391, 46.37681159,        47.10144928, 47.82608696, 48.55072464, 49.27536232, 50.        ])#
TIMING_BINS = array([-100.        ,  -94.20289855,  -88.4057971 ,  -82.60869565,         -76.8115942 ,  -71.01449275,  -65.2173913 ,  -59.42028986,         -53.62318841,  -47.82608696,  -42.02898551,  -36.23188406,         -30.43478261,  -24.63768116,  -18.84057971,  -13.04347826,          -7.24637681,   -1.44927536,    4.34782609,   10.14492754,          15.94202899,   21.73913043,   27.53623188,   33.33333333,          39.13043478,   44.92753623,   50.72463768,   56.52173913,          62.31884058,   68.11594203,   73.91304348,   79.71014493,          85.50724638,   91.30434783,   97.10144928,  102.89855072,         108.69565217,  114.49275362,  120.28985507,  126.08695652,         131.88405797,  137.68115942,  143.47826087,  149.27536232,         155.07246377,  160.86956522,  166.66666667,  172.46376812,         178.26086957,  184.05797101,  189.85507246,  195.65217391,         201.44927536,  207.24637681,  213.04347826,  218.84057971,         224.63768116,  230.43478261,  236.23188406,  242.02898551,         247.82608696,  253.62318841,  259.42028986,  265.2173913 ,         271.01449275,  276.8115942 ,  282.60869565,  288.4057971 ,         294.20289855,  300.        ])#
PDELAY_BINS = array([-60.        , -58.26086957, -56.52173913, -54.7826087 ,        -53.04347826, -51.30434783, -49.56521739, -47.82608696,        -46.08695652, -44.34782609, -42.60869565, -40.86956522,        -39.13043478, -37.39130435, -35.65217391, -33.91304348,        -32.17391304, -30.43478261, -28.69565217, -26.95652174,        -25.2173913 , -23.47826087, -21.73913043, -20.        ,        -18.26086957, -16.52173913, -14.7826087 , -13.04347826,        -11.30434783,  -9.56521739,  -7.82608696,  -6.08695652,         -4.34782609,  -2.60869565,  -0.86956522,   0.86956522,          2.60869565,   4.34782609,   6.08695652,   7.82608696,          9.56521739,  11.30434783,  13.04347826,  14.7826087 ,         16.52173913,  18.26086957,  20.        ,  21.73913043,         23.47826087,  25.2173913 ,  26.95652174,  28.69565217,         30.43478261,  32.17391304,  33.91304348,  35.65217391,         37.39130435,  39.13043478,  40.86956522,  42.60869565,         44.34782609,  46.08695652,  47.82608696,  49.56521739,         51.30434783,  53.04347826,  54.7826087 ,  56.52173913,         58.26086957,  60.        ])#
TDIFF_BINS = array([-1.        , -0.84057971, -0.68115942, -0.52173913, -0.36231884,        -0.20289855, -0.04347826,  0.11594203,  0.27536232,  0.43478261,         0.5942029 ,  0.75362319,  0.91304348,  1.07246377,  1.23188406,         1.39130435,  1.55072464,  1.71014493,  1.86956522,  2.02898551,         2.1884058 ,  2.34782609,  2.50724638,  2.66666667,  2.82608696,         2.98550725,  3.14492754,  3.30434783,  3.46376812,  3.62318841,         3.7826087 ,  3.94202899,  4.10144928,  4.26086957,  4.42028986,         4.57971014,  4.73913043,  4.89855072,  5.05797101,  5.2173913 ,         5.37681159,  5.53623188,  5.69565217,  5.85507246,  6.01449275,         6.17391304,  6.33333333,  6.49275362,  6.65217391,  6.8115942 ,         6.97101449,  7.13043478,  7.28985507,  7.44927536,  7.60869565,         7.76811594,  7.92753623,  8.08695652,  8.24637681,  8.4057971 ,         8.56521739,  8.72463768,  8.88405797,  9.04347826,  9.20289855,         9.36231884,  9.52173913,  9.68115942,  9.84057971, 10.        ])#
DIST_BINS = array([0.        , 0.05797101, 0.11594203, 0.17391304, 0.23188406,        0.28985507, 0.34782609, 0.4057971 , 0.46376812, 0.52173913,        0.57971014, 0.63768116, 0.69565217, 0.75362319, 0.8115942 ,        0.86956522, 0.92753623, 0.98550725, 1.04347826, 1.10144928,        1.15942029, 1.2173913 , 1.27536232, 1.33333333, 1.39130435,        1.44927536, 1.50724638, 1.56521739, 1.62318841, 1.68115942,        1.73913043, 1.79710145, 1.85507246, 1.91304348, 1.97101449,        2.02898551, 2.08695652, 2.14492754, 2.20289855, 2.26086957,        2.31884058, 2.37681159, 2.43478261, 2.49275362, 2.55072464,        2.60869565, 2.66666667, 2.72463768, 2.7826087 , 2.84057971,        2.89855072, 2.95652174, 3.01449275, 3.07246377, 3.13043478,        3.1884058 , 3.24637681, 3.30434783, 3.36231884, 3.42028986,        3.47826087, 3.53623188, 3.5942029 , 3.65217391, 3.71014493,        3.76811594, 3.82608696, 3.88405797, 3.94202899, 4.        ])#
COS_T_BINS = array([0.        , 0.01449275, 0.02898551, 0.04347826, 0.05797101,        0.07246377, 0.08695652, 0.10144928, 0.11594203, 0.13043478,        0.14492754, 0.15942029, 0.17391304, 0.1884058 , 0.20289855,        0.2173913 , 0.23188406, 0.24637681, 0.26086957, 0.27536232,        0.28985507, 0.30434783, 0.31884058, 0.33333333, 0.34782609,        0.36231884, 0.37681159, 0.39130435, 0.4057971 , 0.42028986,        0.43478261, 0.44927536, 0.46376812, 0.47826087, 0.49275362,        0.50724638, 0.52173913, 0.53623188, 0.55072464, 0.56521739,        0.57971014, 0.5942029 , 0.60869565, 0.62318841, 0.63768116,        0.65217391, 0.66666667, 0.68115942, 0.69565217, 0.71014493,        0.72463768, 0.73913043, 0.75362319, 0.76811594, 0.7826087 ,        0.79710145, 0.8115942 , 0.82608696, 0.84057971, 0.85507246,        0.86956522, 0.88405797, 0.89855072, 0.91304348, 0.92753623,        0.94202899, 0.95652174, 0.97101449, 0.98550725, 1.        ])#
COS_T2_BINS = array([0.        , 0.04545455, 0.09090909, 0.13636364, 0.18181818,        0.22727273, 0.27272727, 0.31818182, 0.36363636, 0.40909091,        0.45454545, 0.5       , 0.54545455, 0.59090909, 0.63636364,        0.68181818, 0.72727273, 0.77272727, 0.81818182, 0.86363636,        0.90909091, 0.95454545, 1.        ])#
X_BINS_OUTER = array([-2000.        , -1942.02898551, -1884.05797101, -1826.08695652,        -1768.11594203, -1710.14492754, -1652.17391304, -1594.20289855,        -1536.23188406, -1478.26086957, -1420.28985507, -1362.31884058,        -1304.34782609, -1246.37681159, -1188.4057971 , -1130.43478261,        -1072.46376812, -1014.49275362,  -956.52173913,  -898.55072464,         -840.57971014,  -782.60869565,  -724.63768116,  -666.66666667,         -608.69565217,  -550.72463768,  -492.75362319,  -434.7826087 ,         -376.8115942 ,  -318.84057971,  -260.86956522,  -202.89855072,         -144.92753623,   -86.95652174,   -28.98550725,    28.98550725,           86.95652174,   144.92753623,   202.89855072,   260.86956522,          318.84057971,   376.8115942 ,   434.7826087 ,   492.75362319,          550.72463768,   608.69565217,   666.66666667,   724.63768116,          782.60869565,   840.57971014,   898.55072464,   956.52173913,         1014.49275362,  1072.46376812,  1130.43478261,  1188.4057971 ,         1246.37681159,  1304.34782609,  1362.31884058,  1420.28985507,         1478.26086957,  1536.23188406,  1594.20289855,  1652.17391304,         1710.14492754,  1768.11594203,  1826.08695652,  1884.05797101,         1942.02898551,  2000.        ])#
Y_BINS_OUTER = array([-2000.        , -1942.02898551, -1884.05797101, -1826.08695652,        -1768.11594203, -1710.14492754, -1652.17391304, -1594.20289855,        -1536.23188406, -1478.26086957, -1420.28985507, -1362.31884058,        -1304.34782609, -1246.37681159, -1188.4057971 , -1130.43478261,        -1072.46376812, -1014.49275362,  -956.52173913,  -898.55072464,         -840.57971014,  -782.60869565,  -724.63768116,  -666.66666667,         -608.69565217,  -550.72463768,  -492.75362319,  -434.7826087 ,         -376.8115942 ,  -318.84057971,  -260.86956522,  -202.89855072,         -144.92753623,   -86.95652174,   -28.98550725,    28.98550725,           86.95652174,   144.92753623,   202.89855072,   260.86956522,          318.84057971,   376.8115942 ,   434.7826087 ,   492.75362319,          550.72463768,   608.69565217,   666.66666667,   724.63768116,          782.60869565,   840.57971014,   898.55072464,   956.52173913,         1014.49275362,  1072.46376812,  1130.43478261,  1188.4057971 ,         1246.37681159,  1304.34782609,  1362.31884058,  1420.28985507,         1478.26086957,  1536.23188406,  1594.20289855,  1652.17391304,         1710.14492754,  1768.11594203,  1826.08695652,  1884.05797101,         1942.02898551,  2000.        ])#
Z_BINS_OUTER = array([-250.        , -210.14492754, -170.28985507, -130.43478261,         -90.57971014,  -50.72463768,  -10.86956522,   28.98550725,          68.84057971,  108.69565217,  148.55072464,  188.4057971 ,         228.26086957,  268.11594203,  307.97101449,  347.82608696,         387.68115942,  427.53623188,  467.39130435,  507.24637681,         547.10144928,  586.95652174,  626.8115942 ,  666.66666667,         706.52173913,  746.37681159,  786.23188406,  826.08695652,         865.94202899,  905.79710145,  945.65217391,  985.50724638,        1025.36231884, 1065.2173913 , 1105.07246377, 1144.92753623,        1184.7826087 , 1224.63768116, 1264.49275362, 1304.34782609,        1344.20289855, 1384.05797101, 1423.91304348, 1463.76811594,        1503.62318841, 1543.47826087, 1583.33333333, 1623.1884058 ,        1663.04347826, 1702.89855072, 1742.75362319, 1782.60869565,        1822.46376812, 1862.31884058, 1902.17391304, 1942.02898551,        1981.88405797, 2021.73913043, 2061.5942029 , 2101.44927536,        2141.30434783, 2181.15942029, 2221.01449275, 2260.86956522,        2300.72463768, 2340.57971014, 2380.43478261, 2420.28985507,        2460.14492754, 2500.        ])#
X_BINS_INNER = array([-1000.        ,  -971.01449275,  -942.02898551,  -913.04347826,         -884.05797101,  -855.07246377,  -826.08695652,  -797.10144928,         -768.11594203,  -739.13043478,  -710.14492754,  -681.15942029,         -652.17391304,  -623.1884058 ,  -594.20289855,  -565.2173913 ,         -536.23188406,  -507.24637681,  -478.26086957,  -449.27536232,         -420.28985507,  -391.30434783,  -362.31884058,  -333.33333333,         -304.34782609,  -275.36231884,  -246.37681159,  -217.39130435,         -188.4057971 ,  -159.42028986,  -130.43478261,  -101.44927536,          -72.46376812,   -43.47826087,   -14.49275362,    14.49275362,           43.47826087,    72.46376812,   101.44927536,   130.43478261,          159.42028986,   188.4057971 ,   217.39130435,   246.37681159,          275.36231884,   304.34782609,   333.33333333,   362.31884058,          391.30434783,   420.28985507,   449.27536232,   478.26086957,          507.24637681,   536.23188406,   565.2173913 ,   594.20289855,          623.1884058 ,   652.17391304,   681.15942029,   710.14492754,          739.13043478,   768.11594203,   797.10144928,   826.08695652,          855.07246377,   884.05797101,   913.04347826,   942.02898551,          971.01449275,  1000.        ])#
Y_BINS_INNER = array([-1000.        ,  -971.01449275,  -942.02898551,  -913.04347826,         -884.05797101,  -855.07246377,  -826.08695652,  -797.10144928,         -768.11594203,  -739.13043478,  -710.14492754,  -681.15942029,         -652.17391304,  -623.1884058 ,  -594.20289855,  -565.2173913 ,         -536.23188406,  -507.24637681,  -478.26086957,  -449.27536232,         -420.28985507,  -391.30434783,  -362.31884058,  -333.33333333,         -304.34782609,  -275.36231884,  -246.37681159,  -217.39130435,         -188.4057971 ,  -159.42028986,  -130.43478261,  -101.44927536,          -72.46376812,   -43.47826087,   -14.49275362,    14.49275362,           43.47826087,    72.46376812,   101.44927536,   130.43478261,          159.42028986,   188.4057971 ,   217.39130435,   246.37681159,          275.36231884,   304.34782609,   333.33333333,   362.31884058,          391.30434783,   420.28985507,   449.27536232,   478.26086957,          507.24637681,   536.23188406,   565.2173913 ,   594.20289855,          623.1884058 ,   652.17391304,   681.15942029,   710.14492754,          739.13043478,   768.11594203,   797.10144928,   826.08695652,          855.07246377,   884.05797101,   913.04347826,   942.02898551,          971.01449275,  1000.        ])#
Z_BINS_INNER = array([-250.        , -224.63768116, -199.27536232, -173.91304348,        -148.55072464, -123.1884058 ,  -97.82608696,  -72.46376812,         -47.10144928,  -21.73913043,    3.62318841,   28.98550725,          54.34782609,   79.71014493,  105.07246377,  130.43478261,         155.79710145,  181.15942029,  206.52173913,  231.88405797,         257.24637681,  282.60869565,  307.97101449,  333.33333333,         358.69565217,  384.05797101,  409.42028986,  434.7826087 ,         460.14492754,  485.50724638,  510.86956522,  536.23188406,         561.5942029 ,  586.95652174,  612.31884058,  637.68115942,         663.04347826,  688.4057971 ,  713.76811594,  739.13043478,         764.49275362,  789.85507246,  815.2173913 ,  840.57971014,         865.94202899,  891.30434783,  916.66666667,  942.02898551,         967.39130435,  992.75362319, 1018.11594203, 1043.47826087,        1068.84057971, 1094.20289855, 1119.56521739, 1144.92753623,        1170.28985507, 1195.65217391, 1221.01449275, 1246.37681159,        1271.73913043, 1297.10144928, 1322.46376812, 1347.82608696,        1373.1884058 , 1398.55072464, 1423.91304348, 1449.27536232,        1474.63768116, 1500.        ])#
PID_BINS_INNER = array([ 0.5,  1.5,  2.5,  3.5,  4.5,  5.5,  6.5,  7.5,  8.5,  9.5, 10.5,        11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5,        22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5,        33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5, 43.5,        44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, 51.5, 52.5, 53.5, 54.5,        55.5, 56.5, 57.5, 58.5, 59.5])#
PID_BINS_OUTER = array([ 61.5,  62.5,  63.5,  64.5,  65.5,  66.5,  67.5,  68.5,  69.5,         70.5,  71.5,  72.5,  73.5,  74.5,  75.5,  76.5,  77.5,  78.5,         79.5,  80.5,  81.5,  82.5,  83.5,  84.5,  85.5,  86.5,  87.5,         88.5,  89.5,  90.5,  91.5,  92.5,  93.5,  94.5,  95.5,  96.5,         97.5,  98.5,  99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5,        106.5, 107.5, 108.5, 109.5, 110.5, 111.5, 112.5, 113.5, 114.5,        115.5, 116.5, 117.5, 118.5, 119.5, 120.5, 121.5, 122.5, 123.5,        124.5, 125.5, 126.5, 127.5, 128.5, 129.5, 130.5, 131.5, 132.5,        133.5, 134.5, 135.5, 136.5, 137.5, 138.5, 139.5, 140.5, 141.5,        142.5, 143.5, 144.5, 145.5, 146.5, 147.5, 148.5, 149.5, 150.5,        151.5, 152.5, 153.5, 154.5, 155.5, 156.5, 157.5, 158.5, 159.5,        160.5])#
NHIT_BINS = array([-0.5,  0.5,  1.5,  2.5,  3.5,  4.5,  5.5,  6.5,  7.5,  8.5,  9.5,        10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5,        21.5, 22.5, 23.5, 24.5])#
PID_BINS = array([  0.5,   1.5,   2.5,   3.5,   4.5,   5.5,   6.5,   7.5,   8.5,          9.5,  10.5,  11.5,  12.5,  13.5,  14.5,  15.5,  16.5,  17.5,         18.5,  19.5,  20.5,  21.5,  22.5,  23.5,  24.5,  25.5,  26.5,         27.5,  28.5,  29.5,  30.5,  31.5,  32.5,  33.5,  34.5,  35.5,         36.5,  37.5,  38.5,  39.5,  40.5,  41.5,  42.5,  43.5,  44.5,         45.5,  46.5,  47.5,  48.5,  49.5,  50.5,  51.5,  52.5,  53.5,         54.5,  55.5,  56.5,  57.5,  58.5,  59.5,  60.5,  61.5,  62.5,         63.5,  64.5,  65.5,  66.5,  67.5,  68.5,  69.5,  70.5,  71.5,         72.5,  73.5,  74.5,  75.5,  76.5,  77.5,  78.5,  79.5,  80.5,         81.5,  82.5,  83.5,  84.5,  85.5,  86.5,  87.5,  88.5,  89.5,         90.5,  91.5,  92.5,  93.5,  94.5,  95.5,  96.5,  97.5,  98.5,         99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5,        108.5, 109.5, 110.5, 111.5, 112.5, 113.5, 114.5, 115.5, 116.5,        117.5, 118.5, 119.5, 120.5, 121.5, 122.5, 123.5, 124.5, 125.5,        126.5, 127.5, 128.5, 129.5, 130.5, 131.5, 132.5, 133.5, 134.5,        135.5, 136.5, 137.5, 138.5, 139.5, 140.5, 141.5, 142.5, 143.5,        144.5, 145.5, 146.5, 147.5, 148.5, 149.5, 150.5, 151.5, 152.5,        153.5, 154.5, 155.5, 156.5, 157.5, 158.5, 159.5])#
pretty_print_statistics()#

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

property occupancy#
property occupancy_t#
property n_events#
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, paddle_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.

paddle_analysis : Create plots for the individual paddles nbins : The 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 no_hitmiss#
property one_hitmiss#
property two_hitmiss#
property extra_hits#
property n_mangled_frac#
property n_timed_out_frac#
property event_stati#
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