# Newbie

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

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

---

## [How to fit a process with memory](https://root-forum.cern.ch/t/how-to-fit-a-process-with-memory/35149)

<div class="topic-metadata">

**Author:** [@imateusu](https://root-forum.cern.ch/u/imateusu)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 3:17pm UTC](https://root-forum.cern.ch/t/how-to-fit-a-process-with-memory/35149 "2019-07-15T15:17:04Z")

</div>

Hello, I am trying to build a tool to fit measurement data to a mathematical model. The goal is to characterize defects on irradiated silicon sensors. The measurement consists in recording the electrical current throug…

---

## [Background subtraction from spectrum](https://root-forum.cern.ch/t/background-subtraction-from-spectrum/35179)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 8:49am UTC](https://root-forum.cern.ch/t/background-subtraction-from-spectrum/35179 "2019-07-15T08:49:32Z")

</div>

I need to subtract the background blue in color from my spectrum (Black) and need to plot the energy calibrated histograms for each run. Then need to calculate the area under the peak of interest(which is between channel…

---

## [Running the macro](https://root-forum.cern.ch/t/running-the-macro/35180)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 7:28am UTC](https://root-forum.cern.ch/t/running-the-macro/35180 "2019-07-15T07:28:33Z")

</div>

Hi, I am having trouble running the following macro. Can anyone help me with that? I don’t know what arguments to pass on the terminal in order to run this. Also, it takes some input file as the input which I don’t unde…

---

## [Set View Window on X-Axis](https://root-forum.cern.ch/t/set-view-window-on-x-axis/35170)

<div class="topic-metadata">

**Author:** [@Ethan\_Nguyen](https://root-forum.cern.ch/u/Ethan_Nguyen)\
**Replies:** 1\
**Last updated:** [July 12, 2019, 8:34pm UTC](https://root-forum.cern.ch/t/set-view-window-on-x-axis/35170 "2019-07-12T20:34:55Z")

</div>

I’m creating a graph from a file, but I can’t set the range on the x-axis. How can I set the range for the x-axis? Thanks! { g = new TGraph("Sample72.txt"); g-\>SetTitle(" PWO Sample 72 - Transverse Optical Transmit…

---

## [Error when running a python script](https://root-forum.cern.ch/t/error-when-running-a-python-script/35102)

<div class="topic-metadata">

**Author:** [@Kayshla98](https://root-forum.cern.ch/u/Kayshla98)\
**Replies:** 6\
**Last updated:** [July 12, 2019, 7:26pm UTC](https://root-forum.cern.ch/t/error-when-running-a-python-script/35102 "2019-07-12T19:26:11Z")

</div>

Hey, When I try to run a script the following error occurs: “ImportError: /work/astropa/sw/veritas/root-cern/build/lib/libPyROOT.so: undefined symbol: PyUnicodeUCS2\_FromString” Ubuntu 16.04 Python version 3.6.3 Root…

---

## [Best ROOT version for multi-threading](https://root-forum.cern.ch/t/best-root-version-for-multi-threading/35147)

<div class="topic-metadata">

**Author:** [@Aaron](https://root-forum.cern.ch/u/Aaron)\
**Replies:** 4\
**Last updated:** [July 12, 2019, 10:02am UTC](https://root-forum.cern.ch/t/best-root-version-for-multi-threading/35147 "2019-07-12T10:02:31Z")

</div>

Hi there, I would like to know which version of ROOT for Windows is better for multi-threading. I’m currently using VS 2019 at the moment and ROOT 6.18 but I also have VS 2013 and ROOT 5.34/36. I would like to create a…

---

## [Hiding ROOT::Cintex::Cintex::Enable(); from ROOT6 compilation in a backwards compatible way](https://root-forum.cern.ch/t/hiding-root-enable-from-root6-compilation-in-a-backwards-compatible-way/35134)

<div class="topic-metadata">

**Author:** [@schellman](https://root-forum.cern.ch/u/schellman)\
**Replies:** 3\
**Last updated:** [July 12, 2019, 6:25am UTC](https://root-forum.cern.ch/t/hiding-root-enable-from-root6-compilation-in-a-backwards-compatible-way/35134 "2019-07-12T06:25:42Z")

</div>

I’ve inherited a boatload of ROOT5 code I’d like to make run under both ROOT5 and ROOT6. It is full of ROOT::Cintex::Cintex::Enable(); and putting macros around that line is getting really old after about 30 times. A…

---

## [Extract specific values from txt files in Pyroot](https://root-forum.cern.ch/t/extract-specific-values-from-txt-files-in-pyroot/35133)

<div class="topic-metadata">

**Author:** [@rollerstop](https://root-forum.cern.ch/u/rollerstop)\
**Replies:** 1\
**Last updated:** [July 11, 2019, 9:48pm UTC](https://root-forum.cern.ch/t/extract-specific-values-from-txt-files-in-pyroot/35133 "2019-07-11T21:48:35Z")

</div>

So let’s say I have 20 .txt files with almost similar names like data20.txt, data30.txt etc. Every file has 5 values in it like: 1 2 3 4 5 I want to get the first value from every file and fill them into a array so I g…

---

## [Question about GUI](https://root-forum.cern.ch/t/question-about-gui/34871)

<div class="topic-metadata">

**Author:** [@bg92](https://root-forum.cern.ch/u/bg92)\
**Replies:** 17\
**Last updated:** [July 11, 2019, 1:54pm UTC](https://root-forum.cern.ch/t/question-about-gui/34871 "2019-07-11T13:54:57Z")

</div>

Deall all, I wanted to start working on the ROOT GUI, but I find it … “very old style” (the GuiBuilder too). I just read that “Originally the GUI classes were based on Hector Peraza’s Xclass’95 widget library”. Does it …

---

## [Comparing the contents of two TLists](https://root-forum.cern.ch/t/comparing-the-contents-of-two-tlists/35116)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 6\
**Last updated:** [July 11, 2019, 1:17pm UTC](https://root-forum.cern.ch/t/comparing-the-contents-of-two-tlists/35116 "2019-07-11T13:17:38Z")

</div>

Hi! I’d like to know if there is a way to compare the contents of two TLists in ROOT? I’ve got two THStacks which each have a list of histograms(TH1Ds), and I would like to compare both of them to make sure they both h…

---

## [Filling histograms from a Chain](https://root-forum.cern.ch/t/filling-histograms-from-a-chain/35110)

<div class="topic-metadata">

**Author:** [@KatR](https://root-forum.cern.ch/u/KatR)\
**Replies:** 2\
**Last updated:** [July 11, 2019, 10:01am UTC](https://root-forum.cern.ch/t/filling-histograms-from-a-chain/35110 "2019-07-11T10:01:53Z")

</div>

Hi everyone, I’m sure I’m doing something silly wrong! I’ve made a TChain out of two files and then run MakeClass on it using this: void analysis(){ TChain chain("outTree"); chain.Add("SherpaJZ7.root"); ch…

---

## [Undefined Reference Compiling](https://root-forum.cern.ch/t/undefined-reference-compiling/32175)

<div class="topic-metadata">

**Author:** [@profesors](https://root-forum.cern.ch/u/profesors)\
**Replies:** 6\
**Last updated:** [July 11, 2019, 9:57am UTC](https://root-forum.cern.ch/t/undefined-reference-compiling/32175 "2019-07-11T09:57:57Z")

</div>

ROOT Version: 6.17/01 Platform: Ubuntu 16.04 Compiler: g++ 7.4.0 Hi there, yesterday I compiled successfully ROOT in my old laptop. Now I just want to compile a first test with this Makefile: ROOT\_FLAGS = $(shell r…

---

## [TMinuit Chi-square of data with no errors](https://root-forum.cern.ch/t/tminuit-chi-square-of-data-with-no-errors/34969)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 10\
**Last updated:** [July 11, 2019, 7:57am UTC](https://root-forum.cern.ch/t/tminuit-chi-square-of-data-with-no-errors/34969 "2019-07-11T07:57:10Z")

</div>

I am trying to fit data points that are basically described by a sine function. When I try to fit this by a sine TF1, I get a very small Chi2 (of the order of e-10), which makes sense since my data points and my function…

---

## [Cannot open file: TGraphErrors is Zombie](https://root-forum.cern.ch/t/cannot-open-file-tgrapherrors-is-zombie/35060)

<div class="topic-metadata">

**Author:** [@mike.z](https://root-forum.cern.ch/u/mike.z)\
**Replies:** 5\
**Last updated:** [July 10, 2019, 5:21pm UTC](https://root-forum.cern.ch/t/cannot-open-file-tgrapherrors-is-zombie/35060 "2019-07-10T17:21:24Z")

</div>

I’m completely new to Root and also to C++ coding. I’m going through the Root Primer and am trying to do the example in 2.5 for plotting measurements, which uses a file called “ExampleData.txt”, however I am getting an e…

---

## [Subtracting exponential from Crystal ball](https://root-forum.cern.ch/t/subtracting-exponential-from-crystal-ball/34990)

<div class="topic-metadata">

**Author:** [@Prya13](https://root-forum.cern.ch/u/Prya13)\
**Replies:** 4\
**Last updated:** [July 10, 2019, 1:44pm UTC](https://root-forum.cern.ch/t/subtracting-exponential-from-crystal-ball/34990 "2019-07-10T13:44:38Z")

</div>

Dear All, Please requesting kind assistance with my macro, don’t see nor get the errors. The macro, read in two histograms one fitted with a normal gaussian + exponential called hdndm and the other with a crystal ball …

---

## [Pythia 8 running with Pythia 8 and Pythia 6 welcoming screens](https://root-forum.cern.ch/t/pythia-8-running-with-pythia-8-and-pythia-6-welcoming-screens/35093)

<div class="topic-metadata">

**Author:** [@Ari](https://root-forum.cern.ch/u/Ari)\
**Replies:** 2\
**Last updated:** [July 10, 2019, 12:42pm UTC](https://root-forum.cern.ch/t/pythia-8-running-with-pythia-8-and-pythia-6-welcoming-screens/35093 "2019-07-10T12:42:38Z")

</div>

Hi! I’m using AliRoot/AliPhysics software, which includes ROOT and I wanted to switch from Pythia 6 to Pythia 8. I followed the instructions here: http://alice-offline.web.cern.ch/Activities/Simulation/ExternalGenerato…

---

## [Error rectangles filled incorectly](https://root-forum.cern.ch/t/error-rectangles-filled-incorectly/35070)

<div class="topic-metadata">

**Author:** [@Marta](https://root-forum.cern.ch/u/Marta)\
**Replies:** 9\
**Last updated:** [July 10, 2019, 11:40am UTC](https://root-forum.cern.ch/t/error-rectangles-filled-incorectly/35070 "2019-07-10T11:40:07Z")

</div>

Hello, I have a problem with errors in my histogram - I would like to have error rectangles. For that, I need to set filling color to my histogram, as I found somewhere. So I do it, but then when I draw it, it fills not…

---

## [Relation of the two trees in one root file](https://root-forum.cern.ch/t/relation-of-the-two-trees-in-one-root-file/34999)

<div class="topic-metadata">

**Author:** [@zjw](https://root-forum.cern.ch/u/zjw)\
**Replies:** 3\
**Last updated:** [July 9, 2019, 6:03pm UTC](https://root-forum.cern.ch/t/relation-of-the-two-trees-in-one-root-file/34999 "2019-07-09T18:03:19Z")

</div>

Dear ROOT users, My question is about the two trees (i.e., 2 tree and 1 tree in the image below) in one root file. What is the relation between them? I have checked the data, they seem to contain the same things. T…

---

## [Add Built in Options after installation](https://root-forum.cern.ch/t/add-built-in-options-after-installation/35073)

<div class="topic-metadata">

**Author:** [@agtsiami](https://root-forum.cern.ch/u/agtsiami)\
**Replies:** 2\
**Last updated:** [July 9, 2019, 2:35pm UTC](https://root-forum.cern.ch/t/add-built-in-options-after-installation/35073 "2019-07-09T14:35:37Z")

</div>

Dear Rooters I have already installed ROOT 6.16/00 on ubunut 18.04, without the built in option builtin\_gsl. Is there any way to add it without installing ROOT from scratch? Thank you in advance for your assistance.

---

## [Problem accessing root variables in array form](https://root-forum.cern.ch/t/problem-accessing-root-variables-in-array-form/34927)

<div class="topic-metadata">

**Author:** [@pnakarmi](https://root-forum.cern.ch/u/pnakarmi)\
**Replies:** 7\
**Last updated:** [July 8, 2019, 12:06pm UTC](https://root-forum.cern.ch/t/problem-accessing-root-variables-in-array-form/34927 "2019-07-08T12:06:59Z")

</div>

I was trying to create a tree from different root files (test\_\*.root) having the same branches (numDetected, xPosition, in my case). I have uploaded the script that I used to print the required values after the necessary…

---

## [Simultaneous 1D likelihood fits in different observables, with multiple PDFs](https://root-forum.cern.ch/t/simultaneous-1d-likelihood-fits-in-different-observables-with-multiple-pdfs/34677)

<div class="topic-metadata">

**Author:** [@ilam](https://root-forum.cern.ch/u/ilam)\
**Replies:** 12\
**Last updated:** [July 8, 2019, 8:29am UTC](https://root-forum.cern.ch/t/simultaneous-1d-likelihood-fits-in-different-observables-with-multiple-pdfs/34677 "2019-07-08T08:29:20Z")

</div>

Hi, I am new to RooFit but I have some experience with C++ and ROOT. Mine is a RooFit specific question. This is my first time posting to the forum but I have benefited immensely from all the past posts I have found in…

---

## [TTree pointer initialization](https://root-forum.cern.ch/t/ttree-pointer-initialization/35042)

<div class="topic-metadata">

**Author:** [@SteliosK](https://root-forum.cern.ch/u/SteliosK)\
**Replies:** 1\
**Last updated:** [July 8, 2019, 4:43am UTC](https://root-forum.cern.ch/t/ttree-pointer-initialization/35042 "2019-07-08T04:43:12Z")

</div>

I was given a root file WZmc.root with data produced using MadGraph and Delphes. I want to use the MakeClass function but first I need to read the root file. To do so I typed: TFile f (“WZmc.root”); TTree\* t; f.GetOb…

---

## [Question concerning binary linux distribution and libraries](https://root-forum.cern.ch/t/question-concerning-binary-linux-distribution-and-libraries/34959)

<div class="topic-metadata">

**Author:** [@WhyOWhy](https://root-forum.cern.ch/u/WhyOWhy)\
**Replies:** 3\
**Last updated:** [July 6, 2019, 2:20pm UTC](https://root-forum.cern.ch/t/question-concerning-binary-linux-distribution-and-libraries/34959 "2019-07-06T14:20:09Z")

</div>

Hello, I have downloaded Root Pro Release 6.18/00 - binary realese for Ubuntu 18 and installed it according to instructions given in README file. My question is which libraries are enabled to be used? I ask this questi…

---

## [Not able to save plots generated from the macro](https://root-forum.cern.ch/t/not-able-to-save-plots-generated-from-the-macro/35019)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 3\
**Last updated:** [July 6, 2019, 9:40am UTC](https://root-forum.cern.ch/t/not-able-to-save-plots-generated-from-the-macro/35019 "2019-07-06T09:40:13Z")

</div>

Hi all, I am using the following macro to generate some plots. While I run this macro the plots appear in the terminal but they are not saved. I want to save the plots in the directory that I have created, but I get th…

---

## [GUI Issues in Visual C++](https://root-forum.cern.ch/t/gui-issues-in-visual-c/35011)

<div class="topic-metadata">

**Author:** [@Aaron](https://root-forum.cern.ch/u/Aaron)\
**Replies:** 17\
**Last updated:** [July 5, 2019, 3:10pm UTC](https://root-forum.cern.ch/t/gui-issues-in-visual-c/35011 "2019-07-05T15:10:18Z")

</div>

Hi, I am using VS 2019 with ROOT 6.18 to generate a GUI that should plot a sinx/x graph when the Draw button is clicked and close when the Exit button is clicked however I am having issues. This is an example found in …

---

## [Using ROOT 5.32 standalone with VS2008 and saving canvas as image](https://root-forum.cern.ch/t/using-root-5-32-standalone-with-vs2008-and-saving-canvas-as-image/34548)

<div class="topic-metadata">

**Author:** [@JMed](https://root-forum.cern.ch/u/JMed)\
**Replies:** 24\
**Last updated:** [July 5, 2019, 1:52pm UTC](https://root-forum.cern.ch/t/using-root-5-32-standalone-with-vs2008-and-saving-canvas-as-image/34548 "2019-07-05T13:52:04Z")

</div>

Hello, I am trying to save a canvas with a plot as image / svg, but with no success so far (always empty). I have compiled ROOT 5.32 with vs2008 (we can’t change the compiler for now) and successfully were able to run e…

---

## [Trouble running the Macro in ROOT](https://root-forum.cern.ch/t/trouble-running-the-macro-in-root/35007)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 2\
**Last updated:** [July 4, 2019, 9:56pm UTC](https://root-forum.cern.ch/t/trouble-running-the-macro-in-root/35007 "2019-07-04T21:56:01Z")

</div>

I am having trouble running this macro. Can someone help me with this? extractSpectra\_new.C (3.1 KB)

---

## [Removing Initial C1 Canvas](https://root-forum.cern.ch/t/removing-initial-c1-canvas/34970)

<div class="topic-metadata">

**Author:** [@nmcfadde](https://root-forum.cern.ch/u/nmcfadde)\
**Replies:** 3\
**Last updated:** [July 3, 2019, 2:47pm UTC](https://root-forum.cern.ch/t/removing-initial-c1-canvas/34970 "2019-07-03T14:47:20Z")

</div>

Hi, I am drawing a histogram on a canvas I created: hTripletChargeWeighted-\>Fit(“SingleExpoPlusConstant”,"","",startFit,stopFit); TCanvas \* cTripletFit = new TCanvas(“Triplet Fit”,“Triplet Fit”); cTripletFit-\>cd(); …

---

## [Histograms appear and disappear instantly](https://root-forum.cern.ch/t/histograms-appear-and-disappear-instantly/34981)

<div class="topic-metadata">

**Author:** [@Ozgur\_Akcali](https://root-forum.cern.ch/u/Ozgur_Akcali)\
**Replies:** 2\
**Last updated:** [July 3, 2019, 12:25pm UTC](https://root-forum.cern.ch/t/histograms-appear-and-disappear-instantly/34981 "2019-07-03T12:25:44Z")

</div>

Hi, I’m using ROOT 6.14/04 on Ubuntu 18.04 with gcc 7.4.0 for analyzing signals collected by DRS4. I’m trying to display a Graph and three Histograms on a single Canvas divided into four pieces. The graph is displayed b…

---

## [Changing color of markers in TRatioPlot](https://root-forum.cern.ch/t/changing-color-of-markers-in-tratioplot/34979)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 2\
**Last updated:** [July 3, 2019, 8:53am UTC](https://root-forum.cern.ch/t/changing-color-of-markers-in-tratioplot/34979 "2019-07-03T08:53:03Z")

</div>

Hi, is there a way to change the marker colors in the TRatioPlot class? (I assume it would work with something along the lines of rp-\>SetGraphDrawOpt();, but I have no idea what to put in the brackets)

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

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