# Newbie

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

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

---

## [Contour Plot with bin error](https://root-forum.cern.ch/t/contour-plot-with-bin-error/43646)

<div class="topic-metadata">

**Author:** [@matt](https://root-forum.cern.ch/u/matt)\
**Replies:** 2\
**Last updated:** [February 22, 2021, 9:25am UTC](https://root-forum.cern.ch/t/contour-plot-with-bin-error/43646 "2021-02-22T09:25:53Z")

</div>

ROOT Version:\_ 6.18/00 Platform:\_ Ubuntu 20.04 I wanted to plot this figure . Which is from this paper https://arxiv.org/pdf/hep-ex/0606028.pdf. Here is the root file.data.root (8.1 KB) . Here is my code. dat\_root.C …

---

## [Using RDataFrame in C++](https://root-forum.cern.ch/t/using-rdataframe-in-c/43634)

<div class="topic-metadata">

**Author:** [@Kristian](https://root-forum.cern.ch/u/Kristian)\
**Replies:** 4\
**Last updated:** [February 21, 2021, 8:10pm UTC](https://root-forum.cern.ch/t/using-rdataframe-in-c/43634 "2021-02-21T20:10:40Z")

</div>

Hi, I am trying to use RDataFrames in C++, but for some reason it does not exist in the ROOT namespace. More specifically in the sample code from the class reference neither EnableImplicitMT or RDataFrame can be found: …

---

## [Fluctuation in the fitting function](https://root-forum.cern.ch/t/fluctuation-in-the-fitting-function/43638)

<div class="topic-metadata">

**Author:** [@Prabhu](https://root-forum.cern.ch/u/Prabhu)\
**Replies:** 5\
**Last updated:** [February 21, 2021, 3:45pm UTC](https://root-forum.cern.ch/t/fluctuation-in-the-fitting-function/43638 "2021-02-21T15:45:11Z")

</div>

Hi, Recently, when I was fitting the data with a function, I found something strange to me. Just after fitting the histogram when I draw, it shows some small fluctuation(noise) in the fitting function. But when I save t…

---

## [Efficiently performing arithmetic with TNtuple branches](https://root-forum.cern.ch/t/efficiently-performing-arithmetic-with-tntuple-branches/43629)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 1\
**Last updated:** [February 21, 2021, 5:55am UTC](https://root-forum.cern.ch/t/efficiently-performing-arithmetic-with-tntuple-branches/43629 "2021-02-21T05:55:02Z")

</div>

Is there an efficient way to perform arithmetic with the branches of a TNtuple? By this, I mean adding and subtracting branches, multiplying a branch by a scalar, etc. In my case, I’d like to multiply all entries in one…

---

## [How to add tick marks and text right above plot](https://root-forum.cern.ch/t/how-to-add-tick-marks-and-text-right-above-plot/43556)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 8\
**Last updated:** [February 18, 2021, 6:53am UTC](https://root-forum.cern.ch/t/how-to-add-tick-marks-and-text-right-above-plot/43556 "2021-02-18T06:53:26Z")

</div>

I would like to add tick marks and labels in between the tick marks on top of my plot. At the moment, I am trying to test out this as you see below. # include \<iostream\> # include \<fstream\> # include \<math.h\> # include \<…

---

## [TMathText bug (maybe)](https://root-forum.cern.ch/t/tmathtext-bug-maybe/43543)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 10\
**Last updated:** [February 18, 2021, 6:38am UTC](https://root-forum.cern.ch/t/tmathtext-bug-maybe/43543 "2021-02-18T06:38:17Z")

</div>

Hello everyone, I have crossed by what seems to be a bug in the TMathText class, when plotting a graph with high values in the x axis the “\\” symbols doesn’t seems to work anymore. Here is a quit test that you can check…

---

## [Event decay problem using TGenPhaseSpace](https://root-forum.cern.ch/t/event-decay-problem-using-tgenphasespace/43361)

<div class="topic-metadata">

**Author:** [@ajalotra](https://root-forum.cern.ch/u/ajalotra)\
**Replies:** 6\
**Last updated:** [February 17, 2021, 6:18pm UTC](https://root-forum.cern.ch/t/event-decay-problem-using-tgenphasespace/43361 "2021-02-17T18:18:22Z")

</div>

hi , can anyone help me with this problem, To develop an algorithm to generate a D0 meson of mass 1864.84±0.17 MeV assuming an exponential pT distribution and flat pseudo-rapidity distribution between -1 to 1. Allow t…

---

## [Trivial questions about RDataFrame](https://root-forum.cern.ch/t/trivial-questions-about-rdataframe/43465)

<div class="topic-metadata">

**Author:** [@gcerizza](https://root-forum.cern.ch/u/gcerizza)\
**Replies:** 16\
**Last updated:** [February 17, 2021, 5:01pm UTC](https://root-forum.cern.ch/t/trivial-questions-about-rdataframe/43465 "2021-02-17T17:01:40Z")

</div>

Hi, I have a couple of questions about the RDataFrame concept and how it works. I went through the docs and the examples but I still have a few doubts. RDataFrame seems to be (mostly) a high level interface for analys…

---

## [How can I run multiple PyROOT (Python) scripts using this script?](https://root-forum.cern.ch/t/how-can-i-run-multiple-pyroot-python-scripts-using-this-script/43575)

<div class="topic-metadata">

**Author:** [@ahmedabdelmotteleb](https://root-forum.cern.ch/u/ahmedabdelmotteleb)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 2:11pm UTC](https://root-forum.cern.ch/t/how-can-i-run-multiple-pyroot-python-scripts-using-this-script/43575 "2021-02-17T14:11:52Z")

</div>

Hi. I am using Python to try to run multiple Python scripts that are in different directories. It is important for me that I run these scripts from these respective directories (don’t want to run them from the same direc…

---

## [My code does not have any error but does not work](https://root-forum.cern.ch/t/my-code-does-not-have-any-error-but-does-not-work/43537)

<div class="topic-metadata">

**Author:** [@mohebtash](https://root-forum.cern.ch/u/mohebtash)\
**Replies:** 2\
**Last updated:** [February 16, 2021, 11:07am UTC](https://root-forum.cern.ch/t/my-code-does-not-have-any-error-but-does-not-work/43537 "2021-02-16T11:07:28Z")

</div>

Dear friends, This is a basic question. I have downloaded the file from CMS open source website(HEPTutorial file) and I want to select at least two muon from the file. I have written the code. Although when I run the f…

---

## [Convert some data into root format](https://root-forum.cern.ch/t/convert-some-data-into-root-format/43551)

<div class="topic-metadata">

**Author:** [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Replies:** 4\
**Last updated:** [February 16, 2021, 5:52am UTC](https://root-forum.cern.ch/t/convert-some-data-into-root-format/43551 "2021-02-16T05:52:08Z")

</div>

Hi I got a script which converts the given data from the software into root format for a single file. I am able to do that thing. Now my problem is regarding the conversion of a large number of files into root format. …

---

## [Normalising in TTree](https://root-forum.cern.ch/t/normalising-in-ttree/43525)

<div class="topic-metadata">

**Author:** [@Rajat\_Aggarwal](https://root-forum.cern.ch/u/Rajat_Aggarwal)\
**Replies:** 17\
**Last updated:** [February 15, 2021, 10:06pm UTC](https://root-forum.cern.ch/t/normalising-in-ttree/43525 "2021-02-15T22:06:37Z")

</div>

Dear ROOT Users, I have been trying to normalize the histogram to the number of events. I extracted the histogram from the root file in which it is stored in the Tree format. I wrote the following root marco: TFile\*f…

---

## [TBrowser won't open](https://root-forum.cern.ch/t/tbrowser-wont-open/43521)

<div class="topic-metadata">

**Author:** [@fabstr](https://root-forum.cern.ch/u/fabstr)\
**Replies:** 25\
**Last updated:** [February 15, 2021, 2:45pm UTC](https://root-forum.cern.ch/t/tbrowser-wont-open/43521 "2021-02-15T14:45:35Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: ROOT 6.22/00 Platform: Ubuntu shell Compiler: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Hello, Somehow the TBrowser don’t show up…

---

## [Getting an error while running my code](https://root-forum.cern.ch/t/getting-an-error-while-running-my-code/43545)

<div class="topic-metadata">

**Author:** [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Replies:** 9\
**Last updated:** [February 15, 2021, 11:49am UTC](https://root-forum.cern.ch/t/getting-an-error-while-running-my-code/43545 "2021-02-15T11:49:44Z")

</div>

Hi Hope you are doing great. I am getting the following error while running my code. Please guide me. Have a nice day. ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided

---

## [Issue with defining a custom PDF from an array of TF1 function](https://root-forum.cern.ch/t/issue-with-defining-a-custom-pdf-from-an-array-of-tf1-function/43516)

<div class="topic-metadata">

**Author:** [@zero1](https://root-forum.cern.ch/u/zero1)\
**Replies:** 2\
**Last updated:** [February 15, 2021, 11:14am UTC](https://root-forum.cern.ch/t/issue-with-defining-a-custom-pdf-from-an-array-of-tf1-function/43516 "2021-02-15T11:14:41Z")

</div>

Hello everyone. I’m modelling a multiple slit interference experiment with a variable number of slits. From x I want to compute a distance r for each of the slits and then I want to compute the wave equation by summing t…

---

## [Large memory leak in THnSparse](https://root-forum.cern.ch/t/large-memory-leak-in-thnsparse/43528)

<div class="topic-metadata">

**Author:** [@zubov\_dmitriy\_97](https://root-forum.cern.ch/u/zubov_dmitriy_97)\
**Replies:** 7\
**Last updated:** [February 14, 2021, 12:49pm UTC](https://root-forum.cern.ch/t/large-memory-leak-in-thnsparse/43528 "2021-02-14T12:49:45Z")

</div>

Dear experts, I am having huge memory leak while using N-dimensional histograms with THnSparse. My code contains function and its input - two not empty 9-dimensional histograms and this number of bins for each dimensio…

---

## [Dividing 2 branches from 2 different trees](https://root-forum.cern.ch/t/dividing-2-branches-from-2-different-trees/43538)

<div class="topic-metadata">

**Author:** [@sara\_sellam](https://root-forum.cern.ch/u/sara_sellam)\
**Replies:** 3\
**Last updated:** [February 13, 2021, 7:22pm UTC](https://root-forum.cern.ch/t/dividing-2-branches-from-2-different-trees/43538 "2021-02-13T19:22:45Z")

</div>

Dear Experts, I want to measure the reconstruction efficiency vs PT . I want to divide ple\_PT(reconstructed)/ple\_TRUEPT(generated), without projecting them in a histogram. Instead of h1-\>Divide(h2) where h1, and h2 ar…

---

## [Root binaries compatible with C++17?](https://root-forum.cern.ch/t/root-binaries-compatible-with-c-17/43530)

<div class="topic-metadata">

**Author:** [@ed20](https://root-forum.cern.ch/u/ed20)\
**Replies:** 2\
**Last updated:** [February 13, 2021, 11:01am UTC](https://root-forum.cern.ch/t/root-binaries-compatible-with-c-17/43530 "2021-02-13T11:01:07Z")

</div>

I need to update my ROOT installation to compile code written in C++17 (In case it’s relevant, I don’t actually need to run ROOT in the terminal at all, I just need the libraries to compile code). Are there any precompil…

---

## [Nullptr after using chain -\> SetEntryList()](https://root-forum.cern.ch/t/nullptr-after-using-chain-setentrylist/43511)

<div class="topic-metadata">

**Author:** [@jmattspartacus](https://root-forum.cern.ch/u/jmattspartacus)\
**Replies:** 4\
**Last updated:** [February 12, 2021, 3:03pm UTC](https://root-forum.cern.ch/t/nullptr-after-using-chain-setentrylist/43511 "2021-02-12T15:03:48Z")

</div>

Hi, I am using the following code inside a member function of a class. When I call the member function the first time, I have no issues. However, upon calling the function a second time, EList has become a nullptr, I h…

---

## [Show slices of TH3 in 3D view](https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071)

<div class="topic-metadata">

**Author:** [@youngrootuser](https://root-forum.cern.ch/u/youngrootuser)\
**Replies:** 8\
**Last updated:** [February 12, 2021, 6:44am UTC](https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071 "2021-02-12T06:44:14Z")

</div>

Hi all, I would like to draw a set slices of a TH3D in a 3D view. In other words: I would like to have a 3D coordinate systems and at several z positions, I would like to add planes in which TH2s with option “colz” are …

---

## [How reliable is TFile recovery?](https://root-forum.cern.ch/t/how-reliable-is-tfile-recovery/43512)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 6:15am UTC](https://root-forum.cern.ch/t/how-reliable-is-tfile-recovery/43512 "2021-02-12T06:15:11Z")

</div>

I have some ROOT files, each containing an identically formatted TNtupleD. While the data within them seems to be fine, unfortunately, when I try to open these files, I get the error Warning in \<TFile::Init\>: file filena…

---

## [Updating a histogram in THashList in a root file](https://root-forum.cern.ch/t/updating-a-histogram-in-thashlist-in-a-root-file/43461)

<div class="topic-metadata">

**Author:** [@Haidar](https://root-forum.cern.ch/u/Haidar)\
**Replies:** 4\
**Last updated:** [February 11, 2021, 10:14am UTC](https://root-forum.cern.ch/t/updating-a-histogram-in-thashlist-in-a-root-file/43461 "2021-02-11T10:14:02Z")

</div>

Dear rooters, I would like to modify a histogram in a root file inside a THashList and save it back to the file. So try something like this: TFile \*file = TFile("myFile.root", "update"); TList \*list = (TList\*)file-\>Ge…

---

## [RooStats: Change of Constraint does not change Profile Likelihood Plot](https://root-forum.cern.ch/t/roostats-change-of-constraint-does-not-change-profile-likelihood-plot/43438)

<div class="topic-metadata">

**Author:** [@bibsession](https://root-forum.cern.ch/u/bibsession)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 10:13am UTC](https://root-forum.cern.ch/t/roostats-change-of-constraint-does-not-change-profile-likelihood-plot/43438 "2021-02-11T10:13:08Z")

</div>

Hello everyone, I have been trying to set up a Frequentist Analysis of a signal+background (Gaussian+Polynomial) PDF where some parameters should be constrained in the likelihood due to Systematic Uncertainties. However…

---

## [Problem Fitting .root file histogram](https://root-forum.cern.ch/t/problem-fitting-root-file-histogram/43472)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 4\
**Last updated:** [February 10, 2021, 9:46pm UTC](https://root-forum.cern.ch/t/problem-fitting-root-file-histogram/43472 "2021-02-10T21:46:46Z")

</div>

Hi, I am trying to run a script for a new root file with a histogram, but for some reason, calling the fit function for this new file doesn’t even fit the data, whereas with a previous file it did. Below is the script t…

---

## [Create n outut files](https://root-forum.cern.ch/t/create-n-outut-files/43492)

<div class="topic-metadata">

**Author:** [@GiuliaH](https://root-forum.cern.ch/u/GiuliaH)\
**Replies:** 4\
**Last updated:** [February 10, 2021, 2:59pm UTC](https://root-forum.cern.ch/t/create-n-outut-files/43492 "2021-02-10T14:59:11Z")

</div>

Hi, I have a 10k events data file and I would like to create 10 output files to store the mean signal calculated over 1000 waveforms. I am trying with char out\_name\[10\]; for(i=0; i\<10;i++){ sprintf(out\_na…

---

## [Taking a random subsample of a histogram](https://root-forum.cern.ch/t/taking-a-random-subsample-of-a-histogram/43436)

<div class="topic-metadata">

**Author:** [@Vangi](https://root-forum.cern.ch/u/Vangi)\
**Replies:** 6\
**Last updated:** [February 10, 2021, 10:25am UTC](https://root-forum.cern.ch/t/taking-a-random-subsample-of-a-histogram/43436 "2021-02-10T10:25:05Z")

</div>

Dear ROOTers, I have a histogram of a variable and I want to split it randomly into two histograms, one containing a random x% of the events (of the total sample, not splitting each bin into x% and 100-x%), and the othe…

---

## [jsRoot: Empty file that is not really empty](https://root-forum.cern.ch/t/jsroot-empty-file-that-is-not-really-empty/43471)

<div class="topic-metadata">

**Author:** [@aporeba](https://root-forum.cern.ch/u/aporeba)\
**Replies:** 11\
**Last updated:** [February 10, 2021, 8:52am UTC](https://root-forum.cern.ch/t/jsroot-empty-file-that-is-not-really-empty/43471 "2021-02-10T08:52:45Z")

</div>

Hi, I am trying to open and read ROOT file via jsROOT: JSROOT.openFile("file.root") .then( file =\> console.log("ROOT File open!")); but I’m getting an error: Error: Empty file file.root The file is not emp…

---

## [Copying entries from a TTree](https://root-forum.cern.ch/t/copying-entries-from-a-ttree/43435)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 10:26pm UTC](https://root-forum.cern.ch/t/copying-entries-from-a-ttree/43435 "2021-02-09T22:26:09Z")

</div>

I want to merge the same three branches (call them “A”, “B”, and “C”, if you like) from a large number of ROOT files, containing identically formatted TTree’s. Currently, I iterate over each file and store that file’s T…

---

## [RooPlot showing the number of entries instead of the entries value](https://root-forum.cern.ch/t/rooplot-showing-the-number-of-entries-instead-of-the-entries-value/43427)

<div class="topic-metadata">

**Author:** [@zero1](https://root-forum.cern.ch/u/zero1)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 9:13pm UTC](https://root-forum.cern.ch/t/rooplot-showing-the-number-of-entries-instead-of-the-entries-value/43427 "2021-02-09T21:13:11Z")

</div>

I created a variable d with it’s frame RooRealVar d(“d”,“distance from the target”,0.0,Distance\[0\],Distance\[NDistance-1\]); RooPlot \*dframe = d.frame(); Then created a second variable: RooRealVar HitPerc(“#frac{N\_{…

---

## [TTree name with dots](https://root-forum.cern.ch/t/ttree-name-with-dots/43460)

<div class="topic-metadata">

**Author:** [@ROOTer1](https://root-forum.cern.ch/u/ROOTer1)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 10:31am UTC](https://root-forum.cern.ch/t/ttree-name-with-dots/43460 "2021-02-09T10:31:57Z")

</div>

How to read a TTree on the Root prompt when the name of tree includes dots name.with.dots-\>Scan() =\> Error!

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

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