# Newbie

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

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

---

## [Error running ROOT Macros in VSCode in Windows](https://root-forum.cern.ch/t/error-running-root-macros-in-vscode-in-windows/56595)

<div class="topic-metadata">

**Author:** [@P\_T](https://root-forum.cern.ch/u/P_T)\
**Replies:** 1\
**Last updated:** [October 4, 2023, 12:19pm UTC](https://root-forum.cern.ch/t/error-running-root-macros-in-vscode-in-windows/56595 "2023-10-04T12:19:21Z")

</div>

I am completely new to ROOT and C++ and I wanted to try to run ROOT in VSCode on Windows 11. I have followed the instructions according to the “How to run ROOT Macros in VS Code” Tutorial from 31 March 2021 (I am not all…

---

## [Problem opening .dat file](https://root-forum.cern.ch/t/problem-opening-dat-file/56582)

<div class="topic-metadata">

**Author:** [@Oscar2](https://root-forum.cern.ch/u/Oscar2)\
**Replies:** 5\
**Last updated:** [October 3, 2023, 1:02pm UTC](https://root-forum.cern.ch/t/problem-opening-dat-file/56582 "2023-10-03T13:02:25Z")

</div>

So this is my first time using Root. I’ve installed everything and my professor gave me a script (.cpp) and a data file (.dat) just to test whether everything works fine. I know there are no problems in neither of the f…

---

## [Help with Plotting multiple histograms stored in a vector](https://root-forum.cern.ch/t/help-with-plotting-multiple-histograms-stored-in-a-vector/56571)

<div class="topic-metadata">

**Author:** [@Natilus](https://root-forum.cern.ch/u/Natilus)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 1:38pm UTC](https://root-forum.cern.ch/t/help-with-plotting-multiple-histograms-stored-in-a-vector/56571 "2023-10-02T13:38:59Z")

</div>

Dear Root experts, I have a quite interesting problem and don’t know how to approach it. I create a vector of TH1D\* and fill the histogram with data. I would like to plot them on the same canvas with different colors …

---

## [How to apply a specific Cut?](https://root-forum.cern.ch/t/how-to-apply-a-specific-cut/56553)

<div class="topic-metadata">

**Author:** [@NMarichalar](https://root-forum.cern.ch/u/NMarichalar)\
**Replies:** 9\
**Last updated:** [October 2, 2023, 12:03pm UTC](https://root-forum.cern.ch/t/how-to-apply-a-specific-cut/56553 "2023-10-02T12:03:42Z")

</div>

ROOT Version: 6.18 Platform: Not Provided Compiler: Not Provided Hello, I am fairly new to coding in C++ and using root. I was tasked with applying cuts to a set of data and combining it. I have no issues with everyt…

---

## [Convert numpy array to RDF with root v6.24/06](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454)

<div class="topic-metadata">

**Author:** [@AndrejL](https://root-forum.cern.ch/u/AndrejL)\
**Replies:** 3\
**Last updated:** [September 30, 2023, 5:21pm UTC](https://root-forum.cern.ch/t/convert-numpy-array-to-rdf-with-root-v6-24-06/54454 "2023-09-30T17:21:44Z")

</div>

Does ROOT v6.24 support transofrmation of numpy arrays into RDF? Without caching trees in root files. ROOT Version: 6.24/06 Platform: Jupyter notebook

---

## [Change histogram names in a root file](https://root-forum.cern.ch/t/change-histogram-names-in-a-root-file/56522)

<div class="topic-metadata">

**Author:** [@JanEric](https://root-forum.cern.ch/u/JanEric)\
**Replies:** 7\
**Last updated:** [September 29, 2023, 7:31am UTC](https://root-forum.cern.ch/t/change-histogram-names-in-a-root-file/56522 "2023-09-29T07:31:22Z")

</div>

ROOT version: 6.08.06 I have an input file with multiple folders and histograms. Some of these histograms have names that contain “EWCorr” and i need to rename them all so that they only contain “EW” instead and do so …

---

## [C++ code crashes when trying to run root files](https://root-forum.cern.ch/t/c-code-crashes-when-trying-to-run-root-files/56513)

<div class="topic-metadata">

**Author:** [@Xavier\_James](https://root-forum.cern.ch/u/Xavier_James)\
**Replies:** 6\
**Last updated:** [September 28, 2023, 1:04pm UTC](https://root-forum.cern.ch/t/c-code-crashes-when-trying-to-run-root-files/56513 "2023-09-28T13:04:05Z")

</div>

Dear All, I keep receiving an error message below when trying to run the attached script. It has worked on a co-worker’s computer but having trouble understanding why I am having these difficulties. The script in quest…

---

## [Trying to create multiple tree branches](https://root-forum.cern.ch/t/trying-to-create-multiple-tree-branches/55131)

<div class="topic-metadata">

**Author:** [@Goktug\_Bayram](https://root-forum.cern.ch/u/Goktug_Bayram)\
**Replies:** 1\
**Last updated:** [June 2, 2023, 8:57am UTC](https://root-forum.cern.ch/t/trying-to-create-multiple-tree-branches/55131 "2023-06-02T08:57:13Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hello dear experts I am updating my previous question. int i=0; …

---

## [cling::DynamicLibraryManager::loadLibrary(): libpythia8.so: cannot open shared object file: No such file or directory](https://root-forum.cern.ch/t/cling-loadlibrary-libpythia8-so-cannot-open-shared-object-file-no-such-file-or-directory/56392)

<div class="topic-metadata">

**Author:** [@Owaise\_Ahmed](https://root-forum.cern.ch/u/Owaise_Ahmed)\
**Replies:** 4\
**Last updated:** [September 28, 2023, 4:18am UTC](https://root-forum.cern.ch/t/cling-loadlibrary-libpythia8-so-cannot-open-shared-object-file-no-such-file-or-directory/56392 "2023-09-28T04:18:16Z")

</div>

ROOT Version: 6.28/06

---

## [Save a std::map\<int,TH1D\> to a TFile](https://root-forum.cern.ch/t/save-a-std-map-int-th1d-to-a-tfile/56340)

<div class="topic-metadata">

**Author:** [@ackuhlma](https://root-forum.cern.ch/u/ackuhlma)\
**Replies:** 10\
**Last updated:** [September 27, 2023, 9:36pm UTC](https://root-forum.cern.ch/t/save-a-std-map-int-th1d-to-a-tfile/56340 "2023-09-27T21:36:33Z")

</div>

I am writing a program in C++ and have a std::map\<int,TH1D\> that I would like to write to my TFile. I understand that it is possible to write “simple” STL containers such as std::vector\<int\>; however, I think the TH1D is…

---

## [No module named 'ROOT' error](https://root-forum.cern.ch/t/no-module-named-root-error/56469)

<div class="topic-metadata">

**Author:** [@maaike1806](https://root-forum.cern.ch/u/maaike1806)\
**Replies:** 5\
**Last updated:** [September 26, 2023, 8:14am UTC](https://root-forum.cern.ch/t/no-module-named-root-error/56469 "2023-09-26T08:14:17Z")

</div>

When I try to run import ROOT I get the following error message: ModuleNotFoundError: No module named ‘ROOT’ I did source thisroot.sh Does anyone know what might help?

---

## ['undefined reference' error after adding a library](https://root-forum.cern.ch/t/undefined-reference-error-after-adding-a-library/56333)

<div class="topic-metadata">

**Author:** [@Sbecka](https://root-forum.cern.ch/u/Sbecka)\
**Replies:** 3\
**Last updated:** [September 25, 2023, 8:10pm UTC](https://root-forum.cern.ch/t/undefined-reference-error-after-adding-a-library/56333 "2023-09-25T20:10:13Z")

</div>

Hello, I have a short script that reads a tree from a root file and generates a canvas showing a signal. The script works fine. However, I needed to add a library file called ‘libTParameters.so’ from another directory i…

---

## [Fitting peak under background](https://root-forum.cern.ch/t/fitting-peak-under-background/56337)

<div class="topic-metadata">

**Author:** [@Mustak\_Ali](https://root-forum.cern.ch/u/Mustak_Ali)\
**Replies:** 14\
**Last updated:** [September 25, 2023, 7:51pm UTC](https://root-forum.cern.ch/t/fitting-peak-under-background/56337 "2023-09-25T19:51:50Z")

</div>

Hi, I have the following energy spectrum. I would like to fit the peak lying in the energy range 500 - 800 keV. I am not sure what function would best fit the peak and the background. I would like to extend the backgrou…

---

## [RDataframe vectors of differnt size error](https://root-forum.cern.ch/t/rdataframe-vectors-of-differnt-size-error/56449)

<div class="topic-metadata">

**Author:** [@chungh](https://root-forum.cern.ch/u/chungh)\
**Replies:** 6\
**Last updated:** [September 25, 2023, 12:18pm UTC](https://root-forum.cern.ch/t/rdataframe-vectors-of-differnt-size-error/56449 "2023-09-25T12:18:52Z")

</div>

Hi, I’m getting this error message below. line 479, in \<module\> hNQvT.Add(i.GetValue()) cppyy.gbl.std.runtime\_error: const TH2D& ROOT::RDF::RResultPtr\<TH2D\>::GetValue() =\> runtime\_error: Cannot call operator / on v…

---

## [Summing TBranch data](https://root-forum.cern.ch/t/summing-tbranch-data/56463)

<div class="topic-metadata">

**Author:** [@Ian\_L](https://root-forum.cern.ch/u/Ian_L)\
**Replies:** 2\
**Last updated:** [September 25, 2023, 6:27am UTC](https://root-forum.cern.ch/t/summing-tbranch-data/56463 "2023-09-25T06:27:32Z")

</div>

I am trying to sum over a column of 1s and 0s in a TTree, and this seems like a trivial task, but I have no clue what function lets me pull these values. I am attempting to do this in a .C file, where I am able to pull s…

---

## [Error Creating Ratio Plot](https://root-forum.cern.ch/t/error-creating-ratio-plot/52563)

<div class="topic-metadata">

**Author:** [@Natilus](https://root-forum.cern.ch/u/Natilus)\
**Replies:** 15\
**Last updated:** [September 22, 2023, 2:13pm UTC](https://root-forum.cern.ch/t/error-creating-ratio-plot/52563 "2023-09-22T14:13:06Z")

</div>

Dear experts, After spending a lot of time trying to create a ration plot from my histograms and getting the following error: Error in TRatioPlot::GetUpperRefObject: No upper ref object of TH1 or THStack type found I …

---

## [TF1 and lambda change the values of a vector](https://root-forum.cern.ch/t/tf1-and-lambda-change-the-values-of-a-vector/56416)

<div class="topic-metadata">

**Author:** [@atha.stam](https://root-forum.cern.ch/u/atha.stam)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 7:17am UTC](https://root-forum.cern.ch/t/tf1-and-lambda-change-the-values-of-a-vector/56416 "2023-09-20T07:17:38Z")

</div>

ROOT Version: 6.18/04 Platform: 18.04 Compiler: cc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) Hello co-rooters, Here’s a weird one. I’m defining a few TF1 objects using lambda functions. Here’s my MWE. #include "TF1.h…

---

## [Std::vector\<float\> \*' to 'float', tree with vector entries to float values](https://root-forum.cern.ch/t/std-vector-float-to-float-tree-with-vector-entries-to-float-values/56415)

<div class="topic-metadata">

**Author:** [@shreya14p](https://root-forum.cern.ch/u/shreya14p)\
**Replies:** 2\
**Last updated:** [September 20, 2023, 6:43am UTC](https://root-forum.cern.ch/t/std-vector-float-to-float-tree-with-vector-entries-to-float-values/56415 "2023-09-20T06:43:59Z")

</div>

Is there a way to convert a tree with vector entries to float values? Basically, std::vector \*’ to ‘float’

---

## [Reading/printing a TBranch returns different value than actual](https://root-forum.cern.ch/t/reading-printing-a-tbranch-returns-different-value-than-actual/56403)

<div class="topic-metadata">

**Author:** [@atha.stam](https://root-forum.cern.ch/u/atha.stam)\
**Replies:** 2\
**Last updated:** [September 18, 2023, 7:52pm UTC](https://root-forum.cern.ch/t/reading-printing-a-tbranch-returns-different-value-than-actual/56403 "2023-09-18T19:52:21Z")

</div>

ROOT Version: 6.18/04 Platform: 18.04 Compiler: cc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) Hello co-rooters, I’m posting here because it looks like it might be a silly mistake happening. I am reading a root file that …

---

## [How to navigate a root file and find what I want](https://root-forum.cern.ch/t/how-to-navigate-a-root-file-and-find-what-i-want/56398)

<div class="topic-metadata">

**Author:** [@0101101](https://root-forum.cern.ch/u/0101101)\
**Replies:** 3\
**Last updated:** [September 18, 2023, 11:43am UTC](https://root-forum.cern.ch/t/how-to-navigate-a-root-file-and-find-what-i-want/56398 "2023-09-18T11:43:55Z")

</div>

I am very new to ROOT. I have a root file which was produced by Corrywrreckan weighting above 200 MB, where I expect to find some kind of list of Track objects . When I open the file with the TBrowser I find this: No…

---

## [Problem with root installation (gmake: \*\*\* \[Makefile:156: all\] Error 2)](https://root-forum.cern.ch/t/problem-with-root-installation-gmake-makefile-all-error-2/56394)

<div class="topic-metadata">

**Author:** [@FcoNestor](https://root-forum.cern.ch/u/FcoNestor)\
**Replies:** 1\
**Last updated:** [September 18, 2023, 7:33am UTC](https://root-forum.cern.ch/t/problem-with-root-installation-gmake-makefile-all-error-2/56394 "2023-09-18T07:33:43Z")

</div>

Hello everyone, These are my first steps in Root and I have a problem with the installation. After using cmake --build . – -j8 the program compiles up to 28-32% and then it stops and marks: gmake: \*\*\* \[Makefile:156: a…

---

## [No graphical output, no errors either. (Ubuntu on WSL)](https://root-forum.cern.ch/t/no-graphical-output-no-errors-either-ubuntu-on-wsl/37372)

<div class="topic-metadata">

**Author:** [@jadeunimelb](https://root-forum.cern.ch/u/jadeunimelb)\
**Replies:** 6\
**Last updated:** [September 14, 2023, 10:45am UTC](https://root-forum.cern.ch/t/no-graphical-output-no-errors-either-ubuntu-on-wsl/37372 "2023-09-14T10:45:46Z")

</div>

ROOT Version: 6.18/04 Platform: Ubuntu on WSL Compiler: GCC (I think) Hi, I am making my way through a youtube tutorial from ACU Engineering and Physics. Firstly, I notice that when I start ROOT, the splash screen …

---

## [Types.h file not found](https://root-forum.cern.ch/t/types-h-file-not-found/56355)

<div class="topic-metadata">

**Author:** [@cmercier](https://root-forum.cern.ch/u/cmercier)\
**Replies:** 6\
**Last updated:** [September 13, 2023, 4:24pm UTC](https://root-forum.cern.ch/t/types-h-file-not-found/56355 "2023-09-13T16:24:58Z")

</div>

Hi, I miss an included file Types.h in minuit2 stand alone installation How I install: git clone --branch latest-stable https://github.com/root-project/root.git root\_src mkdir build\_minuit2 cd build\_minuit2 cmake …

---

## [TRatioPlot](https://root-forum.cern.ch/t/tratioplot/56348)

<div class="topic-metadata">

**Author:** [@SamuelD](https://root-forum.cern.ch/u/SamuelD)\
**Replies:** 1\
**Last updated:** [September 12, 2023, 2:51pm UTC](https://root-forum.cern.ch/t/tratioplot/56348 "2023-09-12T14:51:39Z")

</div>

Hi, I would like to know what the dashed lines means in the TRatioPlot. It is not explicitly mentioned. I assumed that the middle one is the mean and the two others are one sigma away from the middle one. Is that right…

---

## [Error in cling](https://root-forum.cern.ch/t/error-in-cling/56317)

<div class="topic-metadata">

**Author:** [@JuhiD](https://root-forum.cern.ch/u/JuhiD)\
**Replies:** 3\
**Last updated:** [September 12, 2023, 8:21am UTC](https://root-forum.cern.ch/t/error-in-cling/56317 "2023-09-12T08:21:38Z")

</div>

Dear root users, I am facing a particular error while installing a software (Checkmate) which uses root: Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState: Error in cling::AutoLoadingVisitor::InsertIntoAu…

---

## [Root-config: command not found when trying to execute thisroot.sh](https://root-forum.cern.ch/t/root-config-command-not-found-when-trying-to-execute-thisroot-sh/56276)

<div class="topic-metadata">

**Author:** [@staylor1484](https://root-forum.cern.ch/u/staylor1484)\
**Replies:** 6\
**Last updated:** [September 12, 2023, 1:34am UTC](https://root-forum.cern.ch/t/root-config-command-not-found-when-trying-to-execute-thisroot-sh/56276 "2023-09-12T01:34:33Z")

</div>

Hello, I am trying to install and use ROOT on my Windows 10 laptop but am getting an error message when trying to execute “. /bin/thisroot.sh” It says “root-config: command not found”, however I have double checked that…

---

## [TLatex Script "B" for Branching Ration](https://root-forum.cern.ch/t/tlatex-script-b-for-branching-ration/56316)

<div class="topic-metadata">

**Author:** [@jrs580](https://root-forum.cern.ch/u/jrs580)\
**Replies:** 2\
**Last updated:** [September 11, 2023, 10:05pm UTC](https://root-forum.cern.ch/t/tlatex-script-b-for-branching-ration/56316 "2023-09-11T22:05:42Z")

</div>

Does anyone know how to use this script B that I always see that represents Branching Ratio? See attached photo.

---

## [Error in plugin for start grid analysis](https://root-forum.cern.ch/t/error-in-plugin-for-start-grid-analysis/56321)

<div class="topic-metadata">

**Author:** [@liuha](https://root-forum.cern.ch/u/liuha)\
**Replies:** 1\
**Last updated:** [September 11, 2023, 7:38am UTC](https://root-forum.cern.ch/t/error-in-plugin-for-start-grid-analysis/56321 "2023-09-11T07:38:36Z")

</div>

const TString mcSelector(Form(““tracks”, “filteredTracks”, kTRUE”)); AliAnalysisTaskSVtaskMCFilter\* mcParticleSelector = reinterpret\_cast\<AliAnalysisTaskSVtaskMCFilter\*\>(addSVMC.Exec(mcSelector.Data())); I successfully…

---

## [Number of Particles in an Entry](https://root-forum.cern.ch/t/number-of-particles-in-an-entry/56264)

<div class="topic-metadata">

**Author:** [@Revan](https://root-forum.cern.ch/u/Revan)\
**Replies:** 5\
**Last updated:** [September 10, 2023, 1:24am UTC](https://root-forum.cern.ch/t/number-of-particles-in-an-entry/56264 "2023-09-10T01:24:09Z")

</div>

This question might seem really dumb, but here goes: I have a dataset from a delphes output with the final product being muons. However, I’m not sure how many muons actually were created. I’ve been looking through the d…

---

## [Problem in loading a Macro more than on time](https://root-forum.cern.ch/t/problem-in-loading-a-macro-more-than-on-time/56305)

<div class="topic-metadata">

**Author:** [@GIULIO\_89](https://root-forum.cern.ch/u/GIULIO_89)\
**Replies:** 1\
**Last updated:** [September 8, 2023, 8:36am UTC](https://root-forum.cern.ch/t/problem-in-loading-a-macro-more-than-on-time/56305 "2023-09-08T08:36:42Z")

</div>

\_ROOT Version: 6.20/02 Platform: Ubuntu 20 on WSL2 Compiler: Not Provided Hi all, I am having some issue with a simple Macro i wrote. In principle it should be able to create an histogram, fill it randomly with a g…

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

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