# Newbie

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

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

---

## [TF1 Draw does not plot correct cosine function](https://root-forum.cern.ch/t/tf1-draw-does-not-plot-correct-cosine-function/36898)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 1\
**Last updated:** [November 19, 2019, 11:49pm UTC](https://root-forum.cern.ch/t/tf1-draw-does-not-plot-correct-cosine-function/36898 "2019-11-19T23:49:42Z")

</div>

I am trying to fit data points with a cosine function, with decaying amplitude. If I fit and plot short range, this looks fine: However, if I increase the time range I get this: Here the fit function (red) does not…

---

## [Passing parameters back into macro or function (or help improving spaghetti code)](https://root-forum.cern.ch/t/passing-parameters-back-into-macro-or-function-or-help-improving-spaghetti-code/36855)

<div class="topic-metadata">

**Author:** [@luiz\_iniciante](https://root-forum.cern.ch/u/luiz_iniciante)\
**Replies:** 4\
**Last updated:** [November 18, 2019, 9:56am UTC](https://root-forum.cern.ch/t/passing-parameters-back-into-macro-or-function-or-help-improving-spaghetti-code/36855 "2019-11-18T09:56:30Z")

</div>

Hello Colleagues, One weak-old Root user here. I’ve a written macro that does a fit to a histogram of the exponential decay of the dose (or intensity) of a photon beam traversing a water target in the presence of a magn…

---

## [Enable C++14/17 support after building ROOT](https://root-forum.cern.ch/t/enable-c-14-17-support-after-building-root/36735)

<div class="topic-metadata">

**Author:** [@kimd99](https://root-forum.cern.ch/u/kimd99)\
**Replies:** 4\
**Last updated:** [November 17, 2019, 9:49am UTC](https://root-forum.cern.ch/t/enable-c-14-17-support-after-building-root/36735 "2019-11-17T09:49:18Z")

</div>

Hello, I am trying to compile macros with c++14/17 features, either with g+±9 g++-9 -std=c++17 -o simulation.exe particle.cpp main-particle.C \`root-config --cflags --libs\` or with ACLiC .L particle.cpp+ .L main-parti…

---

## [Load Delphes library to ROOT](https://root-forum.cern.ch/t/load-delphes-library-to-root/36795)

<div class="topic-metadata">

**Author:** [@pgummulu](https://root-forum.cern.ch/u/pgummulu)\
**Replies:** 5\
**Last updated:** [November 15, 2019, 5:54am UTC](https://root-forum.cern.ch/t/load-delphes-library-to-root/36795 "2019-11-15T05:54:19Z")

</div>

Hi, I am pretty new to using ROOT. I have generated a root file from Delphes output. In root I am typing gSystem-\>Load("libDelphes.so"), It is succesfully loaded when I launch root from within Delphes library. Howev…

---

## [Histogram from arrays](https://root-forum.cern.ch/t/histogram-from-arrays/36778)

<div class="topic-metadata">

**Author:** [@Arianna](https://root-forum.cern.ch/u/Arianna)\
**Replies:** 8\
**Last updated:** [November 14, 2019, 6:28pm UTC](https://root-forum.cern.ch/t/histogram-from-arrays/36778 "2019-11-14T18:28:44Z")

</div>

ROOT Version: 5.34 Platform: Linux Virtual Machine on WIndows10 host Compiler: CINT/ROOT C/C++ Interpreter version 5.18.00 Hello. I’m using ROOT for my astrophysics thesis and I have to recreate a power density spec…

---

## [Increase smoothness of drawn curves](https://root-forum.cern.ch/t/increase-smoothness-of-drawn-curves/36815)

<div class="topic-metadata">

**Author:** [@armstro1](https://root-forum.cern.ch/u/armstro1)\
**Replies:** 5\
**Last updated:** [November 14, 2019, 4:02pm UTC](https://root-forum.cern.ch/t/increase-smoothness-of-drawn-curves/36815 "2019-11-14T16:02:32Z")

</div>

Hello, I am trying to save a canvas with some small graphics elements on it (e.g. circles, curves, lines) and would like these to be in high enough resolution to see small details (e.g. lines lying tangent to a circle).…

---

## [Signal Efficiency and Background Rejection](https://root-forum.cern.ch/t/signal-efficiency-and-background-rejection/36813)

<div class="topic-metadata">

**Author:** [@anprodri](https://root-forum.cern.ch/u/anprodri)\
**Replies:** 1\
**Last updated:** [November 14, 2019, 9:17am UTC](https://root-forum.cern.ch/t/signal-efficiency-and-background-rejection/36813 "2019-11-14T09:17:58Z")

</div>

Hello! Quick question: What are the Signal Efficiency and Background Rejection formulas? Thanks in advance. Kind regards.

---

## [How to extract the XY-values from .root file](https://root-forum.cern.ch/t/how-to-extract-the-xy-values-from-root-file/36790)

<div class="topic-metadata">

**Author:** [@Xavier\_Brock](https://root-forum.cern.ch/u/Xavier_Brock)\
**Replies:** 8\
**Last updated:** [November 13, 2019, 6:26pm UTC](https://root-forum.cern.ch/t/how-to-extract-the-xy-values-from-root-file/36790 "2019-11-13T18:26:59Z")

</div>

Hello all, I am in the home stretch of my thesis and am trying to construct a multigraph. I need my data, from a .root file, overlayed with the data from a .csv file that I generated to replicate someone’s previous wor…

---

## [How to map 2D array to 1D array and drawing resulting 1D histogram](https://root-forum.cern.ch/t/how-to-map-2d-array-to-1d-array-and-drawing-resulting-1d-histogram/36746)

<div class="topic-metadata">

**Author:** [@mulb](https://root-forum.cern.ch/u/mulb)\
**Replies:** 6\
**Last updated:** [November 13, 2019, 5:32pm UTC](https://root-forum.cern.ch/t/how-to-map-2d-array-to-1d-array-and-drawing-resulting-1d-histogram/36746 "2019-11-13T17:32:53Z")

</div>

Hello everyone, Searched root tutorials but found nothing similar to my task yet. How can I write a program to map a 2D array to a 1D array and finally draw the resulting 1D array into a dimensional histogram using C++…

---

## [Confusion Regarding Loading Shared Libraries](https://root-forum.cern.ch/t/confusion-regarding-loading-shared-libraries/36617)

<div class="topic-metadata">

**Author:** [@Jinen](https://root-forum.cern.ch/u/Jinen)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 10:17pm UTC](https://root-forum.cern.ch/t/confusion-regarding-loading-shared-libraries/36617 "2019-11-12T22:17:17Z")

</div>

Dear all, I was attempting to run sample builds of the CutLang Interpreter. The interpreter relies heavily on ROOT. The example build I tried to run compiled successfully. When I tried to run and display the output in a…

---

## [Segmentation violation in creating tree file](https://root-forum.cern.ch/t/segmentation-violation-in-creating-tree-file/36717)

<div class="topic-metadata">

**Author:** [@schniefen](https://root-forum.cern.ch/u/schniefen)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 9:50pm UTC](https://root-forum.cern.ch/t/segmentation-violation-in-creating-tree-file/36717 "2019-11-12T21:50:10Z")

</div>

Consider the attached files. When running EG\_v2\_tree.C and calling the function rootfuncgenerate, there is a segmentation violation. The aim is to produce a tree file phi\_dist.root and be able to run tree-\>Draw() from th…

---

## [Reading data from TLeaf returns false values](https://root-forum.cern.ch/t/reading-data-from-tleaf-returns-false-values/36622)

<div class="topic-metadata">

**Author:** [@fraglesos](https://root-forum.cern.ch/u/fraglesos)\
**Replies:** 9\
**Last updated:** [November 12, 2019, 9:44pm UTC](https://root-forum.cern.ch/t/reading-data-from-tleaf-returns-false-values/36622 "2019-11-12T21:44:16Z")

</div>

Hello everyone, I’m creating a data file filled with ULong64\_t data read from a txt file. The code I wrote looks like this: ULong64\_t var; TFile\* output\_file = new TFile("input\_data.root", "RECREATE"); TTree\* tree=new …

---

## [Plotting only one point on canvass](https://root-forum.cern.ch/t/plotting-only-one-point-on-canvass/36719)

<div class="topic-metadata">

**Author:** [@jbmagallanes](https://root-forum.cern.ch/u/jbmagallanes)\
**Replies:** 23\
**Last updated:** [November 11, 2019, 9:20pm UTC](https://root-forum.cern.ch/t/plotting-only-one-point-on-canvass/36719 "2019-11-11T21:20:15Z")

</div>

hi everyone :slight\_smile: i would have wanted to print only just one point on a canvass. kindly, see part of the code. //=== generating the functions ===// for (Int\_t i=0; i\<nof; i++) { fna = "f"; fna += i; fpf\[…

---

## [TMLP LoadWeights](https://root-forum.cern.ch/t/tmlp-loadweights/36764)

<div class="topic-metadata">

**Author:** [@Alon\_Joffe](https://root-forum.cern.ch/u/Alon_Joffe)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 8:05am UTC](https://root-forum.cern.ch/t/tmlp-loadweights/36764 "2019-11-11T08:05:34Z")

</div>

Hi, I tried to find something on the site but could not. I have a problem where I am trying to use root to train a TMLP class on a set of data, save the weights and load the trained TMLP class on a different server to …

---

## [OUtput file error](https://root-forum.cern.ch/t/output-file-error/36762)

<div class="topic-metadata">

**Author:** [@Jenn](https://root-forum.cern.ch/u/Jenn)\
**Replies:** 1\
**Last updated:** [November 11, 2019, 6:12am UTC](https://root-forum.cern.ch/t/output-file-error/36762 "2019-11-11T06:12:59Z")

</div>

Hello everyone, I am new using ROOT and we are trying to create a histogram but the output file I want to create (“gaus.root”) is not being created and I can’t figure out why. Help me please. Here it is the core we are…

---

## [Error creating output file](https://root-forum.cern.ch/t/error-creating-output-file/36759)

<div class="topic-metadata">

**Author:** [@Jenn](https://root-forum.cern.ch/u/Jenn)\
**Replies:** 7\
**Last updated:** [November 10, 2019, 6:22pm UTC](https://root-forum.cern.ch/t/error-creating-output-file/36759 "2019-11-10T18:22:31Z")

</div>

Hello everyone, I am new using ROOT and we are trying to create a histogram but the output file I want to create (“gaus.root”) is not being created and I can’t figure out why. Help me please. Here it is the core we are…

---

## [G++ compiler strange behavior](https://root-forum.cern.ch/t/g-compiler-strange-behavior/36737)

<div class="topic-metadata">

**Author:** [@Nicola\_Rizzi](https://root-forum.cern.ch/u/Nicola_Rizzi)\
**Replies:** 2\
**Last updated:** [November 8, 2019, 12:12pm UTC](https://root-forum.cern.ch/t/g-compiler-strange-behavior/36737 "2019-11-08T12:12:58Z")

</div>

Hi ROOTers, I am having some problems (again) with the g++ compiler. I made a minimal working example for you example.cpp (416 Bytes) which uses a self-written class Source.h (870 Bytes) Source.cpp (2.7 KB) I try to c…

---

## [Clarification about GUI & compiling ROOT macros in general](https://root-forum.cern.ch/t/clarification-about-gui-compiling-root-macros-in-general/36653)

<div class="topic-metadata">

**Author:** [@renyhp](https://root-forum.cern.ch/u/renyhp)\
**Replies:** 12\
**Last updated:** [November 7, 2019, 2:32pm UTC](https://root-forum.cern.ch/t/clarification-about-gui-compiling-root-macros-in-general/36653 "2019-11-07T14:32:04Z")

</div>

Hello, First of all let me state that I am a complete newbie about compiling and linking any C++ code. “Build” has always been a black magic command to me, which has always worked in a simple and blackbox-y way inside I…

---

## [Changing some lines in ROOT library](https://root-forum.cern.ch/t/changing-some-lines-in-root-library/36668)

<div class="topic-metadata">

**Author:** [@Nicola\_Rizzi](https://root-forum.cern.ch/u/Nicola_Rizzi)\
**Replies:** 6\
**Last updated:** [November 7, 2019, 10:05am UTC](https://root-forum.cern.ch/t/changing-some-lines-in-root-library/36668 "2019-11-07T10:05:14Z")

</div>

ROOT Version: 6.18.02 Platform: Elementary (Ubuntu 16.04) Compiler: g++ 5.5.0 20171010 Hi everybody, I have a small question about modifying ROOT libraries. In particular I would like to change TF1::GetRandom() in…

---

## [Redefinition of class](https://root-forum.cern.ch/t/redefinition-of-class/36712)

<div class="topic-metadata">

**Author:** [@schniefen](https://root-forum.cern.ch/u/schniefen)\
**Replies:** 1\
**Last updated:** [November 6, 2019, 2:49pm UTC](https://root-forum.cern.ch/t/redefinition-of-class/36712 "2019-11-06T14:49:43Z")

</div>

Consider the attached file. Everytime compiling another script where #include "MyClasses.C" is inserted at the top, a redefinition error occurs. Could there be something erroneous about the way ClassDef and ClassImp are …

---

## [TF1 does not take fitted parameters](https://root-forum.cern.ch/t/tf1-does-not-take-fitted-parameters/36665)

<div class="topic-metadata">

**Author:** [@AndreasLdt](https://root-forum.cern.ch/u/AndreasLdt)\
**Replies:** 3\
**Last updated:** [November 6, 2019, 12:01pm UTC](https://root-forum.cern.ch/t/tf1-does-not-take-fitted-parameters/36665 "2019-11-06T12:01:53Z")

</div>

Hi forum, I have a histogram with a plateau region. For considering the uncertainties of this plateau, I fit a horizontal line and a linear line with some slope to the plateau and look for some differences. The problem…

---

## [Remove data from a histogram](https://root-forum.cern.ch/t/remove-data-from-a-histogram/36698)

<div class="topic-metadata">

**Author:** [@DANTE0316](https://root-forum.cern.ch/u/DANTE0316)\
**Replies:** 3\
**Last updated:** [November 6, 2019, 8:52am UTC](https://root-forum.cern.ch/t/remove-data-from-a-histogram/36698 "2019-11-06T08:52:14Z")

</div>

Hello，everyone！I want to remove the data of the first bin in the histogram, while keeping the other bins in the histogram consistent with the original, what should I do?

---

## [Efficient loading of many ".dat" files and plotting them as Histograms](https://root-forum.cern.ch/t/efficient-loading-of-many-dat-files-and-plotting-them-as-histograms/36656)

<div class="topic-metadata">

**Author:** [@myless](https://root-forum.cern.ch/u/myless)\
**Replies:** 12\
**Last updated:** [November 6, 2019, 3:38am UTC](https://root-forum.cern.ch/t/efficient-loading-of-many-dat-files-and-plotting-them-as-histograms/36656 "2019-11-06T03:38:52Z")

</div>

ROOT Version: 6.18/04 Platform: Arch Linux-64 bit Compiler: linuxx8664gcc Hello everyone, I am measuring the Compton effect using a Cs137 Source and NaI detectors. The output of the data consists of multiple “.dat” f…

---

## [Hadd: SysError in \<TFile::ReadBuffer\>: error reading from file](https://root-forum.cern.ch/t/hadd-syserror-in-tfile-readbuffer-error-reading-from-file/36275)

<div class="topic-metadata">

**Author:** [@mlucioma](https://root-forum.cern.ch/u/mlucioma)\
**Replies:** 4\
**Last updated:** [November 5, 2019, 3:51pm UTC](https://root-forum.cern.ch/t/hadd-syserror-in-tfile-readbuffer-error-reading-from-file/36275 "2019-11-05T15:51:58Z")

</div>

Dear rooters, I am trying to merge several (~4000) root files together, for which I do: hadd -kk -f MERGED.root Bd2kstee-2017-MagUp\_335.root Bd2kstee-2017-MagUp\_336.root … I checked that the root files were OK, and th…

---

## [Pie Chart Label sizes](https://root-forum.cern.ch/t/pie-chart-label-sizes/36637)

<div class="topic-metadata">

**Author:** [@makor](https://root-forum.cern.ch/u/makor)\
**Replies:** 5\
**Last updated:** [November 5, 2019, 3:27pm UTC](https://root-forum.cern.ch/t/pie-chart-label-sizes/36637 "2019-11-05T15:27:27Z")

</div>

Hi all, how can I change the label size of slices of a pie chart? Cheers Max

---

## [TTree-\>Draw(): 2D image with color map for third coordinate](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687)

<div class="topic-metadata">

**Author:** [@clapd](https://root-forum.cern.ch/u/clapd)\
**Replies:** 2\
**Last updated:** [November 5, 2019, 2:08pm UTC](https://root-forum.cern.ch/t/ttree-draw-2d-image-with-color-map-for-third-coordinate/36687 "2019-11-05T14:08:21Z")

</div>

Hello, I have a tree object eventTree, which contains four different branches: xCoord, yCoord, zCoord, time. Is there a way to plot 3 of these branches in a 2D image where the third coordinate values are given by a col…

---

## [Minuit2 Minimization did NOT converge](https://root-forum.cern.ch/t/minuit2-minimization-did-not-converge/36568)

<div class="topic-metadata">

**Author:** [@TaeNyFan](https://root-forum.cern.ch/u/TaeNyFan)\
**Replies:** 2\
**Last updated:** [November 5, 2019, 10:38am UTC](https://root-forum.cern.ch/t/minuit2-minimization-did-not-converge/36568 "2019-11-05T10:38:43Z")

</div>

I am using Minuit2 to minimize an unfamiliar function with 6 randomly initialised variables. During the minimzation I get the following error: Minuit2Minimizer: Minimize with max-calls 10000 convergence for edm \< 0.00…

---

## [Variable histogram title](https://root-forum.cern.ch/t/variable-histogram-title/36672)

<div class="topic-metadata">

**Author:** [@schniefen](https://root-forum.cern.ch/u/schniefen)\
**Replies:** 1\
**Last updated:** [November 5, 2019, 8:08am UTC](https://root-forum.cern.ch/t/variable-histogram-title/36672 "2019-11-05T08:08:28Z")

</div>

Consider declaring a 1D histogram like TH1D\* hist = new TH1D("Stats", "Temp. per day at 12 in 1988; Day; Temperature \[#circC\]", 366, 0, 366); Is it possible to include parameters in the title setting part? This is …

---

## [Creating a large histogram with tree splitting](https://root-forum.cern.ch/t/creating-a-large-histogram-with-tree-splitting/36657)

<div class="topic-metadata">

**Author:** [@dave](https://root-forum.cern.ch/u/dave)\
**Replies:** 5\
**Last updated:** [November 4, 2019, 11:50pm UTC](https://root-forum.cern.ch/t/creating-a-large-histogram-with-tree-splitting/36657 "2019-11-04T23:50:34Z")

</div>

Hi, I’m trying to create a large histogram by using splitting. However, when I change the splitting value of the branch with the below code, it doesn’t seem to allow me to use more bins. I’m wondering if I’m doing the…

---

## [Linux problem or not](https://root-forum.cern.ch/t/linux-problem-or-not/36613)

<div class="topic-metadata">

**Author:** [@jbmagallanes](https://root-forum.cern.ch/u/jbmagallanes)\
**Replies:** 2\
**Last updated:** [November 4, 2019, 5:58pm UTC](https://root-forum.cern.ch/t/linux-problem-or-not/36613 "2019-11-04T17:58:01Z")

</div>

SOS: What is meant by this error? I used to run my code in Ubuntu successfully. Now, it is a different kind of Linux (Scientific Linux 6). Could this be the problem? regards, jaybee \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

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

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