#includeIn this example, we create two histograms (histo1 and histo2), fill them with some data, then add them together using the TH1D Add method. We create a third histogram (histo3) as a copy of histo1, then add histo2 to it using the TH1D Add method. Finally, we draw the resulting histogram to visualize the combined data. The ROOT package library is required to use this method, and is typically included in the source code of scientific applications that make use of the ROOT framework.// Create two histograms to add TH1D *histo1 = new TH1D("histo1", "My Histogram 1", 10, 0, 10); TH1D *histo2 = new TH1D("histo2", "My Histogram 2", 10, 0, 10); // Fill the histograms with some data histo1->Fill(2.2); histo1->Fill(2.5); histo1->Fill(3.7); histo2->Fill(1.1); histo2->Fill(3.3); histo2->Fill(3.7); // Add the histograms together TH1D *histo3 = (TH1D*)histo1->Clone(); // Make a copy of histogram 1 histo3->Add(histo2); // Add histogram 2 to histogram 3 // Draw the new histogram histo3->Draw();