further function consolodation in analysisToolsPt.py