# Newbie

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

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

---

## [Looping over root file to create histograms on same plot](https://root-forum.cern.ch/t/looping-over-root-file-to-create-histograms-on-same-plot/38396)

<div class="topic-metadata">

**Author:** [@evdv](https://root-forum.cern.ch/u/evdv)\
**Replies:** 12\
**Last updated:** [January 18, 2023, 2:27pm UTC](https://root-forum.cern.ch/t/looping-over-root-file-to-create-histograms-on-same-plot/38396 "2023-01-18T14:27:39Z")

</div>

So I have a root file: output.root, which has a subfolder ‘FirstCut’, containing 2 histograms, differing in a parameter which is 30 for the first histogram and 50 for the second. Now I want to loop over this parameter, a…

---

## [Compilation error (relocation R\_X86\_64\_PC32 against symbol \`\_Py\_NoneStruct' can not be used)](https://root-forum.cern.ch/t/compilation-error-relocation-r-x86-64-pc32-against-symbol-py-nonestruct-can-not-be-used/53132)

<div class="topic-metadata">

**Author:** [@ampudia](https://root-forum.cern.ch/u/ampudia)\
**Replies:** 3\
**Last updated:** [January 18, 2023, 11:29am UTC](https://root-forum.cern.ch/t/compilation-error-relocation-r-x86-64-pc32-against-symbol-py-nonestruct-can-not-be-used/53132 "2023-01-18T11:29:38Z")

</div>

\_Hi! I am trying to install root-6.26.10 on Ubuntu 22.04 and, when I run the “make” command, at 97%, I keep getting this error: \[ 97%\] Linking CXX shared library …/…/lib/libROOTTPython.so /usr/bin/ld: /usr/local/lib/l…

---

## [\`\`\`TH1D::DrawClone()\`\`\` seems to not take the \`\`\`Option\_t\`\`\` into account](https://root-forum.cern.ch/t/th1d-drawclone-seems-to-not-take-the-option-t-into-account/53121)

<div class="topic-metadata">

**Author:** [@Leo\_Tarbouriech](https://root-forum.cern.ch/u/Leo_Tarbouriech)\
**Replies:** 12\
**Last updated:** [January 18, 2023, 9:20am UTC](https://root-forum.cern.ch/t/th1d-drawclone-seems-to-not-take-the-option-t-into-account/53121 "2023-01-18T09:20:15Z")

</div>

Dear experts, I am trying to draw a seri of histograms. As I want to make to plots, one with the “brut” histograms, one with the histograms that have been renormalized. To achieve this, I have decided to use the TH1D::D…

---

## [Csv data plotting](https://root-forum.cern.ch/t/csv-data-plotting/53140)

<div class="topic-metadata">

**Author:** [@MuhammadWaqas](https://root-forum.cern.ch/u/MuhammadWaqas)\
**Replies:** 10\
**Last updated:** [January 18, 2023, 8:28am UTC](https://root-forum.cern.ch/t/csv-data-plotting/53140 "2023-01-18T08:28:33Z")

</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 read my data from csv file to create histogram for column…

---

## [Contour Lines on a 2d histogram](https://root-forum.cern.ch/t/contour-lines-on-a-2d-histogram/53105)

<div class="topic-metadata">

**Author:** [@DTMsurf](https://root-forum.cern.ch/u/DTMsurf)\
**Replies:** 2\
**Last updated:** [January 18, 2023, 2:19am UTC](https://root-forum.cern.ch/t/contour-lines-on-a-2d-histogram/53105 "2023-01-18T02:19:17Z")

</div>

I am currently working on a project that requires me to draw a contour line over a 2d histogram in order to denote which bins are below a sensitivity of 5 and which are above. attached is an example of what my current 2d…

---

## [Plotting histogram by looping](https://root-forum.cern.ch/t/plotting-histogram-by-looping/53145)

<div class="topic-metadata">

**Author:** [@Bikash](https://root-forum.cern.ch/u/Bikash)\
**Replies:** 1\
**Last updated:** [January 17, 2023, 8:13pm UTC](https://root-forum.cern.ch/t/plotting-histogram-by-looping/53145 "2023-01-17T20:13:04Z")

</div>

Hello. I have a root file within which there is a folder which contains different histogram. I want to loop those and plot different histogram for all of them. The folder name is Energy spectra and within that there are …

---

## [How to read out the entries of a branch?](https://root-forum.cern.ch/t/how-to-read-out-the-entries-of-a-branch/53137)

<div class="topic-metadata">

**Author:** [@Progressive](https://root-forum.cern.ch/u/Progressive)\
**Replies:** 4\
**Last updated:** [January 17, 2023, 1:07pm UTC](https://root-forum.cern.ch/t/how-to-read-out-the-entries-of-a-branch/53137 "2023-01-17T13:07:31Z")

</div>

ROOT Version: 6.26/02 Platform: Windows Compiler: MSVC 19.31.31104.0 Hi, I have a tree called Hits with several branches like ftotEnergy\_sum, ftotEnergy\_1 and so on. I know I can get the entries of the tree via tre…

---

## [TF1 linear fit (pol1): Fitted line is not smooth](https://root-forum.cern.ch/t/tf1-linear-fit-pol1-fitted-line-is-not-smooth/53134)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 1\
**Last updated:** [January 17, 2023, 7:30am UTC](https://root-forum.cern.ch/t/tf1-linear-fit-pol1-fitted-line-is-not-smooth/53134 "2023-01-17T07:30:50Z")

</div>

Hi all, I’m trying to perform a linear fit over a selected region in my plot. The macro is running successfully and giving desirable output; used something like this to FIT: TF1 \*fit2 = new TF1("fit2", "pol1"); hist2-\>F…

---

## [Error in compiling Draw(TString::Format)](https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 1\
**Last updated:** [January 16, 2023, 10:50pm UTC](https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133 "2023-01-16T22:50:32Z")

</div>

Hi everyone, I’m trying to run the macro with the following command. ch1-\>Draw(TString::Format("F3PLA\_TR\_ns - F3PLA\_TL\_ns: (1-%f)/TMath::Sqrt(F3PLA\_QL)", slope1)\>\>hist1,"(PPACX\[0\]\[3\]\>4.5 && PPACX\[0\]\[3\]\<5.5)","colz"); hi…

---

## [ROOT Installation on MacOS Ventura 13.2](https://root-forum.cern.ch/t/root-installation-on-macos-ventura-13-2/53079)

<div class="topic-metadata">

**Author:** [@drawal](https://root-forum.cern.ch/u/drawal)\
**Replies:** 13\
**Last updated:** [January 14, 2023, 3:43am UTC](https://root-forum.cern.ch/t/root-installation-on-macos-ventura-13-2/53079 "2023-01-14T03:43:50Z")

</div>

Hi, I’m trying to download ROOT from source in a new directory on my Mac. I created a new directory /Users/d/ROOT1 and moved into that directory and then executed these commands (as listed on the website): $ git clone …

---

## [Lorentz Boost](https://root-forum.cern.ch/t/lorentz-boost/53072)

<div class="topic-metadata">

**Author:** [@vkireyeu](https://root-forum.cern.ch/u/vkireyeu)\
**Replies:** 4\
**Last updated:** [January 13, 2023, 11:24am UTC](https://root-forum.cern.ch/t/lorentz-boost/53072 "2023-01-13T11:24:02Z")

</div>

If I remember well, a good class TLorentzVector was previously in ROOT. Using it one could easily do boosts to some other frames like: TLorentzVector v; v.Boost(bx, by, bz); Now instead of this user-friendly class the …

---

## [How to use class AliHFMassFitter](https://root-forum.cern.ch/t/how-to-use-class-alihfmassfitter/53058)

<div class="topic-metadata">

**Author:** [@taushy](https://root-forum.cern.ch/u/taushy)\
**Replies:** 2\
**Last updated:** [January 11, 2023, 10:10am UTC](https://root-forum.cern.ch/t/how-to-use-class-alihfmassfitter/53058 "2023-01-11T10:10:38Z")

</div>

I am not able to decipher how to call this AliHFMassFitter class in my macro to do the fitting of histograms. If I could get the syntax of calling a class regards thanks

---

## [TEventList problem with subtraction](https://root-forum.cern.ch/t/teventlist-problem-with-subtraction/53047)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 1\
**Last updated:** [January 10, 2023, 2:48pm UTC](https://root-forum.cern.ch/t/teventlist-problem-with-subtraction/53047 "2023-01-10T14:48:10Z")

</div>

Hello, There’s something weird happening and I’m not sure if it’s a bug or if I’m doing something wrong. I have a class using TEventList to make selections in a TTree. First I use the method t1-\>Draw("\>\>lev","some\_sel…

---

## [I need to write a new branch in already existing root file using pyroot](https://root-forum.cern.ch/t/i-need-to-write-a-new-branch-in-already-existing-root-file-using-pyroot/53033)

<div class="topic-metadata">

**Author:** [@anton.c](https://root-forum.cern.ch/u/anton.c)\
**Replies:** 7\
**Last updated:** [January 10, 2023, 9:12am UTC](https://root-forum.cern.ch/t/i-need-to-write-a-new-branch-in-already-existing-root-file-using-pyroot/53033 "2023-01-10T09:12:41Z")

</div>

Hi, this is the first time i write on this forum, so i’m sorry if what i’m asking here could sound trivial for someone. In order to analyze a certain data that was acquired as root file, I need to make histograms of eac…

---

## [Problem setting DISPLAY on Mac OS X 13.0.1 (22A400)](https://root-forum.cern.ch/t/problem-setting-display-on-mac-os-x-13-0-1-22a400/53034)

<div class="topic-metadata">

**Author:** [@Lin\_Charlie](https://root-forum.cern.ch/u/Lin_Charlie)\
**Replies:** 2\
**Last updated:** [January 9, 2023, 3:21pm UTC](https://root-forum.cern.ch/t/problem-setting-display-on-mac-os-x-13-0-1-22a400/53034 "2023-01-09T15:21:40Z")

</div>

Hi, I started having an issue in the graphic display when running ROOT in ssh. I’m a novice who has just come into contact with Rhopi. When I finish the homework assigned by the teacher, I need to see the image of the …

---

## [A lot of questions on root for windows](https://root-forum.cern.ch/t/a-lot-of-questions-on-root-for-windows/52983)

<div class="topic-metadata">

**Author:** [@germanocarella](https://root-forum.cern.ch/u/germanocarella)\
**Replies:** 4\
**Last updated:** [January 9, 2023, 12:58pm UTC](https://root-forum.cern.ch/t/a-lot-of-questions-on-root-for-windows/52983 "2023-01-09T12:58:15Z")

</div>

ROOT Version: 6.26 Platform: windows Compiler: binary downloaded from the site. Hello, I just downloaded and successfully installed root 6.26 for visual studio 2022. I have some questions that I can’t find answers …

---

## [Multiple TApplication in different functions (and different files)](https://root-forum.cern.ch/t/multiple-tapplication-in-different-functions-and-different-files/53004)

<div class="topic-metadata">

**Author:** [@zenith378](https://root-forum.cern.ch/u/zenith378)\
**Replies:** 5\
**Last updated:** [January 7, 2023, 9:04pm UTC](https://root-forum.cern.ch/t/multiple-tapplication-in-different-functions-and-different-files/53004 "2023-01-07T21:04:07Z")

</div>

Dear ROOT experts, I am working on a project that has mainly two functionalities, i.e. fitting an histogram with customizable parameters; calculating a differential cross section and plot it in a T(Multi)Graph. The s…

---

## [Code Crash](https://root-forum.cern.ch/t/code-crash/52579)

<div class="topic-metadata">

**Author:** [@Harriet\_Kumi](https://root-forum.cern.ch/u/Harriet_Kumi)\
**Replies:** 23\
**Last updated:** [January 5, 2023, 10:57am UTC](https://root-forum.cern.ch/t/code-crash/52579 "2023-01-05T10:57:51Z")

</div>

Hello I am using the runge kutta method to calculate the differential equation. I got a crash when I was compiling my result. the crash message is below and my program as well. Please help me out . Thank you. root \[0\] …

---

## [Create TH1 with TAxis](https://root-forum.cern.ch/t/create-th1-with-taxis/52864)

<div class="topic-metadata">

**Author:** [@Emil\_R](https://root-forum.cern.ch/u/Emil_R)\
**Replies:** 2\
**Last updated:** [January 5, 2023, 10:09am UTC](https://root-forum.cern.ch/t/create-th1-with-taxis/52864 "2023-01-05T10:09:51Z")

</div>

Dear Experts, I have a TAxis Object I obtained from another histogram TAxis \*Ax = Hist-\>GetYaxis(); Now I want to create a new histogram with this Axis. Therefor I did the following: TAxis \* X = new TAxis(1000,0,2…

---

## [Segmentation Fault in IMinuit](https://root-forum.cern.ch/t/segmentation-fault-in-iminuit/52943)

<div class="topic-metadata">

**Author:** [@VEDANT\_BASU](https://root-forum.cern.ch/u/VEDANT_BASU)\
**Replies:** 2\
**Last updated:** [January 2, 2023, 3:10am UTC](https://root-forum.cern.ch/t/segmentation-fault-in-iminuit/52943 "2023-01-02T03:10:33Z")

</div>

Hello, I’ve been running IMinuit as part of a reconstruction algorithm, and I’ve had it seg fault nearly immediately. I’ve attached a stack trace, any advice would be much appreciated! WARN (IMinuit): It appears your i…

---

## [\*\*\*Break\*\*\*\* Segmentation violation from importing lhcbStyle](https://root-forum.cern.ch/t/break-segmentation-violation-from-importing-lhcbstyle/52922)

<div class="topic-metadata">

**Author:** [@carororo](https://root-forum.cern.ch/u/carororo)\
**Replies:** 2\
**Last updated:** [December 28, 2022, 6:06pm UTC](https://root-forum.cern.ch/t/break-segmentation-violation-from-importing-lhcbstyle/52922 "2022-12-28T18:06:10Z")

</div>

Hello, I am very new to root and my python code looks like this: from gettext import install import ROOT from ROOT import RooFit as RF from array import array import pip from lhcbStyle import lhcbStyle, lhcbLatex Wh…

---

## [Analyzing CORSIKA output](https://root-forum.cern.ch/t/analyzing-corsika-output/52901)

<div class="topic-metadata">

**Author:** [@Chege](https://root-forum.cern.ch/u/Chege)\
**Replies:** 2\
**Last updated:** [December 26, 2022, 1:15pm UTC](https://root-forum.cern.ch/t/analyzing-corsika-output/52901 "2022-12-26T13:15:49Z")

</div>

Hi. I am unable to edit CorsikaPlotter to analyze Corsika Output using the instruction given. Edit CorsikPlotter.cc, with editor of your choice, e.g. gedit CorsikaPlotter.cc  Add ROOT 1D histogram to study shower zen…

---

## [Is there any way to get a entry from a single bin?](https://root-forum.cern.ch/t/is-there-any-way-to-get-a-entry-from-a-single-bin/52898)

<div class="topic-metadata">

**Author:** [@tachyon](https://root-forum.cern.ch/u/tachyon)\
**Replies:** 1\
**Last updated:** [December 26, 2022, 10:16am UTC](https://root-forum.cern.ch/t/is-there-any-way-to-get-a-entry-from-a-single-bin/52898 "2022-12-26T10:16:30Z")

</div>

I can get the total number of entries histogram → GetEntries() And also can get the sum of weights for each single bin histogram → GetBinContent(bin) Then how can I get an entry for each single bin? Is there any way…

---

## [Problem in 2D fitting](https://root-forum.cern.ch/t/problem-in-2d-fitting/52886)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 1\
**Last updated:** [December 23, 2022, 4:19pm UTC](https://root-forum.cern.ch/t/problem-in-2d-fitting/52886 "2022-12-23T16:19:59Z")

</div>

Hi, I want to do 2D fitting by specifying the x and y boundaries and using the binned likelihood method, but unfortunately, I have the following error.: Can someone tell how to resolve this ? Thanks

---

## [Getting fit function parameters](https://root-forum.cern.ch/t/getting-fit-function-parameters/52871)

<div class="topic-metadata">

**Author:** [@smatt4](https://root-forum.cern.ch/u/smatt4)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 5:22pm UTC](https://root-forum.cern.ch/t/getting-fit-function-parameters/52871 "2022-12-22T17:22:13Z")

</div>

Hello, I’m experiencing some problems in getting the correct parameters of a function after a fit. What I do in my code is: Get the histogram Define function with starting parameters (f1) Fit histogram with MIGRAD Fit…

---

## [Problem in smearing histogram](https://root-forum.cern.ch/t/problem-in-smearing-histogram/52707)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 24\
**Last updated:** [December 22, 2022, 1:56pm UTC](https://root-forum.cern.ch/t/problem-in-smearing-histogram/52707 "2022-12-22T13:56:58Z")

</div>

Hi, I use the following code to smear a histogram in two ways: Using the gRandom-\>Gaus(x,3.5) using x\_res = x + 3.5 \* TMath::Sqrt2() \* TMath::ErfInverse(2. \* rndm() - 1.) the follwoing is my code : { gStyle-\>SetOptS…

---

## [Export magnetic field to root file](https://root-forum.cern.ch/t/export-magnetic-field-to-root-file/52844)

<div class="topic-metadata">

**Author:** [@arazquin](https://root-forum.cern.ch/u/arazquin)\
**Replies:** 2\
**Last updated:** [December 22, 2022, 4:19am UTC](https://root-forum.cern.ch/t/export-magnetic-field-to-root-file/52844 "2022-12-22T04:19:19Z")

</div>

Hello experts, I have a magnetic fieldmap loaded using TGeoGlobalMagField How can I export it into a root file? Thank you in advance!

---

## [TCutG for binning](https://root-forum.cern.ch/t/tcutg-for-binning/52822)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 2\
**Last updated:** [December 21, 2022, 9:53am UTC](https://root-forum.cern.ch/t/tcutg-for-binning/52822 "2022-12-21T09:53:09Z")

</div>

Hello experts, I have 9 bins defined(see picture). I want to know, How to use TCutG to define the histograms for each bin.(need to draw the missing massSq distributions for each bin) I have defined my binning as a func…

---

## [Best way to learn ROOT](https://root-forum.cern.ch/t/best-way-to-learn-root/52836)

<div class="topic-metadata">

**Author:** [@Subhu18](https://root-forum.cern.ch/u/Subhu18)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 2:46pm UTC](https://root-forum.cern.ch/t/best-way-to-learn-root/52836 "2022-12-20T14:46:10Z")

</div>

Hey all, what is the best way to learn root, for a Master’s Physics student who want to pursue PhD in High Energy Physics? any HEP related analysis tutorial series/book/readout in details?? PS: I have already tried se…

---

## [Root SetParameters](https://root-forum.cern.ch/t/root-setparameters/52800)

<div class="topic-metadata">

**Author:** [@Subhu18](https://root-forum.cern.ch/u/Subhu18)\
**Replies:** 8\
**Last updated:** [December 20, 2022, 2:15pm UTC](https://root-forum.cern.ch/t/root-setparameters/52800 "2022-12-20T14:15:35Z")

</div>

If I try to fit a function to a given data, and if i already define the parameters of the function , after fitting I am getting different parameters ?? I did not understand this part. and also If I fit the function with…

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

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