Пример #1
0
def flavourOfParentVertex(event,rp):
    #note cannot just check direct parent due to resonances etc.
    track = rp.getTracks()[0]
    mcps = event.getRelatedTo(track,[collectionnames.trackmcpcollection,])
    mcp = mcps[0]
    mcp = getCorrectParent(mcp)
    #need to find the first parent that has a length unless we reach the IP (-1 quark type)
    while mc.quarkType(mcp.getPDG()) != -1 and mcp.getVertex() == mcp.getEndpoint():
        mcp = getCorrectParent(mcp)
    return mc.quarkType(mcp.getPDG())
Пример #2
0
def mcVertexNumber(event,rp):
    track = rp.getTracks()[0]
    mcps = event.getRelatedTo(track,[collectionnames.trackmcpcollection,])
    mcp = mcps[0]
    v = mcp.getVertex()
    #Go back through the tree counting all none resonant decays
    v_num = 0
    while mc.quarkType(mcp.getPDG()) != -1:
        #print mcp.getPDG()
        mcp = getCorrectParent(mcp)
        if um.threeDRadius(um.sub(mcp.getVertex(),mcp.getEndpoint())) > 0.0000000001 : v_num += 1
    #print flavourOfParentVertex(event,rp) , v_num, v
    return v_num