# Newbie

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

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

---

## [Z scale and color pallete](https://root-forum.cern.ch/t/z-scale-and-color-pallete/57765)

<div class="topic-metadata">

**Author:** [@Sandy](https://root-forum.cern.ch/u/Sandy)\
**Replies:** 6\
**Last updated:** [January 10, 2024, 7:12am UTC](https://root-forum.cern.ch/t/z-scale-and-color-pallete/57765 "2024-01-10T07:12:27Z")

</div>

Dear Rooters, In a 2D plot, the z count starts from 10^-2 (with the option ‘colz’). When I start it from 1 using hist-\>SetMinimum(1), the color pattern changes which is obvious. How to conserve the same color pattern (…

---

## [Axis title in histogram gets cut by the canvas](https://root-forum.cern.ch/t/axis-title-in-histogram-gets-cut-by-the-canvas/57783)

<div class="topic-metadata">

**Author:** [@Michelangelo](https://root-forum.cern.ch/u/Michelangelo)\
**Replies:** 2\
**Last updated:** [January 9, 2024, 4:30pm UTC](https://root-forum.cern.ch/t/axis-title-in-histogram-gets-cut-by-the-canvas/57783 "2024-01-09T16:30:44Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.26/11 \_Platform: Scientific Linux 6.7 Compiler: Not Provided Hi experts, I have a histogram in a root file, and I want to plo…

---

## [Problem with error: entry with relative path at the root level is not discoverable](https://root-forum.cern.ch/t/problem-with-error-entry-with-relative-path-at-the-root-level-is-not-discoverable/54971)

<div class="topic-metadata">

**Author:** [@user1234](https://root-forum.cern.ch/u/user1234)\
**Replies:** 2\
**Last updated:** [January 6, 2024, 6:16pm UTC](https://root-forum.cern.ch/t/problem-with-error-entry-with-relative-path-at-the-root-level-is-not-discoverable/54971 "2024-01-06T18:16:05Z")

</div>

Hello, I am very new to Root and C++ so any help would be appreciated. I have a MacBook running MacOS 13.3 so I downloaded the binary package from Root’s website and unpackaged the tar file. After that, I sourced it by …

---

## [Voigt function (Gamma is HWHM or FWHM)](https://root-forum.cern.ch/t/voigt-function-gamma-is-hwhm-or-fwhm/57742)

<div class="topic-metadata">

**Author:** [@gurmukh\_dhindsa](https://root-forum.cern.ch/u/gurmukh_dhindsa)\
**Replies:** 1\
**Last updated:** [January 6, 2024, 12:47pm UTC](https://root-forum.cern.ch/t/voigt-function-gamma-is-hwhm-or-fwhm/57742 "2024-01-06T12:47:36Z")

</div>

I have a very simple question , in ROOT I am trying to fit voigt distribution using TF1 \*voigtFit = new TF1(“voigtFit”, “\[0\]\*TMath::Voigt(x - \[1\], \[2\], \[3\])” and I am getting Fitted Parameters: Amplitude: 6268.05 Mea…

---

## [Read histograms from multiple ROOT files](https://root-forum.cern.ch/t/read-histograms-from-multiple-root-files/57748)

<div class="topic-metadata">

**Author:** [@Michelangelo](https://root-forum.cern.ch/u/Michelangelo)\
**Replies:** 2\
**Last updated:** [January 5, 2024, 2:57pm UTC](https://root-forum.cern.ch/t/read-histograms-from-multiple-root-files/57748 "2024-01-05T14:57:31Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.26/11 \_Platform: Scientific Linux 6.7 Compiler: Not Provided Hi everyone, I have some ROOT files, named HistoOutMcDY\_1.root, H…

---

## [How to extract information event by event](https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716)

<div class="topic-metadata">

**Author:** [@iamaanand](https://root-forum.cern.ch/u/iamaanand)\
**Replies:** 1\
**Last updated:** [January 2, 2024, 8:48am UTC](https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716 "2024-01-02T08:48:29Z")

</div>

I have done some simulation with 10k events. I am storing the information by creating NTuple. Finally I am getting an overall spectrum where the number of entries are 213234. For each individual event there is a simil…

---

## [Strange bug when download files from lxplus to local machine](https://root-forum.cern.ch/t/strange-bug-when-download-files-from-lxplus-to-local-machine/57464)

<div class="topic-metadata">

**Author:** [@LongHoa](https://root-forum.cern.ch/u/LongHoa)\
**Replies:** 9\
**Last updated:** [December 31, 2023, 5:45pm UTC](https://root-forum.cern.ch/t/strange-bug-when-download-files-from-lxplus-to-local-machine/57464 "2023-12-31T17:45:09Z")

</div>

Hello, I encountered a strange bug when I download root files containing only histograms (TH1D) from lxplus to my local machine. The files can be read normally on lxplus, but after they are downloaded to my local machi…

---

## [Looping over root files in a folder](https://root-forum.cern.ch/t/looping-over-root-files-in-a-folder/57711)

<div class="topic-metadata">

**Author:** [@Michelangelo](https://root-forum.cern.ch/u/Michelangelo)\
**Replies:** 4\
**Last updated:** [December 30, 2023, 4:37pm UTC](https://root-forum.cern.ch/t/looping-over-root-files-in-a-folder/57711 "2023-12-30T16:37:23Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.26/11 \_Platform: Scientific Linux 6.7 Compiler: Not Provided Hi, I am quite new to ROOT, so please apologise any mistakes. I …

---

## [TCanvas c1; command not working](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693)

<div class="topic-metadata">

**Author:** [@Kaleb\_Harrison](https://root-forum.cern.ch/u/Kaleb_Harrison)\
**Replies:** 3\
**Last updated:** [December 30, 2023, 12:40pm UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693 "2023-12-30T12:40:57Z")

</div>

I followed the physics\_matters tutorial on youtube to download the ROOT program for windows through wsl, but I cannot get the TCanvas c1: command to produce a canvas. I have tried running sudo apt install libtiff-tools, …

---

## [Kernel dies in jupyter notebook when I try to import root\_pandas](https://root-forum.cern.ch/t/kernel-dies-in-jupyter-notebook-when-i-try-to-import-root-pandas/57697)

<div class="topic-metadata">

**Author:** [@Vikas\_Raj](https://root-forum.cern.ch/u/Vikas_Raj)\
**Replies:** 3\
**Last updated:** [December 28, 2023, 8:37pm UTC](https://root-forum.cern.ch/t/kernel-dies-in-jupyter-notebook-when-i-try-to-import-root-pandas/57697 "2023-12-28T20:37:02Z")

</div>

Hello Everyone, I want to use root\_pandas with Python via Jupyter Notebook/Lab. When I try to import root\_pandas via Jupyter Notebook ,it results in a dead kernel. Are there any alternatives for this. I am using minic…

---

## [Passing variable arguments to Define in RDataFrame](https://root-forum.cern.ch/t/passing-variable-arguments-to-define-in-rdataframe/57662)

<div class="topic-metadata">

**Author:** [@nicconflo](https://root-forum.cern.ch/u/nicconflo)\
**Replies:** 2\
**Last updated:** [December 27, 2023, 11:11pm UTC](https://root-forum.cern.ch/t/passing-variable-arguments-to-define-in-rdataframe/57662 "2023-12-27T23:11:59Z")

</div>

Hi all, I’m a bit new to using RDataFrame, so I was wondering if someone had some insight on how to implement this. I have a function (let’s say a simple linear polynomial) that I wish to operate on every element in a t…

---

## [SetTitle method not working](https://root-forum.cern.ch/t/settitle-method-not-working/57528)

<div class="topic-metadata">

**Author:** [@amishgog](https://root-forum.cern.ch/u/amishgog)\
**Replies:** 13\
**Last updated:** [December 23, 2023, 2:27am UTC](https://root-forum.cern.ch/t/settitle-method-not-working/57528 "2023-12-23T02:27:32Z")

</div>

So I have the following code #include "lhcbStyle.C" void Analysis1() { lhcbStyle(); // Opening a file using TChain TChain \*TreeData = new TChain("Xbc2JpsiPhip/DecayTree"); TreeData-\>Add("myrootfile"); // Defini…

---

## [Extracting mean after fitting a distribution](https://root-forum.cern.ch/t/extracting-mean-after-fitting-a-distribution/57610)

<div class="topic-metadata">

**Author:** [@iamaanand](https://root-forum.cern.ch/u/iamaanand)\
**Replies:** 10\
**Last updated:** [December 22, 2023, 11:53am UTC](https://root-forum.cern.ch/t/extracting-mean-after-fitting-a-distribution/57610 "2023-12-22T11:53:09Z")

</div>

I am able a fit a distribution using a fitting function "\[1\]\*(exp(0.5\*(log(2)/\[0\])\*((log(2)/\[0\])\*\[2\]\*\*2-2\*x))\*TMath::Erfc(((log(2)/\[0\])\*\[2\]\*\*2-x)/(sqrt(2)\*\[2\])))" Now I am interested to get the mean of this distributio…

---

## [Building Cling Interpreter with libxml2 external library](https://root-forum.cern.ch/t/building-cling-interpreter-with-libxml2-external-library/57616)

<div class="topic-metadata">

**Author:** [@cw2636](https://root-forum.cern.ch/u/cw2636)\
**Replies:** 10\
**Last updated:** [December 22, 2023, 11:27am UTC](https://root-forum.cern.ch/t/building-cling-interpreter-with-libxml2-external-library/57616 "2023-12-22T11:27:57Z")

</div>

Hello, I am trying to build a custom cling interpreter with libxml2 already loaded using the cling Interpreter source file attached below. I build my cling Interpreter using the command below: g++ -c -o cling.o -Iinclu…

---

## [Needing assistance with an error in a script for viewing branches](https://root-forum.cern.ch/t/needing-assistance-with-an-error-in-a-script-for-viewing-branches/57626)

<div class="topic-metadata">

**Author:** [@psharma1137](https://root-forum.cern.ch/u/psharma1137)\
**Replies:** 6\
**Last updated:** [December 22, 2023, 9:20am UTC](https://root-forum.cern.ch/t/needing-assistance-with-an-error-in-a-script-for-viewing-branches/57626 "2023-12-22T09:20:21Z")

</div>

I tried writing a code to open up files and search through the branches, but I am getting the following error. I don’t know if the error alone can help identify the problem, so please let me know if I need to upload the …

---

## [Creating ROOT executable with input arguments](https://root-forum.cern.ch/t/creating-root-executable-with-input-arguments/57477)

<div class="topic-metadata">

**Author:** [@samuelb91](https://root-forum.cern.ch/u/samuelb91)\
**Replies:** 4\
**Last updated:** [December 21, 2023, 3:17pm UTC](https://root-forum.cern.ch/t/creating-root-executable-with-input-arguments/57477 "2023-12-21T15:17:51Z")

</div>

Hi there, I’m pretty new to ROOT, and not sure if there’s a simple answer to this, but I figured this forum would be a good place to ask. If I’m mistaken, apologies in advance. I have a ROOT macro. I can run the macro …

---

## [Add Arguments to Unnamed Root Macro Without Screwing Everything Up](https://root-forum.cern.ch/t/add-arguments-to-unnamed-root-macro-without-screwing-everything-up/57565)

<div class="topic-metadata">

**Author:** [@Lynne](https://root-forum.cern.ch/u/Lynne)\
**Replies:** 5\
**Last updated:** [December 21, 2023, 3:58pm UTC](https://root-forum.cern.ch/t/add-arguments-to-unnamed-root-macro-without-screwing-everything-up/57565 "2023-12-21T15:58:34Z")

</div>

Hey, So there is this repository X, which I did not make and do not fully understand that I have to incorporate into my code so that it can perform one (1) single function. I tried to write my script that uses the class…

---

## [Tutorial for beginner (TTree::MakeClass TTree::MakeSelector)](https://root-forum.cern.ch/t/tutorial-for-beginner-ttree-makeclass-ttree-makeselector/57321)

<div class="topic-metadata">

**Author:** [@rafal4](https://root-forum.cern.ch/u/rafal4)\
**Replies:** 13\
**Last updated:** [December 21, 2023, 11:49am UTC](https://root-forum.cern.ch/t/tutorial-for-beginner-ttree-makeclass-ttree-makeselector/57321 "2023-12-21T11:49:35Z")

</div>

Hello, I would like to ask if you can recommend me a tutorial for a very beginner? I received root files with data. I can already write a simple macro that opens a root file, draw a graph, a histogram, and save it to …

---

## [How to set X axis range after using SetNdivisions?](https://root-forum.cern.ch/t/how-to-set-x-axis-range-after-using-setndivisions/57597)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 9\
**Last updated:** [December 21, 2023, 9:11am UTC](https://root-forum.cern.ch/t/how-to-set-x-axis-range-after-using-setndivisions/57597 "2023-12-21T09:11:36Z")

</div>

Hi everyone, I have a TH1I histogram comprising of values in \[1,2,3,4\]. I used TH1\* h\_hit = new TH1I("h1", "Hist", 6, 0-0.5, 6-0.5); and after filling h1-\>SetNdivisions(6); so as to adjust the bin centers like t…

---

## [How to draw a bar chart?](https://root-forum.cern.ch/t/how-to-draw-a-bar-chart/57587)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 3\
**Last updated:** [December 19, 2023, 9:19am UTC](https://root-forum.cern.ch/t/how-to-draw-a-bar-chart/57587 "2023-12-19T09:19:05Z")

</div>

Hello everyone, I have a long list of integers from the values 1, 2, 3, and 4. I try plotting a histogram of the data using. TH1\* h\_mult = new TH1I("h\_mult", "Multiplicity", 5, 0, 5); Then use the baroption to draw i…

---

## [SetFillColor TGraph is not working](https://root-forum.cern.ch/t/setfillcolor-tgraph-is-not-working/57590)

<div class="topic-metadata">

**Author:** [@Miguel](https://root-forum.cern.ch/u/Miguel)\
**Replies:** 7\
**Last updated:** [December 18, 2023, 4:40pm UTC](https://root-forum.cern.ch/t/setfillcolor-tgraph-is-not-working/57590 "2023-12-18T16:40:38Z")

</div>

Hi all! I have been trying to plot a TGraph but I keep failing. The idea is the following: we have two graphs, up and down, which are upper-lower limits. Between these lines, a median line is shown as well. My idea is t…

---

## [Compiling my own analysis in MadAnalysis5 expert mode](https://root-forum.cern.ch/t/compiling-my-own-analysis-in-madanalysis5-expert-mode/57569)

<div class="topic-metadata">

**Author:** [@Qazi\_murad](https://root-forum.cern.ch/u/Qazi_murad)\
**Replies:** 2\
**Last updated:** [December 18, 2023, 11:39am UTC](https://root-forum.cern.ch/t/compiling-my-own-analysis-in-madanalysis5-expert-mode/57569 "2023-12-18T11:39:09Z")

</div>

Hi, I am trying to compile my analysis in MA5 expert mode but I got an error given below: =========================================================== There was a crash. This is the entire stack trace of all threads: ===…

---

## [How do I switch from the laboratory reference frame to the center of mass system? ](https://root-forum.cern.ch/t/how-do-i-switch-from-the-laboratory-reference-frame-to-the-center-of-mass-system/57558)

<div class="topic-metadata">

**Author:** [@filveronika](https://root-forum.cern.ch/u/filveronika)\
**Replies:** 1\
**Last updated:** [December 15, 2023, 7:53am UTC](https://root-forum.cern.ch/t/how-do-i-switch-from-the-laboratory-reference-frame-to-the-center-of-mass-system/57558 "2023-12-15T07:53:11Z")

</div>

Hello! Dear users, could you tell me what the problem is? I need to switch from the laboratory reference frame to the center of mass system of the virtual photon-proton system. I read the particle data from the file, the…

---

## [How to save selected events from a ROOT file to another file?](https://root-forum.cern.ch/t/how-to-save-selected-events-from-a-root-file-to-another-file/57110)

<div class="topic-metadata">

**Author:** [@praha](https://root-forum.cern.ch/u/praha)\
**Replies:** 2\
**Last updated:** [December 14, 2023, 8:41pm UTC](https://root-forum.cern.ch/t/how-to-save-selected-events-from-a-root-file-to-another-file/57110 "2023-12-14T20:41:30Z")

</div>

Hi! I want to save a small subset of events with a certain branch from a series of rootfiles onto a single new rootfile. file=0 chain = ROOT.TChain("cbmsim") path="path/to/files/" for inputFile in os.listdir(path): …

---

## [Filling the histogram with Value/Sum](https://root-forum.cern.ch/t/filling-the-histogram-with-value-sum/57463)

<div class="topic-metadata">

**Author:** [@Noor1](https://root-forum.cern.ch/u/Noor1)\
**Replies:** 5\
**Last updated:** [December 14, 2023, 5:45pm UTC](https://root-forum.cern.ch/t/filling-the-histogram-with-value-sum/57463 "2023-12-14T17:45:27Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Dear All, I have a data file, and I want to sum all the data then fil…

---

## [How to open multiple root files at once?](https://root-forum.cern.ch/t/how-to-open-multiple-root-files-at-once/57549)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [December 14, 2023, 4:09pm UTC](https://root-forum.cern.ch/t/how-to-open-multiple-root-files-at-once/57549 "2023-12-14T16:09:53Z")

</div>

Hi Root users, I have two root files that contain a histogram named h9. Is it possible to open them once and access both histograms at once in the CLI session? Currently doing -L file.root file2.root only stores ro…

---

## [Error in CMake with FairRoot](https://root-forum.cern.ch/t/error-in-cmake-with-fairroot/57205)

<div class="topic-metadata">

**Author:** [@Harriet\_Kumi](https://root-forum.cern.ch/u/Harriet_Kumi)\
**Replies:** 7\
**Last updated:** [December 14, 2023, 4:02pm UTC](https://root-forum.cern.ch/t/error-in-cmake-with-fairroot/57205 "2023-12-14T16:02:59Z")

</div>

Good morning, I tried to add root to my Cmake( I have attached my CMakeLists.txt). I am new to CMake and root as well. I want to include FairRunAna in my main.cpp file, but I get this error when building my cmake. Pleas…

---

## [THStack histogram with markers and no error bars](https://root-forum.cern.ch/t/thstack-histogram-with-markers-and-no-error-bars/57547)

<div class="topic-metadata">

**Author:** [@elemental](https://root-forum.cern.ch/u/elemental)\
**Replies:** 1\
**Last updated:** [December 14, 2023, 1:50pm UTC](https://root-forum.cern.ch/t/thstack-histogram-with-markers-and-no-error-bars/57547 "2023-12-14T13:50:06Z")

</div>

Hi, I am working building a THStack from several histograms on a single canvas. I would like to plot the histograms with only markers and no error bars, Unlike what I see in the attached figure, I would like remove the …

---

## [Windows 10: how to find .rootrc and set macro search path](https://root-forum.cern.ch/t/windows-10-how-to-find-rootrc-and-set-macro-search-path/57534)

<div class="topic-metadata">

**Author:** [@izen](https://root-forum.cern.ch/u/izen)\
**Replies:** 1\
**Last updated:** [December 14, 2023, 7:54am UTC](https://root-forum.cern.ch/t/windows-10-how-to-find-rootrc-and-set-macro-search-path/57534 "2023-12-14T07:54:26Z")

</div>

ROOT Version: 6 Platform: Windows 10 Compiler: Not Provided I have installed Visual studio, Python and the latest root binary on my windows pc. A vanilla, out of the box installation. Root launches just fine, but whe…

---

## [No member named 'apply' in namespace 'std](https://root-forum.cern.ch/t/no-member-named-apply-in-namespace-std/57522)

<div class="topic-metadata">

**Author:** [@cw2636](https://root-forum.cern.ch/u/cw2636)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 2:36pm UTC](https://root-forum.cern.ch/t/no-member-named-apply-in-namespace-std/57522 "2023-12-13T14:36:40Z")

</div>

I install cling using the instructions here Cling Build Instructions - ROOT. The installation was successful and can use cling anywhere in my bash shell. I created a test script which looks like script.cxx //#! /usr/lo…

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

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