Looping tree and getting branch value, but branch has a dot(.) in its name

You can try:

for entry in tree:
        yy_pt = getattr(entry, "HGamEventInfoAuxDyn.pT_yy")
        print(yy_pt)