Function to calculate correlation?

Is there some functions that can calculate the correlation / correlation matrix of variables in TTree?

Thanks!