fix lhe eventperlumi in task chain

refactor and combine commit for #5053