Is ```hits``` an ```edm::Handle<>```? If so, you need to do ```(*hits)[hit_counter]```