Moved functionality to extra functions for better readability. New function to check compatibility of gen and reco vectors