# Newbie

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

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

---

## [From TCanvas to TH1](https://root-forum.cern.ch/t/from-tcanvas-to-th1/48046)

<div class="topic-metadata">

**Author:** [@ROOTer1](https://root-forum.cern.ch/u/ROOTer1)\
**Replies:** 2\
**Last updated:** [December 13, 2021, 2:54pm UTC](https://root-forum.cern.ch/t/from-tcanvas-to-th1/48046 "2021-12-13T14:54:44Z")

</div>

How do you save/convert a histogram found in a TCanvas object to a normal TH1 object? .ls (TFile \*) 0x7fcfcffb9870 root \[1\] .ls TFile\*\* File.root TFile\* File.root KEY: TCanvas c1;1 c1

---

## [Minimization subject to constrains with Tminuit, is it possible? \[PyROOT\]](https://root-forum.cern.ch/t/minimization-subject-to-constrains-with-tminuit-is-it-possible-pyroot/48027)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 7\
**Last updated:** [December 13, 2021, 1:37pm UTC](https://root-forum.cern.ch/t/minimization-subject-to-constrains-with-tminuit-is-it-possible-pyroot/48027 "2021-12-13T13:37:32Z")

</div>

Dear experts, I need to minimize a function subject to nonlinear constraints. I heard about Minuit, and that it is a great tool. But I read some old forums \[2001-2003\] where it was said that the Minuit cannot handle co…

---

## [SetParameters in fitting](https://root-forum.cern.ch/t/setparameters-in-fitting/47974)

<div class="topic-metadata">

**Author:** [@Saradindu](https://root-forum.cern.ch/u/Saradindu)\
**Replies:** 4\
**Last updated:** [December 12, 2021, 8:34am UTC](https://root-forum.cern.ch/t/setparameters-in-fitting/47974 "2021-12-12T08:34:13Z")

</div>

Hello, In root for fitting a peak using a function and using SetParameters we can define 11 parameters maximum . How to increase the number of parameters like 15 , 20 etc ? thanks saradindu Please read tips for effic…

---

## [Draw("COLZ") is not producing a histogram with the expected color scheme](https://root-forum.cern.ch/t/draw-colz-is-not-producing-a-histogram-with-the-expected-color-scheme/48015)

<div class="topic-metadata">

**Author:** [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 7:01pm UTC](https://root-forum.cern.ch/t/draw-colz-is-not-producing-a-histogram-with-the-expected-color-scheme/48015 "2021-12-09T19:01:26Z")

</div>

Hello Experts, I the macro shown below, I loop over a root file that has both TH1 and TH2 histograms. I was to plot these histograms in the order they appear in the file. Over all, the macro achieves that goal, but ther…

---

## [Problem reading a TTree with PyROOT](https://root-forum.cern.ch/t/problem-reading-a-ttree-with-pyroot/47960)

<div class="topic-metadata">

**Author:** [@andrew](https://root-forum.cern.ch/u/andrew)\
**Replies:** 2\
**Last updated:** [December 6, 2021, 5:04pm UTC](https://root-forum.cern.ch/t/problem-reading-a-ttree-with-pyroot/47960 "2021-12-06T17:04:28Z")

</div>

Greetings, I have this minor problem where I cannot read TTrees on PyROOT, while I can perfectly read them via .cpp files. The code that I am executing is: import ROOT Data = ROOT.TFile.Open("data.root", "READ") Main\_…

---

## [If ROOT can work for OS12 Monterey with M1 Pro processor?](https://root-forum.cern.ch/t/if-root-can-work-for-os12-monterey-with-m1-pro-processor/47951)

<div class="topic-metadata">

**Author:** [@Adam](https://root-forum.cern.ch/u/Adam)\
**Replies:** 1\
**Last updated:** [December 6, 2021, 11:34am UTC](https://root-forum.cern.ch/t/if-root-can-work-for-os12-monterey-with-m1-pro-processor/47951 "2021-12-06T11:34:12Z")

</div>

if ROOT can work for OS12 Monterey with M1 Pro processor? Has anyone ever tried it? Thanks. Adam

---

## [Can you build ROOT with a prebuilt Interpreter?](https://root-forum.cern.ch/t/can-you-build-root-with-a-prebuilt-interpreter/47927)

<div class="topic-metadata">

**Author:** [@mstack](https://root-forum.cern.ch/u/mstack)\
**Replies:** 1\
**Last updated:** [December 6, 2021, 9:53am UTC](https://root-forum.cern.ch/t/can-you-build-root-with-a-prebuilt-interpreter/47927 "2021-12-06T09:53:56Z")

</div>

ROOT Version: “Latest Stable” Platform: Linux x86 Compiler: GCC Is there a flag I can pass to build ROOT from source that says ignore building the llvm interpreter, I already have it built? I tried commenting out the …

---

## [Segmentation error while building root](https://root-forum.cern.ch/t/segmentation-error-while-building-root/47800)

<div class="topic-metadata">

**Author:** [@ata](https://root-forum.cern.ch/u/ata)\
**Replies:** 2\
**Last updated:** [December 6, 2021, 2:25am UTC](https://root-forum.cern.ch/t/segmentation-error-while-building-root/47800 "2021-12-06T02:25:52Z")

</div>

\[ 30%\] Building CXX object interpreter/llvm/src/lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCalls.cpp.o {standard input}: Assembler messages: {standard input}: Internal error in emit\_inc\_line\_add…

---

## [Ubuntu installation and cmake project integration](https://root-forum.cern.ch/t/ubuntu-installation-and-cmake-project-integration/47931)

<div class="topic-metadata">

**Author:** [@olivier-subatech](https://root-forum.cern.ch/u/olivier-subatech)\
**Replies:** 2\
**Last updated:** [December 4, 2021, 8:27pm UTC](https://root-forum.cern.ch/t/ubuntu-installation-and-cmake-project-integration/47931 "2021-12-04T20:27:48Z")

</div>

Hi there, I installed (build) the latest root release with the following instructions # aptitude install gfortran libpcre3-dev \\ xlibmesa-glu-dev libglew1.5-dev libftgl-dev \\ libmysqlclient-dev libfftw3-dev libcfitsio-…

---

## [Root have any built in tools to sample from a fitted function?](https://root-forum.cern.ch/t/root-have-any-built-in-tools-to-sample-from-a-fitted-function/47936)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 5\
**Last updated:** [December 3, 2021, 10:20pm UTC](https://root-forum.cern.ch/t/root-have-any-built-in-tools-to-sample-from-a-fitted-function/47936 "2021-12-03T22:20:33Z")

</div>

HI, I made a fit using root and now I want to sample points from the fitted function. Does root have any tool to do that? Best Regards, Cesar.

---

## [Can i apply the chi2test over a specific region of my histogram?](https://root-forum.cern.ch/t/can-i-apply-the-chi2test-over-a-specific-region-of-my-histogram/47818)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 4\
**Last updated:** [December 3, 2021, 10:51am UTC](https://root-forum.cern.ch/t/can-i-apply-the-chi2test-over-a-specific-region-of-my-histogram/47818 "2021-12-03T10:51:56Z")

</div>

Dear experts, I am just want to know if there is a way to apply the chi2test in a specific region of my histogram. I am comparing mc-mc histograms, and there is a region that I want to keep outside of my chi2test. There…

---

## [ROOT Convolution with .txt file of data values](https://root-forum.cern.ch/t/root-convolution-with-txt-file-of-data-values/47842)

<div class="topic-metadata">

**Author:** [@obitter16](https://root-forum.cern.ch/u/obitter16)\
**Replies:** 2\
**Last updated:** [December 3, 2021, 10:10am UTC](https://root-forum.cern.ch/t/root-convolution-with-txt-file-of-data-values/47842 "2021-12-03T10:10:13Z")

</div>

Dear Experts, I am new to using a lot of the functions in ROOT and I’m having trouble performing a convolution of a graph generated from a .txt file with a Gaussian. I looked up and checked the ROOT tutorial: fitConvol…

---

## [Libcppyy3\_8 in Python3.8 on lxplus7](https://root-forum.cern.ch/t/libcppyy3-8-in-python3-8-on-lxplus7/47903)

<div class="topic-metadata">

**Author:** [@maciejarturgiza](https://root-forum.cern.ch/u/maciejarturgiza)\
**Replies:** 3\
**Last updated:** [December 2, 2021, 5:49am UTC](https://root-forum.cern.ch/t/libcppyy3-8-in-python3-8-on-lxplus7/47903 "2021-12-02T05:49:37Z")

</div>

ROOT Version: 6.24/06 Platform: lxplus7 Compiler: Python 3.8.12 Hello, I’m using lxplus7 virtual machine and tried to import ROOT inside python environment as follows: \[mgiza@lxplus717 scripts\]$ python Python 3.8.1…

---

## [Default value of SetOptStat in TBrowser](https://root-forum.cern.ch/t/default-value-of-setoptstat-in-tbrowser/47889)

<div class="topic-metadata">

**Author:** [@mzriu](https://root-forum.cern.ch/u/mzriu)\
**Replies:** 7\
**Last updated:** [November 30, 2021, 2:40pm UTC](https://root-forum.cern.ch/t/default-value-of-setoptstat-in-tbrowser/47889 "2021-11-30T14:40:34Z")

</div>

ROOT Version : 6.24/06 Hi guys, I would like to know if there is a way to change the default SetOptStat value definitively. To give a bit of context, I am looking at many histograms using TBrowser and everytime I switc…

---

## [Multithreading in uproot](https://root-forum.cern.ch/t/multithreading-in-uproot/47862)

<div class="topic-metadata">

**Author:** [@caetano.eirea](https://root-forum.cern.ch/u/caetano.eirea)\
**Replies:** 4\
**Last updated:** [November 30, 2021, 8:52am UTC](https://root-forum.cern.ch/t/multithreading-in-uproot/47862 "2021-11-30T08:52:02Z")

</div>

Hi all, I don’t know if there is an specific forum to ask questions about uproot but if not my question is the following. I just started playing with uproot because it seems so useful, however, I wanted to know if there…

---

## [Likelihood fit changes signals order](https://root-forum.cern.ch/t/likelihood-fit-changes-signals-order/47845)

<div class="topic-metadata">

**Author:** [@OtaviusDecius](https://root-forum.cern.ch/u/OtaviusDecius)\
**Replies:** 1\
**Last updated:** [November 29, 2021, 6:19am UTC](https://root-forum.cern.ch/t/likelihood-fit-changes-signals-order/47845 "2021-11-29T06:19:37Z")

</div>

Dear Rooters, Fitting two Breit-Wigner signals using likelihood method “L”, defined as signal1 + signal2 + background with initial parameters signal1:(norm p0, gamma p1, mean p2) and signal2:(norm p3, gamma p4, mean p5)…

---

## [RooFit tutorial rf203\_ranges.C crash at line "model.plotOn(frame, Range(""), LineStyle(kDashed), LineColor(kRed));"](https://root-forum.cern.ch/t/roofit-tutorial-rf203-ranges-c-crash-at-line-model-ploton-frame-range-linestyle-kdashed-linecolor-kred/47835)

<div class="topic-metadata">

**Author:** [@rdisalvo672](https://root-forum.cern.ch/u/rdisalvo672)\
**Replies:** 1\
**Last updated:** [November 26, 2021, 12:45pm UTC](https://root-forum.cern.ch/t/roofit-tutorial-rf203-ranges-c-crash-at-line-model-ploton-frame-range-linestyle-kdashed-linecolor-kred/47835 "2021-11-26T12:45:20Z")

</div>

Hallo. I am new in RooFit and I am studying the tutorials. In the tutorial rf203\_range.C the execution crashes at line model.plotOn(frame, Range(""), LineStyle(kDashed), LineColor(kRed)); It does not crash if I put “s…

---

## [Remove directory](https://root-forum.cern.ch/t/remove-directory/47733)

<div class="topic-metadata">

**Author:** [@archiron](https://root-forum.cern.ch/u/archiron)\
**Replies:** 32\
**Last updated:** [November 25, 2021, 4:30pm UTC](https://root-forum.cern.ch/t/remove-directory/47733 "2021-11-25T16:30:25Z")

</div>

Hi, for some work I need to use only one directory (EgammaV) instead of all wich are provided into a ROOT file. With a small python script \[1\] I can do it but there is no significant file size reduction. For exemple if…

---

## [Filling \`TEfficiency\` with multiple events](https://root-forum.cern.ch/t/filling-tefficiency-with-multiple-events/47817)

<div class="topic-metadata">

**Author:** [@renyhp](https://root-forum.cern.ch/u/renyhp)\
**Replies:** 1\
**Last updated:** [November 25, 2021, 11:48am UTC](https://root-forum.cern.ch/t/filling-tefficiency-with-multiple-events/47817 "2021-11-25T11:48:11Z")

</div>

Hello, I am looking at some aggregate data and I am building a TEfficiency out of it. Is it possible to add some number of passed and total events in a bin? Workarounds that come to my mind: declare manually the tota…

---

## [TRatio in graph](https://root-forum.cern.ch/t/tratio-in-graph/47606)

<div class="topic-metadata">

**Author:** [@chanchal](https://root-forum.cern.ch/u/chanchal)\
**Replies:** 9\
**Last updated:** [November 25, 2021, 11:45am UTC](https://root-forum.cern.ch/t/tratio-in-graph/47606 "2021-11-25T11:45:09Z")

</div>

Dear Expert, I have drawn two graphs using TMultigraph which are corresponding to two txt files (data.txt and MC.txt). Now I want to make a graph which is the ratio of two txt files (data.txt / MC.txt) as TRatio for h…

---

## [Macro crashing without any error](https://root-forum.cern.ch/t/macro-crashing-without-any-error/47767)

<div class="topic-metadata">

**Author:** [@damandeep\_kaur](https://root-forum.cern.ch/u/damandeep_kaur)\
**Replies:** 10\
**Last updated:** [November 24, 2021, 5:31pm UTC](https://root-forum.cern.ch/t/macro-crashing-without-any-error/47767 "2021-11-24T17:31:45Z")

</div>

\_\_\_I am trying to get average of number of events between particular range saved in a text file. Every event has 1024 values. My macro is crashing after giving some output averages without error. After giving some output…

---

## [Display the vertex in RooEllipse](https://root-forum.cern.ch/t/display-the-vertex-in-rooellipse/47803)

<div class="topic-metadata">

**Author:** [@Dennis\_Arogancia](https://root-forum.cern.ch/u/Dennis_Arogancia)\
**Replies:** 4\
**Last updated:** [November 24, 2021, 12:15pm UTC](https://root-forum.cern.ch/t/display-the-vertex-in-rooellipse/47803 "2021-11-24T12:15:05Z")

</div>

Hi, I’m trying to plot an ellipse using RooEllipse and I want the vertex to plotted as well: RooEllipse \*el = new RooEllipse("",0.0039,-0.0002,0.0033,0.0036,0.13,100); el-\>Draw(); Is it possible to display the vertex…

---

## [Applying two options in the chi square evaluation](https://root-forum.cern.ch/t/applying-two-options-in-the-chi-square-evaluation/47771)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 2\
**Last updated:** [November 23, 2021, 5:18pm UTC](https://root-forum.cern.ch/t/applying-two-options-in-the-chi-square-evaluation/47771 "2021-11-23T17:18:46Z")

</div>

Dear experts, I need to calculate the chi-square between two MC (weighted) histograms. And I want the value of the chi-square. Following the documentation here: https://root.cern.ch/doc/master/classTH1.html#a6c281eebc0…

---

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

<div class="topic-metadata">

**Author:** [@mzriu](https://root-forum.cern.ch/u/mzriu)\
**Replies:** 3\
**Last updated:** [November 23, 2021, 1:43pm UTC](https://root-forum.cern.ch/t/error-use-of-undeclared-identifier/47791 "2021-11-23T13:43:36Z")

</div>

ROOT Version : 6.24/06 Hello guys, I am having a problem which is pretty weird. Here is my code : Int\_t ind\_run = 0; if(ind\_run==0){ TString path = "/home/marius/Documents/Thèse/E819S/Copie/Histogrammes/sing…

---

## ["Failed to get attribute ExRootTreeReader from ROOT" -- on MacOS Monterey 12.0.1](https://root-forum.cern.ch/t/failed-to-get-attribute-exroottreereader-from-root-on-macos-monterey-12-0-1/47782)

<div class="topic-metadata">

**Author:** [@sferrante](https://root-forum.cern.ch/u/sferrante)\
**Replies:** 1\
**Last updated:** [November 23, 2021, 12:45pm UTC](https://root-forum.cern.ch/t/failed-to-get-attribute-exroottreereader-from-root-on-macos-monterey-12-0-1/47782 "2021-11-23T12:45:07Z")

</div>

I have MacOS Monterey 12.0.1, and installed ROOT via brew install root, which created a directory /opt/homebrew/Cellar/root/6.24.06/. I am now trying to read a .root file coming from MadGraph+Pythia8+Delphes. When I inst…

---

## [Running fast-jet and fast-jet contrib in RDataFrame](https://root-forum.cern.ch/t/running-fast-jet-and-fast-jet-contrib-in-rdataframe/47384)

<div class="topic-metadata">

**Author:** [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Replies:** 11\
**Last updated:** [November 23, 2021, 8:56am UTC](https://root-forum.cern.ch/t/running-fast-jet-and-fast-jet-contrib-in-rdataframe/47384 "2021-11-23T08:56:00Z")

</div>

Dear all, does anybody have an example how to run the fastjet package in RDataFrame ? I would like to read the input from a tree, run a jet- or event shape algorithm and plot the result Thank you for your help. Reg…

---

## [Code not compiling due to a ROOT error in printing a warning? Stack trace provided](https://root-forum.cern.ch/t/code-not-compiling-due-to-a-root-error-in-printing-a-warning-stack-trace-provided/47769)

<div class="topic-metadata">

**Author:** [@mblidaru](https://root-forum.cern.ch/u/mblidaru)\
**Replies:** 2\
**Last updated:** [November 22, 2021, 8:28pm UTC](https://root-forum.cern.ch/t/code-not-compiling-due-to-a-root-error-in-printing-a-warning-stack-trace-provided/47769 "2021-11-22T20:28:12Z")

</div>

I am currently working with a MC calculator for position resolution in silicon detectors. The code is available here (github.com/simonspa/resolution-simulator) and it is ran on lxplus. It requires ROOT and an external l…

---

## [Error after cmake --build while installing ROOT](https://root-forum.cern.ch/t/error-after-cmake-build-while-installing-root/47747)

<div class="topic-metadata">

**Author:** [@vasco](https://root-forum.cern.ch/u/vasco)\
**Replies:** 4\
**Last updated:** [November 21, 2021, 5:44pm UTC](https://root-forum.cern.ch/t/error-after-cmake-build-while-installing-root/47747 "2021-11-21T17:44:08Z")

</div>

\_ROOT Version: root\_v624 \_Platform: Ubuntu 20.04.3 LTS Compiler: Not Provided I need to install ROOT to use it in a programing class. I don’t understand how the installation process works but I followed the instruct…

---

## [Residual plot fitting](https://root-forum.cern.ch/t/residual-plot-fitting/47721)

<div class="topic-metadata">

**Author:** [@Saradindu](https://root-forum.cern.ch/u/Saradindu)\
**Replies:** 6\
**Last updated:** [November 21, 2021, 9:26am UTC](https://root-forum.cern.ch/t/residual-plot-fitting/47721 "2021-11-21T09:26:30Z")

</div>

Hii , I have a data set ( text file) . I plot a graph and fitted it using quadratic equation. I need to fit the residuals of fitting. I can do it for histograms but how do I do it for graph ? Can you privide some code…

---

## [Drawing a function which contains an Integral](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746)

<div class="topic-metadata">

**Author:** [@SarahHamad](https://root-forum.cern.ch/u/SarahHamad)\
**Replies:** 2\
**Last updated:** [November 21, 2021, 1:13am UTC](https://root-forum.cern.ch/t/drawing-a-function-which-contains-an-integral/47746 "2021-11-21T01:13:07Z")

</div>

Hello, I am trying to draw this function: Do I need to find the integral at a set of points and then draw the function or is there a way to define the function as an integral in TF1, so it can be drawn easily? Than…

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

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