# Newbie

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

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

---

## [Getting branch data using RDataFrame](https://root-forum.cern.ch/t/getting-branch-data-using-rdataframe/57252)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 3\
**Last updated:** [December 12, 2023, 2:38pm UTC](https://root-forum.cern.ch/t/getting-branch-data-using-rdataframe/57252 "2023-12-12T14:38:45Z")

</div>

Hi, I have 2 questions: What is the best way to access values of variables like particle mass, momentas and other parameters from a root file. Is RDataFrame easier to use for this? In many papers I have seen that …

---

## [Running root macros with multiple (2+) arguments from the shell/Terminal directly from a script](https://root-forum.cern.ch/t/running-root-macros-with-multiple-2-arguments-from-the-shell-terminal-directly-from-a-script/57433)

<div class="topic-metadata">

**Author:** [@elemental](https://root-forum.cern.ch/u/elemental)\
**Replies:** 10\
**Last updated:** [December 11, 2023, 4:35pm UTC](https://root-forum.cern.ch/t/running-root-macros-with-multiple-2-arguments-from-the-shell-terminal-directly-from-a-script/57433 "2023-12-11T16:35:40Z")

</div>

I am trying to run a macro that has several arguments from a terminal through a script. The point of it all is that I want to run the macro for several input files which are in different directories while passing the val…

---

## [Snapshot method overriding specified root file](https://root-forum.cern.ch/t/snapshot-method-overriding-specified-root-file/57494)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 5\
**Last updated:** [December 11, 2023, 1:24pm UTC](https://root-forum.cern.ch/t/snapshot-method-overriding-specified-root-file/57494 "2023-12-11T13:24:43Z")

</div>

So in the topic here: Applying cuts to histogram without having a TTree branch I specified the solution as using the Snapshot method to add a branch to a tree in the root file. However I had one other tree in my root fi…

---

## [Setting the opacity of histogram line?](https://root-forum.cern.ch/t/setting-the-opacity-of-histogram-line/57489)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [December 11, 2023, 9:54am UTC](https://root-forum.cern.ch/t/setting-the-opacity-of-histogram-line/57489 "2023-12-11T09:54:18Z")

</div>

Hi everyone, I am trying to set the opacity of a TH1F histogramh\_singles (red) line using h\_singles-\>SetLineColorAlpha(kRed, 0.164); However, I am not seeing any visible changes in the canvas. Numerically I can see t…

---

## [There is no pyroot](https://root-forum.cern.ch/t/there-is-no-pyroot/57486)

<div class="topic-metadata">

**Author:** [@mvpurohit](https://root-forum.cern.ch/u/mvpurohit)\
**Replies:** 2\
**Last updated:** [December 10, 2023, 10:25pm UTC](https://root-forum.cern.ch/t/there-is-no-pyroot/57486 "2023-12-10T22:25:37Z")

</div>

root --version ROOT Version: 6.30/02 Built for linuxx8664gcc on Dec 10 2023, 05:31:40 From heads/master@tags/v6-30-02 Platform: Ubuntu 20.04.6 LTS g++ --version g++ (Ubuntu 13.1.0-8ubuntu1~20.04.2) 13.1.0 Copyr…

---

## [Cling error](https://root-forum.cern.ch/t/cling-error/57458)

<div class="topic-metadata">

**Author:** [@catfish](https://root-forum.cern.ch/u/catfish)\
**Replies:** 9\
**Last updated:** [December 10, 2023, 12:52pm UTC](https://root-forum.cern.ch/t/cling-error/57458 "2023-12-10T12:52:23Z")

</div>

Helo i have tried to install the cling and when i open it i get following error: ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths! Invoking: LC\_ALL=C x86\_64-linux-gnu-g+±9 -O3 -DN…

---

## [Analysing a specific dataset from geant4](https://root-forum.cern.ch/t/analysing-a-specific-dataset-from-geant4/57454)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [December 9, 2023, 2:42pm UTC](https://root-forum.cern.ch/t/analysing-a-specific-dataset-from-geant4/57454 "2023-12-09T14:42:20Z")

</div>

Hello everyone, I am trying to analyze the following dataset using ROOT. I agree that this is not directly related to ROOT, but if someone has gone through a similar procedure, are there some examples for newbies? It wi…

---

## [Applying cuts to histogram without having a TTree branch](https://root-forum.cern.ch/t/applying-cuts-to-histogram-without-having-a-ttree-branch/57441)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 12\
**Last updated:** [December 9, 2023, 10:01am UTC](https://root-forum.cern.ch/t/applying-cuts-to-histogram-without-having-a-ttree-branch/57441 "2023-12-09T10:01:54Z")

</div>

Hi So I created 2 list of masses and i want to apply a cut to one variable to draw the histogram of the other but I am having trouble in adding branches to my existing root file. Is there a way to apply a cut to the his…

---

## [Problem in reading ROOT Trees and Branches](https://root-forum.cern.ch/t/problem-in-reading-root-trees-and-branches/57435)

<div class="topic-metadata">

**Author:** [@NPuccZ](https://root-forum.cern.ch/u/NPuccZ)\
**Replies:** 5\
**Last updated:** [December 8, 2023, 3:11pm UTC](https://root-forum.cern.ch/t/problem-in-reading-root-trees-and-branches/57435 "2023-12-08T15:11:59Z")

</div>

I’m writing a ROOT macro to read a tree, this tree contains many branches but I’m only interested in three particular ones. The problem is that when I try to read them I get wrong values, in fact, e.g., if I type “h76-\>S…

---

## [AttributeError: type object 'RDF' has no attribute 'FromCSV'](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899)

<div class="topic-metadata">

**Author:** [@Ufuk\_Tok](https://root-forum.cern.ch/u/Ufuk_Tok)\
**Replies:** 2\
**Last updated:** [December 8, 2023, 2:23pm UTC](https://root-forum.cern.ch/t/attributeerror-type-object-rdf-has-no-attribute-fromcsv/54899 "2023-12-08T14:23:44Z")

</div>

ROOT Version: 6.26/04 Platform: lxplus Compiler: Not Provided Hi. I am trying to convert a CSV file to a root file by using RDataFrame.FromCSV. However, it gives an attribute error. My simple code is here: import …

---

## [Manipulating hadd to skip some folders](https://root-forum.cern.ch/t/manipulating-hadd-to-skip-some-folders/57446)

<div class="topic-metadata">

**Author:** [@morbik](https://root-forum.cern.ch/u/morbik)\
**Replies:** 1\
**Last updated:** [December 8, 2023, 10:55am UTC](https://root-forum.cern.ch/t/manipulating-hadd-to-skip-some-folders/57446 "2023-12-08T10:55:59Z")

</div>

Dear ROOT Experts, I have been using hadd to merge my root files that has has different TDirectory’ies under. But, there is just one directory that is named same with all the ROOT files, and I do not want to hadd histog…

---

## [Compilation Error when submitting to CERN's cluster](https://root-forum.cern.ch/t/compilation-error-when-submitting-to-cerns-cluster/55142)

<div class="topic-metadata">

**Author:** [@Montechristo](https://root-forum.cern.ch/u/Montechristo)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 5:59pm UTC](https://root-forum.cern.ch/t/compilation-error-when-submitting-to-cerns-cluster/55142 "2023-06-01T17:59:55Z")

</div>

Hello everyone. This is my first post and I sincerely hope it is relevant to the discussions here. My question is how to deal with the error c++: error: unrecognized command line option ‘-std=c++14’ , that I receive afte…

---

## [Add branches to TTree for a file opened with RDataFrame](https://root-forum.cern.ch/t/add-branches-to-ttree-for-a-file-opened-with-rdataframe/57423)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 2\
**Last updated:** [December 7, 2023, 11:54am UTC](https://root-forum.cern.ch/t/add-branches-to-ttree-for-a-file-opened-with-rdataframe/57423 "2023-12-07T11:54:01Z")

</div>

So I opened my file using RDataFrame because I found it easier to access the data in the branches and use the data for analysis, but I want to add some branches to my dataset for which I need the tree in the dataset as a…

---

## [ROOT cannot be called in VS Code](https://root-forum.cern.ch/t/root-cannot-be-called-in-vs-code/57343)

<div class="topic-metadata">

**Author:** [@mc.dmytro](https://root-forum.cern.ch/u/mc.dmytro)\
**Replies:** 32\
**Last updated:** [December 6, 2023, 10:46pm UTC](https://root-forum.cern.ch/t/root-cannot-be-called-in-vs-code/57343 "2023-12-06T22:46:36Z")

</div>

Hello experts, I am having a problem with running ROOT on my new Windows device. I’ve installed the latest 6.30.02 version for my Windows 11 laptop. I know that it is only compatible with Python 3.8.10, so I installed …

---

## [How to plot z axis for a third variable in root](https://root-forum.cern.ch/t/how-to-plot-z-axis-for-a-third-variable-in-root/57402)

<div class="topic-metadata">

**Author:** [@github-arpita](https://root-forum.cern.ch/u/github-arpita)\
**Replies:** 5\
**Last updated:** [December 6, 2023, 11:52am UTC](https://root-forum.cern.ch/t/how-to-plot-z-axis-for-a-third-variable-in-root/57402 "2023-12-06T11:52:18Z")

</div>

\_ Dear team, I want a plot where two variables are plotted on the X and Y axis whereas the third variable can be plotted on the Z axis. An example plot is attached here. Can I get a graph like this? Thanks and reg…

---

## [Unable to import ROOT in Python, getting a long error when trying to open ROOT in terminal (macOS Ventura 13.5.2)](https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404)

<div class="topic-metadata">

**Author:** [@madisd](https://root-forum.cern.ch/u/madisd)\
**Replies:** 1\
**Last updated:** [December 6, 2023, 8:37am UTC](https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404 "2023-12-06T08:37:13Z")

</div>

Hello! After trying to uninstall and reinstall ROOT using Brew, and upgrading Brew and trying to uninstall/reinstall ROOT again, upon starting ROOT in my terminal or checking the version using root --version, I get the f…

---

## [Draw() command does not work](https://root-forum.cern.ch/t/draw-command-does-not-work/57392)

<div class="topic-metadata">

**Author:** [@Gorgon](https://root-forum.cern.ch/u/Gorgon)\
**Replies:** 1\
**Last updated:** [December 5, 2023, 4:31am UTC](https://root-forum.cern.ch/t/draw-command-does-not-work/57392 "2023-12-05T04:31:20Z")

</div>

Hi There! When I start root and type these two lines: TF1 f1(“f1”,“sin(x)/x”,0.,10.); fi.Draw(); I get the following message: \< TCanvas::MakeDefCanvas\>: created default TCanvas with name c1 But it doesnt opan anyth…

---

## [Behavior of TFile::Open() in a loop](https://root-forum.cern.ch/t/behavior-of-tfile-open-in-a-loop/57390)

<div class="topic-metadata">

**Author:** [@jocl](https://root-forum.cern.ch/u/jocl)\
**Replies:** 1\
**Last updated:** [December 4, 2023, 9:44pm UTC](https://root-forum.cern.ch/t/behavior-of-tfile-open-in-a-loop/57390 "2023-12-04T21:44:39Z")

</div>

ROOT Version: 6.26/06 Platform: Scientific Linux 7.3 (Nitrogen) Compiler: None (macro) Hi ROOT forum, I am seeing some behavior that I don’t understand when I open TFiles within a loop. This may be an issue with my…

---

## [Horizontal line through zero bin content](https://root-forum.cern.ch/t/horizontal-line-through-zero-bin-content/57385)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 4\
**Last updated:** [December 4, 2023, 12:30pm UTC](https://root-forum.cern.ch/t/horizontal-line-through-zero-bin-content/57385 "2023-12-04T12:30:14Z")

</div>

Hi Everyone, I am trying to plot two 1D histograms on the same canvas with non-zero bin contents from 0 to 0.7. However, the histograms produced also draw a line over zero bin contents. Is it possible to get rid of thi…

---

## [Visual Studio 2022: error LNK2019: unresolved external symbol when trying to compile a simple code using ROOT's libraries](https://root-forum.cern.ch/t/visual-studio-2022-error-lnk2019-unresolved-external-symbol-when-trying-to-compile-a-simple-code-using-roots-libraries/57363)

<div class="topic-metadata">

**Author:** [@FederalPoop](https://root-forum.cern.ch/u/FederalPoop)\
**Replies:** 5\
**Last updated:** [December 2, 2023, 4:22pm UTC](https://root-forum.cern.ch/t/visual-studio-2022-error-lnk2019-unresolved-external-symbol-when-trying-to-compile-a-simple-code-using-roots-libraries/57363 "2023-12-02T16:22:46Z")

</div>

ROOT Version: 6.30.02 Platform: Visual Studio Community 2022 v17.8.1 (Windows 10) Compiler: MSBuild (with the c++17 standard) Hello, I’m trying to run an extremely simple code (just an empty main() function that doe…

---

## [Use RDataFrame with nested vectors (like vector\<vector\<float\>\>) without creating additional dictionaries](https://root-forum.cern.ch/t/use-rdataframe-with-nested-vectors-like-vector-vector-float-without-creating-additional-dictionaries/57356)

<div class="topic-metadata">

**Author:** [@CuriousPeter](https://root-forum.cern.ch/u/CuriousPeter)\
**Replies:** 3\
**Last updated:** [December 1, 2023, 2:13pm UTC](https://root-forum.cern.ch/t/use-rdataframe-with-nested-vectors-like-vector-vector-float-without-creating-additional-dictionaries/57356 "2023-12-01T14:13:20Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.26/02, 6.28/06 \_Platform: GNU/Linux (CentOS Linux release 7.9.2009) \_Compiler: GCC 11.2.0, GCC 13.2.0 Hi, My question is quit…

---

## [Setting a histogram x axis rage for a splitted histogram?](https://root-forum.cern.ch/t/setting-a-histogram-x-axis-rage-for-a-splitted-histogram/57320)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 4\
**Last updated:** [November 29, 2023, 10:09am UTC](https://root-forum.cern.ch/t/setting-a-histogram-x-axis-rage-for-a-splitted-histogram/57320 "2023-11-29T10:09:50Z")

</div>

Hi folks, I have been trying to draw two histograms stacked on top of each other by splitting the parent histogram into two sets of axis ranges. I have divided the canvas. However, I am not able to set the x-axis ranges…

---

## [Running JSROOT From Local Server and setting histogram titles](https://root-forum.cern.ch/t/running-jsroot-from-local-server-and-setting-histogram-titles/56619)

<div class="topic-metadata">

**Author:** [@trainroot](https://root-forum.cern.ch/u/trainroot)\
**Replies:** 2\
**Last updated:** [October 11, 2023, 12:56pm UTC](https://root-forum.cern.ch/t/running-jsroot-from-local-server-and-setting-histogram-titles/56619 "2023-10-11T12:56:52Z")

</div>

Hello All, I am new to root and am trying to draw a histogram using JSROOT. I have a two questions: Everything works when calling the js files from cern servers, but not from local servers. I cloned the repo from jsr…

---

## [TH1F constructor, setting the x axis range does not work](https://root-forum.cern.ch/t/th1f-constructor-setting-the-x-axis-range-does-not-work/57162)

<div class="topic-metadata">

**Author:** [@rafal4](https://root-forum.cern.ch/u/rafal4)\
**Replies:** 12\
**Last updated:** [November 23, 2023, 9:37am UTC](https://root-forum.cern.ch/t/th1f-constructor-setting-the-x-axis-range-does-not-work/57162 "2023-11-23T09:37:41Z")

</div>

Hello, I would like to ask for a hint regarding the scope of the simple histogram. I need to draw a simple histogram of the variable x, only in a narrow range of x from 10 to 15. I set the range in the constructor: TH1…

---

## [Possible leak with dynamic\_cast and TKey::ReadObj?](https://root-forum.cern.ch/t/possible-leak-with-dynamic-cast-and-tkey-readobj/56799)

<div class="topic-metadata">

**Author:** [@ctacke](https://root-forum.cern.ch/u/ctacke)\
**Replies:** 6\
**Last updated:** [October 27, 2023, 11:23am UTC](https://root-forum.cern.ch/t/possible-leak-with-dynamic-cast-and-tkey-readobj/56799 "2023-10-27T11:23:53Z")

</div>

I am looking at the TKey::ReadObj() docs for ROOT 6.28. The “can create a new object \[…\] This new object \[…\]” lets me assume, that ReadObj returns an owning pointer (the implementation code also looks like this)? A bit …

---

## [High value of Chi Square](https://root-forum.cern.ch/t/high-value-of-chi-square/34322)

<div class="topic-metadata">

**Author:** [@SimoneT](https://root-forum.cern.ch/u/SimoneT)\
**Replies:** 5\
**Last updated:** [October 31, 2023, 1:24am UTC](https://root-forum.cern.ch/t/high-value-of-chi-square/34322 "2023-10-31T01:24:45Z")

</div>

Goodevening everybody, I’ve some problems with chi-square. I wrote a macro that fit some experimental data with a sin function. The result is that the fitting function is perfect for the data, but in a way that i cannot…

---

## [Issue with ROOT tree compression in a MakeSelector framework](https://root-forum.cern.ch/t/issue-with-root-tree-compression-in-a-makeselector-framework/57244)

<div class="topic-metadata">

**Author:** [@phazarik](https://root-forum.cern.ch/u/phazarik)\
**Replies:** 2\
**Last updated:** [November 27, 2023, 9:52am UTC](https://root-forum.cern.ch/t/issue-with-root-tree-compression-in-a-makeselector-framework/57244 "2023-11-27T09:52:39Z")

</div>

Dear experts, I am using a make-selector based analysis code to read into nanoAOD files, pick a subset of events, and store the event-level variables in a new root file, inside a tree called “Events”. This is how I am …

---

## [How to fill tree from xml file](https://root-forum.cern.ch/t/how-to-fill-tree-from-xml-file/57279)

<div class="topic-metadata">

**Author:** [@Goktug\_Bayram](https://root-forum.cern.ch/u/Goktug_Bayram)\
**Replies:** 1\
**Last updated:** [November 27, 2023, 1:41pm UTC](https://root-forum.cern.ch/t/how-to-fill-tree-from-xml-file/57279 "2023-11-27T13:41:44Z")

</div>

A couple months ago I write a code that it get data from txt file and writes to tree. Now I want to write code that do the same thing but instead of getting data from txt file, I need to do get data from xml file and wri…

---

## [Area under histogram subtracting the background?](https://root-forum.cern.ch/t/area-under-histogram-subtracting-the-background/57294)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [November 28, 2023, 1:55pm UTC](https://root-forum.cern.ch/t/area-under-histogram-subtracting-the-background/57294 "2023-11-28T13:55:20Z")

</div>

Hello ROOT experts, I am trying to get the area under the peak; really, a TH1F histogram from bin Xmin to bin Xmax and not count the area under the background. Can someone please suggest how to achieve this, or if ther…

---

## [Installation video request](https://root-forum.cern.ch/t/installation-video-request/57289)

<div class="topic-metadata">

**Author:** [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Replies:** 2\
**Last updated:** [November 28, 2023, 10:06am UTC](https://root-forum.cern.ch/t/installation-video-request/57289 "2023-11-28T10:06:30Z")

</div>

Dear ROOT team, Is that possible to release, for instance, 5 mins video to show how to remove the old installed ROOT from our laptops and how to install the new release ROOT without messing up anything? For instance, I…

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

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