# Newbie

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

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

---

## [Error of inverse matrix](https://root-forum.cern.ch/t/error-of-inverse-matrix/51582)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 1\
**Last updated:** [September 15, 2022, 7:39pm UTC](https://root-forum.cern.ch/t/error-of-inverse-matrix/51582 "2022-09-15T19:39:53Z")

</div>

Hello Rooters, Is there a direct way to calculate the error of the inverse matrix? I have a 6 x 6 matrix. I used following lines to take a the inverse of my matrix.I am looking note/code for calculate the error of th…

---

## [Scaling histograms before stacking them with option "nostackb" removes the bins width and colors](https://root-forum.cern.ch/t/scaling-histograms-before-stacking-them-with-option-nostackb-removes-the-bins-width-and-colors/51573)

<div class="topic-metadata">

**Author:** [@Maxime\_Jotterand](https://root-forum.cern.ch/u/Maxime_Jotterand)\
**Replies:** 6\
**Last updated:** [September 15, 2022, 10:28am UTC](https://root-forum.cern.ch/t/scaling-histograms-before-stacking-them-with-option-nostackb-removes-the-bins-width-and-colors/51573 "2022-09-15T10:28:05Z")

</div>

Hello, I am stacking 3 non-normalized histograms and assign each of them colors. The result is what I am looking for; visible bins with the respective color. Now, whenever I try to scale each histograms before integrati…

---

## [Integrate gaus fit with infinite bounds](https://root-forum.cern.ch/t/integrate-gaus-fit-with-infinite-bounds/51569)

<div class="topic-metadata">

**Author:** [@Kshire](https://root-forum.cern.ch/u/Kshire)\
**Replies:** 1\
**Last updated:** [September 15, 2022, 7:53am UTC](https://root-forum.cern.ch/t/integrate-gaus-fit-with-infinite-bounds/51569 "2022-09-15T07:53:22Z")

</div>

I am fitting a double gaussian, and would like to store each of their integrals from -inf to +inf. I’ve looked through other posts and tutorials, and ended up following the methods here Integration of a multidimensional …

---

## [Filling a TH1F Conditionally in a "For" Loop](https://root-forum.cern.ch/t/filling-a-th1f-conditionally-in-a-for-loop/51548)

<div class="topic-metadata">

**Author:** [@Rahon](https://root-forum.cern.ch/u/Rahon)\
**Replies:** 9\
**Last updated:** [September 14, 2022, 5:48pm UTC](https://root-forum.cern.ch/t/filling-a-th1f-conditionally-in-a-for-loop/51548 "2022-09-14T17:48:14Z")

</div>

Hello ROOTers, NB: I’ve looked extensively through the forums for this topic and while there are many answers that hint at what I need to accomplish, there are still gaps. Please be gentle. I have a TTree with branches…

---

## [Cannot retrieve histogram from ROOT file](https://root-forum.cern.ch/t/cannot-retrieve-histogram-from-root-file/51566)

<div class="topic-metadata">

**Author:** [@beg1nner](https://root-forum.cern.ch/u/beg1nner)\
**Replies:** 13\
**Last updated:** [September 14, 2022, 5:14pm UTC](https://root-forum.cern.ch/t/cannot-retrieve-histogram-from-root-file/51566 "2022-09-14T17:14:19Z")

</div>

Hello, Can someone help me to spot the mistake in a way how I retrieve the histogram? I do following TFile \*f = TFile::Open("myFile.root"); TH1F \*matched\_plus = (TH1F\*)f-\>Get("ChargeStudies/GenVisTau\_pt; positive char…

---

## [Incorrect information in jupyROOT 2d histograms](https://root-forum.cern.ch/t/incorrect-information-in-jupyroot-2d-histograms/51547)

<div class="topic-metadata">

**Author:** [@sarthchoudhary](https://root-forum.cern.ch/u/sarthchoudhary)\
**Replies:** 6\
**Last updated:** [September 14, 2022, 12:29pm UTC](https://root-forum.cern.ch/t/incorrect-information-in-jupyroot-2d-histograms/51547 "2022-09-14T12:29:09Z")

</div>

The hover information for bin in interactive 2D histograms in jupyter lab (jupyROOT) seems to be pythonic rather than ROOT/C++ (See attached screenshot). Unless, I am mistaken, the first bin in ROOT should be indexed a…

---

## [How to make the Statistics box appear when plotting a THStack (Pyroot)](https://root-forum.cern.ch/t/how-to-make-the-statistics-box-appear-when-plotting-a-thstack-pyroot/51538)

<div class="topic-metadata">

**Author:** [@Diracula](https://root-forum.cern.ch/u/Diracula)\
**Replies:** 3\
**Last updated:** [September 13, 2022, 11:41am UTC](https://root-forum.cern.ch/t/how-to-make-the-statistics-box-appear-when-plotting-a-thstack-pyroot/51538 "2022-09-13T11:41:24Z")

</div>

I’ve been plotting THStacks using: canvas107 = ROOT.TCanvas("c\_mc\_truth\_delta\_r\_lower", "", 800, 800) S\["mc\_truth\_delta\_r\_lower"\].Draw("HIST S SAME") canvas107.Draw() canvasas\['107'\] = canvas107 but I can’t get the sta…

---

## [Normalising in Histogram](https://root-forum.cern.ch/t/normalising-in-histogram/51509)

<div class="topic-metadata">

**Author:** [@souvikc](https://root-forum.cern.ch/u/souvikc)\
**Replies:** 2\
**Last updated:** [September 12, 2022, 5:57am UTC](https://root-forum.cern.ch/t/normalising-in-histogram/51509 "2022-09-12T05:57:01Z")

</div>

Hi everyone, I want to normalize a histogram by dividing each bin with different number i.e divide count in first bin with .5 and second bin with 4. How should I proceed?

---

## [Get values from projection](https://root-forum.cern.ch/t/get-values-from-projection/51536)

<div class="topic-metadata">

**Author:** [@Ailema](https://root-forum.cern.ch/u/Ailema)\
**Replies:** 1\
**Last updated:** [September 11, 2022, 7:53pm UTC](https://root-forum.cern.ch/t/get-values-from-projection/51536 "2022-09-11T19:53:41Z")

</div>

Dear expert, I have a THnSparse with 4 dimension and I want to get the values from one of them. What I have done: THnSparse \*sparse = (THnSparse \*)list-\>FindObject("sparse"); TH1F \*proj = (TH1F \*)sparse-\>Projection(…

---

## [HISTOGRAM fill](https://root-forum.cern.ch/t/histogram-fill/51534)

<div class="topic-metadata">

**Author:** [@Anil\_Kumar](https://root-forum.cern.ch/u/Anil_Kumar)\
**Replies:** 4\
**Last updated:** [September 11, 2022, 3:44pm UTC](https://root-forum.cern.ch/t/histogram-fill/51534 "2022-09-11T15:44:06Z")

</div>

Hi experts, How to fill a histogram in which each bin will contain at least 5 counts. Here is the macro: TFile \*f1 = new TFile("count.root", "RECREATE"); TTree \*tr = new TTree("ntuple", "data"); tr-\>ReadFile("hi…

---

## [How to draw and fit the histogram](https://root-forum.cern.ch/t/how-to-draw-and-fit-the-histogram/51374)

<div class="topic-metadata">

**Author:** [@Anil\_Kumar](https://root-forum.cern.ch/u/Anil_Kumar)\
**Replies:** 11\
**Last updated:** [September 10, 2022, 3:42pm UTC](https://root-forum.cern.ch/t/how-to-draw-and-fit-the-histogram/51374 "2022-09-10T15:42:01Z")

</div>

Hii experts, I have a dat file and want to fill a histogram. Ensure that each bin contains at least 5 counts. Then after it will fit two Gaussian distributions. How to count at least 5 in each bin? kindly help me. Her…

---

## [Error in Pythia8 To hepmc To ROOT](https://root-forum.cern.ch/t/error-in-pythia8-to-hepmc-to-root/51264)

<div class="topic-metadata">

**Author:** [@Raseeb\_Haroon](https://root-forum.cern.ch/u/Raseeb_Haroon)\
**Replies:** 2\
**Last updated:** [September 11, 2022, 11:41am UTC](https://root-forum.cern.ch/t/error-in-pythia8-to-hepmc-to-root/51264 "2022-09-11T11:41:53Z")

</div>

I have been trying to plot data from a .hepmc file using ROOT by following a guide, and after the last step, this is what I’m getting. I’m not sure what to do. I’m new to this and any help would be appreciated. (pythia8…

---

## [Error in \<TTreeReaderValueBase::CreateProxy()\>](https://root-forum.cern.ch/t/error-in-ttreereadervaluebase-createproxy/51510)

<div class="topic-metadata">

**Author:** [@beg1nner](https://root-forum.cern.ch/u/beg1nner)\
**Replies:** 4\
**Last updated:** [September 9, 2022, 1:18pm UTC](https://root-forum.cern.ch/t/error-in-ttreereadervaluebase-createproxy/51510 "2022-09-09T13:18:33Z")

</div>

Hello, I am trying to create histogram which will have only positively charged hadronic taus in it using RDataFrame and I get following error : Error in \<TTreeReaderValueBase::CreateProxy()\>: The branch GenVisTau\_charg…

---

## [Adding Gaussian PDF in event loop](https://root-forum.cern.ch/t/adding-gaussian-pdf-in-event-loop/51483)

<div class="topic-metadata">

**Author:** [@matt](https://root-forum.cern.ch/u/matt)\
**Replies:** 5\
**Last updated:** [September 7, 2022, 9:39pm UTC](https://root-forum.cern.ch/t/adding-gaussian-pdf-in-event-loop/51483 "2022-09-07T21:39:45Z")

</div>

ROOT Version: 6.14.00 Platform: Ubuntu 20.04 LTS Compiler: gcc Dear experts, I would like to kindly ask for your help. As a distribution, I want to add a gaussian pdf generated from the given mean(Ea) and sigma. N…

---

## [Reader multiple files with TTreeReader](https://root-forum.cern.ch/t/reader-multiple-files-with-ttreereader/51474)

<div class="topic-metadata">

**Author:** [@Ramin](https://root-forum.cern.ch/u/Ramin)\
**Replies:** 2\
**Last updated:** [September 7, 2022, 6:44pm UTC](https://root-forum.cern.ch/t/reader-multiple-files-with-ttreereader/51474 "2022-09-07T18:44:21Z")

</div>

Hello everyone, I am currently using a TTreeReader in order to read some data from a certain file. I was wondering whether it would be possible to read from two files in parallel simultaneously by making use of a TTreeR…

---

## [Inverse of a 3D matrix](https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 1\
**Last updated:** [September 7, 2022, 9:10am UTC](https://root-forum.cern.ch/t/inverse-of-a-3d-matrix/51481 "2022-09-07T09:10:45Z")

</div>

Hello, I need to take the inverse of a 3D matrix, Could someone help me with an example code for that? Thanks Dil

---

## [ROOT 6.26.06 installation issues on window](https://root-forum.cern.ch/t/root-6-26-06-installation-issues-on-window/51476)

<div class="topic-metadata">

**Author:** [@June\_Lee](https://root-forum.cern.ch/u/June_Lee)\
**Replies:** 2\
**Last updated:** [September 6, 2022, 7:33pm UTC](https://root-forum.cern.ch/t/root-6-26-06-installation-issues-on-window/51476 "2022-09-06T19:33:56Z")

</div>

Hello, I am trying to install Root on a windows 10 platform. I downloaded the dependencies for cmake, visual studios 2022 17.3, and python as well as root\_v6.26.06. However, when I run the program, I keep getting an err…

---

## [Create function from histogram](https://root-forum.cern.ch/t/create-function-from-histogram/51470)

<div class="topic-metadata">

**Author:** [@Riccardo\_Manfredi](https://root-forum.cern.ch/u/Riccardo_Manfredi)\
**Replies:** 3\
**Last updated:** [September 6, 2022, 1:22pm UTC](https://root-forum.cern.ch/t/create-function-from-histogram/51470 "2022-09-06T13:22:42Z")

</div>

Hi ROOTers, I am following up from a topic that was signed as closed even if not (my bad for never noticiging the last reply). The topic is this one. In the last comment I am suggested to use the constructor auto f1 =…

---

## [Filling TTree but setting Event ID manually?](https://root-forum.cern.ch/t/filling-ttree-but-setting-event-id-manually/51237)

<div class="topic-metadata">

**Author:** [@viktoriak](https://root-forum.cern.ch/u/viktoriak)\
**Replies:** 10\
**Last updated:** [September 6, 2022, 12:42pm UTC](https://root-forum.cern.ch/t/filling-ttree-but-setting-event-id-manually/51237 "2022-09-06T12:42:41Z")

</div>

Hi, I am working on creating root files from binary data files and there was a change of our readout mode. Before our data files were ordered by event number making it easy to fill the TTree after each event. Now the or…

---

## [Reading data from a leaf of a TClonesArray created by MadGraph](https://root-forum.cern.ch/t/reading-data-from-a-leaf-of-a-tclonesarray-created-by-madgraph/50889)

<div class="topic-metadata">

**Author:** [@Ramin](https://root-forum.cern.ch/u/Ramin)\
**Replies:** 13\
**Last updated:** [September 6, 2022, 12:31pm UTC](https://root-forum.cern.ch/t/reading-data-from-a-leaf-of-a-tclonesarray-created-by-madgraph/50889 "2022-09-06T12:31:00Z")

</div>

Hi, all. I was trying to read the data from a decay process that I ran in MadGraph. The result of that simulation in Madgraph gave me a TClonesArray with the name “LHEF” and several branches: Event, Rwgt, and Particle. …

---

## [Add global title to a root canvas](https://root-forum.cern.ch/t/add-global-title-to-a-root-canvas/51463)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 1\
**Last updated:** [September 6, 2022, 4:47am UTC](https://root-forum.cern.ch/t/add-global-title-to-a-root-canvas/51463 "2022-09-06T04:47:14Z")

</div>

Hi everyone, needless to say, I’m very new to ROOT. I’m trying to plot a canvas with divide (3,2) with a global title/heading to the canvas. I haven’t found an appropriate solution to add the title to a canvas (NOT to t…

---

## [Error reading all requested bytes from file](https://root-forum.cern.ch/t/error-reading-all-requested-bytes-from-file/51301)

<div class="topic-metadata">

**Author:** [@azinbeigi](https://root-forum.cern.ch/u/azinbeigi)\
**Replies:** 5\
**Last updated:** [September 6, 2022, 6:07am UTC](https://root-forum.cern.ch/t/error-reading-all-requested-bytes-from-file/51301 "2022-09-06T06:07:59Z")

</div>

Hi everyone, I have thousands of .root data files that I would like to combine using hadd. The problem is that some of them cannot be opened and I would like to come up with a script that loops through the files and rem…

---

## [Unable to use standard libraries in cern root](https://root-forum.cern.ch/t/unable-to-use-standard-libraries-in-cern-root/51449)

<div class="topic-metadata">

**Author:** [@sawan4](https://root-forum.cern.ch/u/sawan4)\
**Replies:** 1\
**Last updated:** [September 5, 2022, 3:29pm UTC](https://root-forum.cern.ch/t/unable-to-use-standard-libraries-in-cern-root/51449 "2022-09-05T15:29:19Z")

</div>

I am unable to use # include and using namespace std; in root. root gives error when I use these. ROOT Version: 6.26/06 Platform: cern root Compiler: cern root

---

## [How to fill a histogram in parallel?](https://root-forum.cern.ch/t/how-to-fill-a-histogram-in-parallel/51430)

<div class="topic-metadata">

**Author:** [@scheng5134](https://root-forum.cern.ch/u/scheng5134)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 4:23pm UTC](https://root-forum.cern.ch/t/how-to-fill-a-histogram-in-parallel/51430 "2022-09-02T16:23:36Z")

</div>

So I have a TTree we’ll call it Data\_A and it has a branch named “Time” and there are millions to sometimes billions of entries. My data analysis is based on the difference in the “Time” values between each entry. And…

---

## [Integration of histogram](https://root-forum.cern.ch/t/integration-of-histogram/51418)

<div class="topic-metadata">

**Author:** [@gurmukh\_dhindsa](https://root-forum.cern.ch/u/gurmukh_dhindsa)\
**Replies:** 2\
**Last updated:** [September 1, 2022, 4:29pm UTC](https://root-forum.cern.ch/t/integration-of-histogram/51418 "2022-09-01T16:29:23Z")

</div>

I have a histogram and I wanted to do an integration of that. It will be a great help ,if you can provide me a script. I am attaching root file output3.root (123.7 KB) ROOT Version: Not Provided Platform: Not Provid…

---

## [TCutG Histogram Integration](https://root-forum.cern.ch/t/tcutg-histogram-integration/51417)

<div class="topic-metadata">

**Author:** [@gurmukh\_dhindsa](https://root-forum.cern.ch/u/gurmukh_dhindsa)\
**Replies:** 1\
**Last updated:** [September 1, 2022, 1:09pm UTC](https://root-forum.cern.ch/t/tcutg-histogram-integration/51417 "2022-09-01T13:09:40Z")

</div>

Hi there, Can you please provide help me to find the integration of the cut inside the histogram? I am attaching the cut file and histogram root file output3.root (123.7 KB) \_ROOT Version:6.24/06 Platform: Not Provid…

---

## [Using ROOT and LXPLUS](https://root-forum.cern.ch/t/using-root-and-lxplus/51275)

<div class="topic-metadata">

**Author:** [@npoliaru](https://root-forum.cern.ch/u/npoliaru)\
**Replies:** 4\
**Last updated:** [September 1, 2022, 10:59am UTC](https://root-forum.cern.ch/t/using-root-and-lxplus/51275 "2022-09-01T10:59:49Z")

</div>

Hello! I am trying to use root with LXPLUS virtual machine and I am having troubles with it. I’ve made a program that creates a graph using data from .csv file. The problem is I can’t see the graph using this machine. I…

---

## [How to avoid the repetition of plots being plotted on all the canvas while using for loop for each canvas](https://root-forum.cern.ch/t/how-to-avoid-the-repetition-of-plots-being-plotted-on-all-the-canvas-while-using-for-loop-for-each-canvas/51328)

<div class="topic-metadata">

**Author:** [@taushy](https://root-forum.cern.ch/u/taushy)\
**Replies:** 7\
**Last updated:** [September 1, 2022, 6:13am UTC](https://root-forum.cern.ch/t/how-to-avoid-the-repetition-of-plots-being-plotted-on-all-the-canvas-while-using-for-loop-for-each-canvas/51328 "2022-09-01T06:13:13Z")

</div>

hello I have plotted Pt Vs mass projections and i have used an array to fill the canvas. code runs fine but when i used more than one loop, in my case i have used three loops for three canvas. The problem I’m facing is…

---

## [How the error of the standard distribution is calculated in root?](https://root-forum.cern.ch/t/how-the-error-of-the-standard-distribution-is-calculated-in-root/51411)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 3\
**Last updated:** [August 31, 2022, 12:39pm UTC](https://root-forum.cern.ch/t/how-the-error-of-the-standard-distribution-is-calculated-in-root/51411 "2022-08-31T12:39:37Z")

</div>

Hi, I wonder how the errors of the standard deviation of a histogram are calculated in root? Say for example, in the following histogram (TH1D\*h1 = new TH1D(“h1”,“Au\_158.62\_MeV”,101.,39.5,140.5) attached : Here the…

---

## [Calling TBrowser + Filename directly in shell](https://root-forum.cern.ch/t/calling-tbrowser-filename-directly-in-shell/50936)

<div class="topic-metadata">

**Author:** [@xaratustra](https://root-forum.cern.ch/u/xaratustra)\
**Replies:** 8\
**Last updated:** [August 31, 2022, 10:54am UTC](https://root-forum.cern.ch/t/calling-tbrowser-filename-directly-in-shell/50936 "2022-08-31T10:54:11Z")

</div>

I successfully use: root --web=off -e 'new TBrowser()' to open a TBrowser directly from shell. But then I have to navigate and find my root file and open it by double click. My question is, is it possible to pass the f…

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

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