TH2::Projection entries problem

I have the problem of a 2D histogram projection not yielding the same number of entries as the mother histogram. I read that the effective number of entries is calculated in the projection, which should be equal to the number of entries in case of an unweighted histogram. I’m sure the this histogram was filled only with “Fill(x,y)”, thus unweighted. The missing events end up in the under- and overflow of the projection. Can someone explain this?

I attach a file and a script which illustrate my problem.
th2projEntriesProblem.C (249 Bytes)
fhisto.root (6.01 KB)

… 73272 -> INCLUDING “underflow” and “overflow” bins in “X” and “Y” …
h2D->Integral(0, (h2D->GetNbinsX() + 1), 0, (h2D->GetNbinsY() + 1), “”)
h2D->GetEntries()

… 37286 -> INCLUDING “underflow” and “overflow” bins in “X” but EXCLUDING them in “Y” …
h2D->Integral(0, (h2D->GetNbinsX()+1), 1, h2D->GetNbinsY(), “”)
h2D->ProjectionY("_py", 0, (h2D->GetNbinsX() + 1), “”)->GetEntries()
h2D->ProjectionY()->GetEntries()

… 36107 -> EXCLUDING “underflow” and “overflow” bins in “X” and “Y” …
h2D->Integral(1, h2D->GetNbinsX(), 1, h2D->GetNbinsY(), “”)
h2D->Integral()
h2D->GetEffectiveEntries()
h2D->ProjectionY("_py", 1, h2D->GetNbinsX(), “”)->GetEntries()