# Newbie

**URL:** https://root-forum.cern.ch/c/newbie/26.md?page=54

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

**Page:** 55

---

## [Using integral in a fit function](https://root-forum.cern.ch/t/using-integral-in-a-fit-function/49743)

<div class="topic-metadata">

**Author:** [@omar](https://root-forum.cern.ch/u/omar)\
**Replies:** 1\
**Last updated:** [April 26, 2022, 7:34am UTC](https://root-forum.cern.ch/t/using-integral-in-a-fit-function/49743 "2022-04-26T07:34:51Z")

</div>

Hello, I am new to root and I have been trying to do a fit using Birks’ function which contains an integral. I know how to define my own function for the fit but I don’t know how to include the integral in it. If someon…

---

## [gStyle.SetPalette issue with numpy](https://root-forum.cern.ch/t/gstyle-setpalette-issue-with-numpy/49738)

<div class="topic-metadata">

**Author:** [@enbyphysicist](https://root-forum.cern.ch/u/enbyphysicist)\
**Replies:** 7\
**Last updated:** [April 26, 2022, 6:03am UTC](https://root-forum.cern.ch/t/gstyle-setpalette-issue-with-numpy/49738 "2022-04-26T06:03:01Z")

</div>

\_ROOT Version: 6.13/02 Platform: Not Provided Compiler: Not Provided Hi there! I’ve been messing around with making some custom palettes in root. I’ve gotten it to a point where ROOT.TColor.CreateGradientColorTable …

---

## [Using CopyTree to select events for TMVA training](https://root-forum.cern.ch/t/using-copytree-to-select-events-for-tmva-training/49723)

<div class="topic-metadata">

**Author:** [@JunKai](https://root-forum.cern.ch/u/JunKai)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 1:11pm UTC](https://root-forum.cern.ch/t/using-copytree-to-select-events-for-tmva-training/49723 "2022-04-25T13:11:57Z")

</div>

Hi, experts I am modifying codes from TMVAClassification.C. The code shown below is at the part before the invocation of TMVA::Factory, and I want to select only some numbers of entries from the S/B tree (without genera…

---

## [Normalize two histograms coming from two different files with different cross sections](https://root-forum.cern.ch/t/normalize-two-histograms-coming-from-two-different-files-with-different-cross-sections/49720)

<div class="topic-metadata">

**Author:** [@github-arpita](https://root-forum.cern.ch/u/github-arpita)\
**Replies:** 1\
**Last updated:** [April 24, 2022, 6:51am UTC](https://root-forum.cern.ch/t/normalize-two-histograms-coming-from-two-different-files-with-different-cross-sections/49720 "2022-04-24T06:51:02Z")

</div>

Hi everyone, Screenshot from 2022-04-24 10-45-08-converted.pdf (36.0 KB) I am trying to plot two histograms in a same canvas using data from two different files. These two files correspond to signal and background and …

---

## [Logarithmic Function in Y-axis](https://root-forum.cern.ch/t/logarithmic-function-in-y-axis/49702)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 1\
**Last updated:** [April 23, 2022, 5:00am UTC](https://root-forum.cern.ch/t/logarithmic-function-in-y-axis/49702 "2022-04-23T05:00:50Z")

</div>

Hello, My value differ a lot in Y-axis \[ from 10 to 10^6) in histogram which makes most of the value disappear in the plot. It doesn’t show up in the logarithmic function \[10^3 to 10^6\]. Is there any way to fix the prob…

---

## [TGraph not accepting gStyle-\>Palette](https://root-forum.cern.ch/t/tgraph-not-accepting-gstyle-palette/49671)

<div class="topic-metadata">

**Author:** [@slocum](https://root-forum.cern.ch/u/slocum)\
**Replies:** 5\
**Last updated:** [April 22, 2022, 4:31pm UTC](https://root-forum.cern.ch/t/tgraph-not-accepting-gstyle-palette/49671 "2022-04-22T16:31:31Z")

</div>

Hi everyone, I would like to fill a TGraph polygon with a color from a specified gStyle-\>Palette(), as in the short example below. The problem seems to be that when I change the Palette() from default to e.g. Viridis, …

---

## [GSLMultiFit Memory Leak with ROOT::Fit::Fitter?](https://root-forum.cern.ch/t/gslmultifit-memory-leak-with-root-fitter/49566)

<div class="topic-metadata">

**Author:** [@inneedofhelp](https://root-forum.cern.ch/u/inneedofhelp)\
**Replies:** 7\
**Last updated:** [April 22, 2022, 1:40pm UTC](https://root-forum.cern.ch/t/gslmultifit-memory-leak-with-root-fitter/49566 "2022-04-22T13:40:54Z")

</div>

I am attempting to use the ROOT::Fit::Fitter class in combination with the GSLMultiFit minimizer and am running into a memory leak which seems to be inherent to the minimizer (as best as I can tell). I have been looking …

---

## [Merging multiple Histogramms](https://root-forum.cern.ch/t/merging-multiple-histogramms/49669)

<div class="topic-metadata">

**Author:** [@wfelix](https://root-forum.cern.ch/u/wfelix)\
**Replies:** 1\
**Last updated:** [April 22, 2022, 7:53am UTC](https://root-forum.cern.ch/t/merging-multiple-histogramms/49669 "2022-04-22T07:53:19Z")

</div>

Hello, I am trying to merge multiple diagrams. To do this, I created a bunch of diagrams in a for loop and now I want to add each of these diagrams to a list, and then merge them. Like this: TList \*individualetaphi = n…

---

## [Bin selection](https://root-forum.cern.ch/t/bin-selection/49673)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 1\
**Last updated:** [April 22, 2022, 7:40am UTC](https://root-forum.cern.ch/t/bin-selection/49673 "2022-04-22T07:40:11Z")

</div>

Hello experts, I am having trouble selecting the bins in following code.Feel like I selected some underflows.Could you please help me figure it out? ntheta=4; Double\_t pLowBinEdge\[6\]= {0.30, 0.45, 0.65, 0.95, 1.65, 2.0…

---

## [Histogram doesn't shows the regular line](https://root-forum.cern.ch/t/histogram-doesnt-shows-the-regular-line/49685)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 9:20pm UTC](https://root-forum.cern.ch/t/histogram-doesnt-shows-the-regular-line/49685 "2022-04-21T21:20:45Z")

</div>

When I try to add the uncertainty to the plot it removes the regular line in the histogram. Thank You so much for help. ‘’’ TH1D\* beyondThreshold = new TH1D(“beyondThreshold”, “Current Beyond threshold on January”,Nu…

---

## [Histogram is not being generated](https://root-forum.cern.ch/t/histogram-is-not-being-generated/49684)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 8:56pm UTC](https://root-forum.cern.ch/t/histogram-is-not-being-generated/49684 "2022-04-21T20:56:22Z")

</div>

My code doesn’t generate the histogram as expected, Float\_t Threshold1; TFile\* file\_input1 = new TFile("current\_dec.root", "read"); TTree\* current = (TTree\*)file\_input1-\>Get("current\_ntuple"); Float\_t C…

---

## [Error of \*\*\*Break\*\*\*Segmentation-violation](https://root-forum.cern.ch/t/error-of-break-segmentation-violation/49678)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 6:59pm UTC](https://root-forum.cern.ch/t/error-of-break-segmentation-violation/49678 "2022-04-21T18:59:43Z")

</div>

My program has been giving the error of break segmentation violation but if I try running the code in chunk it works fine. ‘’'void Percent\_beyond\_threshold(TString file1, TString file2) { TH1D\* beyondthreshold\_stable …

---

## [How to skip nan numbers in txt file](https://root-forum.cern.ch/t/how-to-skip-nan-numbers-in-txt-file/49567)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 7\
**Last updated:** [April 21, 2022, 3:18pm UTC](https://root-forum.cern.ch/t/how-to-skip-nan-numbers-in-txt-file/49567 "2022-04-21T15:18:45Z")

</div>

Hello, I have a txt file. It contains efficiency values for proton. Some of the values are “nan” (1). I need to know how to get rid of nan bins? Once I try to calculate the following “sigma\_real”, this nan values bot…

---

## [Error of undeclared identifier of root file](https://root-forum.cern.ch/t/error-of-undeclared-identifier-of-root-file/49662)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 3\
**Last updated:** [April 21, 2022, 7:34am UTC](https://root-forum.cern.ch/t/error-of-undeclared-identifier-of-root-file/49662 "2022-04-21T07:34:54Z")

</div>

I am trying to plot stacked histogram but Canvas doesn’t show any plot. void Analysis(TString file1, TString file2) { THStack hs("hs", "Filtered data for december and January"); TFile f1(file1); TTree\* t1 =(…

---

## [Mac M1 Architecture Issue](https://root-forum.cern.ch/t/mac-m1-architecture-issue/49635)

<div class="topic-metadata">

**Author:** [@enbyphysicist](https://root-forum.cern.ch/u/enbyphysicist)\
**Replies:** 1\
**Last updated:** [April 19, 2022, 7:38pm UTC](https://root-forum.cern.ch/t/mac-m1-architecture-issue/49635 "2022-04-19T19:38:05Z")

</div>

\_ROOT Version: v6-13-0 \_Platform: macOS Monterey, 12.2 Compiler: Not Provided Hi! Very new to ROOT and trying to get it up and running with pyroot. At the current time, I can fire up python and root from my terminal,…

---

## [Error with TGraph::SetTitle](https://root-forum.cern.ch/t/error-with-tgraph-settitle/49523)

<div class="topic-metadata">

**Author:** [@roany01](https://root-forum.cern.ch/u/roany01)\
**Replies:** 5\
**Last updated:** [April 18, 2022, 11:01am UTC](https://root-forum.cern.ch/t/error-with-tgraph-settitle/49523 "2022-04-18T11:01:01Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.26/00 Platform: arm64 apple m1 Compiler: xcode12 Dear expert, when I run this macro without grms::SetTitle everything works. …

---

## [Percentage Threshold histogram](https://root-forum.cern.ch/t/percentage-threshold-histogram/49598)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 1\
**Last updated:** [April 16, 2022, 4:59am UTC](https://root-forum.cern.ch/t/percentage-threshold-histogram/49598 "2022-04-16T04:59:44Z")

</div>

I am trying to plot percentage on the Y-axis instead of data count, the plot does not show as expected, my data size is from \[0,0.25\] ‘’’ void cae() { Float\_t Threshold; TFile\* file\_input = new TFile(“Mar07.roo…

---

## [Comparing of data file](https://root-forum.cern.ch/t/comparing-of-data-file/49591)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 7\
**Last updated:** [April 15, 2022, 5:10pm UTC](https://root-forum.cern.ch/t/comparing-of-data-file/49591 "2022-04-15T17:10:24Z")

</div>

I was trying to construct a histogram to compare two different data set but the plot is not as expected or as even it shows through new TBrowser Can some one help me out please? void current\_data(TString file1, TStrin…

---

## [How to disable command line terminal colour and other text formatting?](https://root-forum.cern.ch/t/how-to-disable-command-line-terminal-colour-and-other-text-formatting/49592)

<div class="topic-metadata">

**Author:** [@jaymorgan](https://root-forum.cern.ch/u/jaymorgan)\
**Replies:** 1\
**Last updated:** [April 15, 2022, 9:48am UTC](https://root-forum.cern.ch/t/how-to-disable-command-line-terminal-colour-and-other-text-formatting/49592 "2022-04-15T09:48:28Z")

</div>

Hello, Is there a way to disable all terminal colours and other text formatting functionality (thereby disabling the use of ascii character codes) when using the root REPL? For example, if I start a new instance of the …

---

## [Best way to deal with unknown range of variable for histogram axis](https://root-forum.cern.ch/t/best-way-to-deal-with-unknown-range-of-variable-for-histogram-axis/49577)

<div class="topic-metadata">

**Author:** [@renyhp](https://root-forum.cern.ch/u/renyhp)\
**Replies:** 4\
**Last updated:** [April 14, 2022, 2:46pm UTC](https://root-forum.cern.ch/t/best-way-to-deal-with-unknown-range-of-variable-for-histogram-axis/49577 "2022-04-14T14:46:25Z")

</div>

Hi, suppose I want to populate a histogram where I don’t know in advance what the precise range of the variable is, but I do know the bin width that I need. I also need to have the possibility to hadd files with two su…

---

## [How to convert this ROOT.PyIntBuffer class to an integer or array object that can be handled by python? (PyROOT and Marley related)](https://root-forum.cern.ch/t/how-to-convert-this-root-pyintbuffer-class-to-an-integer-or-array-object-that-can-be-handled-by-python-pyroot-and-marley-related/49579)

<div class="topic-metadata">

**Author:** [@Hilary](https://root-forum.cern.ch/u/Hilary)\
**Replies:** 1\
**Last updated:** [April 14, 2022, 8:28am UTC](https://root-forum.cern.ch/t/how-to-convert-this-root-pyintbuffer-class-to-an-integer-or-array-object-that-can-be-handled-by-python-pyroot-and-marley-related/49579 "2022-04-14T08:28:31Z")

</div>

Hello everyone! I am trying to plot energies of deexcitation products of nue-Ar40 reactions. Per page 58 of this document (toward the end of the page): https://arxiv.org/pdf/2101.11867.pdf, the pdg codes of the deexcit…

---

## [Get curve outline when fill area overlap in graph](https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576)

<div class="topic-metadata">

**Author:** [@gorsedh](https://root-forum.cern.ch/u/gorsedh)\
**Replies:** 1\
**Last updated:** [April 13, 2022, 5:53pm UTC](https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576 "2022-04-13T17:53:05Z")

</div>

Hello there, I’m drawing some curves on a histogram and i want some areas filled but in some cases they overlap. Is there a way to get the outline of the covered curve to superimpose on the fill area? (for example, in t…

---

## [Command “.dir” in ROOT v6 on W10?](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548)

<div class="topic-metadata">

**Author:** [@Vladi](https://root-forum.cern.ch/u/Vladi)\
**Replies:** 5\
**Last updated:** [April 13, 2022, 6:44am UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548 "2022-04-13T06:44:46Z")

</div>

Hello, Commands “with a dot” do not work in excess of those listed in the starting Root-welcome. I tried versions v26.00.00, v24.xx.xx, and the version indicated on the forum for 64-bit W10. The result is the same as …

---

## [Using cached files from CVMFS when no internet available](https://root-forum.cern.ch/t/using-cached-files-from-cvmfs-when-no-internet-available/49540)

<div class="topic-metadata">

**Author:** [@drsh2306](https://root-forum.cern.ch/u/drsh2306)\
**Replies:** 2\
**Last updated:** [April 11, 2022, 2:03pm UTC](https://root-forum.cern.ch/t/using-cached-files-from-cvmfs-when-no-internet-available/49540 "2022-04-11T14:03:44Z")

</div>

Hi, suppose I am using from my local machine software from cvmfs. Is it possible to use it without internet connection from cache? When cvmfs is not mounted.

---

## [Problem fitting a linear TF1 in a TH2](https://root-forum.cern.ch/t/problem-fitting-a-linear-tf1-in-a-th2/41153)

<div class="topic-metadata">

**Author:** [@juliangb](https://root-forum.cern.ch/u/juliangb)\
**Replies:** 5\
**Last updated:** [April 11, 2022, 12:21pm UTC](https://root-forum.cern.ch/t/problem-fitting-a-linear-tf1-in-a-th2/41153 "2022-04-11T12:21:10Z")

</div>

Hello, I’m trying to fit multiple TH2 with a straight line, using the command TH2.Fit(“pol1”). While this works, I’m not sure that this is the right way to do it, since it fails when the tracks are completely vertical, …

---

## [TMVAGUI interface](https://root-forum.cern.ch/t/tmvagui-interface/49520)

<div class="topic-metadata">

**Author:** [@pjana](https://root-forum.cern.ch/u/pjana)\
**Replies:** 3\
**Last updated:** [April 11, 2022, 10:00am UTC](https://root-forum.cern.ch/t/tmvagui-interface/49520 "2022-04-11T10:00:38Z")

</div>

Dear all, I am new to ROOT. I have created an output root file after the BDT. I can see all the variables in the output root file, which I used in the BDT method. But When I am going to see them using TMVAGUI , I can n…

---

## [No of events in the bins](https://root-forum.cern.ch/t/no-of-events-in-the-bins/49512)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 2\
**Last updated:** [April 7, 2022, 5:29pm UTC](https://root-forum.cern.ch/t/no-of-events-in-the-bins/49512 "2022-04-07T17:29:36Z")

</div>

Hello rooters, I need to find out number of events in each bin.(see attached plot) For that I wrote a little code.I got 0 events . I am not sure why GetBinContent is not working. void NoOfEvents(){ int i\_Q2\_bins=4…

---

## [How do I append to the include path using .rootrc or rootlogon.C?](https://root-forum.cern.ch/t/how-do-i-append-to-the-include-path-using-rootrc-or-rootlogon-c/49506)

<div class="topic-metadata">

**Author:** [@jaysonl](https://root-forum.cern.ch/u/jaysonl)\
**Replies:** 4\
**Last updated:** [April 7, 2022, 3:33pm UTC](https://root-forum.cern.ch/t/how-do-i-append-to-the-include-path-using-rootrc-or-rootlogon-c/49506 "2022-04-07T15:33:47Z")

</div>

Hello again. I use ROOT for prototyping bits of code, and at the moment, I happen to be working with GLib a lot. The paths for these header files aren’t in the default include path, so I find myself having to perform t…

---

## [Install ROOT/TMVA SOFIE](https://root-forum.cern.ch/t/install-root-tmva-sofie/48754)

<div class="topic-metadata">

**Author:** [@dilne](https://root-forum.cern.ch/u/dilne)\
**Replies:** 11\
**Last updated:** [April 7, 2022, 2:58pm UTC](https://root-forum.cern.ch/t/install-root-tmva-sofie/48754 "2022-04-07T14:58:20Z")

</div>

Hi, I was very impressed when I recently discovered ROOT/TMVA SOFIE on GitHub (/root-project/root/tree/master/tmva/sofie). I am interested in taking an AI/ML/DL ONNX model I have and using SOFIE to create a .hxx file for…

---

## [Reading array branch](https://root-forum.cern.ch/t/reading-array-branch/49484)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 6\
**Last updated:** [April 7, 2022, 9:27am UTC](https://root-forum.cern.ch/t/reading-array-branch/49484 "2022-04-07T09:27:23Z")

</div>

Hello all, This is maybe a more C++ related question, but I didn’t find a solution for the problem. I have a tree that as branch as an array, that is, if I do t1-\>Print() I have as output something like: \*.........…

[Previous page](https://root-forum.cern.ch/c/newbie/26.md?page=53)

[Next page](https://root-forum.cern.ch/c/newbie/26.md?page=55)
