GenTauCPProducer, CPQuantities: Generalizing the calculation of CP-quantities