I need to rescale my initial TH2D histogram to a physical meaningful histogram, namely, with re-calibrated x and y-axises.
I did the following :
TH2D *RAW = new TH2D("RAW",histoname,binx,0,binx,biny,0,biny);
TH2D *RAW2 = new TH2D("RAW2",histoname,binx,0,binx,biny,0,biny*0.00064);
for (ifreq = ifmin; ifreq < ifmax; ifreq++){
for (i_multi = 0; i_multi < n_of_multi; i_multi++) {
RAW->SetBinContent(ifreq-ifmin_multi+1,i_multi+1, multi_taper_spektrum[i_multi][ifreq]);
RAW2->Fill(ifreq-ifmin_multi, (i_multi+1)*dtm, multi_taper_spektrum[i_multi][ifreq]);
}
}
I attached also part of the results of both RAW and RAW2 in comparison. As one can see, in most cases both agrees, except in RAW2 1) missing data in the highest ybin of RAW2, which corresponding to biny=50 in RAW, 2) empty content in the middle yaxis, which corresponding to biny=25 in RAW, and also the new biny content at 26 in RAW2 is actually the sum of the biny conents at 25 and 26 in RAW…
I guess that the second point may related to floating point precision.
I was always confused on the fill …
Thanks for any comments or reply…