# Newbie

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

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

---

## [Drawing multiple Histograms in one canvas using Dividing method](https://root-forum.cern.ch/t/drawing-multiple-histograms-in-one-canvas-using-dividing-method/42993)

<div class="topic-metadata">

**Author:** [@Mo922022](https://root-forum.cern.ch/u/Mo922022)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 1:56pm UTC](https://root-forum.cern.ch/t/drawing-multiple-histograms-in-one-canvas-using-dividing-method/42993 "2021-01-07T13:56:51Z")

</div>

Here in this code I have a problem in constructing a method for Drawing a different graphs between direction of particles in X, Y and Z with Energy in 3 Histograms in one Canvas, I want all of them in one canvas using di…

---

## [Overlaying ProfileY on TH2D](https://root-forum.cern.ch/t/overlaying-profiley-on-th2d/42955)

<div class="topic-metadata">

**Author:** [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Replies:** 3\
**Last updated:** [January 7, 2021, 6:49am UTC](https://root-forum.cern.ch/t/overlaying-profiley-on-th2d/42955 "2021-01-07T06:49:01Z")

</div>

Hello Everyone, I have these two plots that I would like to overlay on top of each other. But, some how I am unable to. Here is a pdf of the plots: overlayingPlots.pdf (154.8 KB) What I want is for the ProfileY plot to…

---

## [Problem fitting Toy mc](https://root-forum.cern.ch/t/problem-fitting-toy-mc/42653)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 6\
**Last updated:** [January 5, 2021, 7:49pm UTC](https://root-forum.cern.ch/t/problem-fitting-toy-mc/42653 "2021-01-05T19:49:28Z")

</div>

Hello, I am trying to do a toy mc with fixed bins, where I have a 5 parameter function, which I use to generate data and to fit the data that it generates. For some reason when I run this script, the p-value is 0. I don…

---

## [Complex number imaginary](https://root-forum.cern.ch/t/complex-number-imaginary/42925)

<div class="topic-metadata">

**Author:** [@chaos](https://root-forum.cern.ch/u/chaos)\
**Replies:** 11\
**Last updated:** [January 5, 2021, 5:02pm UTC](https://root-forum.cern.ch/t/complex-number-imaginary/42925 "2021-01-05T17:02:12Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided I am unable to print sqrt(-1) i.e Imaginary number i. So please help

---

## [Display error at WSL](https://root-forum.cern.ch/t/display-error-at-wsl/42901)

<div class="topic-metadata">

**Author:** [@Keistad](https://root-forum.cern.ch/u/Keistad)\
**Replies:** 3\
**Last updated:** [January 5, 2021, 12:38pm UTC](https://root-forum.cern.ch/t/display-error-at-wsl/42901 "2021-01-05T12:38:13Z")

</div>

I install root in WSL. And I write a simple code which draw graph. I sure that the code hasn’t problem. But the graph isn’t invoked and following massage occurs; Error in TGClient::TGClient: can’t open display “:0”, swi…

---

## [Adding fitting parameters to the statistical box in multiple canvas](https://root-forum.cern.ch/t/adding-fitting-parameters-to-the-statistical-box-in-multiple-canvas/42908)

<div class="topic-metadata">

**Author:** [@zero1](https://root-forum.cern.ch/u/zero1)\
**Replies:** 3\
**Last updated:** [January 4, 2021, 3:33pm UTC](https://root-forum.cern.ch/t/adding-fitting-parameters-to-the-statistical-box-in-multiple-canvas/42908 "2021-01-04T15:33:25Z")

</div>

I have one macro that creates 4 different canvas, the last two canvas are respectively a canvas with one graph and a canvas with two graph, the code is as follows: auto Histogram\_canvas\_fitted=new TCanvas("Histogram…

---

## [Complex number based](https://root-forum.cern.ch/t/complex-number-based/42924)

<div class="topic-metadata">

**Author:** [@chaos](https://root-forum.cern.ch/u/chaos)\
**Replies:** 1\
**Last updated:** [January 4, 2021, 3:18pm UTC](https://root-forum.cern.ch/t/complex-number-based/42924 "2021-01-04T15:18:42Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided How to print imaginary part of complex number.

---

## [THStack GetHistogram?](https://root-forum.cern.ch/t/thstack-gethistogram/42930)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 1\
**Last updated:** [January 4, 2021, 3:13pm UTC](https://root-forum.cern.ch/t/thstack-gethistogram/42930 "2021-01-04T15:13:17Z")

</div>

hi, im trying to produce a plot as such i see that it plots the signal first(dash) then plots the background (red blue) but im not sure how to do this, i saw the GetHistogram option in THStack, but doesnt really answ…

---

## [Pyroot loading a single value out of a vector in a tree](https://root-forum.cern.ch/t/pyroot-loading-a-single-value-out-of-a-vector-in-a-tree/42810)

<div class="topic-metadata">

**Author:** [@henrysp](https://root-forum.cern.ch/u/henrysp)\
**Replies:** 6\
**Last updated:** [January 4, 2021, 2:44pm UTC](https://root-forum.cern.ch/t/pyroot-loading-a-single-value-out-of-a-vector-in-a-tree/42810 "2021-01-04T14:44:14Z")

</div>

Hello, I wanted to create a tree with vectors in which I can save different values and the time I get these. To keep it simple i tried this code to create my file with the values. file = ROOT.TFile.Open(name,“create”) …

---

## [How to convert window log csv file to .root file](https://root-forum.cern.ch/t/how-to-convert-window-log-csv-file-to-root-file/42802)

<div class="topic-metadata">

**Author:** [@Learn\_To\_Learn](https://root-forum.cern.ch/u/Learn_To_Learn)\
**Replies:** 5\
**Last updated:** [January 4, 2021, 11:34am UTC](https://root-forum.cern.ch/t/how-to-convert-window-log-csv-file-to-root-file/42802 "2021-01-04T11:34:55Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.22.06 \_Platform: ubuntu 20.04 \_Compiler: GNU g++ Hi Everyone, I need to do analytics on windows log file which is in .csv for…

---

## [ROOT and vectorization?](https://root-forum.cern.ch/t/root-and-vectorization/42915)

<div class="topic-metadata">

**Author:** [@dertexaner](https://root-forum.cern.ch/u/dertexaner)\
**Replies:** 2\
**Last updated:** [January 4, 2021, 10:05am UTC](https://root-forum.cern.ch/t/root-and-vectorization/42915 "2021-01-04T10:05:51Z")

</div>

Dear experts, I have been observing some interesting crashes for a typical pyROOT analysis code based on RDataFrame. The jobs are being run on a local condor system, and I consistently observe a “\*\*\* Break \*\*\* illegal …

---

## [Fill TTree in pyroot loop](https://root-forum.cern.ch/t/fill-ttree-in-pyroot-loop/42824)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 5\
**Last updated:** [January 4, 2021, 9:54am UTC](https://root-forum.cern.ch/t/fill-ttree-in-pyroot-loop/42824 "2021-01-04T09:54:20Z")

</div>

Dear, I trying to fill a new tree from events using tchain: outfile = ROOT.TFile("Smaller.root",'recreate') get\_var = ROOT.vector('float')(0) subtree = ROOT.TTree("subtree","subtree") subtree.Branch("var", get\_var,…

---

## [Spread Option, "s", in TProfile](https://root-forum.cern.ch/t/spread-option-s-in-tprofile/42847)

<div class="topic-metadata">

**Author:** [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Replies:** 3\
**Last updated:** [December 30, 2020, 7:36pm UTC](https://root-forum.cern.ch/t/spread-option-s-in-tprofile/42847 "2020-12-30T19:36:43Z")

</div>

Hello everyone, I am trying to use the spread option of the TProfile function. Here is what I am doing: TProfile\* histo2ProfY2 = Histogram2-\>ProfileY("histo2ProfY2", 0, -1, "s \[cut1\]"); histo2ProfY2-\>Se…

---

## [TH1 methods can't find correct minimum and maximum values for a filled histogram](https://root-forum.cern.ch/t/th1-methods-cant-find-correct-minimum-and-maximum-values-for-a-filled-histogram/42894)

<div class="topic-metadata">

**Author:** [@jemarq04](https://root-forum.cern.ch/u/jemarq04)\
**Replies:** 2\
**Last updated:** [December 30, 2020, 6:08pm UTC](https://root-forum.cern.ch/t/th1-methods-cant-find-correct-minimum-and-maximum-values-for-a-filled-histogram/42894 "2020-12-30T18:08:55Z")

</div>

I was trying to compare a pair of histograms by drawing on the same canvas, but I needed to resize. When resizing, I found that none of the TH1 methods were giving me accurate values. For instance, all of the following m…

---

## [Compile Macro with GSL libraries](https://root-forum.cern.ch/t/compile-macro-with-gsl-libraries/31984)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 6\
**Last updated:** [December 26, 2020, 10:13am UTC](https://root-forum.cern.ch/t/compile-macro-with-gsl-libraries/31984 "2020-12-26T10:13:40Z")

</div>

I have a macro to solve differential equations using the RK4 method in the GSL libraries. At the top of my .cpp file I have R\_\_LOAD\_LIBRARY(gsl); #include \<gsl/gsl\_matrix.h\> #include \<gsl/gsl\_odeiv2.h\> with the ot…

---

## [Error in \<TTreeFormula::Compile\>: Bad numerical expression : "bifTime"](https://root-forum.cern.ch/t/error-in-ttreeformula-compile-bad-numerical-expression-biftime/40625)

<div class="topic-metadata">

**Author:** [@Aveen](https://root-forum.cern.ch/u/Aveen)\
**Replies:** 5\
**Last updated:** [December 24, 2020, 12:14am UTC](https://root-forum.cern.ch/t/error-in-ttreeformula-compile-bad-numerical-expression-biftime/40625 "2020-12-24T00:14:48Z")

</div>

I have 4 existing branch variables: bif\_nTrigger, bif\_source, bif\_BXID and bif\_Time. The first three are integers, the last one is a float. The last three variables all depend on the first, bif\_nTrigger. These have all b…

---

## [Smoothing out a TGraph plot](https://root-forum.cern.ch/t/smoothing-out-a-tgraph-plot/42832)

<div class="topic-metadata">

**Author:** [@obitter16](https://root-forum.cern.ch/u/obitter16)\
**Replies:** 3\
**Last updated:** [December 23, 2020, 8:56am UTC](https://root-forum.cern.ch/t/smoothing-out-a-tgraph-plot/42832 "2020-12-23T08:56:25Z")

</div>

Dear experts, I’m trying to figure out if I can “smooth” a curve of a TGraph line that is plotted on a TH2D frame. I know that in the histogram itself, I can change the number of bins, but this doesn’t affect the TGraph…

---

## [ROOT Classes in Python](https://root-forum.cern.ch/t/root-classes-in-python/42748)

<div class="topic-metadata">

**Author:** [@Skip](https://root-forum.cern.ch/u/Skip)\
**Replies:** 4\
**Last updated:** [December 22, 2020, 4:38pm UTC](https://root-forum.cern.ch/t/root-classes-in-python/42748 "2020-12-22T16:38:46Z")

</div>

Hey, all! I’ve been working in Python 3.x a lot and am in the process of reproducing many functions native to ROOT but in a numpy/pandas format. Most things I’m doing (going over StPico files for STAR analysis) are prett…

---

## [Same content but different file sizes ROOT](https://root-forum.cern.ch/t/same-content-but-different-file-sizes-root/42536)

<div class="topic-metadata">

**Author:** [@alexantony.arokiaraj](https://root-forum.cern.ch/u/alexantony.arokiaraj)\
**Replies:** 6\
**Last updated:** [December 22, 2020, 1:14am UTC](https://root-forum.cern.ch/t/same-content-but-different-file-sizes-root/42536 "2020-12-22T01:14:00Z")

</div>

I have two output root files generated by the same function Output File1: generated by function run in stand-alone mode Output File2: Run from Spark-Submit in parallel mode They both contain the same number of entries…

---

## [Adding bin-by-bin significances](https://root-forum.cern.ch/t/adding-bin-by-bin-significances/42812)

<div class="topic-metadata">

**Author:** [@dan\_m](https://root-forum.cern.ch/u/dan_m)\
**Replies:** 1\
**Last updated:** [December 21, 2020, 10:35am UTC](https://root-forum.cern.ch/t/adding-bin-by-bin-significances/42812 "2020-12-21T10:35:57Z")

</div>

Dear experts, This is a follow-up on the following thread which is now closed: https://root-forum.cern.ch/t/significance-bin-by-bin/37269 so I am creating a new thread. I have a similar construct with a background and …

---

## [Building Root 6.22.06 from source Ubuntu 20.04](https://root-forum.cern.ch/t/building-root-6-22-06-from-source-ubuntu-20-04/42798)

<div class="topic-metadata">

**Author:** [@henrysp](https://root-forum.cern.ch/u/henrysp)\
**Replies:** 4\
**Last updated:** [December 19, 2020, 4:48pm UTC](https://root-forum.cern.ch/t/building-root-6-22-06-from-source-ubuntu-20-04/42798 "2020-12-19T16:48:28Z")

</div>

Hello, I am trying to create ROOT from the source in Order to use Pyroot. While running cmake – build . --target install i get the following error: \[ 90%\] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/NeuralN…

---

## [SegFault calling GetN() method of a TGraph object](https://root-forum.cern.ch/t/segfault-calling-getn-method-of-a-tgraph-object/42747)

<div class="topic-metadata">

**Author:** [@Juan\_Sanchez](https://root-forum.cern.ch/u/Juan_Sanchez)\
**Replies:** 6\
**Last updated:** [December 16, 2020, 12:03pm UTC](https://root-forum.cern.ch/t/segfault-calling-getn-method-of-a-tgraph-object/42747 "2020-12-16T12:03:13Z")

</div>

Hello, I’ve been having trouble running the following script successfully. SignalToNoiseRatio.cpp (4.1 KB) What occurs is that there is a segfault on line 94 where the class method GetN() for a TGraph object is called…

---

## [How to split subdirectories into different root files?](https://root-forum.cern.ch/t/how-to-split-subdirectories-into-different-root-files/42705)

<div class="topic-metadata">

**Author:** [@dongjokim](https://root-forum.cern.ch/u/dongjokim)\
**Replies:** 2\
**Last updated:** [December 15, 2020, 3:07pm UTC](https://root-forum.cern.ch/t/how-to-split-subdirectories-into-different-root-files/42705 "2020-12-15T15:07:16Z")

</div>

Hello, I have a root file which contains 5 subdirectories. Each subdirectory also consist of few directories and many histograms are in each directory. I want to make each directory into a separate root file, of course…

---

## [Confusion when declaring a TFile](https://root-forum.cern.ch/t/confusion-when-declaring-a-tfile/42734)

<div class="topic-metadata">

**Author:** [@ed20](https://root-forum.cern.ch/u/ed20)\
**Replies:** 6\
**Last updated:** [December 15, 2020, 10:55am UTC](https://root-forum.cern.ch/t/confusion-when-declaring-a-tfile/42734 "2020-12-15T10:55:13Z")

</div>

I know this is a completely trivial question, but I am confused about how to declare a TFile without the use of pointers and would appreciate any advice. Why does the following compile: #include \<iostream\> #include \<st…

---

## [Segmentation violation on closing TFile](https://root-forum.cern.ch/t/segmentation-violation-on-closing-tfile/42693)

<div class="topic-metadata">

**Author:** [@mrTuna](https://root-forum.cern.ch/u/mrTuna)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 11:18am UTC](https://root-forum.cern.ch/t/segmentation-violation-on-closing-tfile/42693 "2020-12-11T11:18:48Z")

</div>

Hello, I am having trouble with a very simple matter. The following code attempts to create a directory and save a histogram in it AND not use new to create the histogram. Unfortunately it gives a segfault. Why is that? …

---

## [Cutting histogram using TLine](https://root-forum.cern.ch/t/cutting-histogram-using-tline/42546)

<div class="topic-metadata">

**Author:** [@Abh](https://root-forum.cern.ch/u/Abh)\
**Replies:** 4\
**Last updated:** [December 11, 2020, 10:05am UTC](https://root-forum.cern.ch/t/cutting-histogram-using-tline/42546 "2020-12-11T10:05:36Z")

</div>

Hi all, I want to draw a line on the histogram as a cut and exclude the upper part. I want to only consider the part below the line. I tried like this double xmin = -0.63; double xmax = 0.97; double ymin = 1.22; dou…

---

## [Unable to Retain the Style of the projection Histogram on using HBAR](https://root-forum.cern.ch/t/unable-to-retain-the-style-of-the-projection-histogram-on-using-hbar/42584)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 8\
**Last updated:** [December 4, 2020, 10:27am UTC](https://root-forum.cern.ch/t/unable-to-retain-the-style-of-the-projection-histogram-on-using-hbar/42584 "2020-12-04T10:27:20Z")

</div>

Dear Experts, I am trying to make a 2D plot and its 1D projections. Here’s the macrob2\_style\_pad.C (7.0 KB) and the root file for\_fds\_plots.root (177.2 KB) that i am using. The resulting plot that I get, is:unnamed.pd…

---

## [Problem with Root Library](https://root-forum.cern.ch/t/problem-with-root-library/42680)

<div class="topic-metadata">

**Author:** [@NinoFrassica](https://root-forum.cern.ch/u/NinoFrassica)\
**Replies:** 5\
**Last updated:** [December 10, 2020, 4:52pm UTC](https://root-forum.cern.ch/t/problem-with-root-library/42680 "2020-12-10T16:52:45Z")

</div>

Hi, I’m new to the forum and I’m (of course) newbie. I’m trying to run some program but I get this kind of error: IncrementalExecutor::executeFunction: symbol ‘ZSt3powIiiEN9\_\_gnu\_cxx11\_\_promote\_2IT\_T0\_NS0\_9\_\_promoteIS2…

---

## [Trouble with pyRoot](https://root-forum.cern.ch/t/trouble-with-pyroot/41995)

<div class="topic-metadata">

**Author:** [@krausejm](https://root-forum.cern.ch/u/krausejm)\
**Replies:** 9\
**Last updated:** [December 10, 2020, 10:15am UTC](https://root-forum.cern.ch/t/trouble-with-pyroot/41995 "2020-12-10T10:15:24Z")

</div>

ROOT Version: 6.22 Platform: Linux greetings. i want to use root within python and followed the instructions here https://root.cern/manual/python/ which do not seem that complicated since root is already installed on …

---

## [TLegend entry for TMultigraph](https://root-forum.cern.ch/t/tlegend-entry-for-tmultigraph/42673)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 7:07am UTC](https://root-forum.cern.ch/t/tlegend-entry-for-tmultigraph/42673 "2020-12-10T07:07:32Z")

</div>

hi, im wonder how to set the entry option so that it shows the markerstyle as well, also for option ‘l’ here how do i set the colour of the line? { gROOT-\>Reset(); gStyle-\>SetOptStat(0); TCanvas \*c…

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

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