! GeAllocTree.f90 ! ! Allocates one tree and sets up the pointers. ! Returns actual size. ! ! Detlef Irmscher, Thomas Ullrich, Uni Heidelberg, September 1993 ! Last update: 17.3.95 tu ! integer function GeAllocTree (parentindex, part_name) use genesis_m, self=>GeAllocTree use mom_m implicit none integer, intent(in) :: parentindex character(len=*), intent(in) :: part_name type(tree), pointer :: new_tree integer :: indexp, i ! get appropriate particle type from particle list indexp = GeParticleIndex (part_name) if (indexp == -1) return call GeAppendTree ! increases lasttree new_tree => treeList(lasttree) ! set the pointers to decay and child to zero; set decay flag to false nullify (new_tree%decaytype) do i = 1, 3 new_tree%child(i) = 0 enddo new_tree%decayed = .false. ! set stability to false new_tree%isStable = .false. ! set pointer to parent and parttype new_tree%parent = parentindex new_tree%parttype => particleList(indexp) ! set 4-momentum to 0 new_tree%p4 = mom4(0., mom3(0., 0., 0.)) ! setup return index GeAllocTree = lasttree end function GeAllocTree