def printMasses(self): """ convenience function to print masses with particle names """ particles = [] namer = SParticleNames(susy=False) for pid, m in self.masses.items(): if m > 99000: continue particles.append("%s: %d" % (namer.asciiName(pid), m)) print(", ".join(particles))
def __str__(self): """ return basic information on model """ namer = SParticleNames(susy=False) pNames = [namer.asciiName(pid) for pid in self.unFrozenParticles()] pNames = ','.join(pNames) pStr = 'ProtoModel (%s):' % (pNames) if self.K: pStr += ' K = %1.2f' % self.K else: pStr += ' K = %s' % self.K if self.Z: pStr += ', Z = %1.2f' % self.Z else: pStr += ', Z = %s' % self.Z return pStr