# Newbie

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

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

---

## [Convert data from a software to root](https://root-forum.cern.ch/t/convert-data-from-a-software-to-root/41304)

<div class="topic-metadata">

**Author:** [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Replies:** 29\
**Last updated:** [September 9, 2020, 4:12pm UTC](https://root-forum.cern.ch/t/convert-data-from-a-software-to-root/41304 "2020-09-09T16:12:18Z")

</div>

Hi ! I got a script which converts the data in a rarely popular software to root format. But there is some kind of mistakes in this script and I am getting error while converting into root format. Could you please help…

---

## [Using ACLiC to compile a macaro](https://root-forum.cern.ch/t/using-aclic-to-compile-a-macaro/41349)

<div class="topic-metadata">

**Author:** [@bogomyag](https://root-forum.cern.ch/u/bogomyag)\
**Replies:** 6\
**Last updated:** [September 25, 2020, 4:21am UTC](https://root-forum.cern.ch/t/using-aclic-to-compile-a-macaro/41349 "2020-09-25T04:21:24Z")

</div>

Hello I am using ROOT 6.22/02 on Windows 10 (https://root.cern/download/root\_v6.22.02.win32.vc16.exe) with Visual studio Community 2019 and trying to run script hsimple.C with ACLiC and I get errors below. I tried to r…

---

## [How can I normalize an Energy Spectrum by solid angle?](https://root-forum.cern.ch/t/how-can-i-normalize-an-energy-spectrum-by-solid-angle/41546)

<div class="topic-metadata">

**Author:** [@Elisabetta\_Di\_Franco](https://root-forum.cern.ch/u/Elisabetta_Di_Franco)\
**Replies:** 1\
**Last updated:** [September 24, 2020, 3:06pm UTC](https://root-forum.cern.ch/t/how-can-i-normalize-an-energy-spectrum-by-solid-angle/41546 "2020-09-24T15:06:01Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.18 Platform: Ubuntu Compiler: Not Provided Hello to everyone, I have some energy spectra in the center of mass reference syste…

---

## [TMultigraph not drawing all data](https://root-forum.cern.ch/t/tmultigraph-not-drawing-all-data/41556)

<div class="topic-metadata">

**Author:** [@AleCalamida](https://root-forum.cern.ch/u/AleCalamida)\
**Replies:** 8\
**Last updated:** [September 23, 2020, 2:48pm UTC](https://root-forum.cern.ch/t/tmultigraph-not-drawing-all-data/41556 "2020-09-23T14:48:36Z")

</div>

Dear all, I have a problemi with the TMultigraph() funcition. I have to plot a large number of data in my graphs. The strange things is that when I use the TGraph() the plot are drawn fine without any errors. Instead, w…

---

## [Run mu mcaros in virtual gate](https://root-forum.cern.ch/t/run-mu-mcaros-in-virtual-gate/36947)

<div class="topic-metadata">

**Author:** [@omrghad](https://root-forum.cern.ch/u/omrghad)\
**Replies:** 2\
**Last updated:** [September 23, 2020, 2:44pm UTC](https://root-forum.cern.ch/t/run-mu-mcaros-in-virtual-gate/36947 "2020-09-23T14:44:04Z")

</div>

please,when running my macro i have this error!: \[G4-cerr\] \*\*\*\*\* Illegal application state \</gate/source/addSource xraygun\> \*\*\*\*\* \[Gate\] Sorry, error in a macro command : abort. can you help me please

---

## [How to select the histogram inside my root file in TBrowser?](https://root-forum.cern.ch/t/how-to-select-the-histogram-inside-my-root-file-in-tbrowser/41399)

<div class="topic-metadata">

**Author:** [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Replies:** 7\
**Last updated:** [September 22, 2020, 7:16pm UTC](https://root-forum.cern.ch/t/how-to-select-the-histogram-inside-my-root-file-in-tbrowser/41399 "2020-09-22T19:16:15Z")

</div>

Dear All, I have a root file in which I am able to see all the 24 histograms in “TBrowser”. Now while writing the macro for calibration I have to select only one spectrum. Could you please help? What should be the smal…

---

## [Saving a fit at a root file](https://root-forum.cern.ch/t/saving-a-fit-at-a-root-file/41510)

<div class="topic-metadata">

**Author:** [@luminociter](https://root-forum.cern.ch/u/luminociter)\
**Replies:** 2\
**Last updated:** [September 22, 2020, 7:09am UTC](https://root-forum.cern.ch/t/saving-a-fit-at-a-root-file/41510 "2020-09-22T07:09:44Z")

</div>

Dear Experts, I have a code comprised of several classes and functions, one of which is responsible for fitting. This function will take as an argument a vector and the kind of fit and will return two values of interest…

---

## [Fixing the value of the sum of multiple parameters](https://root-forum.cern.ch/t/fixing-the-value-of-the-sum-of-multiple-parameters/41484)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 11\
**Last updated:** [September 21, 2020, 5:48pm UTC](https://root-forum.cern.ch/t/fixing-the-value-of-the-sum-of-multiple-parameters/41484 "2020-09-21T17:48:36Z")

</div>

Hi, I was wondering if there is a way to fix parameter limits on the sum of multiple parameters. Something like: g-\>FixPar(1+2+3,1) where 1,2,3 are fitting parameters and 1 is the value to fix the sum to. Is this in a…

---

## [Running ROOT macros using LXPLUS](https://root-forum.cern.ch/t/running-root-macros-using-lxplus/41525)

<div class="topic-metadata">

**Author:** [@steven\_sani](https://root-forum.cern.ch/u/steven_sani)\
**Replies:** 6\
**Last updated:** [September 21, 2020, 5:44pm UTC](https://root-forum.cern.ch/t/running-root-macros-using-lxplus/41525 "2020-09-21T17:44:16Z")

</div>

I am trying to use the LXPLUS service to run my own ROOT macros. I can successfully access ROOT itself, however, I do not know how to access the path “.:/usr/share/root/macros” to paste my macros. Could you help me with …

---

## [XML parsing for I/O](https://root-forum.cern.ch/t/xml-parsing-for-i-o/41514)

<div class="topic-metadata">

**Author:** [@Andrea\_Falzetti](https://root-forum.cern.ch/u/Andrea_Falzetti)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 8:02pm UTC](https://root-forum.cern.ch/t/xml-parsing-for-i-o/41514 "2020-09-20T20:02:09Z")

</div>

Hi, First of all i apologize in advance if this question wastes anybody’s time but i am a total newbie. I need to parse an XML file and i am having issues using the TXMLEngine class in order to do that. I am trying to…

---

## [Get Number of Divisions in a TCanvas](https://root-forum.cern.ch/t/get-number-of-divisions-in-a-tcanvas/41495)

<div class="topic-metadata">

**Author:** [@Erdrick](https://root-forum.cern.ch/u/Erdrick)\
**Replies:** 8\
**Last updated:** [September 18, 2020, 2:41pm UTC](https://root-forum.cern.ch/t/get-number-of-divisions-in-a-tcanvas/41495 "2020-09-18T14:41:25Z")

</div>

ROOT Version: v6.14.06 Platform: Ubuntu 16.04.6 LTS Compiler: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 I would like to have a way of obtaining the number of “divisions” in a TCanvas. I looked in the ROOT d…

---

## [Correct way to initialize array of histograms?](https://root-forum.cern.ch/t/correct-way-to-initialize-array-of-histograms/41493)

<div class="topic-metadata">

**Author:** [@MartinSerfling](https://root-forum.cern.ch/u/MartinSerfling)\
**Replies:** 2\
**Last updated:** [September 18, 2020, 7:07am UTC](https://root-forum.cern.ch/t/correct-way-to-initialize-array-of-histograms/41493 "2020-09-18T07:07:14Z")

</div>

Hi Rooters, I was trying to send an array of histograms to a class and realized through the highlighting of my editor that I might be using a weird or unnecessary way of declaring my arrays of histograms. So far I used …

---

## [Scaling histogram and filling](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459)

<div class="topic-metadata">

**Author:** [@Chris1](https://root-forum.cern.ch/u/Chris1)\
**Replies:** 2\
**Last updated:** [September 16, 2020, 7:38am UTC](https://root-forum.cern.ch/t/scaling-histogram-and-filling/41459 "2020-09-16T07:38:38Z")

</div>

I am measureing some radiation, and i want to subtract a measured background radiation from my histogram. The background is not measured over the same length of time, so i need to scale it up before i can subtract. i tr…

---

## [How does the Add function work?](https://root-forum.cern.ch/t/how-does-the-add-function-work/41448)

<div class="topic-metadata">

**Author:** [@leon1122](https://root-forum.cern.ch/u/leon1122)\
**Replies:** 5\
**Last updated:** [September 16, 2020, 7:41am UTC](https://root-forum.cern.ch/t/how-does-the-add-function-work/41448 "2020-09-16T07:41:01Z")

</div>

I am testing out the add function on TProfiles to see how it works. Below, I create a profile with all y values at 10 and another profile with all y values at 5. I then subtract the second profile from the first profile …

---

## [Fill a histogram](https://root-forum.cern.ch/t/fill-a-histogram/41421)

<div class="topic-metadata">

**Author:** [@Fateme](https://root-forum.cern.ch/u/Fateme)\
**Replies:** 14\
**Last updated:** [September 15, 2020, 5:21am UTC](https://root-forum.cern.ch/t/fill-a-histogram/41421 "2020-09-15T05:21:25Z")

</div>

Hello guys, Here I have a code, I wanna create a histogram but I can’t. What’s the matter? Tips for Efficient and Successful Posting \[Badom.root (1.7 MB) #include \<array\> #include \<string\> #include \<vector\> #include \<…

---

## [Optimal shift value](https://root-forum.cern.ch/t/optimal-shift-value/41366)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [September 15, 2020, 2:44am UTC](https://root-forum.cern.ch/t/optimal-shift-value/41366 "2020-09-15T02:44:17Z")

</div>

Dear, I have two TH1’s, which in the ideal case should be very similar (typical data/MC plot). However, you can see with the naked eye that there is a shift difference between the two. Is there a function/test/way to f…

---

## [Weighted Histogram not being generated as smooth curve using draw option "c"](https://root-forum.cern.ch/t/weighted-histogram-not-being-generated-as-smooth-curve-using-draw-option-c/41428)

<div class="topic-metadata">

**Author:** [@EkNishchey](https://root-forum.cern.ch/u/EkNishchey)\
**Replies:** 1\
**Last updated:** [September 14, 2020, 7:54am UTC](https://root-forum.cern.ch/t/weighted-histogram-not-being-generated-as-smooth-curve-using-draw-option-c/41428 "2020-09-14T07:54:57Z")

</div>

Hi there! Hope you’re doing well. I’ve been trying to obtain a weighted histogram through following code: TH1F \*Hist=new TH1F("Hist","Hist",100,-10,10); for(unsigned int b=0;b\<limit;b++){ hist-\>Fill(neg\_a\[b\],neg\_b\[b\])…

---

## [Error: no matching constructor for initialization](https://root-forum.cern.ch/t/error-no-matching-constructor-for-initialization/41372)

<div class="topic-metadata">

**Author:** [@RPaun](https://root-forum.cern.ch/u/RPaun)\
**Replies:** 7\
**Last updated:** [September 14, 2020, 1:19am UTC](https://root-forum.cern.ch/t/error-no-matching-constructor-for-initialization/41372 "2020-09-14T01:19:03Z")

</div>

Hello everyone, I am trying to read data from a txt file and I keep bumping into this: \*\*\*error:\*\* \*\*no matching constructor for initialization of 'std::fstream' (aka 'basic\_fstream\<char\>')\*\* Here is the code: fstrea…

---

## [Draw line instead of zigzag line](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 3\
**Last updated:** [September 13, 2020, 6:44pm UTC](https://root-forum.cern.ch/t/draw-line-instead-of-zigzag-line/41420 "2020-09-13T18:44:25Z")

</div>

Hi want to draw line instead of zigzag line as here in attachment.! Screenshot from 2020-09-13 13-02-28|690x387

---

## [ROOT 5 on Mac OS 10.15?](https://root-forum.cern.ch/t/root-5-on-mac-os-10-15/41412)

<div class="topic-metadata">

**Author:** [@shazaldinho](https://root-forum.cern.ch/u/shazaldinho)\
**Replies:** 1\
**Last updated:** [September 12, 2020, 3:58pm UTC](https://root-forum.cern.ch/t/root-5-on-mac-os-10-15/41412 "2020-09-12T15:58:29Z")

</div>

Hi guys, I’m very new to root and coding and got a little bit stuck. I’ve downloaded root 6 on my laptop already but my supervisor says that my project would be easier with root 5.34 since a lot of the code is already w…

---

## [Formatting Problems](https://root-forum.cern.ch/t/formatting-problems/41347)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 11\
**Last updated:** [September 11, 2020, 11:13am UTC](https://root-forum.cern.ch/t/formatting-problems/41347 "2020-09-11T11:13:03Z")

</div>

Hello, I am making a plot and a residual plot. I am having some formatting problems. The y-axis label on my runner plot is too high. I want the runner plot to span the same width that my main plot does, but now it is …

---

## [A ROOT method that open a GUI window show you the list of variables and memory](https://root-forum.cern.ch/t/a-root-method-that-open-a-gui-window-show-you-the-list-of-variables-and-memory/41352)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 2\
**Last updated:** [September 10, 2020, 5:54pm UTC](https://root-forum.cern.ch/t/a-root-method-that-open-a-gui-window-show-you-the-list-of-variables-and-memory/41352 "2020-09-10T17:54:51Z")

</div>

Hi, I know there is a method in ROOT which will open a GUI window and show you the list of variables and memory. I used it before but today I can’t find it anyway :frowning:. It’s not complicated, I remember it’s in a …

---

## [Plotting individual points on a TGraph?](https://root-forum.cern.ch/t/plotting-individual-points-on-a-tgraph/41368)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 1\
**Last updated:** [September 10, 2020, 5:11am UTC](https://root-forum.cern.ch/t/plotting-individual-points-on-a-tgraph/41368 "2020-09-10T05:11:06Z")

</div>

Using, a TGraph (well, at least I think a TGraph would be best here), how do I go about plotting individual points? By individual points, I mean that I want to plot locations on a coordinate plane as single dots, no curv…

---

## [Residual plot with TGraphErrors Object](https://root-forum.cern.ch/t/residual-plot-with-tgrapherrors-object/41326)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 3\
**Last updated:** [September 9, 2020, 9:19am UTC](https://root-forum.cern.ch/t/residual-plot-with-tgrapherrors-object/41326 "2020-09-09T09:19:21Z")

</div>

Hello, I am trying to make a residual plot of point-fit/error, but I am using TGraphErrors object, so it doesn’t work the same way as with TH1F. Does somebody know how to do it? alpha\_0\_beta\_and\_C01.cxx (3.5 KB) alpha\_…

---

## [Creating c++ file to extract data from root output](https://root-forum.cern.ch/t/creating-c-file-to-extract-data-from-root-output/41240)

<div class="topic-metadata">

**Author:** [@Nkuba1982](https://root-forum.cern.ch/u/Nkuba1982)\
**Replies:** 6\
**Last updated:** [September 8, 2020, 5:14pm UTC](https://root-forum.cern.ch/t/creating-c-file-to-extract-data-from-root-output/41240 "2020-09-08T17:14:37Z")

</div>

Hello I have a root file from simulation, and wanted a C++ file to extract from it several information including number of coincidences, trues coincidences, scatter and random coincidences. What energy between gamma1 an…

---

## [Making Branches with class objects](https://root-forum.cern.ch/t/making-branches-with-class-objects/41292)

<div class="topic-metadata">

**Author:** [@Natilus](https://root-forum.cern.ch/u/Natilus)\
**Replies:** 2\
**Last updated:** [September 8, 2020, 5:10pm UTC](https://root-forum.cern.ch/t/making-branches-with-class-objects/41292 "2020-09-08T17:10:46Z")

</div>

Dear experts, I am trying to make a tree with 4 branches, Module0, Module1, Module2, Module3. I have created a simple class called Data with 7 uint32\_t data members as follows: class Data { public: uint32\_t module; …

---

## [Split Root File in two separate Files](https://root-forum.cern.ch/t/split-root-file-in-two-separate-files/41333)

<div class="topic-metadata">

**Author:** [@C\_S](https://root-forum.cern.ch/u/C_S)\
**Replies:** 2\
**Last updated:** [September 8, 2020, 12:15pm UTC](https://root-forum.cern.ch/t/split-root-file-in-two-separate-files/41333 "2020-09-08T12:15:11Z")

</div>

Hey all, I am using a root file to read values from it, the file is called main.root. The root file consists of a tree “myvalues” and several branches like “Energy”, “Momentum”, “Event”. Now I would like to separate my…

---

## [How to improve exponential decay fit](https://root-forum.cern.ch/t/how-to-improve-exponential-decay-fit/41328)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 1\
**Last updated:** [September 8, 2020, 6:37am UTC](https://root-forum.cern.ch/t/how-to-improve-exponential-decay-fit/41328 "2020-09-08T06:37:31Z")

</div>

Dear all, Could anyone please suggest to me how I can improve this exponential decay fit? Here is the input file I am reading from 2 3692 4 2356 6 1555 8 949 10 607 12 410 14 247 16 173 18 126 20 90 22 66 24 44 26 36 …

---

## [Problem positioning two pads](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 2\
**Last updated:** [September 7, 2020, 7:08pm UTC](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306 "2020-09-07T19:08:16Z")

</div>

Hello, I am having trouble trying to draw two pads to a canvas. I want a runner plot on the bottom, but my code seems to be putting the second pad on top of the first one. alpha\_0\_beta\_and\_C01.cxx (3.7 KB) alpha\_0\_bet…

---

## [Is it possible to normalize or divide one axis of THnSparse by another TH1D histogram when we do THnSparse::Projection in 2D?](https://root-forum.cern.ch/t/is-it-possible-to-normalize-or-divide-one-axis-of-thnsparse-by-another-th1d-histogram-when-we-do-thnsparse-projection-in-2d/41296)

<div class="topic-metadata">

**Author:** [@kneupane1](https://root-forum.cern.ch/u/kneupane1)\
**Replies:** 3\
**Last updated:** [September 7, 2020, 6:24pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-normalize-or-divide-one-axis-of-thnsparse-by-another-th1d-histogram-when-we-do-thnsparse-projection-in-2d/41296 "2020-09-07T18:24:49Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.18/04 \_Compiler:c++

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

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