ebe_scripts/average_event_spvn_h5_minimumbias.py
def calcualte_inte_vn(pT_low, pT_high, data):
    """
        this function calculates the pT-integrated vn in a 
        given pT range (pT_low, pT_high) for every event in the data
    """
    npT = 50
    pT_inte_array = linspace(pT_low, pT_high, npT)
    dpT = pT_inte_array[1] - pT_inte_array[0]
    dN_event = data[:, 2]
    pT_event = data[:, 0]
    dN_interp = exp(interp(pT_inte_array, pT_event, log(dN_event+1e-30)))
    N_event = data[:, -1]
    N_interp = exp(interp(pT_inte_array, pT_event, log(N_event+1e-30)))
    N = sum(N_interp)*dpT/0.1
    temp_vn_array = [N,]
    for iorder in range(1, n_order):
        vn_real_event = data[:, 4*iorder]
        vn_imag_event = data[:, 4*iorder+2]
        vn_real_interp = interp(pT_inte_array, pT_event, vn_real_event)
        vn_imag_interp = interp(pT_inte_array, pT_event, vn_imag_event)
        vn_real_inte = (
            sum(vn_real_interp*dN_interp*pT_inte_array)
            /sum(dN_interp*pT_inte_array))
        vn_imag_inte = (
            sum(vn_imag_interp*dN_interp*pT_inte_array)
            /sum(dN_interp*pT_inte_array))
        vn_inte = vn_real_inte + 1j*vn_imag_inte
        temp_vn_array.append(vn_inte)
    return(temp_vn_array)

        this function calculates the pT-integrated vn in a 
        given pT range (pT_low, pT_high) for every event in the data
    
this function calculates the pT-integrated vn in a
given pT range (pT_low, pT_high) for every event in the data
this function calculates the pT - integrated vn in a given pT range ( pT_low pT_high ) for every event in the data
def calcualte_inte_vn(pT_low, pT_high, data):
    npT = 50
    pT_inte_array = linspace(pT_low, pT_high, npT)
    dpT = pT_inte_array[1] - pT_inte_array[0]
    dN_event = data[:, 2]
    pT_event = data[:, 0]
    dN_interp = exp(interp(pT_inte_array, pT_event, log(dN_event+1e-30)))
    N_event = data[:, -1]
    N_interp = exp(interp(pT_inte_array, pT_event, log(N_event+1e-30)))
    N = sum(N_interp)*dpT/0.1
    temp_vn_array = [N,]
    for iorder in range(1, n_order):
        vn_real_event = data[:, 4*iorder]
        vn_imag_event = data[:, 4*iorder+2]
        vn_real_interp = interp(pT_inte_array, pT_event, vn_real_event)
        vn_imag_interp = interp(pT_inte_array, pT_event, vn_imag_event)
        vn_real_inte = (
            sum(vn_real_interp*dN_interp*pT_inte_array)
            /sum(dN_interp*pT_inte_array))
        vn_imag_inte = (
            sum(vn_imag_interp*dN_interp*pT_inte_array)
            /sum(dN_interp*pT_inte_array))
        vn_inte = vn_real_inte + 1j*vn_imag_inte
        temp_vn_array.append(vn_inte)
    return(temp_vn_array)
def calcualte_inte_vn ( pT_low , pT_high , data ) : npT = 50 pT_inte_array = linspace ( pT_low , pT_high , npT ) dpT = pT_inte_array [ 1 ] - pT_inte_array [ 0 ] dN_event = data [ : , 2 ] pT_event = data [ : , 0 ] dN_interp = exp ( interp ( pT_inte_array , pT_event , log ( dN_event + 1e-30 ) ) ) N_event = data [ : , - 1 ] N_interp = exp ( interp ( pT_inte_array , pT_event , log ( N_event + 1e-30 ) ) ) N = sum ( N_interp ) * dpT / 0.1 temp_vn_array = [ N , ] for iorder in range ( 1 , n_order ) : vn_real_event = data [ : , 4 * iorder ] vn_imag_event = data [ : , 4 * iorder + 2 ] vn_real_interp = interp ( pT_inte_array , pT_event , vn_real_event ) vn_imag_interp = interp ( pT_inte_array , pT_event , vn_imag_event ) vn_real_inte = ( sum ( vn_real_interp * dN_interp * pT_inte_array ) / sum ( dN_interp * pT_inte_array ) ) vn_imag_inte = ( sum ( vn_imag_interp * dN_interp * pT_inte_array ) / sum ( dN_interp * pT_inte_array ) ) vn_inte = vn_real_inte + 1j * vn_imag_inte temp_vn_array . append ( vn_inte ) return ( temp_vn_array )
this function calculates the pT-integrated vn in a
given pT range (pT_low, pT_high) for every event in the data
this function calculates the pT - integrated vn in a given pT range ( pT_low pT_high ) for every event in the data
"""
        this function calculates the pT-integrated vn in a 
        given pT range (pT_low, pT_high) for every event in the data
    """
pT_low
pT_high
data