this computes the normalisation that is needed to normalise the PDF. When you call getVal without any variables to normalise over, you get a raw, unnormalised value. When you call getVal(normSet), you get getVal()/getNorm(normSet).
One word of warning. When you call RooFit functions with unnamed temporaries from python, python sometimes manages to delete the temporary before the C++ function completes.
This will work: