changed AnaPulses to TotalCharge