Exemplo n.º 1
0
def assign_flasher(cs_buf, ads_buf):
    '''
    Assign the given TreeBuffers to the prototypical flasher event.

    '''
    assign_value(cs_buf.nHit, 100)
    assign_value(cs_buf.charge, 80)
    assign_value(cs_buf.fQuad, 1.234)
    assign_value(cs_buf.fMax, 2.345)
    assign_value(cs_buf.fPSD_t1, 0.1234)
    assign_value(cs_buf.fPSD_t2, 0.2345)
    assign_value(cs_buf.f2inch_maxQ, 105)
    assign_value(ads_buf.energy, 0.9)
    assign_value(ads_buf.x, -100)
    assign_value(ads_buf.y, 1000)
    assign_value(ads_buf.z, 1450)
Exemplo n.º 2
0
def fill_event(calibStats, cs_buf, adSimple, ads_buf,
        timestamp, triggerNumber, event_type, detector, nh):
    assign_value(cs_buf.triggerNumber, triggerNumber)
    timestamp_seconds = timestamp // int(1e9)
    timestamp_nanoseconds = timestamp % int(1e9)
    assign_value(cs_buf.timestamp_seconds, timestamp_seconds)
    assign_value(cs_buf.timestamp_nanoseconds, timestamp_nanoseconds)
    assign_value(cs_buf.detector, detector)
    assign_value(ads_buf.triggerType, 0x10001100)
    assign_value(ads_buf.site, 1)
    if event_type == 'flasher':
        assign_flasher(cs_buf, ads_buf)
    elif event_type == 'promptlike':
        assign_prompt_like(cs_buf, ads_buf, nh)
    elif event_type == 'delayedlike':
        assign_delayed_like(cs_buf, ads_buf, nh)
    elif event_type == 'admuon':
        assign_ADMuon(cs_buf, ads_buf)
    elif event_type == 'wsmuon':
        assign_WSMuon(cs_buf, ads_buf)
    calibStats.Fill()
    adSimple.Fill()
Exemplo n.º 3
0
def assign_WSMuon(cs_buf, ads_buf):
    '''
    Assign the given TreeBuffers to the prototypical WS Muon event.

    '''
    assign_value(cs_buf.nHit, 20)
    assign_value(cs_buf.charge, 1000)
    assign_value(cs_buf.fQuad, 0)
    assign_value(cs_buf.fMax, 0)
    assign_value(cs_buf.fPSD_t1, 1)
    assign_value(cs_buf.fPSD_t2, 1)
    assign_value(cs_buf.f2inch_maxQ, 0)
    assign_value(ads_buf.energy, 0)
    assign_value(ads_buf.x, 0)
    assign_value(ads_buf.y, 0)
    assign_value(ads_buf.z, 0)
Exemplo n.º 4
0
def assign_ADMuon(cs_buf, ads_buf):
    '''
    Assign the given TreeBuffers to the prototypical AD Muon event.

    '''
    assign_value(cs_buf.nHit, 180)
    assign_value(cs_buf.charge, 5000)
    assign_value(cs_buf.fQuad, 0.123)
    assign_value(cs_buf.fMax, 0.210)
    assign_value(cs_buf.fPSD_t1, 0.912)
    assign_value(cs_buf.fPSD_t2, 0.956)
    assign_value(cs_buf.f2inch_maxQ, 2)
    assign_value(ads_buf.energy, 30)
    assign_value(ads_buf.x, 0.1)
    assign_value(ads_buf.y, 0.2)
    assign_value(ads_buf.z, 0.3)
Exemplo n.º 5
0
def assign_delayed_like(cs_buf, ads_buf, nh):
    '''
    Assign the given TreeBuffers to the prototypical delayed-like event.

    '''
    assign_value(cs_buf.nHit, 120)
    assign_value(cs_buf.charge, 1360)
    assign_value(cs_buf.fQuad, 0.1)
    assign_value(cs_buf.fMax, 0.2)
    assign_value(cs_buf.fPSD_t1, 0.9)
    assign_value(cs_buf.fPSD_t2, 0.95)
    assign_value(cs_buf.f2inch_maxQ, 1)
    if nh:
        energy = 2.2
    else:
        energy = 8.1
    assign_value(ads_buf.energy, energy)
    assign_value(ads_buf.x, 500)
    assign_value(ads_buf.y, 1200)
    assign_value(ads_buf.z, -50)
Exemplo n.º 6
0
def assign_prompt_like(cs_buf, ads_buf, nh):
    '''
    Assign the given TreeBuffers to the prototypical prompt-like event.

    '''
    assign_value(cs_buf.nHit, 100)
    assign_value(cs_buf.charge, 300)
    assign_value(cs_buf.fQuad, 0.1)
    assign_value(cs_buf.fMax, 0.2)
    assign_value(cs_buf.fPSD_t1, 0.9)
    assign_value(cs_buf.fPSD_t2, 0.95)
    assign_value(cs_buf.f2inch_maxQ, 1)
    assign_value(ads_buf.energy, 3.1)
    assign_value(ads_buf.x, 500)
    assign_value(ads_buf.y, 1300)
    assign_value(ads_buf.z, -250)