Hi–
If you have distributions for two variables (each TH1’s) and want to find the correlation coefficient for these two variables, I’d imagine you’d create a TH2 with the appropriate number of bins for each axis, and then use the TH2::GetCorrelationFactor method:
https://root.cern.ch/doc/master/TH2_8cxx_source.html#l01025
which will return a double value.
Best,
Andrew