Ejemplo n.º 1
0
def make_mctree(frame, linearized=True):
    tree = dataclasses.I3MCTree()
    p1 = dataclasses.I3Particle()
    tree.insert(p1)
    p2 = dataclasses.I3Particle()
    tree.append_child(p1, p2)
    if linearized:
        tree = dataclasses.I3LinearizedMCTree(tree)
    frame['I3MCTree'] = tree
Ejemplo n.º 2
0
def ConvertToLinearizedMCTree(frame):
    if 'I3MCTree' in frame:
        try:
            tree = dataclasses.I3LinearizedMCTree(frame['I3MCTree'])
        except:
            logger.error('cannot convert to I3LinearizedMCTree')
        else:
            del frame['I3MCTree']
            frame['I3MCTree'] = tree
    return True
 def replaceMCTree(frame):
     if frame.Has("I3MCTree"):
         tree = frame["I3MCTree"]
         del frame["I3MCTree"]
         frame["I3MCTree"] = dataclasses.I3LinearizedMCTree(tree)