Histogram from TTree with the sum in each bin, not the mean

Try (see the TTree::Draw method description for explanations):
YourTree->Draw(“x”, “x”, “any draw options”); // the “selection expression” is used as a “weight”

Unless you wanted to “normalize” your histogram … then see [url]Different ways of normalizing histograms