# \#hist

**URL:** https://root-forum.cern.ch/tag/hist/7.md

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

---

## [TBufferMerger fails to write histograms to output file for Alma Linux](https://root-forum.cern.ch/t/tbuffermerger-fails-to-write-histograms-to-output-file-for-alma-linux/64787)

<div class="topic-metadata">

**Author:** [@crafter312](https://root-forum.cern.ch/u/crafter312)\
**Replies:** 9\
**Last updated:** [July 21, 2026, 2:17pm UTC](https://root-forum.cern.ch/t/tbuffermerger-fails-to-write-histograms-to-output-file-for-alma-linux/64787 "2026-07-21T14:17:12Z")

</div>

Continuing the discussion from Multi-threaded output of TH\* histograms via TBufferMerger: ROOT Version: 6.36.10 Platform: Alma Linux 8.10 (linuxx8664gcc) Compiler: c++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28) Detail…

---

## [TEfficiency with Log Scale?](https://root-forum.cern.ch/t/tefficiency-with-log-scale/64694)

<div class="topic-metadata">

**Author:** [@lost\_soul\_519](https://root-forum.cern.ch/u/lost_soul_519)\
**Replies:** 6\
**Last updated:** [February 11, 2026, 2:54pm UTC](https://root-forum.cern.ch/t/tefficiency-with-log-scale/64694 "2026-02-11T14:54:55Z")

</div>

Hello all, Just wanted to check how the TEfficiency class are supposed to be drawn on a log Canvas. I am hoping I’ve done something stupid here. Here is a quick reproducer. import ROOT import numpy as np xBins = np.lo…

---

## [Feeding TMVA with TTrees for signal and backgrounds](https://root-forum.cern.ch/t/feeding-tmva-with-ttrees-for-signal-and-backgrounds/64537)

<div class="topic-metadata">

**Author:** [@ammelsayed](https://root-forum.cern.ch/u/ammelsayed)\
**Replies:** 2\
**Last updated:** [December 15, 2025, 11:02am UTC](https://root-forum.cern.ch/t/feeding-tmva-with-ttrees-for-signal-and-backgrounds/64537 "2025-12-15T11:02:08Z")

</div>

Dear experts, I’m using multiple root files for signal and background samples generated by Delphes. I read the files once for each process, create a corresponding TTree object, and store the variables data of interest i…

---

## [Read a SQLite db file and convert it to TTree](https://root-forum.cern.ch/t/read-a-sqlite-db-file-and-convert-it-to-ttree/64530)

<div class="topic-metadata">

**Author:** [@wztbxl](https://root-forum.cern.ch/u/wztbxl)\
**Replies:** 5\
**Last updated:** [December 11, 2025, 12:51am UTC](https://root-forum.cern.ch/t/read-a-sqlite-db-file-and-convert-it-to-ttree/64530 "2025-12-11T00:51:59Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: v6-30-02 Platform: Ubuntu-20.4 on Windows Compiler: Not Provided Dear Expert, I am trying to convert a SQLite file like ArchiveL…

---

## [Histogram markers clipping over axis](https://root-forum.cern.ch/t/histogram-markers-clipping-over-axis/64506)

<div class="topic-metadata">

**Author:** [@Vangi](https://root-forum.cern.ch/u/Vangi)\
**Replies:** 7\
**Last updated:** [December 4, 2025, 3:28pm UTC](https://root-forum.cern.ch/t/histogram-markers-clipping-over-axis/64506 "2025-12-04T15:28:24Z")

</div>

ROOT Version: ROOT 6.24/07 Dear ROOTers, I am trying to plot a histogram which contains bins of value 0 (or close to 0), and plotting markers (using Draw(“e0p”)) of custom size makes them clip through the axis of the…

---

## [TSpectrum2::Bac... ERROR function not yet implemented](https://root-forum.cern.ch/t/tspectrum2-bac-error-function-not-yet-implemented/64427)

<div class="topic-metadata">

**Author:** [@lshan](https://root-forum.cern.ch/u/lshan)\
**Replies:** 2\
**Last updated:** [November 21, 2025, 7:20pm UTC](https://root-forum.cern.ch/t/tspectrum2-bac-error-function-not-yet-implemented/64427 "2025-11-21T19:20:45Z")

</div>

Dear Experts, Please pardon a strange question and please give a look when you are free. The root to use is : /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.30.02-398ae/x86\_64-centos7-gcc11-opt In the CMakeLists.txt for my m…

---

## [Smarter Histograms Handling and Plotting Class](https://root-forum.cern.ch/t/smarter-histograms-handling-and-plotting-class/64403)

<div class="topic-metadata">

**Author:** [@ammelsayed](https://root-forum.cern.ch/u/ammelsayed)\
**Replies:** 6\
**Last updated:** [November 18, 2025, 9:15am UTC](https://root-forum.cern.ch/t/smarter-histograms-handling-and-plotting-class/64403 "2025-11-18T09:15:47Z")

</div>

Hello, When searching for new particles, my typical workflow involves stacking background histograms in a THStack while keeping the signal separate in a TH1D. With multiple processes, this requires creating many histogr…

---

## [Delphes root files and RDataFrame](https://root-forum.cern.ch/t/delphes-root-files-and-rdataframe/64329)

<div class="topic-metadata">

**Author:** [@ammelsayed](https://root-forum.cern.ch/u/ammelsayed)\
**Replies:** 7\
**Last updated:** [October 20, 2025, 6:14am UTC](https://root-forum.cern.ch/t/delphes-root-files-and-rdataframe/64329 "2025-10-20T06:14:03Z")

</div>

Hi, I’m trying to preform some analysis cuts using RDataFrame from root files generated by Delphes. But I seem to encounter a problem with reading particles data from arrays. As i understand, in a delphes file, an even…

---

## [How i can take two histograms from root-file and make its in one picture?](https://root-forum.cern.ch/t/how-i-can-take-two-histograms-from-root-file-and-make-its-in-one-picture/64325)

<div class="topic-metadata">

**Author:** [@andkon](https://root-forum.cern.ch/u/andkon)\
**Replies:** 15\
**Last updated:** [October 17, 2025, 1:16pm UTC](https://root-forum.cern.ch/t/how-i-can-take-two-histograms-from-root-file-and-make-its-in-one-picture/64325 "2025-10-17T13:16:43Z")

</div>

Hello, dear All! I have a problem: How i can take two histograms from root-file and make its in one picture? it is my code: void itog\_allGuass() { // Float\_t PMT2; Int\_t PMT2; TFile\* file1 = TFile::Open("351mm\_…

---

## [Problems in binning after RooMomentMorph with RooHistPdf](https://root-forum.cern.ch/t/problems-in-binning-after-roomomentmorph-with-roohistpdf/64112)

<div class="topic-metadata">

**Author:** [@Elia\_Giulio\_Grandoni](https://root-forum.cern.ch/u/Elia_Giulio_Grandoni)\
**Replies:** 1\
**Last updated:** [September 3, 2025, 11:21am UTC](https://root-forum.cern.ch/t/problems-in-binning-after-roomomentmorph-with-roohistpdf/64112 "2025-09-03T11:21:56Z")

</div>

Dear experts, I am trying to perform template morphing using RooMomentMorph with RooHistPdf. The morphed function seems to produce inconsistent binning when drawn, which may cause issues when fitting this function as pa…

---

## [Multi-threaded output of TH\* histograms via TBufferMerger](https://root-forum.cern.ch/t/multi-threaded-output-of-th-histograms-via-tbuffermerger/64089)

<div class="topic-metadata">

**Author:** [@crafter312](https://root-forum.cern.ch/u/crafter312)\
**Replies:** 2\
**Last updated:** [August 29, 2025, 5:10pm UTC](https://root-forum.cern.ch/t/multi-threaded-output-of-th-histograms-via-tbuffermerger/64089 "2025-08-29T17:10:50Z")

</div>

ROOT Version: 6.30/08 Platform: AlmaLinux 8.10 Compiler: GNU 8.5.0 via CMake 3.26.5 I am writing a program which uses TTreeProcessorMT for multi-threaded processing of an input tree and TBufferMerger for output in th…

---

## [Adding new entry to the stats box doesn't work](https://root-forum.cern.ch/t/adding-new-entry-to-the-stats-box-doesnt-work/64062)

<div class="topic-metadata">

**Author:** [@mhstar](https://root-forum.cern.ch/u/mhstar)\
**Replies:** 16\
**Last updated:** [August 27, 2025, 7:40am UTC](https://root-forum.cern.ch/t/adding-new-entry-to-the-stats-box-doesnt-work/64062 "2025-08-27T07:40:43Z")

</div>

I have the example code to attach, adding new entry to the statistics box doesn’t work. Also the first statistics box line color doesn’t change as expected if I have multiple stats box. #include "TCanvas.h" #include …

---

## [How to set the DrawOption for y Projection using the SetShowProjectionY for a TH2D Histogram](https://root-forum.cern.ch/t/how-to-set-the-drawoption-for-y-projection-using-the-setshowprojectiony-for-a-th2d-histogram/64060)

<div class="topic-metadata">

**Author:** [@DavidK](https://root-forum.cern.ch/u/DavidK)\
**Replies:** 2\
**Last updated:** [August 21, 2025, 1:27pm UTC](https://root-forum.cern.ch/t/how-to-set-the-drawoption-for-y-projection-using-the-setshowprojectiony-for-a-th2d-histogram/64060 "2025-08-21T13:27:00Z")

</div>

I’m using TBrowser to show a TH2D histogram in a root file. I need to make multiple projections to the y-Axis. These Projections always use the “HISTO” draw option but I need to show the error bars. Tabbing into the proj…

---

## [How to include my function in RooFit?](https://root-forum.cern.ch/t/how-to-include-my-function-in-roofit/63944)

<div class="topic-metadata">

**Author:** [@OtaviusDecius](https://root-forum.cern.ch/u/OtaviusDecius)\
**Replies:** 5\
**Last updated:** [July 31, 2025, 11:49pm UTC](https://root-forum.cern.ch/t/how-to-include-my-function-in-roofit/63944 "2025-07-31T23:49:21Z")

</div>

Hi there, I need to define a line shape function for the non-resonant background in Roofit in order to get the Breit-Wigner signal. The function is defined as a class in C++ as follows: // NonResonantFunction.h class N…

---

## [Terminate called after throwing an instance of 'std::out\_of\_range'](https://root-forum.cern.ch/t/terminate-called-after-throwing-an-instance-of-std-out-of-range/63943)

<div class="topic-metadata">

**Author:** [@muhammaa](https://root-forum.cern.ch/u/muhammaa)\
**Replies:** 1\
**Last updated:** [July 29, 2025, 8:07am UTC](https://root-forum.cern.ch/t/terminate-called-after-throwing-an-instance-of-std-out-of-range/63943 "2025-07-29T08:07:41Z")

</div>

I want to reconstruct the energy from the gaussian fit but instead i am getting the error. terminate called after throwing an instance of 'std::out\_of\_range' what(): vector::\_M\_range\_check: \_\_n (which is 53861) \>= th…

---

## [TH1 and RooDataHist asymmetric uncertainties differ](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936)

<div class="topic-metadata">

**Author:** [@iaosiiuv](https://root-forum.cern.ch/u/iaosiiuv)\
**Replies:** 1\
**Last updated:** [July 28, 2025, 6:57am UTC](https://root-forum.cern.ch/t/th1-and-roodatahist-asymmetric-uncertainties-differ/63936 "2025-07-28T06:57:42Z")

</div>

Hello everyone, When asking to display asymmetric error bars, TH1 and RooDataHist give the same intervals except for a bin with 0 event. The frequentist approach states that there is 68% coverage and 32% in the upper a…

---

## [Setting bins of indentically 0 value to a specific color in a TH2 drawn with COLZ](https://root-forum.cern.ch/t/setting-bins-of-indentically-0-value-to-a-specific-color-in-a-th2-drawn-with-colz/63935)

<div class="topic-metadata">

**Author:** [@jocl](https://root-forum.cern.ch/u/jocl)\
**Replies:** 4\
**Last updated:** [July 28, 2025, 6:15am UTC](https://root-forum.cern.ch/t/setting-bins-of-indentically-0-value-to-a-specific-color-in-a-th2-drawn-with-colz/63935 "2025-07-28T06:15:46Z")

</div>

ROOT Version: 6.32.06 Platform: AlmaLinux9.5 Compiler: GCC 14.2.0 Hi ROOTers, Suppose I have a TH2 for which I have created a custom palette like so: const int ncol = 50; const int nstp = 3; double red\[nstp\] = {0.,…

---

## [TPaveStats is showing weird fit numbers](https://root-forum.cern.ch/t/tpavestats-is-showing-weird-fit-numbers/63908)

<div class="topic-metadata">

**Author:** [@OtaviusDecius](https://root-forum.cern.ch/u/OtaviusDecius)\
**Replies:** 6\
**Last updated:** [July 18, 2025, 9:02pm UTC](https://root-forum.cern.ch/t/tpavestats-is-showing-weird-fit-numbers/63908 "2025-07-18T21:02:22Z")

</div>

Hi there, Fitting a histogram with one Breit-Wigner signal and a non-resonant background I noticed the fit parameters shown on TPaveStats are completely different, non-physical, than those ones shown in the ROOT command…

---

## [Regarding the dy/dx of the histogram](https://root-forum.cern.ch/t/regarding-the-dy-dx-of-the-histogram/63726)

<div class="topic-metadata">

**Author:** [@QinLi](https://root-forum.cern.ch/u/QinLi)\
**Replies:** 5\
**Last updated:** [June 13, 2025, 9:27am UTC](https://root-forum.cern.ch/t/regarding-the-dy-dx-of-the-histogram/63726 "2025-06-13T09:27:39Z")

</div>

Dear Experts: I now have a TH1 histogram with the x-axis noted as T and the y-axis noted as N. Now perform a t=a+bT transformation on x, which transforms the x-axis to t, and then perform an E=2t\*t transformation, which…

---

## [TH::FindBin relation to a "discriminator 1" error](https://root-forum.cern.ch/t/th-findbin-relation-to-a-discriminator-1-error/63679)

<div class="topic-metadata">

**Author:** [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Replies:** 3\
**Last updated:** [June 9, 2025, 7:49pm UTC](https://root-forum.cern.ch/t/th-findbin-relation-to-a-discriminator-1-error/63679 "2025-06-09T19:49:55Z")

</div>

Hi! In which conditions a FindBin method requested from a TH3D\* can give an error ending with (discriminator 1) ? The exact error is of the form: \[3943232:flow\_base\]: my\_test() \[0x4760fc\]: \_ZN9flow\_base7process…

---

## [Problem with calibrated energy histogtram](https://root-forum.cern.ch/t/problem-with-calibrated-energy-histogtram/63588)

<div class="topic-metadata">

**Author:** [@chetan](https://root-forum.cern.ch/u/chetan)\
**Replies:** 4\
**Last updated:** [May 22, 2025, 2:39am UTC](https://root-forum.cern.ch/t/problem-with-calibrated-energy-histogtram/63588 "2025-05-22T02:39:34Z")

</div>

I have Energy histogram with 8k channels and need to calibrate it. I am doing this with a macro but the output calibrated histogram has dips at fixed channel difference. In some cases, there are spikes in the calibrated …

---

## [Use TTree::Draw() to a histogram with weights and weight errors coming from branches](https://root-forum.cern.ch/t/use-ttree-draw-to-a-histogram-with-weights-and-weight-errors-coming-from-branches/63556)

<div class="topic-metadata">

**Author:** [@FVazquez](https://root-forum.cern.ch/u/FVazquez)\
**Replies:** 2\
**Last updated:** [May 16, 2025, 4:09pm UTC](https://root-forum.cern.ch/t/use-ttree-draw-to-a-histogram-with-weights-and-weight-errors-coming-from-branches/63556 "2025-05-16T16:09:36Z")

</div>

Hi all, I have a TTree with a few branches output by simulation code, with each entry representing one MC event. One of the branches is the weight W of the event, and another is the quadratic error WE of the event. Plo…

---

## [Problem of efficiency in transformation from TH3 to THnSparse](https://root-forum.cern.ch/t/problem-of-efficiency-in-transformation-from-th3-to-thnsparse/63531)

<div class="topic-metadata">

**Author:** [@coffeezfw](https://root-forum.cern.ch/u/coffeezfw)\
**Replies:** 9\
**Last updated:** [May 16, 2025, 1:16am UTC](https://root-forum.cern.ch/t/problem-of-efficiency-in-transformation-from-th3-to-thnsparse/63531 "2025-05-16T01:16:49Z")

</div>

Hi, I am trying to score a dose grid which has a dimension of 600x600x600. However, ROOT can’t save this histogram successfully due to the 1GB IO limitation. Therefore I need to transfer this histogram from TH3D to THnS…

---

## [Plotly Interface](https://root-forum.cern.ch/t/plotly-interface/63542)

<div class="topic-metadata">

**Author:** [@ParticleTruthSeeker](https://root-forum.cern.ch/u/ParticleTruthSeeker)\
**Replies:** 1\
**Last updated:** [May 13, 2025, 11:37am UTC](https://root-forum.cern.ch/t/plotly-interface/63542 "2025-05-13T11:37:39Z")

</div>

Hello, I am wondering if there is plotly interface available with some on click functionality for peak fitting. At least to provide the bounding parameters rather than use the xwindow interface? What would it take to cr…

---

## [TGraph2D with predefined axis-range?](https://root-forum.cern.ch/t/tgraph2d-with-predefined-axis-range/63479)

<div class="topic-metadata">

**Author:** [@Georg\_T](https://root-forum.cern.ch/u/Georg_T)\
**Replies:** 14\
**Last updated:** [May 8, 2025, 12:55pm UTC](https://root-forum.cern.ch/t/tgraph2d-with-predefined-axis-range/63479 "2025-05-08T12:55:50Z")

</div>

Hi, I would like to create a TGraph2D and draw it with a prefined axis range (using cont4z). I can limit the axis, but I cannot extend them…? Finally, I would like to draw some lines, circles and arcs on top. I found …

---

## [THStack "pfc" transparent fill?](https://root-forum.cern.ch/t/thstack-pfc-transparent-fill/63439)

<div class="topic-metadata">

**Author:** [@rlyons](https://root-forum.cern.ch/u/rlyons)\
**Replies:** 8\
**Last updated:** [April 24, 2025, 12:20pm UTC](https://root-forum.cern.ch/t/thstack-pfc-transparent-fill/63439 "2025-04-24T12:20:39Z")

</div>

There does not seem to be a way to plot a THStack with the “pfc” option and have the fill partially transparent. Is there a way to draw the THStack with this option and also use FIllColorAlpha? The following code produce…

---

## [Plots in Histogram](https://root-forum.cern.ch/t/plots-in-histogram/63142)

<div class="topic-metadata">

**Author:** [@Muhammad\_Zeeshan](https://root-forum.cern.ch/u/Muhammad_Zeeshan)\
**Replies:** 16\
**Last updated:** [April 2, 2025, 7:11pm UTC](https://root-forum.cern.ch/t/plots-in-histogram/63142 "2025-04-02T19:11:35Z")

</div>

Greetings! I’m Zeeshan, theoretical particle physics research student. We are working on histograms like draw some plots, but there are some issues regarding smoothness and position of legends in Canva. So please guide…

---

## [histo.Integral() vs looping tree to get sumw](https://root-forum.cern.ch/t/histo-integral-vs-looping-tree-to-get-sumw/63256)

<div class="topic-metadata">

**Author:** [@cvergis](https://root-forum.cern.ch/u/cvergis)\
**Replies:** 1\
**Last updated:** [March 31, 2025, 7:16pm UTC](https://root-forum.cern.ch/t/histo-integral-vs-looping-tree-to-get-sumw/63256 "2025-03-31T19:16:17Z")

</div>

Hello, I am encountering an issue with getting the total yields from a weighted histogram. I have the values in the TTree, which I want to apply certain selections. I tried the following code: import ROOT as R f=R.TFi…

---

## [TH2 option TEXT not working with font 43](https://root-forum.cern.ch/t/th2-option-text-not-working-with-font-43/62513)

<div class="topic-metadata">

**Author:** [@pad](https://root-forum.cern.ch/u/pad)\
**Replies:** 4\
**Last updated:** [March 27, 2025, 2:36pm UTC](https://root-forum.cern.ch/t/th2-option-text-not-working-with-font-43/62513 "2025-03-27T14:36:54Z")

</div>

Dear ROOT, On my system, using the old canvas (TRootCanvas), the call to TH2F::Draw("text") do not show any bin content when the font is set to 13, 23 or 43… This script reproduces the issue : def testH(): h2 = RO…

---

## [Useless check/bug in TH1::Smooth](https://root-forum.cern.ch/t/useless-check-bug-in-th1-smooth/63183)

<div class="topic-metadata">

**Author:** [@Evander137](https://root-forum.cern.ch/u/Evander137)\
**Replies:** 3\
**Last updated:** [March 22, 2025, 8:00pm UTC](https://root-forum.cern.ch/t/useless-check-bug-in-th1-smooth/63183 "2025-03-22T20:00:53Z")

</div>

Hi, I’ve been looking at the TH1::Smooth function (and the associated TH1::SmoothArray for smoothing some of my histograms. In this line of the smoothing procedure in the source code, I noticed there seems to be a useles…

[Next page](https://root-forum.cern.ch/tag/hist/7.md?match_all_tags=true&page=1&tags%5B%5D=hist)
