# Newbie

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

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

---

## [Peak-to-Background Ratio](https://root-forum.cern.ch/t/peak-to-background-ratio/43198)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 2\
**Last updated:** [January 25, 2021, 11:24am UTC](https://root-forum.cern.ch/t/peak-to-background-ratio/43198 "2021-01-25T11:24:00Z")

</div>

Good day I would like to get the peak to background ratio from a spectrum that I obtained in Root. In some analyzing tools this function is already built-in. I am not sure how to go about it in Root. ROOT Version: 6.1…

---

## [How to plot two variables from one root file](https://root-forum.cern.ch/t/how-to-plot-two-variables-from-one-root-file/43242)

<div class="topic-metadata">

**Author:** [@abaf](https://root-forum.cern.ch/u/abaf)\
**Replies:** 5\
**Last updated:** [January 25, 2021, 11:17am UTC](https://root-forum.cern.ch/t/how-to-plot-two-variables-from-one-root-file/43242 "2021-01-25T11:17:27Z")

</div>

Hi, I have a root file from which I have to plot two variables against each other, for example, velocity on y axis and momentum on the x axis. How would I proceed with this? Any help would be greatly appreciated! Tha…

---

## [Fill all branches of a tree separately (because every branch has to satisfy different conditions)](https://root-forum.cern.ch/t/fill-all-branches-of-a-tree-separately-because-every-branch-has-to-satisfy-different-conditions/43117)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 6\
**Last updated:** [January 25, 2021, 9:51am UTC](https://root-forum.cern.ch/t/fill-all-branches-of-a-tree-separately-because-every-branch-has-to-satisfy-different-conditions/43117 "2021-01-25T09:51:47Z")

</div>

Dear experts, I am trying to fill a tree ( which has with more than one branch) that I created. Now, the problem is that, the variables to be stores in these branches need to satisfy different conditions. Which means th…

---

## [How calculate net area in root](https://root-forum.cern.ch/t/how-calculate-net-area-in-root/43119)

<div class="topic-metadata">

**Author:** [@oumaima\_ben\_chamakh](https://root-forum.cern.ch/u/oumaima_ben_chamakh)\
**Replies:** 4\
**Last updated:** [January 25, 2021, 9:42am UTC](https://root-forum.cern.ch/t/how-calculate-net-area-in-root/43119 "2021-01-25T09:42:32Z")

</div>

Hello , please can anyone explain me how calculate net area in root ?

---

## [Problem Fitting Gaussian data](https://root-forum.cern.ch/t/problem-fitting-gaussian-data/43244)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 9:06am UTC](https://root-forum.cern.ch/t/problem-fitting-gaussian-data/43244 "2021-01-25T09:06:24Z")

</div>

Hi, I have a mass spectrum, and I inject Gaussian data into it within some region. I then want to fit that region with a gaussian function, but I get a bad fit (high chi-squared/ndf statistic). How can I make it better?…

---

## [TGLVector3 using](https://root-forum.cern.ch/t/tglvector3-using/43027)

<div class="topic-metadata">

**Author:** [@xiaojiye](https://root-forum.cern.ch/u/xiaojiye)\
**Replies:** 14\
**Last updated:** [January 25, 2021, 8:15am UTC](https://root-forum.cern.ch/t/tglvector3-using/43027 "2021-01-25T08:15:58Z")

</div>

I’m trying to use TGLVector3, which prompts me with the following information. I don’t know how to solve it IncrementalExecutor::executeFunction: symbol '\_ZN10TGLVector3C1Eddd' unresolved while linking \[cling interface …

---

## [Overlay two histograms drawn by two . root files on one canvas](https://root-forum.cern.ch/t/overlay-two-histograms-drawn-by-two-root-files-on-one-canvas/43245)

<div class="topic-metadata">

**Author:** [@xiaojiye](https://root-forum.cern.ch/u/xiaojiye)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 6:44am UTC](https://root-forum.cern.ch/t/overlay-two-histograms-drawn-by-two-root-files-on-one-canvas/43245 "2021-01-25T06:44:31Z")

</div>

I have two . root files and draw histograms according to the data in them. I want to put these two histograms on the same canvas for comparison. What should I do？ Please read tips for efficient and successful posting a…

---

## [Pyroot fill ttree](https://root-forum.cern.ch/t/pyroot-fill-ttree/43129)

<div class="topic-metadata">

**Author:** [@ROOTer1](https://root-forum.cern.ch/u/ROOTer1)\
**Replies:** 2\
**Last updated:** [January 24, 2021, 10:45pm UTC](https://root-forum.cern.ch/t/pyroot-fill-ttree/43129 "2021-01-24T22:45:29Z")

</div>

Hello, Here is my code to fill a tree in pyroot get\_var = ROOT.vector(‘float’)(0) subtree = ROOT.TTree(“subtree”,“subtree”) subtree.Branch(“var”, “std::vector\< float \>”, get\_var) for iev in chain: get\_var.push\_bac…

---

## [Vector declaration error](https://root-forum.cern.ch/t/vector-declaration-error/43230)

<div class="topic-metadata">

**Author:** [@jmg](https://root-forum.cern.ch/u/jmg)\
**Replies:** 4\
**Last updated:** [January 23, 2021, 10:50pm UTC](https://root-forum.cern.ch/t/vector-declaration-error/43230 "2021-01-23T22:50:17Z")

</div>

Relatively new to ROOT so this could be a simple human error! Hello! I’m trying to analyze data from a tree. I had ROOT generate analyze.C and analyze.h from my tree, edited analyze.C to do some analysis I need, and am …

---

## [What's mean this ?!](https://root-forum.cern.ch/t/whats-mean-this/43237)

<div class="topic-metadata">

**Author:** [@oumaima\_ben\_chamakh](https://root-forum.cern.ch/u/oumaima_ben_chamakh)\
**Replies:** 1\
**Last updated:** [January 24, 2021, 11:29am UTC](https://root-forum.cern.ch/t/whats-mean-this/43237 "2021-01-24T11:29:17Z")

</div>

whats mean this line h2-\>Add(d2,0.1);

---

## [Weird problem with TH2F](https://root-forum.cern.ch/t/weird-problem-with-th2f/43200)

<div class="topic-metadata">

**Author:** [@AdvaitDhingra](https://root-forum.cern.ch/u/AdvaitDhingra)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 3:29pm UTC](https://root-forum.cern.ch/t/weird-problem-with-th2f/43200 "2021-01-21T15:29:54Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version:Latest as of January 2021 Platform: Ubuntu Compiler: C++ So I want to plot a couple hundred points on a 2d histogram, but when I…

---

## [Save histogram one by one ata time](https://root-forum.cern.ch/t/save-histogram-one-by-one-ata-time/42914)

<div class="topic-metadata">

**Author:** [@Prya13](https://root-forum.cern.ch/u/Prya13)\
**Replies:** 17\
**Last updated:** [January 21, 2021, 1:34pm UTC](https://root-forum.cern.ch/t/save-histogram-one-by-one-ata-time/42914 "2021-01-21T13:34:17Z")

</div>

Happy New year to everyone. I have problem, trying to loop through a list of .root file, get histogram B, do calculation with histogram A, den put histograms A and B on same canvas, den save each individual canvas. Tr…

---

## [ProjectionY for each bin](https://root-forum.cern.ch/t/projectiony-for-each-bin/42920)

<div class="topic-metadata">

**Author:** [@iftikhar\_safi](https://root-forum.cern.ch/u/iftikhar_safi)\
**Replies:** 8\
**Last updated:** [January 21, 2021, 1:09pm UTC](https://root-forum.cern.ch/t/projectiony-for-each-bin/42920 "2021-01-21T13:09:58Z")

</div>

I am having trouble with getting the ProjectionY for all the bins and then Drawing them? For specific range of TH2 I do like this histo-\>ProjectionY(“slices”,lowbin,highbin); For doing it bin by bin, I do it like th…

---

## [How can I change the color of the point in TH2F?](https://root-forum.cern.ch/t/how-can-i-change-the-color-of-the-point-in-th2f/43169)

<div class="topic-metadata">

**Author:** [@AdvaitDhingra](https://root-forum.cern.ch/u/AdvaitDhingra)\
**Replies:** 4\
**Last updated:** [January 21, 2021, 1:14pm UTC](https://root-forum.cern.ch/t/how-can-i-change-the-color-of-the-point-in-th2f/43169 "2021-01-21T13:14:50Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: latest as of january 2021 \_Platform:Ubuntu 20.04 \_Compiler:C++ So I want to combine two TH2F histograms, but I still want to be …

---

## [Apply weight to each events](https://root-forum.cern.ch/t/apply-weight-to-each-events/43151)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 3\
**Last updated:** [January 20, 2021, 11:51am UTC](https://root-forum.cern.ch/t/apply-weight-to-each-events/43151 "2021-01-20T11:51:21Z")

</div>

hi, im trying to apply weights to each of my events for each branch sample void W(){ gStyle-\>SetOptStat(1111);// untk print no of events // root file TFile \*f\_sig20 = new TFile("/Users/applestudio/Desktop/ro…

---

## [Energy calibration of gamma ray-detector](https://root-forum.cern.ch/t/energy-calibration-of-gamma-ray-detector/33852)

<div class="topic-metadata">

**Author:** [@Arshjot\_Kaur](https://root-forum.cern.ch/u/Arshjot_Kaur)\
**Replies:** 10\
**Last updated:** [January 19, 2021, 7:00pm UTC](https://root-forum.cern.ch/t/energy-calibration-of-gamma-ray-detector/33852 "2021-01-19T19:00:54Z")

</div>

Hi, I am working on project to calculate resolution of LaBr detector, I have my spectra in root format. I don’t know how to convert channel no. to Energy. I have spectra of Eu-152 and Co-60. Please guide me regarding t…

---

## [GetMainPainter(divid) in JSROOT v5.9-\>v6](https://root-forum.cern.ch/t/getmainpainter-divid-in-jsroot-v5-9-v6/43147)

<div class="topic-metadata">

**Author:** [@AndrejL](https://root-forum.cern.ch/u/AndrejL)\
**Replies:** 4\
**Last updated:** [January 19, 2021, 2:39pm UTC](https://root-forum.cern.ch/t/getmainpainter-divid-in-jsroot-v5-9-v6/43147 "2021-01-19T14:39:25Z")

</div>

Hello, I am a beginner in javascript and with jsroot. Half a year ago I did some coding with jsroot v5.9. But now that new version is out I am having some troubles with the basics. The problem: In 5.9 version I used t…

---

## [Import ROOT in python](https://root-forum.cern.ch/t/import-root-in-python/43139)

<div class="topic-metadata">

**Author:** [@hhggggg1826](https://root-forum.cern.ch/u/hhggggg1826)\
**Replies:** 4\
**Last updated:** [January 18, 2021, 2:33pm UTC](https://root-forum.cern.ch/t/import-root-in-python/43139 "2021-01-18T14:33:15Z")

</div>

Hi, I face a problem when I import ROOT in python. from ROOT import \* And, the error is ImportError: Failed to import libcppyy3\_8. Please check that ROOT has been built for Python 3.8 Is there a new version of ROOT…

---

## [‘Functor1D’ is not a member of ‘ROOT::Math’](https://root-forum.cern.ch/t/functor1d-is-not-a-member-of-root-math/43111)

<div class="topic-metadata">

**Author:** [@newbie2](https://root-forum.cern.ch/u/newbie2)\
**Replies:** 2\
**Last updated:** [January 15, 2021, 2:16pm UTC](https://root-forum.cern.ch/t/functor1d-is-not-a-member-of-root-math/43111 "2021-01-15T14:16:23Z")

</div>

ROOT Version: 6.22/02 Platform: Ubuntu 20.04.1 LTS Compiler: g++ What am I doing wrong actually? Is it something related to namespace or what? I have just taken the code from the available user guide for ROOT and usi…

---

## [Error in writing file in a directory](https://root-forum.cern.ch/t/error-in-writing-file-in-a-directory/43092)

<div class="topic-metadata">

**Author:** [@Towseef\_Rehman](https://root-forum.cern.ch/u/Towseef_Rehman)\
**Replies:** 3\
**Last updated:** [January 15, 2021, 12:03pm UTC](https://root-forum.cern.ch/t/error-in-writing-file-in-a-directory/43092 "2021-01-15T12:03:26Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 16.06.00 Platform: Linux Ubuntu Compiler: Hey Rooters, I have a program where I want to read files from a directory and then save…

---

## [Segmentation violation with graph](https://root-forum.cern.ch/t/segmentation-violation-with-graph/42979)

<div class="topic-metadata">

**Author:** [@Jacob\_Repucci](https://root-forum.cern.ch/u/Jacob_Repucci)\
**Replies:** 7\
**Last updated:** [January 13, 2021, 3:49pm UTC](https://root-forum.cern.ch/t/segmentation-violation-with-graph/42979 "2021-01-13T15:49:08Z")

</div>

ROOT Version: 6.22 Platform: Linux Compiler: Not Provided Hey all, I’m currently running a program that has two histograms, one of which I draw a fit graph on. The first time I run it, it works fine, but if I try t…

---

## [Geant4 compling error of a repo](https://root-forum.cern.ch/t/geant4-compling-error-of-a-repo/43073)

<div class="topic-metadata">

**Author:** [@cangunes](https://root-forum.cern.ch/u/cangunes)\
**Replies:** 3\
**Last updated:** [January 12, 2021, 3:38pm UTC](https://root-forum.cern.ch/t/geant4-compling-error-of-a-repo/43073 "2021-01-12T15:38:48Z")

</div>

Dear user, i am just a beginner user on Geant4. i have to tried LaBr3 code via https://github.com/giglio0/DRAGON-G4-LaBr3.git. after the configuration while creating build files with make command, the process send a err…

---

## [Memory management with many TGraph.Fit()](https://root-forum.cern.ch/t/memory-management-with-many-tgraph-fit/43058)

<div class="topic-metadata">

**Author:** [@FoxWise](https://root-forum.cern.ch/u/FoxWise)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 3:23pm UTC](https://root-forum.cern.ch/t/memory-management-with-many-tgraph-fit/43058 "2021-01-12T15:23:43Z")

</div>

I have a pseudocode which looks like this double fitFunc(...){ vector\<double\> x, y, x\_err, y\_err; // fill vectors if(x.size() \<= 1) return 0; TGraphErrors gr(x.size(), &x\[0\], &y\[0\], &x\_err\[0\], &y\_err\[0\]…

---

## [Error in Adding same histograms from different root files](https://root-forum.cern.ch/t/error-in-adding-same-histograms-from-different-root-files/42971)

<div class="topic-metadata">

**Author:** [@Towseef\_Rehman](https://root-forum.cern.ch/u/Towseef_Rehman)\
**Replies:** 13\
**Last updated:** [January 11, 2021, 1:15pm UTC](https://root-forum.cern.ch/t/error-in-adding-same-histograms-from-different-root-files/42971 "2021-01-11T13:15:31Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hello there, i am a beginner, i am trying to add histograms (same) fro…

---

## [Solving non linear system with ROOT::Math::GSLMultiRootFinder](https://root-forum.cern.ch/t/solving-non-linear-system-with-root-gslmultirootfinder/43019)

<div class="topic-metadata">

**Author:** [@Lucien\_Causse](https://root-forum.cern.ch/u/Lucien_Causse)\
**Replies:** 2\
**Last updated:** [January 11, 2021, 8:41am UTC](https://root-forum.cern.ch/t/solving-non-linear-system-with-root-gslmultirootfinder/43019 "2021-01-11T08:41:16Z")

</div>

Hello, first of all, happy new year to everyone! I have to solve 4 variable non linear equation systems. I found the class “ROOT::Math::GSLMultiRootFinder” that could do that for me. It seems to find the common root o…

---

## [Root 6.22.06 and matplotlib and Jupyter - what to do?](https://root-forum.cern.ch/t/root-6-22-06-and-matplotlib-and-jupyter-what-to-do/42870)

<div class="topic-metadata">

**Author:** [@Heidi\_M\_Schellman](https://root-forum.cern.ch/u/Heidi_M_Schellman)\
**Replies:** 3\
**Last updated:** [January 11, 2021, 8:12am UTC](https://root-forum.cern.ch/t/root-6-22-06-and-matplotlib-and-jupyter-what-to-do/42870 "2021-01-11T08:12:21Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.22.06 Platform: SL7.9 Compiler: gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) I want to use matplotlib with root histogram…

---

## [Histogram declare position matters or namespace matters](https://root-forum.cern.ch/t/histogram-declare-position-matters-or-namespace-matters/43034)

<div class="topic-metadata">

**Author:** [@jsgou](https://root-forum.cern.ch/u/jsgou)\
**Replies:** 1\
**Last updated:** [January 10, 2021, 10:08am UTC](https://root-forum.cern.ch/t/histogram-declare-position-matters-or-namespace-matters/43034 "2021-01-10T10:08:17Z")

</div>

Hi, Root Experts I use tree-\>Draw(“Ne\>\>h”) to create a histogram. the tree was read from a file and the histogram h is declared as required. The thing is when I declare the h after the file was opened, all is well, how…

---

## [Normalize to SM higgs XS and BR](https://root-forum.cern.ch/t/normalize-to-sm-higgs-xs-and-br/43025)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 3\
**Last updated:** [January 9, 2021, 11:06am UTC](https://root-forum.cern.ch/t/normalize-to-sm-higgs-xs-and-br/43025 "2021-01-09T11:06:07Z")

</div>

hi im trying to normalize my samples to the standard model higgs xs and BR though i dont think im doing it right i produced the samples privately using MG5 firstly for both signal and background i produced 25k event…

---

## [Getting PYTHIA to work with ROOT](https://root-forum.cern.ch/t/getting-pythia-to-work-with-root/42978)

<div class="topic-metadata">

**Author:** [@Jacob\_Repucci](https://root-forum.cern.ch/u/Jacob_Repucci)\
**Replies:** 5\
**Last updated:** [January 8, 2021, 7:24pm UTC](https://root-forum.cern.ch/t/getting-pythia-to-work-with-root/42978 "2021-01-08T19:24:14Z")

</div>

ROOT Version: 6.22 Platform: MacOS Compiler: Not Provided I downloaded ROOT using brew install on my mac. I also downloaded Pythia, but it appears that my C++ code doesn’t recognize any Pythia-based include statemen…

---

## [Computer hardware](https://root-forum.cern.ch/t/computer-hardware/42985)

<div class="topic-metadata">

**Author:** [@chaos](https://root-forum.cern.ch/u/chaos)\
**Replies:** 3\
**Last updated:** [January 7, 2021, 7:04pm UTC](https://root-forum.cern.ch/t/computer-hardware/42985 "2021-01-07T19:04:43Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hi, Whenever I compile and run a program in root, after I found that …

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

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