# Newbie

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

[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:** 18

---

## [Plotting custom function within TF1](https://root-forum.cern.ch/t/plotting-custom-function-within-tf1/58901)

<div class="topic-metadata">

**Author:** [@MicheleScattola](https://root-forum.cern.ch/u/MicheleScattola)\
**Replies:** 3\
**Last updated:** [April 8, 2024, 3:06pm UTC](https://root-forum.cern.ch/t/plotting-custom-function-within-tf1/58901 "2024-04-08T15:06:24Z")

</div>

Hi, I’m trying to plot a function (Compton scattering) and I am trying to use TF1. My function is defined in a header file double E\_1(double theta); And in my main file I am trying to recall it like this: TApplic…

---

## ["Failed to call \`y()\` to execute the macro" Error](https://root-forum.cern.ch/t/failed-to-call-y-to-execute-the-macro-error/58883)

<div class="topic-metadata">

**Author:** [@Noname](https://root-forum.cern.ch/u/Noname)\
**Replies:** 1\
**Last updated:** [April 7, 2024, 2:27pm UTC](https://root-forum.cern.ch/t/failed-to-call-y-to-execute-the-macro-error/58883 "2024-04-07T14:27:24Z")

</div>

Hi, I am quite new to the root and in general all concepts surrounding it. I installed it on Ubuntu manually ,including all dependencies. I can call and run root for basic things like 1+1 but when I use an text file and …

---

## [Error related to the interpreter information for class TNtupleD](https://root-forum.cern.ch/t/error-related-to-the-interpreter-information-for-class-tntupled/58843)

<div class="topic-metadata">

**Author:** [@neerajk](https://root-forum.cern.ch/u/neerajk)\
**Replies:** 5\
**Last updated:** [April 5, 2024, 8:29pm UTC](https://root-forum.cern.ch/t/error-related-to-the-interpreter-information-for-class-tntupled/58843 "2024-04-05T20:29:46Z")

</div>

Hello, I am writing a short script and compiling it through CMake to create an executable file. I have defined the root (6.30.04) path in CMakeLists.txt and encountered no errors during the build process; the program fi…

---

## [ImportError: Failed to import libcppyy3\_8. Please check that ROOT has been built for Python 3.8](https://root-forum.cern.ch/t/importerror-failed-to-import-libcppyy3-8-please-check-that-root-has-been-built-for-python-3-8/58856)

<div class="topic-metadata">

**Author:** [@eballabe](https://root-forum.cern.ch/u/eballabe)\
**Replies:** 3\
**Last updated:** [April 5, 2024, 7:01am UTC](https://root-forum.cern.ch/t/importerror-failed-to-import-libcppyy3-8-please-check-that-root-has-been-built-for-python-3-8/58856 "2024-04-05T07:01:25Z")

</div>

Hi, this is what I get when I try to import ROOT in python 3.8 on my macOS terminal python3 Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) \[Clang 6.0 (clang-600.0.57)\] on darwin Type “help”, “copyright”, “…

---

## [TCanvas grpahs](https://root-forum.cern.ch/t/tcanvas-grpahs/58840)

<div class="topic-metadata">

**Author:** [@akberovic](https://root-forum.cern.ch/u/akberovic)\
**Replies:** 3\
**Last updated:** [April 5, 2024, 6:39am UTC](https://root-forum.cern.ch/t/tcanvas-grpahs/58840 "2024-04-05T06:39:41Z")

</div>

Hello, when I run the code the histograms in ROOT are displayed correctly while the macro is running, but once the macro finishes, the histograms disappear or turn white. I couldn’t find the reason behind it. Can someone…

---

## [Root broken after removing build directory](https://root-forum.cern.ch/t/root-broken-after-removing-build-directory/58593)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 10\
**Last updated:** [April 4, 2024, 2:11pm UTC](https://root-forum.cern.ch/t/root-broken-after-removing-build-directory/58593 "2024-04-04T14:11:19Z")

</div>

Dear experts, I tried to build the root from scratch in a docker container. I build everything from the source and root prompt seems ok after installing it. However, root is broken after I deleted build directory. It sh…

---

## [Peak-to-background ratio for a double peak](https://root-forum.cern.ch/t/peak-to-background-ratio-for-a-double-peak/58841)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [April 4, 2024, 7:49am UTC](https://root-forum.cern.ch/t/peak-to-background-ratio-for-a-double-peak/58841 "2024-04-04T07:49:16Z")

</div>

I am trying to find the peak-to-background ratio for the second peak (peak 1), Assuming from fitting, we have the 1.) Counts in Peak 0 2.) Counts in Peaks 1 3.) Total counts (Integral) I think merely subtracting 3.)…

---

## [Consistent issues with ROOT on macOS](https://root-forum.cern.ch/t/consistent-issues-with-root-on-macos/57932)

<div class="topic-metadata">

**Author:** [@Alex\_Gavin](https://root-forum.cern.ch/u/Alex_Gavin)\
**Replies:** 34\
**Last updated:** [April 3, 2024, 5:50pm UTC](https://root-forum.cern.ch/t/consistent-issues-with-root-on-macos/57932 "2024-04-03T17:50:55Z")

</div>

Hi, I’m having consistent issues with ROOT on my macOS Sonoma 14.2.1. When I try to run a command on some ROOT dependent software I have installed, I get: alexgavin@Alexs-MacBook-Air Run % UCLSignalAna data/mu3e\_vertex…

---

## [Smoothen a histogram](https://root-forum.cern.ch/t/smoothen-a-histogram/58815)

<div class="topic-metadata">

**Author:** [@Sandy](https://root-forum.cern.ch/u/Sandy)\
**Replies:** 4\
**Last updated:** [April 3, 2024, 9:38am UTC](https://root-forum.cern.ch/t/smoothen-a-histogram/58815 "2024-04-03T09:38:36Z")

</div>

Hello, Could somebody please tell me how to smoothen the attached 2D histogram where the visible lines (inside the red ellipse) would not be there in that way… \[Will the rebinning help?\] Thanks

---

## [Upper limit on production cross section](https://root-forum.cern.ch/t/upper-limit-on-production-cross-section/58773)

<div class="topic-metadata">

**Author:** [@Dpops98](https://root-forum.cern.ch/u/Dpops98)\
**Replies:** 3\
**Last updated:** [April 2, 2024, 4:12am UTC](https://root-forum.cern.ch/t/upper-limit-on-production-cross-section/58773 "2024-04-02T04:12:47Z")

</div>

Hi, So, I want to reproduce a plot of the upper limit on the production cross-section as a function of mass from a paper(arXiv:2101.11582v2). With the given information about Data, Total background, uncertainty in the …

---

## [Using Form() with the SetTitle() while graphing inside loop](https://root-forum.cern.ch/t/using-form-with-the-settitle-while-graphing-inside-loop/58811)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 1\
**Last updated:** [April 1, 2024, 8:23pm UTC](https://root-forum.cern.ch/t/using-form-with-the-settitle-while-graphing-inside-loop/58811 "2024-04-01T20:23:41Z")

</div>

Is it somehow possible to use Form() while setting TGraph title using the ‘shorthand’ method gr-\>SetTitle ("Form("Graph %d", graph\_num); X title; Y title") Or I need to resort to separate titles for the axes and the to…

---

## [Cmake message upon installation](https://root-forum.cern.ch/t/cmake-message-upon-installation/58800)

<div class="topic-metadata">

**Author:** [@Mahanyapane](https://root-forum.cern.ch/u/Mahanyapane)\
**Replies:** 2\
**Last updated:** [April 1, 2024, 5:55pm UTC](https://root-forum.cern.ch/t/cmake-message-upon-installation/58800 "2024-04-01T17:55:55Z")

</div>

I am installing root on my computer. I get this message on a terminal when I execute cmake … command. Please help ROOT Version: 6.30.04 Platform: ubuntu 22.04 Compiler: gcc 11

---

## [2D histogram where bin contents are the fitted gaussian sigma of data in each bin](https://root-forum.cern.ch/t/2d-histogram-where-bin-contents-are-the-fitted-gaussian-sigma-of-data-in-each-bin/58778)

<div class="topic-metadata">

**Author:** [@mfglinux\_gmail](https://root-forum.cern.ch/u/mfglinux_gmail)\
**Replies:** 3\
**Last updated:** [March 30, 2024, 4:01pm UTC](https://root-forum.cern.ch/t/2d-histogram-where-bin-contents-are-the-fitted-gaussian-sigma-of-data-in-each-bin/58778 "2024-03-30T16:01:05Z")

</div>

Hello rooters I am seeking for advice implementing a function. I would like to plot a 2D histogram where the bin contents are the fitted gaussian sigma of the bin contents in each bin. It is something similar to a TProf…

---

## [Unbinned MLF vs Binned MLF?](https://root-forum.cern.ch/t/unbinned-mlf-vs-binned-mlf/58787)

<div class="topic-metadata">

**Author:** [@Vikas\_Raj](https://root-forum.cern.ch/u/Vikas_Raj)\
**Replies:** 3\
**Last updated:** [March 30, 2024, 3:50pm UTC](https://root-forum.cern.ch/t/unbinned-mlf-vs-binned-mlf/58787 "2024-03-30T15:50:16Z")

</div>

How can I tell the difference between binned vs unbinned maximum likelihood fit? I know that this is a very basic question, but I keep getting confused between the two. I want to clear this once and for all! For exampl…

---

## [Order of printed parameters in stat box](https://root-forum.cern.ch/t/order-of-printed-parameters-in-stat-box/58777)

<div class="topic-metadata">

**Author:** [@liz](https://root-forum.cern.ch/u/liz)\
**Replies:** 2\
**Last updated:** [March 29, 2024, 1:44pm UTC](https://root-forum.cern.ch/t/order-of-printed-parameters-in-stat-box/58777 "2024-03-29T13:44:19Z")

</div>

Hello, does anybody know how can i change the order of the fit results shown in the stats box? I can see they are printed out alphabetically but I would like to customize the order. I wuld also like to change the title i…

---

## [Changing the parameters name in a fit](https://root-forum.cern.ch/t/changing-the-parameters-name-in-a-fit/58774)

<div class="topic-metadata">

**Author:** [@liz](https://root-forum.cern.ch/u/liz)\
**Replies:** 2\
**Last updated:** [March 29, 2024, 12:14pm UTC](https://root-forum.cern.ch/t/changing-the-parameters-name-in-a-fit/58774 "2024-03-29T12:14:17Z")

</div>

Hello, I have this code that performs a double gaussian fit on two close photopeaks in a gamma spectrum. It works fine but whenever I try to set different parameters names for the Gauss function, this messes up the fit …

---

## [Import ROOT](https://root-forum.cern.ch/t/import-root/58769)

<div class="topic-metadata">

**Author:** [@MRazza879](https://root-forum.cern.ch/u/MRazza879)\
**Replies:** 1\
**Last updated:** [March 28, 2024, 8:17pm UTC](https://root-forum.cern.ch/t/import-root/58769 "2024-03-28T20:17:47Z")

</div>

Hi, I’m trying to work with Jupyter Notebook using the ROOT functions. To do so i type “import ROOT”. The output is “No module named ‘ROOT’”. Then I did “sys.append(”/usr/local/Cellar/root/6.30.04/lib/root")", and the …

---

## [Gaussian fit + background in gamma spectroscopy](https://root-forum.cern.ch/t/gaussian-fit-background-in-gamma-spectroscopy/58753)

<div class="topic-metadata">

**Author:** [@liz](https://root-forum.cern.ch/u/liz)\
**Replies:** 4\
**Last updated:** [March 28, 2024, 6:28pm UTC](https://root-forum.cern.ch/t/gaussian-fit-background-in-gamma-spectroscopy/58753 "2024-03-28T18:28:53Z")

</div>

Hello, I am trying to perform a gaussian fit of a photopeak for several elements. I also want to include an exponential background noise but I have trouble in defining the final fit function. The Gaussian fit actually …

---

## [Unable to set the x axis range of a TGraph](https://root-forum.cern.ch/t/unable-to-set-the-x-axis-range-of-a-tgraph/58751)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 12:29pm UTC](https://root-forum.cern.ch/t/unable-to-set-the-x-axis-range-of-a-tgraph/58751 "2024-03-27T12:29:04Z")

</div>

Hi all, I cannot set the x-axis range of the TGraphError below using the SetRangeUser() method. I am almost sure I am doing something ridiculous, but can someone please help me figure that out ? Everytime I get the sa…

---

## [Fitting TH1 to TH1](https://root-forum.cern.ch/t/fitting-th1-to-th1/58697)

<div class="topic-metadata">

**Author:** [@Will\_Flanagan](https://root-forum.cern.ch/u/Will_Flanagan)\
**Replies:** 8\
**Last updated:** [March 27, 2024, 11:38am UTC](https://root-forum.cern.ch/t/fitting-th1-to-th1/58697 "2024-03-27T11:38:35Z")

</div>

ROOT Experts, I am looking to decompose a TH1 histogram into a linear combination of other TH1 histograms. I am familiar with fitting histograms to functions, but instead I am looking to do something of the flavor h3-\>F…

---

## [ROOT Browser can't be used](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717)

<div class="topic-metadata">

**Author:** [@Fred](https://root-forum.cern.ch/u/Fred)\
**Replies:** 19\
**Last updated:** [March 25, 2024, 4:24pm UTC](https://root-forum.cern.ch/t/root-browser-cant-be-used/58717 "2024-03-25T16:24:10Z")

</div>

ROOT experts, I am trying to display data in ROOT, but when i try to use new TBrowser I get the message: “The ROOT browser cannot run in batch mode” although I at no point attempt to use batch mode. I am aware of the po…

---

## [Bessel Function](https://root-forum.cern.ch/t/bessel-function/58362)

<div class="topic-metadata">

**Author:** [@Jorge\_Nava](https://root-forum.cern.ch/u/Jorge_Nava)\
**Replies:** 4\
**Last updated:** [March 23, 2024, 6:49am UTC](https://root-forum.cern.ch/t/bessel-function/58362 "2024-03-23T06:49:23Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.26.06 Platform: Not Provided Compiler: Ubuntu Hello experts from root, I am having quite a hard time trying to run a code in wh…

---

## [Cling: unknown type name ‘source’](https://root-forum.cern.ch/t/cling-unknown-type-name-source/58656)

<div class="topic-metadata">

**Author:** [@prabhu634](https://root-forum.cern.ch/u/prabhu634)\
**Replies:** 8\
**Last updated:** [March 22, 2024, 5:56pm UTC](https://root-forum.cern.ch/t/cling-unknown-type-name-source/58656 "2024-03-22T17:56:17Z")

</div>

Hi @bellenot , I suppose I have CLING vesion 1.0~dev installed on my windows machine, as I get the below output: C:\\Release\_NEW\\bin\>cling.exe --version 1.0~dev I am able to call my project specific DLL functions from…

---

## [TF3 Integration Over Infinity](https://root-forum.cern.ch/t/tf3-integration-over-infinity/58592)

<div class="topic-metadata">

**Author:** [@Denali\_Jah](https://root-forum.cern.ch/u/Denali_Jah)\
**Replies:** 2\
**Last updated:** [March 21, 2024, 5:25pm UTC](https://root-forum.cern.ch/t/tf3-integration-over-infinity/58592 "2024-03-21T17:25:11Z")

</div>

I am attempting to integrate over all space and am unfamiliar with the necessary syntax. The following is my current code. Could someone please explain how to do this properly? TF3 \* inter = new TF3("Integrator1",myFunc…

---

## [Building CLING dll from source code](https://root-forum.cern.ch/t/building-cling-dll-from-source-code/55311)

<div class="topic-metadata">

**Author:** [@prabhu6341](https://root-forum.cern.ch/u/prabhu6341)\
**Replies:** 8\
**Last updated:** [February 6, 2024, 1:18pm UTC](https://root-forum.cern.ch/t/building-cling-dll-from-source-code/55311 "2024-02-06T13:18:14Z")

</div>

Hi Team, I am new to the CLING interpreter. Currently, we are using CINT interpreter in our project for writing C++ scripts and we are using VS2012. Since CINT is not supprorted on VS2019, we are looking at using CINT …

---

## [Using cling with CUDA enabled](https://root-forum.cern.ch/t/using-cling-with-cuda-enabled/47434)

<div class="topic-metadata">

**Author:** [@alstown](https://root-forum.cern.ch/u/alstown)\
**Replies:** 6\
**Last updated:** [March 17, 2024, 3:10pm UTC](https://root-forum.cern.ch/t/using-cling-with-cuda-enabled/47434 "2024-03-17T15:10:48Z")

</div>

I would ultimately like to use Cling + CUDA in a Jupyter notebook if this is not the right place for this please let me know. Is there usage documentation elsewhere for Cling + CUDA? I have looked regarding CUDA usage …

---

## [Suppressing background in mass histogram](https://root-forum.cern.ch/t/suppressing-background-in-mass-histogram/58590)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 2\
**Last updated:** [March 20, 2024, 3:38am UTC](https://root-forum.cern.ch/t/suppressing-background-in-mass-histogram/58590 "2024-03-20T03:38:20Z")

</div>

So my objective is to suppress background in the mass histogram of various channels in my ROOT file to see which channel is worth looking further into. Let me take an example of a decay A-\>B C D. Now I want to suppress …

---

## [TTree Branch Filling](https://root-forum.cern.ch/t/ttree-branch-filling/58574)

<div class="topic-metadata">

**Author:** [@Manisha\_Rana](https://root-forum.cern.ch/u/Manisha_Rana)\
**Replies:** 6\
**Last updated:** [March 19, 2024, 3:25pm UTC](https://root-forum.cern.ch/t/ttree-branch-filling/58574 "2024-03-19T15:25:09Z")

</div>

Hi, I am trying to fill individual Branchs of a Tree using Struct . but it is not working. struct TrackParameter{ float m; float px; float py; float pz; float en; int pid; int charge; } ; struct E…

---

## [TLatex text overflowing histogram border](https://root-forum.cern.ch/t/tlatex-text-overflowing-histogram-border/58548)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 9\
**Last updated:** [March 18, 2024, 12:07pm UTC](https://root-forum.cern.ch/t/tlatex-text-overflowing-histogram-border/58548 "2024-03-18T12:07:42Z")

</div>

Hi all, I am trying to add some text with x coordinate centred at the pad and the Y coordinate just above a histogram (with some offset) However Setting X = 0.5 and Y = 0.9 draws the text but it overflows the histogram…

---

## [How to get the IonMobility.txt file ? if the /garfield/Data/ don't have one](https://root-forum.cern.ch/t/how-to-get-the-ionmobility-txt-file-if-the-garfield-data-dont-have-one/58563)

<div class="topic-metadata">

**Author:** [@simpletrouble6](https://root-forum.cern.ch/u/simpletrouble6)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 9:14pm UTC](https://root-forum.cern.ch/t/how-to-get-the-ionmobility-txt-file-if-the-garfield-data-dont-have-one/58563 "2024-03-17T21:14:29Z")

</div>

The gas i used is n-pentane and Co2. but i con’t generate it?

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

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