# Newbie

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

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

---

## [How to sum two TLorenzVectors in c++?](https://root-forum.cern.ch/t/how-to-sum-two-tlorenzvectors-in-c/48764)

<div class="topic-metadata">

**Author:** [@Daumann](https://root-forum.cern.ch/u/Daumann)\
**Replies:** 2\
**Last updated:** [February 11, 2022, 1:41pm UTC](https://root-forum.cern.ch/t/how-to-sum-two-tlorenzvectors-in-c/48764 "2022-02-11T13:41:15Z")

</div>

HI, Sorry to bother with this simple task, but how can I sum and take the invariant mass of a pair of four vectors?. I have written the following script to read information of a tree and store it in a two four vectors: …

---

## [Problem with Writing Class Objects to TTrees that contain std::tuple\<double, double, double\> varialbes](https://root-forum.cern.ch/t/problem-with-writing-class-objects-to-ttrees-that-contain-std-tuple-double-double-double-varialbes/48749)

<div class="topic-metadata">

**Author:** [@andrew](https://root-forum.cern.ch/u/andrew)\
**Replies:** 2\
**Last updated:** [February 11, 2022, 9:41am UTC](https://root-forum.cern.ch/t/problem-with-writing-class-objects-to-ttrees-that-contain-std-tuple-double-double-double-varialbes/48749 "2022-02-11T09:41:35Z")

</div>

Greetings, I am currently facing a problem with regards to writing class objects that contain the STL class object std::tuple\<double, double, double\> to TTrees. I have recreated the essence of my problem in the followin…

---

## [Adding text to the center of a TEllipse](https://root-forum.cern.ch/t/adding-text-to-the-center-of-a-tellipse/48747)

<div class="topic-metadata">

**Author:** [@Fr4nk](https://root-forum.cern.ch/u/Fr4nk)\
**Replies:** 1\
**Last updated:** [February 10, 2022, 2:58pm UTC](https://root-forum.cern.ch/t/adding-text-to-the-center-of-a-tellipse/48747 "2022-02-10T14:58:19Z")

</div>

Hi all, I would like to generate an ellipse with text at its center. I am able to generate an ellipse fine and all, curious to see if there is a way to place some text at its center, like if there is some option or fun…

---

## [Filling a histogram in Rint from a TFile Tree](https://root-forum.cern.ch/t/filling-a-histogram-in-rint-from-a-tfile-tree/48745)

<div class="topic-metadata">

**Author:** [@preimer](https://root-forum.cern.ch/u/preimer)\
**Replies:** 2\
**Last updated:** [February 10, 2022, 1:58pm UTC](https://root-forum.cern.ch/t/filling-a-histogram-in-rint-from-a-tfile-tree/48745 "2022-02-10T13:58:00Z")

</div>

Hello, I would like to create a histogram in root’s memory, open a TFile, fill the histogram from a TTree in that file, close the file and still have the filled histogram in memory. Below is a snippet of code that does…

---

## [TRatioPlot with TimeDisplay](https://root-forum.cern.ch/t/tratioplot-with-timedisplay/39927)

<div class="topic-metadata">

**Author:** [@hohshita](https://root-forum.cern.ch/u/hohshita)\
**Replies:** 25\
**Last updated:** [February 9, 2022, 3:29pm UTC](https://root-forum.cern.ch/t/tratioplot-with-timedisplay/39927 "2022-02-09T15:29:42Z")

</div>

Dear all, I’d like to draw the ratio plot with time units. As attached file below, I created a simple example modified from ‘$ROOTSYS/tutorials/graphs/timeonaxis2.C.’ Actually, only 4 lines add to the original as belo…

---

## [What are the meaning of the parameters of TGeoMaterial(name, a ,z, rho)?](https://root-forum.cern.ch/t/what-are-the-meaning-of-the-parameters-of-tgeomaterial-name-a-z-rho/48705)

<div class="topic-metadata">

**Author:** [@Frederic\_Faure](https://root-forum.cern.ch/u/Frederic_Faure)\
**Replies:** 4\
**Last updated:** [February 9, 2022, 1:34pm UTC](https://root-forum.cern.ch/t/what-are-the-meaning-of-the-parameters-of-tgeomaterial-name-a-z-rho/48705 "2022-02-09T13:34:06Z")

</div>

Hello, i try to learn how to use TGeom package. what are the meaning of the parameters a ,z, rho in the constructor TGeoMaterial(name, a ,z, rho) ? I see examples, but i don’t find explanations. Thanks, Frédéric. …

---

## [PyROOT : "Could not convert argument to buffer or nullptr"](https://root-forum.cern.ch/t/pyroot-could-not-convert-argument-to-buffer-or-nullptr/48699)

<div class="topic-metadata">

**Author:** [@tmaurin](https://root-forum.cern.ch/u/tmaurin)\
**Replies:** 2\
**Last updated:** [February 9, 2022, 11:21am UTC](https://root-forum.cern.ch/t/pyroot-could-not-convert-argument-to-buffer-or-nullptr/48699 "2022-02-09T11:21:36Z")

</div>

Dear experts, While playing with PyROOT to make a function that manually rebins histograms in a specific way, I discovered a behavior that I cannot explain. I am sorry if the problem is obvious as I am not very experim…

---

## [Filling the branches of a tree in PyROOT](https://root-forum.cern.ch/t/filling-the-branches-of-a-tree-in-pyroot/48702)

<div class="topic-metadata">

**Author:** [@Daumann](https://root-forum.cern.ch/u/Daumann)\
**Replies:** 2\
**Last updated:** [February 9, 2022, 10:40am UTC](https://root-forum.cern.ch/t/filling-the-branches-of-a-tree-in-pyroot/48702 "2022-02-09T10:40:54Z")

</div>

Hi, I wrote a simple script in python where I tried to fill a tree branch with an array that has two entries, but only the first entry in filled into the tree branch. The code is the following: import ROOT as root impo…

---

## [Filling TTree with strings insert only first TString](https://root-forum.cern.ch/t/filling-ttree-with-strings-insert-only-first-tstring/48656)

<div class="topic-metadata">

**Author:** [@TheEnigmist](https://root-forum.cern.ch/u/TheEnigmist)\
**Replies:** 5\
**Last updated:** [February 9, 2022, 8:46am UTC](https://root-forum.cern.ch/t/filling-ttree-with-strings-insert-only-first-tstring/48656 "2022-02-09T08:46:35Z")

</div>

ROOT Version:6.24/06 Platform: linux/docker Hello, I’m trying to create a TTree with a std::vector wich has inside a TString. The problem is that only first string is stored and all other are ignored. I will provide…

---

## [Evaluation value from a function](https://root-forum.cern.ch/t/evaluation-value-from-a-function/48693)

<div class="topic-metadata">

**Author:** [@Saradindu](https://root-forum.cern.ch/u/Saradindu)\
**Replies:** 6\
**Last updated:** [February 7, 2022, 8:52pm UTC](https://root-forum.cern.ch/t/evaluation-value-from-a-function/48693 "2022-02-07T20:52:22Z")

</div>

I have a function eff = exp\[c0+c1log(x)+c2(log(x))\*\*2\] The input is like this : x y ey 450 16770 515 1600 10924 …

---

## [AddLast() {TClonesArray}](https://root-forum.cern.ch/t/addlast-tclonesarray/48665)

<div class="topic-metadata">

**Author:** [@EVTO](https://root-forum.cern.ch/u/EVTO)\
**Replies:** 2\
**Last updated:** [February 7, 2022, 1:50pm UTC](https://root-forum.cern.ch/t/addlast-tclonesarray/48665 "2022-02-07T13:50:05Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hi. The function AddLast() creates a copy of the object in the array o…

---

## [Binning in root file](https://root-forum.cern.ch/t/binning-in-root-file/48667)

<div class="topic-metadata">

**Author:** [@JunKai](https://root-forum.cern.ch/u/JunKai)\
**Replies:** 3\
**Last updated:** [February 7, 2022, 9:24am UTC](https://root-forum.cern.ch/t/binning-in-root-file/48667 "2022-02-07T09:24:31Z")

</div>

Hi everyone, I am curious that when viewing the histogram of a single branch in a TTree (I opened up a root file and clicked on the branch to view the histogram), why does in some of the case, the rebin option is less f…

---

## [cannot extract standard library include paths](https://root-forum.cern.ch/t/cannot-extract-standard-library-include-paths/48633)

<div class="topic-metadata">

**Author:** [@Alzahraa\_Farrag](https://root-forum.cern.ch/u/Alzahraa_Farrag)\
**Replies:** 6\
**Last updated:** [February 7, 2022, 9:23am UTC](https://root-forum.cern.ch/t/cannot-extract-standard-library-include-paths/48633 "2022-02-07T09:23:06Z")

</div>

I am using ROOT for data analysis. I am trying to run the command ( …/…/…/…/CreateNolanFrames.exe corrOut\_T4T3\_y2021m03d30h19m58s38\_p20samp.txt 8 ), but I got the error ( ERROR in cling::CIFactory::createCI(): cann…

---

## [How to open root after installing?](https://root-forum.cern.ch/t/how-to-open-root-after-installing/48680)

<div class="topic-metadata">

**Author:** [@joshpf](https://root-forum.cern.ch/u/joshpf)\
**Replies:** 1\
**Last updated:** [February 7, 2022, 4:48am UTC](https://root-forum.cern.ch/t/how-to-open-root-after-installing/48680 "2022-02-07T04:48:28Z")

</div>

Hello, My computer BSOD after “.q” in root. Now I open ubuntu and use “root” command and it says that command does not exist. How do I open root again? ROOT Version: Not Provided Platform: Ubuntu on WSL Compiler: Not…

---

## [Nan value of Mean in histogram](https://root-forum.cern.ch/t/nan-value-of-mean-in-histogram/48678)

<div class="topic-metadata">

**Author:** [@Sima\_Bashiri](https://root-forum.cern.ch/u/Sima_Bashiri)\
**Replies:** 1\
**Last updated:** [February 6, 2022, 8:47pm UTC](https://root-forum.cern.ch/t/nan-value-of-mean-in-histogram/48678 "2022-02-06T20:47:14Z")

</div>

Hi, I have a question about one of my drawn histograms. What’s the reason for nan value of Mean as you see? What I understand from the shape of this hist, the mean must be around -0.3, but I don’t know why it shows Na…

---

## [Use ROOT in VS 2022](https://root-forum.cern.ch/t/use-root-in-vs-2022/48653)

<div class="topic-metadata">

**Author:** [@khoitsma](https://root-forum.cern.ch/u/khoitsma)\
**Replies:** 2\
**Last updated:** [February 4, 2022, 8:18am UTC](https://root-forum.cern.ch/t/use-root-in-vs-2022/48653 "2022-02-04T08:18:12Z")

</div>

Trying to use ROOT with VS 2022. ROOT works well from the command line outside VS. Within VS, I used NuGet to install latest ROOT package (534.36.13). Received this message “This ROOT package supports only Visual Stud…

---

## [No matching function for call to 'bindFunction'](https://root-forum.cern.ch/t/no-matching-function-for-call-to-bindfunction/48577)

<div class="topic-metadata">

**Author:** [@Nea](https://root-forum.cern.ch/u/Nea)\
**Replies:** 6\
**Last updated:** [February 4, 2022, 7:59am UTC](https://root-forum.cern.ch/t/no-matching-function-for-call-to-bindfunction/48577 "2022-02-04T07:59:06Z")

</div>

Hello. This is the continuation of this. Forcing value to zero I don’t know I write this code on a new topic or on old one. TF1\* f = new TF1("f", "1/\[2\]/\[2\]\*(\[0\] \*( (\[1\]\*\[1\])/((\[2\]\*\[2\])\*(1-\[1\])\*(1-\[1\])) + \[1\]/(1-\[1\])\*…

---

## [New software in ubuntu LTS 20.04.3](https://root-forum.cern.ch/t/new-software-in-ubuntu-lts-20-04-3/48639)

<div class="topic-metadata">

**Author:** [@psharma1137](https://root-forum.cern.ch/u/psharma1137)\
**Replies:** 4\
**Last updated:** [February 3, 2022, 4:49pm UTC](https://root-forum.cern.ch/t/new-software-in-ubuntu-lts-20-04-3/48639 "2022-02-03T16:49:10Z")

</div>

I am installing a new software in ubuntu LTS 20.04.3. Its called NiasMARS. It is a .sh file. But i cant seem to get away with this error of compling root libraries. I dont have much experience with Linux and commands. Ca…

---

## [Importing Ansys 2021 Fields to Garfield++](https://root-forum.cern.ch/t/importing-ansys-2021-fields-to-garfield/48144)

<div class="topic-metadata">

**Author:** [@drift.phys](https://root-forum.cern.ch/u/drift.phys)\
**Replies:** 3\
**Last updated:** [February 3, 2022, 1:37pm UTC](https://root-forum.cern.ch/t/importing-ansys-2021-fields-to-garfield/48144 "2022-02-03T13:37:51Z")

</div>

I am trying to export field data from Ansys 2021 R2 into Garfield++ for gas gain multiplication. After building the model in Ansys, I realized the export model structure in the newer versions of Ansys has changed from wh…

---

## [Events with exactly two Taus in RDataFrame](https://root-forum.cern.ch/t/events-with-exactly-two-taus-in-rdataframe/47983)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 1\
**Last updated:** [December 7, 2021, 6:26pm UTC](https://root-forum.cern.ch/t/events-with-exactly-two-taus-in-rdataframe/47983 "2021-12-07T18:26:38Z")

</div>

Hello rooters, I am having some trouble trying to figure out how to make a “cut” in a data frame, such as the only events that pass the filter are those events with two taus. I have a branch of tree called TauPt which …

---

## [Trigonometric](https://root-forum.cern.ch/t/trigonometric/48642)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 2\
**Last updated:** [February 3, 2022, 7:02am UTC](https://root-forum.cern.ch/t/trigonometric/48642 "2022-02-03T07:02:48Z")

</div>

Hello, I know this is a really basic question. I get confused this with other languages. I need to know how to code atan2 in root/C++ tan x= x0/y0 ----- r0=sqrt(x0^2 + y0^2)) sin x= x0/r0 cox x= y0/r0 (…

---

## [Variable Title - Mutiple Lines](https://root-forum.cern.ch/t/variable-title-mutiple-lines/48625)

<div class="topic-metadata">

**Author:** [@michiD](https://root-forum.cern.ch/u/michiD)\
**Replies:** 5\
**Last updated:** [February 3, 2022, 4:58am UTC](https://root-forum.cern.ch/t/variable-title-mutiple-lines/48625 "2022-02-03T04:58:58Z")

</div>

Platform: Linux / C++ Compiler: Clang Hello, I want label my y-axis with multiple lines. For example first line = velocity second line = m/s I use mg-\>GetYaxis ()-\>SetTitle ( ("#splitline{velocity}}…

---

## [Trees and objects](https://root-forum.cern.ch/t/trees-and-objects/48606)

<div class="topic-metadata">

**Author:** [@EVTO](https://root-forum.cern.ch/u/EVTO)\
**Replies:** 4\
**Last updated:** [January 31, 2022, 2:44pm UTC](https://root-forum.cern.ch/t/trees-and-objects/48606 "2022-01-31T14:44:43Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hi. I want to create a tree with a branch collecting events (1 event f…

---

## [How to get the Cumulative Distribution of Data?](https://root-forum.cern.ch/t/how-to-get-the-cumulative-distribution-of-data/48559)

<div class="topic-metadata">

**Author:** [@makor](https://root-forum.cern.ch/u/makor)\
**Replies:** 2\
**Last updated:** [January 31, 2022, 2:01pm UTC](https://root-forum.cern.ch/t/how-to-get-the-cumulative-distribution-of-data/48559 "2022-01-31T14:01:07Z")

</div>

Dear experts, I am currently trying to get the integral fct. of real world data. I have the data in ASCII format and already produced TGraph Objects to store them in a ROOT File. The data has the shape of the derivati…

---

## [Generating a Shared Library (.so) out of a lot of a lot of .cpp and .hpp files via ROOT?](https://root-forum.cern.ch/t/generating-a-shared-library-so-out-of-a-lot-of-a-lot-of-cpp-and-hpp-files-via-root/48576)

<div class="topic-metadata">

**Author:** [@andrew](https://root-forum.cern.ch/u/andrew)\
**Replies:** 17\
**Last updated:** [January 31, 2022, 10:35am UTC](https://root-forum.cern.ch/t/generating-a-shared-library-so-out-of-a-lot-of-a-lot-of-cpp-and-hpp-files-via-root/48576 "2022-01-31T10:35:36Z")

</div>

Greetings, I would like to create a shared library for several .hpp and .cpp files that I have created. Typically, when I want to use a class (say, that I have a class defined a class called Event in the files Event.hpp …

---

## [Warning in \<TTree::ReadStream\>: Couldn't read formatted data in "Voltaje(mV)" for branch Voltaje(mV) on line 1](https://root-forum.cern.ch/t/warning-in-ttree-readstream-couldnt-read-formatted-data-in-voltaje-mv-for-branch-voltaje-mv-on-line-1/48560)

<div class="topic-metadata">

**Author:** [@acgc99](https://root-forum.cern.ch/u/acgc99)\
**Replies:** 10\
**Last updated:** [January 31, 2022, 10:18am UTC](https://root-forum.cern.ch/t/warning-in-ttree-readstream-couldnt-read-formatted-data-in-voltaje-mv-for-branch-voltaje-mv-on-line-1/48560 "2022-01-31T10:18:31Z")

</div>

Hi, I’m new to ROOT and C++. I need to read a .csv file for plotting. I share with you the file. This is the .c file: void CurvasUmbral() { TTree \*tree = new TTree("tree", "tree title"); tree-\>ReadFile("CurvasUmbr…

---

## [LZMA/src/LZMA/lib/liblzma.lib', needed by 'bin/Core.dll', missing and no known rule to make it](https://root-forum.cern.ch/t/lzma-src-lzma-lib-liblzma-lib-needed-by-bin-core-dll-missing-and-no-known-rule-to-make-it/48613)

<div class="topic-metadata">

**Author:** [@subham73](https://root-forum.cern.ch/u/subham73)\
**Replies:** 9\
**Last updated:** [January 31, 2022, 8:22am UTC](https://root-forum.cern.ch/t/lzma-src-lzma-lib-liblzma-lib-needed-by-bin-core-dll-missing-and-no-known-rule-to-make-it/48613 "2022-01-31T08:22:39Z")

</div>

I’m new to vsc++ and root. want to contribute but I’m struggling to compile root files with this error message "LZMA/src/LZMA/lib/liblzma.lib', needed by 'bin/Core.dll', missing and no known rule to make it" for over 3 d…

---

## [How to define a C++ map](https://root-forum.cern.ch/t/how-to-define-a-c-map/48513)

<div class="topic-metadata">

**Author:** [@acgc99](https://root-forum.cern.ch/u/acgc99)\
**Replies:** 15\
**Last updated:** [January 29, 2022, 8:24pm UTC](https://root-forum.cern.ch/t/how-to-define-a-c-map/48513 "2022-01-29T20:24:07Z")

</div>

Hi, I’m trying to store information in a C++ map (I’m new to C++ and ROOT), but I’m struggling. If I do: map\<Char\_t, Int\_t\> myMap = {{'a',2}, {'b', 3}}; I get: Syntax Error: map\<Char\_t,Int\_t\> myMap= C:\\Users\\acgc9\\De…

---

## [Conda package with debug symbols](https://root-forum.cern.ch/t/conda-package-with-debug-symbols/48579)

<div class="topic-metadata">

**Author:** [@renyhp](https://root-forum.cern.ch/u/renyhp)\
**Replies:** 2\
**Last updated:** [January 28, 2022, 5:10am UTC](https://root-forum.cern.ch/t/conda-package-with-debug-symbols/48579 "2022-01-28T05:10:03Z")

</div>

Hi! I’ve installed ROOT via conda, and it works very nicely. However, when I debug my executable via gdb, ROOT objects are inaccessible. I am under the impression that there are no debug symbols in the ROOT installation…

---

## [Legend to the right of the graph](https://root-forum.cern.ch/t/legend-to-the-right-of-the-graph/48554)

<div class="topic-metadata">

**Author:** [@michiD](https://root-forum.cern.ch/u/michiD)\
**Replies:** 6\
**Last updated:** [January 26, 2022, 3:51pm UTC](https://root-forum.cern.ch/t/legend-to-the-right-of-the-graph/48554 "2022-01-26T15:51:15Z")

</div>

ROOT Version: Platform: Linux Compiler: Clang 11.0.0 x86\_64 / C++ Hello, I want to plot the legend of the graph I draw to the right of the graph. If I use TGraph \*g\[matrix\_of\_cell\_values.size ()\]; TMultiGraph …

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

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