# Newbie

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

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

---

## [Segmentation Fault When Reading Ntuple in a macro](https://root-forum.cern.ch/t/segmentation-fault-when-reading-ntuple-in-a-macro/42662)

<div class="topic-metadata">

**Author:** [@Zhiyhep](https://root-forum.cern.ch/u/Zhiyhep)\
**Replies:** 13\
**Last updated:** [December 9, 2020, 8:26pm UTC](https://root-forum.cern.ch/t/segmentation-fault-when-reading-ntuple-in-a-macro/42662 "2020-12-09T20:26:58Z")

</div>

Dear Experts: I try to read in a ntuple object in this macro but get a segmentation fault when execute run -x test.mac. There is no Error when i type in the command lines in root session. How could this happen? { T…

---

## [Different quadratic fit(Data from file)](https://root-forum.cern.ch/t/different-quadratic-fit-data-from-file/42642)

<div class="topic-metadata">

**Author:** [@elitafa](https://root-forum.cern.ch/u/elitafa)\
**Replies:** 5\
**Last updated:** [December 9, 2020, 9:42am UTC](https://root-forum.cern.ch/t/different-quadratic-fit-data-from-file/42642 "2020-12-09T09:42:34Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.20/02 \_Platform: \_Compiler: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) Hello everyone! I have some data in a .txt file an…

---

## [Converting a cube into root format](https://root-forum.cern.ch/t/converting-a-cube-into-root-format/42492)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 8:49am UTC](https://root-forum.cern.ch/t/converting-a-cube-into-root-format/42492 "2020-12-09T08:49:56Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.18 Platform: Not Provided Compiler: Not Provided Hi I am trying to convert a cube that created from a Data Acquistion system i…

---

## [THStack histogram](https://root-forum.cern.ch/t/thstack-histogram/42655)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 6:05am UTC](https://root-forum.cern.ch/t/thstack-histogram/42655 "2020-12-09T06:05:53Z")

</div>

hi, im trying to stack these 5 samples, i wonder why, the value of events is different when i add more sample to stack here is a plot of 2, signal (15 & 55GeV)and 3 signal,(15,35,55GeV) on the 3 signal plot, there is …

---

## [Converting root file to csv using root2csv](https://root-forum.cern.ch/t/converting-root-file-to-csv-using-root2csv/42583)

<div class="topic-metadata">

**Author:** [@Hawi\_Phys](https://root-forum.cern.ch/u/Hawi_Phys)\
**Replies:** 5\
**Last updated:** [December 8, 2020, 5:59pm UTC](https://root-forum.cern.ch/t/converting-root-file-to-csv-using-root2csv/42583 "2020-12-08T17:59:27Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hello All, I’m having trouble running the root2csv code posted by @sb…

---

## [Changing line styles using hbar option](https://root-forum.cern.ch/t/changing-line-styles-using-hbar-option/42586)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 4\
**Last updated:** [December 8, 2020, 4:55pm UTC](https://root-forum.cern.ch/t/changing-line-styles-using-hbar-option/42586 "2020-12-08T16:55:56Z")

</div>

Dear Experts, I am using this macro b2\_style\_pad.C (6.9 KB) and I get a plot like:unnamed.pdf (67.3 KB) As you can guess, I want to retain the plot style of the top left for the bottom right one. It seem that it is be…

---

## [Filling a histogram with ntuple entries with cuts](https://root-forum.cern.ch/t/filling-a-histogram-with-ntuple-entries-with-cuts/42459)

<div class="topic-metadata">

**Author:** [@Ada](https://root-forum.cern.ch/u/Ada)\
**Replies:** 2\
**Last updated:** [December 8, 2020, 12:08pm UTC](https://root-forum.cern.ch/t/filling-a-histogram-with-ntuple-entries-with-cuts/42459 "2020-12-08T12:08:16Z")

</div>

Hi! I have basic problems with operating on ntuple. All I can do is to read ntuple from loop made by MakeClass function. Now I’m suppposed to draw a histogram with bins whrere in the first one I have number of all even…

---

## [Can't built ROOT Version 6.22/06](https://root-forum.cern.ch/t/cant-built-root-version-6-22-06/42629)

<div class="topic-metadata">

**Author:** [@CzTee](https://root-forum.cern.ch/u/CzTee)\
**Replies:** 3\
**Last updated:** [December 8, 2020, 8:08am UTC](https://root-forum.cern.ch/t/cant-built-root-version-6-22-06/42629 "2020-12-08T08:08:23Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version:6.22/06 \_Platform: Ubuntu 20.04.1 LTS \_Compiler: g++ 9.3.0 Hi, I am a newbie and would like to build ROOT manually, as suggested …

---

## [Warning in using prooflite with TSelector to write output tree](https://root-forum.cern.ch/t/warning-in-using-prooflite-with-tselector-to-write-output-tree/42537)

<div class="topic-metadata">

**Author:** [@Mariana](https://root-forum.cern.ch/u/Mariana)\
**Replies:** 4\
**Last updated:** [December 7, 2020, 7:22pm UTC](https://root-forum.cern.ch/t/warning-in-using-prooflite-with-tselector-to-write-output-tree/42537 "2020-12-07T19:22:05Z")

</div>

\_ROOT Version: 6.08/06 Platform: CentOS7 Compiler: gcc 4.8.5 I’m using PROOF-Lite with TSelector. I am writing a custom tree in the output. To do so inside TSelector clas I have defined the tree and its branches as …

---

## [Failed to build ROOT 6.22/xx on Arch Linux ARM](https://root-forum.cern.ch/t/failed-to-build-root-6-22-xx-on-arch-linux-arm/42621)

<div class="topic-metadata">

**Author:** [@marty1885](https://root-forum.cern.ch/u/marty1885)\
**Replies:** 4\
**Last updated:** [December 7, 2020, 5:04pm UTC](https://root-forum.cern.ch/t/failed-to-build-root-6-22-xx-on-arch-linux-arm/42621 "2020-12-07T17:04:23Z")

</div>

Hi I’ve been using ROOT on my persional ARM64 server. I’m able to get ROOT 6.18 and 6.20 to build properly by modifying PKGBUILD from Arch. But 6.22 always fails at one of the last steps (here’s the full log): /usr/bin…

---

## [Problems by generating a graph](https://root-forum.cern.ch/t/problems-by-generating-a-graph/42617)

<div class="topic-metadata">

**Author:** [@NicolasBiscione](https://root-forum.cern.ch/u/NicolasBiscione)\
**Replies:** 2\
**Last updated:** [December 6, 2020, 9:55pm UTC](https://root-forum.cern.ch/t/problems-by-generating-a-graph/42617 "2020-12-06T21:55:22Z")

</div>

Hi everyone, I’m working with ROOT 6.22/02 for a university exam using a virtual version of ubuntu on Repl. I’m compiling with g++. My program should show with TGraph the trend of the intensity of the electric field ge…

---

## [Normalize sample to BR, Luminosity & XS](https://root-forum.cern.ch/t/normalize-sample-to-br-luminosity-xs/42602)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 4\
**Last updated:** [December 5, 2020, 1:44pm UTC](https://root-forum.cern.ch/t/normalize-sample-to-br-luminosity-xs/42602 "2020-12-05T13:44:35Z")

</div>

hi i am trying to normalize my samples to the standr model higgs boson production cross section 48.58pb and BR of 1.25e-4 and to the Luminosity of 30fb-1 1.here, i can only find the equation for normalization to be, xs…

---

## [Function DividePad() is not defined in current scope](https://root-forum.cern.ch/t/function-dividepad-is-not-defined-in-current-scope/42597)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 2\
**Last updated:** [December 5, 2020, 5:04am UTC](https://root-forum.cern.ch/t/function-dividepad-is-not-defined-in-current-scope/42597 "2020-12-05T05:04:35Z")

</div>

Dear Experts, I am trying to run the macro: b2\_style\_pad.C (9.7 KB) which uses the root file: for\_fds\_plots.root (177.2 KB). I have defined a function DividePad for my requirements but I receive he error: \_\> \_root \[0…

---

## [Linear interpolation TH2](https://root-forum.cern.ch/t/linear-interpolation-th2/42519)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 7\
**Last updated:** [December 5, 2020, 12:31am UTC](https://root-forum.cern.ch/t/linear-interpolation-th2/42519 "2020-12-05T00:31:30Z")

</div>

Hi, I have TH2 plot showing a clear pattern, however, fitting a function doesn’t help to model it. is there a way to fit a linear interpolation that connects the mean values in the x-axis bins? Thanks!

---

## [Wrong Gaussian Fit (data from File)](https://root-forum.cern.ch/t/wrong-gaussian-fit-data-from-file/42578)

<div class="topic-metadata">

**Author:** [@elitafa](https://root-forum.cern.ch/u/elitafa)\
**Replies:** 3\
**Last updated:** [December 4, 2020, 4:33pm UTC](https://root-forum.cern.ch/t/wrong-gaussian-fit-data-from-file/42578 "2020-12-04T16:33:51Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.20/02 \_Platform: \_Compiler: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) Hello Everyone! I have a program that produces so…

---

## [Rotating images using ROOT](https://root-forum.cern.ch/t/rotating-images-using-root/42571)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 7\
**Last updated:** [December 4, 2020, 2:23pm UTC](https://root-forum.cern.ch/t/rotating-images-using-root/42571 "2020-12-04T14:23:28Z")

</div>

Dear Experts, I have 3 images which I want to arrange as shown in fds\_plot.pdf (182.1 KB) The three images are:for\_approval2D\_fds.pdf (125.6 KB) for\_approval\_1D\_fds\_low\_p.pdf (15.1 KB) 1Dfds\_high\_p.pdf (14.6 KB) I u…

---

## [Unable to create new Branch in PyRoot](https://root-forum.cern.ch/t/unable-to-create-new-branch-in-pyroot/42532)

<div class="topic-metadata">

**Author:** [@Aveen](https://root-forum.cern.ch/u/Aveen)\
**Replies:** 1\
**Last updated:** [December 4, 2020, 1:14pm UTC](https://root-forum.cern.ch/t/unable-to-create-new-branch-in-pyroot/42532 "2020-12-04T13:14:43Z")

</div>

Hello, I am rather new to Root and have been so far trying to use it through the PyRoot interface. My goal with this particular piece of code is to take the values from an existing TTree branch and modify them slightl…

---

## [Minuit/Migrad Fitter](https://root-forum.cern.ch/t/minuit-migrad-fitter/42525)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 2\
**Last updated:** [December 3, 2020, 4:42am UTC](https://root-forum.cern.ch/t/minuit-migrad-fitter/42525 "2020-12-03T04:42:28Z")

</div>

Hello, When I execute the command fitr-\>Print(); ROOT prints the following statistics MinFCN Chi2 NDf Edm NCalls What are…

---

## [ASCII from Root file](https://root-forum.cern.ch/t/ascii-from-root-file/42020)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 12\
**Last updated:** [December 1, 2020, 1:34pm UTC](https://root-forum.cern.ch/t/ascii-from-root-file/42020 "2020-12-01T13:34:52Z")

</div>

How to generate an ASCII file from Root file?

---

## [SetBranchAddress data not loaded](https://root-forum.cern.ch/t/setbranchaddress-data-not-loaded/42535)

<div class="topic-metadata">

**Author:** [@chikin\_tam](https://root-forum.cern.ch/u/chikin_tam)\
**Replies:** 3\
**Last updated:** [December 1, 2020, 5:53am UTC](https://root-forum.cern.ch/t/setbranchaddress-data-not-loaded/42535 "2020-12-01T05:53:06Z")

</div>

I have been trying to read and analyze the data from a tree by writing a class. I initialized the variables and array in the constructor and set the branch address in a function of the class. There is no error message co…

---

## [Event Manager not streaming Geometry scene](https://root-forum.cern.ch/t/event-manager-not-streaming-geometry-scene/42506)

<div class="topic-metadata">

**Author:** [@PBR](https://root-forum.cern.ch/u/PBR)\
**Replies:** 3\
**Last updated:** [November 30, 2020, 8:06pm UTC](https://root-forum.cern.ch/t/event-manager-not-streaming-geometry-scene/42506 "2020-11-30T20:06:12Z")

</div>

Hello I am a first year college physics student and I want to setup the display of a simplified detector/particle tracking system. The script I describe below ran into a snag and as I am in the initial stages of learning…

---

## [Fit a piecewise function](https://root-forum.cern.ch/t/fit-a-piecewise-function/42476)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 12:07pm UTC](https://root-forum.cern.ch/t/fit-a-piecewise-function/42476 "2020-11-30T12:07:18Z")

</div>

Hi, I have TH2 plot showing a clear pattern, however, fitting a function doesn’t help to model it. is there a way to fit a piecewise function based on a linear interpolation to connect the mean values in x-axis slices? …

---

## [\<TROOT::Append\>: Replacing existing TH1: h (Potential memory leak)](https://root-forum.cern.ch/t/troot-append-replacing-existing-th1-h-potential-memory-leak/42387)

<div class="topic-metadata">

**Author:** [@hammiu](https://root-forum.cern.ch/u/hammiu)\
**Replies:** 10\
**Last updated:** [November 29, 2020, 3:52am UTC](https://root-forum.cern.ch/t/troot-append-replacing-existing-th1-h-potential-memory-leak/42387 "2020-11-29T03:52:11Z")

</div>

Hi everyone. I have an warning when I run my code. This warning was discussed more times in the past. I have read some posts related this topic but it can not help me to pass this problem. My code has only a histogram.…

---

## [Plot graph from Tree with passing name branch as argument](https://root-forum.cern.ch/t/plot-graph-from-tree-with-passing-name-branch-as-argument/32222)

<div class="topic-metadata">

**Author:** [@anhelina](https://root-forum.cern.ch/u/anhelina)\
**Replies:** 6\
**Last updated:** [November 27, 2020, 9:49am UTC](https://root-forum.cern.ch/t/plot-graph-from-tree-with-passing-name-branch-as-argument/32222 "2020-11-27T09:49:34Z")

</div>

I have some problem with passing arguments to my script. I won’t plot graph from some tree and name of branch passing like arguments. I know that can do it like that .x ‘anylize.cxx(“BSOuterVoltage”,“NimplantTotalCu…

---

## [Get histograms from two different files and plot on same canvas](https://root-forum.cern.ch/t/get-histograms-from-two-different-files-and-plot-on-same-canvas/42470)

<div class="topic-metadata">

**Author:** [@KatR](https://root-forum.cern.ch/u/KatR)\
**Replies:** 5\
**Last updated:** [November 26, 2020, 2:59pm UTC](https://root-forum.cern.ch/t/get-histograms-from-two-different-files-and-plot-on-same-canvas/42470 "2020-11-26T14:59:51Z")

</div>

I am 100% sure I am making an extremely stupid mistake here. I have a macro that is supposed to get one histogram from each file and plot them on the same canvas. what it actually does is plot them separately: void com…

---

## [Set axis range on THStack](https://root-forum.cern.ch/t/set-axis-range-on-thstack/42436)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 2\
**Last updated:** [November 26, 2020, 3:48am UTC](https://root-forum.cern.ch/t/set-axis-range-on-thstack/42436 "2020-11-26T03:48:34Z")

</div>

hi, im trying to set the range for THStack, i tried THStack \*hs = new THStack("hs", "zd mass"); hs-\>Add(h\_bkg\_zz4lep); hs-\>Add(h\_bkg\_pph4l); hs-\>Add(h\_sig); hs-\>Draw("HIST"); hs-\>GetXaxis()-\>SetTitle("mass of …

---

## ["Undefined Symbol" error while running script in ROOT](https://root-forum.cern.ch/t/undefined-symbol-error-while-running-script-in-root/42328)

<div class="topic-metadata">

**Author:** [@JHarrop](https://root-forum.cern.ch/u/JHarrop)\
**Replies:** 10\
**Last updated:** [November 25, 2020, 2:23pm UTC](https://root-forum.cern.ch/t/undefined-symbol-error-while-running-script-in-root/42328 "2020-11-25T14:23:56Z")

</div>

\_ROOT Version: 6.22/02 \_Platform: Centos 7 \_Compiler: GCC 10.2.0 Hi All, I’ve been having issues trying to run a script with root. This code was not written by me though it’s definitely been run successfully before (…

---

## [Using CopyFiles.C](https://root-forum.cern.ch/t/using-copyfiles-c/42404)

<div class="topic-metadata">

**Author:** [@KatR](https://root-forum.cern.ch/u/KatR)\
**Replies:** 4\
**Last updated:** [November 25, 2020, 11:24am UTC](https://root-forum.cern.ch/t/using-copyfiles-c/42404 "2020-11-25T11:24:23Z")

</div>

I want to copy the histograms from one file into a new one, with one additional branch included. There are no TDirectories and no trees, only histograms in the file. I copied and pasted into my macro the syntax from the …

---

## [Calculate cross section](https://root-forum.cern.ch/t/calculate-cross-section/42409)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 1\
**Last updated:** [November 24, 2020, 10:33am UTC](https://root-forum.cern.ch/t/calculate-cross-section/42409 "2020-11-24T10:33:08Z")

</div>

hi im trying out this example https://twiki.cern.ch/twiki/bin/view/Main/UnitsHiggsTutorial#Delphes\_\_\_ and adding some of my own root files, im trying to calculate the cross section, with equation x = N events / Luminos…

---

## [How to plot error bars along with fitthing the curve in TGraph?](https://root-forum.cern.ch/t/how-to-plot-error-bars-along-with-fitthing-the-curve-in-tgraph/42422)

<div class="topic-metadata">

**Author:** [@dsubhro](https://root-forum.cern.ch/u/dsubhro)\
**Replies:** 8\
**Last updated:** [November 24, 2020, 7:54pm UTC](https://root-forum.cern.ch/t/how-to-plot-error-bars-along-with-fitthing-the-curve-in-tgraph/42422 "2020-11-24T19:54:12Z")

</div>

ROOT Version: 6.22 Platform: Ubuntu I want to plot error bars and fit the graph along with it. The code I have written is, { f = new TF1("fit", "\[0\]\*x + \[1\]",0,5); f -\> SetParNames("Slope", "Interceptor"); doub…

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

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