#include "TH2D.h" TH2D *histogram = new TH2D("Histogram", "My histogram title", 100, 0, 10, 100, 0, 5);
histogram->SetBinContent(5, 3, 10.0); // Sets the bin content at x=5, y=3 to 10.0 histogram->Fill(2.5, 1.0); // Fills the bin at x=2.5, y=1.0 with 1In the first line, we set the content of a specific bin within the histogram. In the second line, we use the Fill() method to increment the bin corresponding to x=2.5 and y=1.0 by 1. Overall, TH2D is an extremely useful tool for data analysis and modeling applications.