Update buildMeanPulse.cpp