# Newbie

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

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

---

## [What is "Weight" in TGenPhaseSpace Generate function](https://root-forum.cern.ch/t/what-is-weight-in-tgenphasespace-generate-function/31943)

<div class="topic-metadata">

**Author:** [@pauln](https://root-forum.cern.ch/u/pauln)\
**Replies:** 3\
**Last updated:** [January 9, 2019, 8:20pm UTC](https://root-forum.cern.ch/t/what-is-weight-in-tgenphasespace-generate-function/31943 "2019-01-09T20:20:05Z")

</div>

Hi all, I’m glad there is a noobie section, because I’m sure I am missing something trivial here… I am playing with my first simulation using TGenPhaseSpace. I am generating events and then I am going to subsequently w…

---

## [Version with id '6.15/02' does not exist in Jira](https://root-forum.cern.ch/t/version-with-id-6-15-02-does-not-exist-in-jira/32220)

<div class="topic-metadata">

**Author:** [@e\_price](https://root-forum.cern.ch/u/e_price)\
**Replies:** 1\
**Last updated:** [January 9, 2019, 4:07pm UTC](https://root-forum.cern.ch/t/version-with-id-6-15-02-does-not-exist-in-jira/32220 "2019-01-09T16:07:22Z")

</div>

Hi, I am trying to submit a bug report for one of the latest versions of root. I built root using the source code from git using tag v6-15-02, visible using git tag -l. This version is not visible in the dropdown menu t…

---

## [Create an executable with GSL libraries in a Root image](https://root-forum.cern.ch/t/create-an-executable-with-gsl-libraries-in-a-root-image/32204)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 1\
**Last updated:** [January 9, 2019, 7:13am UTC](https://root-forum.cern.ch/t/create-an-executable-with-gsl-libraries-in-a-root-image/32204 "2019-01-09T07:13:07Z")

</div>

Following the solution of my own question here, I could create an executable of my code. Now I need to compile it in the DLX machine in my university. If I understood properly, we have the Root software as a singularity …

---

## [Trouble with displaying scatter plots](https://root-forum.cern.ch/t/trouble-with-displaying-scatter-plots/32199)

<div class="topic-metadata">

**Author:** [@Vangi](https://root-forum.cern.ch/u/Vangi)\
**Replies:** 5\
**Last updated:** [January 8, 2019, 2:51pm UTC](https://root-forum.cern.ch/t/trouble-with-displaying-scatter-plots/32199 "2019-01-08T14:51:43Z")

</div>

Dear ROOTers, I am having difficulty displaying a scatter plot for my analysis. I have attached a couple of canvases, one displaying the default scatter and the other displaying the same scatter plot with the “box” opti…

---

## [How to convert root graphs into .dat format?](https://root-forum.cern.ch/t/how-to-convert-root-graphs-into-dat-format/32184)

<div class="topic-metadata">

**Author:** [@Aqsa\_Shaikh](https://root-forum.cern.ch/u/Aqsa_Shaikh)\
**Replies:** 14\
**Last updated:** [January 8, 2019, 10:08am UTC](https://root-forum.cern.ch/t/how-to-convert-root-graphs-into-dat-format/32184 "2019-01-08T10:08:20Z")

</div>

I am a GEANT4 user I get my output in file.root format, The graphs are in TH1F format. I would like to convert these into .dat format for further refining the output. platform : CentOS 7 root version: ROOT 5.34/36

---

## [TFitResultPtr Constructor](https://root-forum.cern.ch/t/tfitresultptr-constructor/32164)

<div class="topic-metadata">

**Author:** [@luminociter](https://root-forum.cern.ch/u/luminociter)\
**Replies:** 4\
**Last updated:** [January 6, 2019, 2:43pm UTC](https://root-forum.cern.ch/t/tfitresultptr-constructor/32164 "2019-01-06T14:43:24Z")

</div>

Dear rooters, Happy new year to everyone, and best wished for 2019. Now this is probably a stupid question, but i am trying to create a TFitResultPtr object. Now I know this is actually behaving like a smart pointer (it…

---

## [Undefined reference to \`vtable for ROOT::Minuit2' Error](https://root-forum.cern.ch/t/undefined-reference-to-vtable-for-root-minuit2-error/32171)

<div class="topic-metadata">

**Author:** [@christianwos83](https://root-forum.cern.ch/u/christianwos83)\
**Replies:** 2\
**Last updated:** [January 5, 2019, 10:18pm UTC](https://root-forum.cern.ch/t/undefined-reference-to-vtable-for-root-minuit2-error/32171 "2019-01-05T22:18:47Z")

</div>

Hi there, I am trying to compile the following piece of code in CodeBlocks17:12 and I have root 5.34. I have included all the header files and linked all the libraries using the Settings-\>Compiler-\>Search Directories an…

---

## [Use parameters in GetUserInfo()](https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161)

<div class="topic-metadata">

**Author:** [@nvhviet](https://root-forum.cern.ch/u/nvhviet)\
**Replies:** 1\
**Last updated:** [January 5, 2019, 8:19pm UTC](https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161 "2019-01-05T20:19:03Z")

</div>

I search for a way to store some parameters together with tree in root file and some people suggest using GetUserInfo(). Now I can print out the parameters: root \[15\] tree-\>GetUserInfo()-\>Print() Collection name='UserI…

---

## [Minuit2 For Windows](https://root-forum.cern.ch/t/minuit2-for-windows/32131)

<div class="topic-metadata">

**Author:** [@christianwos83](https://root-forum.cern.ch/u/christianwos83)\
**Replies:** 6\
**Last updated:** [December 31, 2018, 3:25pm UTC](https://root-forum.cern.ch/t/minuit2-for-windows/32131 "2018-12-31T15:25:09Z")

</div>

Hi all, Completely new to Root. I am trying to install Minuit2 on Windows10. Is that possible? Thanks in advance.

---

## [2D Histogram not drawing](https://root-forum.cern.ch/t/2d-histogram-not-drawing/32136)

<div class="topic-metadata">

**Author:** [@Maximus12108](https://root-forum.cern.ch/u/Maximus12108)\
**Replies:** 2\
**Last updated:** [December 30, 2018, 4:03pm UTC](https://root-forum.cern.ch/t/2d-histogram-not-drawing/32136 "2018-12-30T16:03:06Z")

</div>

Hi, I’m new to root and need some help understanding why my code wont produce a histogram. I have a data set that I want to fill a 2D histogram with. Where invariant mass (Ws) is on the x-axis and total number of hadron…

---

## [Variable getting mangled during retrieval](https://root-forum.cern.ch/t/variable-getting-mangled-during-retrieval/32110)

<div class="topic-metadata">

**Author:** [@jstock](https://root-forum.cern.ch/u/jstock)\
**Replies:** 14\
**Last updated:** [December 29, 2018, 12:32am UTC](https://root-forum.cern.ch/t/variable-getting-mangled-during-retrieval/32110 "2018-12-29T00:32:51Z")

</div>

Hey experts, I am posting this in Newbie because I am pretty sure it isn’t appropriate for ROOT Forum, but I really hope someone can chime in with past experience looking at a similar issue. This is a big problem for me…

---

## [Calculating new terms from a given root file](https://root-forum.cern.ch/t/calculating-new-terms-from-a-given-root-file/32104)

<div class="topic-metadata">

**Author:** [@Saurav](https://root-forum.cern.ch/u/Saurav)\
**Replies:** 1\
**Last updated:** [December 26, 2018, 10:48am UTC](https://root-forum.cern.ch/t/calculating-new-terms-from-a-given-root-file/32104 "2018-12-26T10:48:20Z")

</div>

I have a file which contains the data regarding event, multiplicity, no. of particle taking part, px,py,pz. From this given data I need to calculate… pt, and phi . How do i do that?

---

## [Restoring the original root file](https://root-forum.cern.ch/t/restoring-the-original-root-file/32101)

<div class="topic-metadata">

**Author:** [@Saurav](https://root-forum.cern.ch/u/Saurav)\
**Replies:** 1\
**Last updated:** [December 25, 2018, 9:03am UTC](https://root-forum.cern.ch/t/restoring-the-original-root-file/32101 "2018-12-25T09:03:35Z")

</div>

I was given a root file, from which I had to calculate Pt and phi. So I went to write a file , where i recreated the original root file so that i can include Pt and phi. Later after compiling it i see that my data from o…

---

## [Draw("P") option not working correctly](https://root-forum.cern.ch/t/draw-p-option-not-working-correctly/32088)

<div class="topic-metadata">

**Author:** [@FlorianB](https://root-forum.cern.ch/u/FlorianB)\
**Replies:** 4\
**Last updated:** [December 23, 2018, 7:49pm UTC](https://root-forum.cern.ch/t/draw-p-option-not-working-correctly/32088 "2018-12-23T19:49:30Z")

</div>

TFile\* event\_time\_per\_cluster(int debug = 0) { //gROOT-\>ProcessLine(".x cbmsim.C"); TCanvas\* c1 = new TCanvas("c1","c1"); TFile\* rec\_root = new TFile("ev100\_12gev\_00001.rec.root", "UPDATE"); rec\_root-\>cd(…

---

## [Assign vector of pointers of type vector\<double\> for branch adressing in selector](https://root-forum.cern.ch/t/assign-vector-of-pointers-of-type-vector-double-for-branch-adressing-in-selector/32054)

<div class="topic-metadata">

**Author:** [@luminociter](https://root-forum.cern.ch/u/luminociter)\
**Replies:** 4\
**Last updated:** [December 19, 2018, 6:09pm UTC](https://root-forum.cern.ch/t/assign-vector-of-pointers-of-type-vector-double-for-branch-adressing-in-selector/32054 "2018-12-19T18:09:16Z")

</div>

Dear rooters, I am trying to write my analysis that inherits from a TSelector (among other classes). In this application I am using root files that have multiple times the same branch for each event, one branch per read…

---

## [Struggling with reading from TTree](https://root-forum.cern.ch/t/struggling-with-reading-from-ttree/32057)

<div class="topic-metadata">

**Author:** [@Jerom](https://root-forum.cern.ch/u/Jerom)\
**Replies:** 2\
**Last updated:** [December 18, 2018, 8:23pm UTC](https://root-forum.cern.ch/t/struggling-with-reading-from-ttree/32057 "2018-12-18T20:23:42Z")

</div>

Hello, I’m trying to read a TTree file with four branches. However when implementing the code analogous to how it is done in some of the simple Tree examples, it gives an error message when setting the Branch address: "…

---

## [How do we iterate through TrackParticles\_v1?](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042)

<div class="topic-metadata">

**Author:** [@rychan](https://root-forum.cern.ch/u/rychan)\
**Replies:** 3\
**Last updated:** [December 18, 2018, 5:27pm UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042 "2018-12-18T17:27:04Z")

</div>

I have a root file that that has a branch with leaves of all sort. I want to iterate and plot histograms with specific headings. From this picture, I am attempting to read and plot data on everything that starts with …

---

## [Bernstein Polynomial + Gaussian (or Crystal Ball) fit to a histogram](https://root-forum.cern.ch/t/bernstein-polynomial-gaussian-or-crystal-ball-fit-to-a-histogram/31953)

<div class="topic-metadata">

**Author:** [@Debajyoti\_Sengupta](https://root-forum.cern.ch/u/Debajyoti_Sengupta)\
**Replies:** 17\
**Last updated:** [December 15, 2018, 10:24am UTC](https://root-forum.cern.ch/t/bernstein-polynomial-gaussian-or-crystal-ball-fit-to-a-histogram/31953 "2018-12-15T10:24:48Z")

</div>

OS: Windows 10 Root Version : ROOT 6.15/01 Hello, I have a histogram that I am trying to fit with a combination of Bernstein Pol (background) and a Gaussian (or a Crystal Ball) for the signal region. Previously, I ha…

---

## [Makefile with gsl libraries](https://root-forum.cern.ch/t/makefile-with-gsl-libraries/32024)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 2\
**Last updated:** [December 15, 2018, 10:44pm UTC](https://root-forum.cern.ch/t/makefile-with-gsl-libraries/32024 "2018-12-15T22:44:40Z")

</div>

I am trying to create a .exe file from my .cpp with ROOT and GSL libraries. My Makefile is: ObjSuf = o SrcSuf = C DllSuf = so OutPutOpt = -o ROOTLIBS = (shell root-config --libs) ROOTG…

---

## [Cannot set include path for external headers in macro](https://root-forum.cern.ch/t/cannot-set-include-path-for-external-headers-in-macro/32015)

<div class="topic-metadata">

**Author:** [@rsharankova](https://root-forum.cern.ch/u/rsharankova)\
**Replies:** 2\
**Last updated:** [December 14, 2018, 6:16pm UTC](https://root-forum.cern.ch/t/cannot-set-include-path-for-external-headers-in-macro/32015 "2018-12-14T18:16:26Z")

</div>

Hello, I am trying to load some external classes to use in a macro. If I add the include path interactively I can successfully include the header. However if I write the following macro test.C: gInterpreter-\>AddInclude…

---

## [Question about TGenPhaseSpace](https://root-forum.cern.ch/t/question-about-tgenphasespace/31947)

<div class="topic-metadata">

**Author:** [@danny](https://root-forum.cern.ch/u/danny)\
**Replies:** 1\
**Last updated:** [December 14, 2018, 11:37am UTC](https://root-forum.cern.ch/t/question-about-tgenphasespace/31947 "2018-12-14T11:37:03Z")

</div>

Hi, I have a question about TGenPhaseSpace. I want to modify the code, and I just tried the first thing, which was just to copy the original and change names. in some other part of your website I found that in order to i…

---

## [Problem was solved](https://root-forum.cern.ch/t/problem-was-solved/32013)

<div class="topic-metadata">

**Author:** [@H4KC3R](https://root-forum.cern.ch/u/H4KC3R)\
**Replies:** 0\
**Last updated:** [December 13, 2018, 9:47pm UTC](https://root-forum.cern.ch/t/problem-was-solved/32013 "2018-12-13T21:47:18Z")

</div>

Problem was solved, thank to all very much!

---

## [Reading vector data from leaves](https://root-forum.cern.ch/t/reading-vector-data-from-leaves/31989)

<div class="topic-metadata">

**Author:** [@shk](https://root-forum.cern.ch/u/shk)\
**Replies:** 1\
**Last updated:** [December 13, 2018, 8:28am UTC](https://root-forum.cern.ch/t/reading-vector-data-from-leaves/31989 "2018-12-13T08:28:16Z")

</div>

I have a tree that contains multiple branches with multiple leaves each. I can read the leaves that contain basic data types, but don’t know how to read leaf data that are themselves vector types and couldn’t find an ex…

---

## [Ownership of TFitResult returned by TGraph](https://root-forum.cern.ch/t/ownership-of-tfitresult-returned-by-tgraph/31945)

<div class="topic-metadata">

**Author:** [@gipetril](https://root-forum.cern.ch/u/gipetril)\
**Replies:** 5\
**Last updated:** [December 12, 2018, 3:35pm UTC](https://root-forum.cern.ch/t/ownership-of-tfitresult-returned-by-tgraph/31945 "2018-12-12T15:35:37Z")

</div>

Hi, I read the “Object ownership” section of the ROOT users guide, and it says: I’m using TGraph::Fit, which returns a TFitResultPtr holding (but, by reading the destructor code, not owning) a pointer to a TFitResult. …

---

## [ROOT version dependent on ssh to CERN computer](https://root-forum.cern.ch/t/root-version-dependent-on-ssh-to-cern-computer/31975)

<div class="topic-metadata">

**Author:** [@Byter](https://root-forum.cern.ch/u/Byter)\
**Replies:** 2\
**Last updated:** [December 12, 2018, 1:03pm UTC](https://root-forum.cern.ch/t/root-version-dependent-on-ssh-to-cern-computer/31975 "2018-12-12T13:03:58Z")

</div>

I’m finding that when I ssh into CERN via the lxplus computer, the version of ROOT that starts up when commanded is ROOT v5, and the plotting macro I’m using works fine, whereas via lxplus7, which assigns me to any given…

---

## [Animated gif, SaveAs() only runs once](https://root-forum.cern.ch/t/animated-gif-saveas-only-runs-once/31970)

<div class="topic-metadata">

**Author:** [@nikB](https://root-forum.cern.ch/u/nikB)\
**Replies:** 1\
**Last updated:** [December 12, 2018, 8:11am UTC](https://root-forum.cern.ch/t/animated-gif-saveas-only-runs-once/31970 "2018-12-12T08:11:45Z")

</div>

I’m trying to make an animated gif. The animation works when the macro is run but it doesn’t save. I end up with a saved single gif image. This is my loop for(int i = 0; i \< 100; i++){ text -\> Clear(); //TPave…

---

## [Cling to use fltk widgets](https://root-forum.cern.ch/t/cling-to-use-fltk-widgets/31794)

<div class="topic-metadata">

**Author:** [@forrest](https://root-forum.cern.ch/u/forrest)\
**Replies:** 2\
**Last updated:** [December 11, 2018, 4:58am UTC](https://root-forum.cern.ch/t/cling-to-use-fltk-widgets/31794 "2018-12-11T04:58:03Z")

</div>

First, I’m unsure how to set a library path and other compiler command-line options for cling. 2nd, the (musical) use I have in mind will require some sort of gui interface, fltk being the most intelligible set of tools…

---

## [Merge pt hard bins for jet-jet MC in PWG-JE](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923)

<div class="topic-metadata">

**Author:** [@Haidar](https://root-forum.cern.ch/u/Haidar)\
**Replies:** 2\
**Last updated:** [December 7, 2018, 12:50pm UTC](https://root-forum.cern.ch/t/merge-pt-hard-bins-for-jet-jet-mc-in-pwg-je/31923 "2018-12-07T12:50:41Z")

</div>

Hi, I run jj MC for 20 different pt hard bins and obtained 20 root files. I am wondering if someone can point where I can get a script to merge the different pt hard and get the pt cross section. Thanks

---

## [TLegend set distance between entry symbol and entry text](https://root-forum.cern.ch/t/tlegend-set-distance-between-entry-symbol-and-entry-text/31902)

<div class="topic-metadata">

**Author:** [@gollumben](https://root-forum.cern.ch/u/gollumben)\
**Replies:** 3\
**Last updated:** [December 6, 2018, 1:18pm UTC](https://root-forum.cern.ch/t/tlegend-set-distance-between-entry-symbol-and-entry-text/31902 "2018-12-06T13:18:28Z")

</div>

Hi, I am trying to adjust the distance between an entry symbol (i.e. the marker, line, filled box, etc.) and its text in TLegend independent of its margin (i.e. its width). Is this possible somehow? Cheers, Ben

---

## [What function can be used to fit to a pt-distribution?](https://root-forum.cern.ch/t/what-function-can-be-used-to-fit-to-a-pt-distribution/31904)

<div class="topic-metadata">

**Author:** [@LoekMeijers](https://root-forum.cern.ch/u/LoekMeijers)\
**Replies:** 1\
**Last updated:** [December 6, 2018, 11:38am UTC](https://root-forum.cern.ch/t/what-function-can-be-used-to-fit-to-a-pt-distribution/31904 "2018-12-06T11:38:05Z")

</div>

Dear Root community, Does anyone happen to know what function type can be fitted to a pt- distributions such as the following:ap\_vs\_sp\_ranges\_10M.pdf (47.7 KB) Best regards, Loek Meijers

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

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