TH2F array GetBinContent problem

Hi Wile_E_Coyote, I got my problem resolved. Quite embarassed to say that there was very small mistake , in the second for loop i forget to declare the variable n before , that was causing the trouble

Thanks for all the suggestions , they really helped me debugg the problem.