This report describes a Montecarlo simulation method for the simulation of a Pet or Spect equipment. The method is based on the Egs4cyl code. This work has been done in the framework of the Hirespet collaboration, for the developing of an high spatial resolution tomograph, the method will be used for the project of the tomograph. The treated geometry consists of a set of coaxial cylinders, surrounded by a ring of detectors. The detectors have a box shape, a collimator in front of each of them can be included, by means of geometrical constraints to the incident particles. An isotropic source is in the middle of the system. For the particles transport the Egs4code is used, for storing and plotting results the Cern packages Higz and Hbook are used.