Update of TPC code and macros by M.Kowalski