# Newbie

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

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

---

## [Error when drawing a histogram](https://root-forum.cern.ch/t/error-when-drawing-a-histogram/34218)

<div class="topic-metadata">

**Author:** [@Christoph\_Vogl](https://root-forum.cern.ch/u/Christoph_Vogl)\
**Replies:** 8\
**Last updated:** [May 24, 2019, 1:06pm UTC](https://root-forum.cern.ch/t/error-when-drawing-a-histogram/34218 "2019-05-24T13:06:26Z")

</div>

I am analysing gamma ray spectra and create histograms out of them. Those spectra get fitted multiple times because each peak gets fitted individually. I save my original spectrum (hSpectrumUncalibrated), the one where I…

---

## [Ploting the data from a txt file](https://root-forum.cern.ch/t/ploting-the-data-from-a-txt-file/34238)

<div class="topic-metadata">

**Author:** [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Replies:** 4\
**Last updated:** [May 24, 2019, 11:57am UTC](https://root-forum.cern.ch/t/ploting-the-data-from-a-txt-file/34238 "2019-05-24T11:57:52Z")

</div>

Hello everyone, Can you please assist me in plotting a graphs for the first column against each column from the following text file 19-05-10.txt (1.1 MB) i’m not sure if it is histogram or ntuple thank you in advance

---

## [Filling Histograms with a text file](https://root-forum.cern.ch/t/filling-histograms-with-a-text-file/34190)

<div class="topic-metadata">

**Author:** [@JorgeM](https://root-forum.cern.ch/u/JorgeM)\
**Replies:** 20\
**Last updated:** [May 23, 2019, 1:44pm UTC](https://root-forum.cern.ch/t/filling-histograms-with-a-text-file/34190 "2019-05-23T13:44:40Z")

</div>

Hi, I am new to ROOT and I am trying to create a macro for a 1-D histogram which is filled with a .txt file, but I don’t really know how to do it. I’ve read some recommendations on other forums on how to do this, but wh…

---

## [Contours from minos for arbitrary sigma level](https://root-forum.cern.ch/t/contours-from-minos-for-arbitrary-sigma-level/33483)

<div class="topic-metadata">

**Author:** [@afylot](https://root-forum.cern.ch/u/afylot)\
**Replies:** 2\
**Last updated:** [May 23, 2019, 11:34am UTC](https://root-forum.cern.ch/t/contours-from-minos-for-arbitrary-sigma-level/33483 "2019-05-23T11:34:16Z")

</div>

I am trying to achieve something that is a modification of some of the standard tasks minimization of chi2 and uncertainties on parameters: starting from chi2 function, find the parameters contours as obtained from mino…

---

## [Accessing Delphes Tree leaf variables without delphes installation](https://root-forum.cern.ch/t/accessing-delphes-tree-leaf-variables-without-delphes-installation/34173)

<div class="topic-metadata">

**Author:** [@luclepot](https://root-forum.cern.ch/u/luclepot)\
**Replies:** 4\
**Last updated:** [May 23, 2019, 7:58am UTC](https://root-forum.cern.ch/t/accessing-delphes-tree-leaf-variables-without-delphes-installation/34173 "2019-05-23T07:58:35Z")

</div>

Hi, I have a Delphes style tree in which there are branches with leaves that appear to be arrays of their own right. I would like to access the leaf variables using a TChain, but can not figure out how to do so. Here i…

---

## [Plotting two graphs with different with axis on the same pad](https://root-forum.cern.ch/t/plotting-two-graphs-with-different-with-axis-on-the-same-pad/34199)

<div class="topic-metadata">

**Author:** [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 2:50pm UTC](https://root-forum.cern.ch/t/plotting-two-graphs-with-different-with-axis-on-the-same-pad/34199 "2019-05-22T14:50:02Z")

</div>

Hello Root family Can you please assist me, i wanna plot two graphs on the same pad with different axes. i managed to get the axes but they same to be the same and the data i’m supposed to display its not showing. Here…

---

## [Calculate the energy of points in the detector volume](https://root-forum.cern.ch/t/calculate-the-energy-of-points-in-the-detector-volume/34197)

<div class="topic-metadata">

**Author:** [@ideaisgenerator](https://root-forum.cern.ch/u/ideaisgenerator)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 2:42pm UTC](https://root-forum.cern.ch/t/calculate-the-energy-of-points-in-the-detector-volume/34197 "2019-05-22T14:42:33Z")

</div>

How in root to calculate the energy of points in the detector volume? There are 10 different volumes in the detector and need to know the accumulated energy for each individual volume. Thanks !

---

## [WARNING! SOAP ERROR, while contacting the Manager/Job](https://root-forum.cern.ch/t/warning-soap-error-while-contacting-the-manager-job/34196)

<div class="topic-metadata">

**Author:** [@chengtt0406](https://root-forum.cern.ch/u/chengtt0406)\
**Replies:** 1\
**Last updated:** [May 22, 2019, 12:13pm UTC](https://root-forum.cern.ch/t/warning-soap-error-while-contacting-the-manager-job/34196 "2019-05-22T12:13:17Z")

</div>

Hi all, I am submitting my jobs to the grid…There should be 42 jobs, but now it stoppe at 5th job, and there is the error: The code before worked well, I don’t know why I have the weird error now … Can you help me ? …

---

## [How to create a histogram TH2F](https://root-forum.cern.ch/t/how-to-create-a-histogram-th2f/34167)

<div class="topic-metadata">

**Author:** [@ideaisgenerator](https://root-forum.cern.ch/u/ideaisgenerator)\
**Replies:** 4\
**Last updated:** [May 21, 2019, 6:40am UTC](https://root-forum.cern.ch/t/how-to-create-a-histogram-th2f/34167 "2019-05-21T06:40:52Z")

</div>

Hi everyone. How to draw a histogram of accumulated energy in different volumes?

---

## [Error while running a macro to view and convert root data into text file](https://root-forum.cern.ch/t/error-while-running-a-macro-to-view-and-convert-root-data-into-text-file/32195)

<div class="topic-metadata">

**Author:** [@Aqsa\_Shaikh](https://root-forum.cern.ch/u/Aqsa_Shaikh)\
**Replies:** 5\
**Last updated:** [May 20, 2019, 8:36am UTC](https://root-forum.cern.ch/t/error-while-running-a-macro-to-view-and-convert-root-data-into-text-file/32195 "2019-05-20T08:36:14Z")

</div>

I am using a macro to write my root graph data into text, Following crash is happening when I try to view my root graph using a browser If required I will give details of the macro. Following is the stack of error tha…

---

## [SetMoreLogLabels for TEfficiency?](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122)

<div class="topic-metadata">

**Author:** [@armin.kadlecsik](https://root-forum.cern.ch/u/armin.kadlecsik)\
**Replies:** 5\
**Last updated:** [May 20, 2019, 8:20am UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122 "2019-05-20T08:20:40Z")

</div>

Hello, I am trying to create a TEfficiency histogram with values very close together, so I’ve switched the canvas to logarithmic scale on the y axis. (TCanvas c-\>setLogy()). This results in the figure I’ve attached. b…

---

## [Reading Files in different directory](https://root-forum.cern.ch/t/reading-files-in-different-directory/34145)

<div class="topic-metadata">

**Author:** [@Yogeshraj\_N](https://root-forum.cern.ch/u/Yogeshraj_N)\
**Replies:** 1\
**Last updated:** [May 19, 2019, 7:59am UTC](https://root-forum.cern.ch/t/reading-files-in-different-directory/34145 "2019-05-19T07:59:56Z")

</div>

I use ROOT v5.34.38 in Ubuntu 16.04 I am also new to the Forums section. By default, ROOT is only found to execute files that are stored in “macros” sub-directory in “root” main directory. How can I access files in an …

---

## [How to plot a particle from Particle\_PID branch?](https://root-forum.cern.ch/t/how-to-plot-a-particle-from-particle-pid-branch/34125)

<div class="topic-metadata">

**Author:** [@julia\_49](https://root-forum.cern.ch/u/julia_49)\
**Replies:** 1\
**Last updated:** [May 18, 2019, 6:12am UTC](https://root-forum.cern.ch/t/how-to-plot-a-particle-from-particle-pid-branch/34125 "2019-05-18T06:12:08Z")

</div>

Hello, I know that this is a really simple question: I want to plot a histogram from the branch called “Particle\_PID”. I know that eg the top-quarks are the number 6 (according to the PDG IDs). Now I want to plot the hi…

---

## [How to read function documentation](https://root-forum.cern.ch/t/how-to-read-function-documentation/34106)

<div class="topic-metadata">

**Author:** [@Jabberspocky](https://root-forum.cern.ch/u/Jabberspocky)\
**Replies:** 7\
**Last updated:** [May 17, 2019, 8:48pm UTC](https://root-forum.cern.ch/t/how-to-read-function-documentation/34106 "2019-05-17T20:48:01Z")

</div>

This is probably a standard C++ thing, but I’m a C++ noob. What I’m looking for is something similar to Python’s help(function\_name), something that will just tell me what a function takes as input and what it does. I g…

---

## [Cannot draw canvas - root runtime error](https://root-forum.cern.ch/t/cannot-draw-canvas-root-runtime-error/34041)

<div class="topic-metadata">

**Author:** [@jbrummer](https://root-forum.cern.ch/u/jbrummer)\
**Replies:** 13\
**Last updated:** [May 15, 2019, 1:35pm UTC](https://root-forum.cern.ch/t/cannot-draw-canvas-root-runtime-error/34041 "2019-05-15T13:35:04Z")

</div>

Hi. I installed root v5-34-34 patches as instructed in this forum (https://root-forum.cern.ch/t/trouble-installing/18046/11) and it seemed as if all was fine. When I try to draw a TGraph, for instance, or execute one of …

---

## [Crossing point of two signals(function)](https://root-forum.cern.ch/t/crossing-point-of-two-signals-function/33805)

<div class="topic-metadata">

**Author:** [@AA360c](https://root-forum.cern.ch/u/AA360c)\
**Replies:** 26\
**Last updated:** [May 14, 2019, 9:02am UTC](https://root-forum.cern.ch/t/crossing-point-of-two-signals-function/33805 "2019-05-14T09:02:11Z")

</div>

Hi boys, I’m really glad to start ROOT learning. Would anyone be kind enough to help a beginner ? Well, i have two plot that i could draw them successfully. Next i draw them at ones Canvas using “same”. Okay, Now i’m l…

---

## [Getting value of histogram values.. Help](https://root-forum.cern.ch/t/getting-value-of-histogram-values-help/34008)

<div class="topic-metadata">

**Author:** [@Mustafa\_KOSMAZ](https://root-forum.cern.ch/u/Mustafa_KOSMAZ)\
**Replies:** 2\
**Last updated:** [May 14, 2019, 12:47am UTC](https://root-forum.cern.ch/t/getting-value-of-histogram-values-help/34008 "2019-05-14T00:47:39Z")

</div>

I need to know about getting values of any histogram and print it out to .txt file.

---

## [Convert a csv file into ROOT format](https://root-forum.cern.ch/t/convert-a-csv-file-into-root-format/33217)

<div class="topic-metadata">

**Author:** [@addy369](https://root-forum.cern.ch/u/addy369)\
**Replies:** 2\
**Last updated:** [May 13, 2019, 1:56pm UTC](https://root-forum.cern.ch/t/convert-a-csv-file-into-root-format/33217 "2019-05-13T13:56:51Z")

</div>

I am a complete newbie to the root framework and would really appreciate if someone could tell me how to convert a csv(or any data file) into root format

---

## [Want to convert data file.csv into file.root](https://root-forum.cern.ch/t/want-to-convert-data-file-csv-into-file-root/34028)

<div class="topic-metadata">

**Author:** [@phy.vijayraj](https://root-forum.cern.ch/u/phy.vijayraj)\
**Replies:** 1\
**Last updated:** [May 13, 2019, 7:12am UTC](https://root-forum.cern.ch/t/want-to-convert-data-file-csv-into-file-root/34028 "2019-05-13T07:12:35Z")

</div>

Hi experts, Recently we performed an experiment for fusion reaction. The data saved from the DAQ system is in csv format. I am curious to start doing anlysis using root software. Everything is OK with root installation.…

---

## [Getting x and y bins correspond to a maximum bin content on 2D plot](https://root-forum.cern.ch/t/getting-x-and-y-bins-correspond-to-a-maximum-bin-content-on-2d-plot/34012)

<div class="topic-metadata">

**Author:** [@Abdualazem](https://root-forum.cern.ch/u/Abdualazem)\
**Replies:** 4\
**Last updated:** [May 12, 2019, 6:34am UTC](https://root-forum.cern.ch/t/getting-x-and-y-bins-correspond-to-a-maximum-bin-content-on-2d-plot/34012 "2019-05-12T06:34:17Z")

</div>

Hi root experts, I’m trying to get x and y-axis correspond to the maximum bin content on a 2D plot. And then mark the point on the plot with the values of (x,y,z). If you look at the attached plot, you see that I get tw…

---

## [TGraph retrieve vertex index given a point](https://root-forum.cern.ch/t/tgraph-retrieve-vertex-index-given-a-point/34001)

<div class="topic-metadata">

**Author:** [@bmahf](https://root-forum.cern.ch/u/bmahf)\
**Replies:** 1\
**Last updated:** [May 10, 2019, 3:07pm UTC](https://root-forum.cern.ch/t/tgraph-retrieve-vertex-index-given-a-point/34001 "2019-05-10T15:07:12Z")

</div>

I am pretty new to Root, and have been put on a project where Root is used for displaying graphs. II hope that this request is valid for this area in the forum. We have plots that have TCutG objects on them. I have cr…

---

## [Converting TH1F into a TGraph with smooth line connecting all the points](https://root-forum.cern.ch/t/converting-th1f-into-a-tgraph-with-smooth-line-connecting-all-the-points/33967)

<div class="topic-metadata">

**Author:** [@Prya13](https://root-forum.cern.ch/u/Prya13)\
**Replies:** 4\
**Last updated:** [May 10, 2019, 7:11am UTC](https://root-forum.cern.ch/t/converting-th1f-into-a-tgraph-with-smooth-line-connecting-all-the-points/33967 "2019-05-10T07:11:10Z")

</div>

Dear All, I have plotted a TH1F histogram, I would like to now plot a TGraph from this histogram. But don’t know how to go about doing that, may I have some kindly. Int\_t n = 6000000; Float\_t norm = sigma/h\_rapidity-\>…

---

## [Changing fonts of TParalledCoord](https://root-forum.cern.ch/t/changing-fonts-of-tparalledcoord/33974)

<div class="topic-metadata">

**Author:** [@hohshita](https://root-forum.cern.ch/u/hohshita)\
**Replies:** 3\
**Last updated:** [May 9, 2019, 1:12pm UTC](https://root-forum.cern.ch/t/changing-fonts-of-tparalledcoord/33974 "2019-05-09T13:12:27Z")

</div>

Dear all, I executed $ROOTSYS/tutorials/tree/parallelcoord.C. Now, I’d like to change the title and label fonts of parallel coordinates. Would you tell me how to do it? Best Regards, Hide

---

## [Adding TH2D in a loop](https://root-forum.cern.ch/t/adding-th2d-in-a-loop/33966)

<div class="topic-metadata">

**Author:** [@\_rthur](https://root-forum.cern.ch/u/_rthur)\
**Replies:** 4\
**Last updated:** [May 9, 2019, 11:23am UTC](https://root-forum.cern.ch/t/adding-th2d-in-a-loop/33966 "2019-05-09T11:23:58Z")

</div>

Dear All, I hope this question fits in the Newbie section. I have several root files which contain a TH2D histogram with exactly the same number of bins (basically it is the same histogram but filled with different data…

---

## [Plotting rapidity using root](https://root-forum.cern.ch/t/plotting-rapidity-using-root/33969)

<div class="topic-metadata">

**Author:** [@Anjali](https://root-forum.cern.ch/u/Anjali)\
**Replies:** 6\
**Last updated:** [May 9, 2019, 8:52am UTC](https://root-forum.cern.ch/t/plotting-rapidity-using-root/33969 "2019-05-09T08:52:09Z")

</div>

I am trying to plot rapidity using root. try3.c (280 Bytes).This is my code. But while executing this I get an error Error: log param\[0\]=-16.0655 up:1.#INF low:0 out of range C:\\root\\trial\\try3.c(1 1) \*\*\* Interpreter e…

---

## [Applying TCuts to branches and saving them to new TFile](https://root-forum.cern.ch/t/applying-tcuts-to-branches-and-saving-them-to-new-tfile/33940)

<div class="topic-metadata">

**Author:** [@Unlucky](https://root-forum.cern.ch/u/Unlucky)\
**Replies:** 4\
**Last updated:** [May 8, 2019, 2:17pm UTC](https://root-forum.cern.ch/t/applying-tcuts-to-branches-and-saving-them-to-new-tfile/33940 "2019-05-08T14:17:11Z")

</div>

Hi, Quite new here. I have a TTree object stored within a NTuple. I have also generated some appropriate TCut that I would like to apply. Currently I am using -\>Draw(“branch”, TCuts) to produce histograms for different…

---

## [TF1 cannot release the fixed parameter](https://root-forum.cern.ch/t/tf1-cannot-release-the-fixed-parameter/33948)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 2\
**Last updated:** [May 8, 2019, 12:53pm UTC](https://root-forum.cern.ch/t/tf1-cannot-release-the-fixed-parameter/33948 "2019-05-08T12:53:26Z")

</div>

Dear experts I had a problem when I fitted the mass distribution of a particle. I wrote a macro called massfitting.C, then I called it in the macro dcaFittingOptimal.C. And it gave Unknown function: 0.00000e+…

---

## [For cycle with strings](https://root-forum.cern.ch/t/for-cycle-with-strings/33933)

<div class="topic-metadata">

**Author:** [@Marta](https://root-forum.cern.ch/u/Marta)\
**Replies:** 8\
**Last updated:** [May 8, 2019, 7:58am UTC](https://root-forum.cern.ch/t/for-cycle-with-strings/33933 "2019-05-08T07:58:37Z")

</div>

Hello again, I am trying to make a for loop that would help me shorten my code. I have several histograms that have almost same name, but differ in suffix. I would like the loop to take the histogram, set all the things…

---

## [Boost to rest frame with TLorentzVector made with SetPtPhiEtaM](https://root-forum.cern.ch/t/boost-to-rest-frame-with-tlorentzvector-made-with-setptphietam/33924)

<div class="topic-metadata">

**Author:** [@trenta\_coollime](https://root-forum.cern.ch/u/trenta_coollime)\
**Replies:** 1\
**Last updated:** [May 7, 2019, 6:23pm UTC](https://root-forum.cern.ch/t/boost-to-rest-frame-with-tlorentzvector-made-with-setptphietam/33924 "2019-05-07T18:23:38Z")

</div>

If I have a TLorentzVector(ip-\>pt(),ip-\>eta(),ip-\>phi(),ip-\>mass()) where ip is the generator level particle. How can I boost this vector to the rest frame of its own particle? Thank you.

---

## [Change title and scale of TPaletteAxis from TBrowser](https://root-forum.cern.ch/t/change-title-and-scale-of-tpaletteaxis-from-tbrowser/33923)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 4\
**Last updated:** [May 7, 2019, 6:20pm UTC](https://root-forum.cern.ch/t/change-title-and-scale-of-tpaletteaxis-from-tbrowser/33923 "2019-05-07T18:20:38Z")

</div>

I am using the command tree-\>Draw(“e1:e2:e3”, “”, “colz”) to get a 3D plot of my variable “e3”. The color scale looks like this: First, I would like to remove the “x10^-6” at the top, and if you look carefully, the ti…

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

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