# Newbie

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

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

---

## [Variable size array workaround](https://root-forum.cern.ch/t/variable-size-array-workaround/49493)

<div class="topic-metadata">

**Author:** [@Ailema](https://root-forum.cern.ch/u/Ailema)\
**Replies:** 3\
**Last updated:** [April 6, 2022, 12:14pm UTC](https://root-forum.cern.ch/t/variable-size-array-workaround/49493 "2022-04-06T12:14:33Z")

</div>

Dear experts, I want to fill a ttree with event and track related objects. So for each event-related observable I have a number of tracks that is the size of the array of the track-related observable. the way I initial…

---

## [How to "print" a variable (aka the newbiest of newbie questions)](https://root-forum.cern.ch/t/how-to-print-a-variable-aka-the-newbiest-of-newbie-questions/49489)

<div class="topic-metadata">

**Author:** [@jaysonl](https://root-forum.cern.ch/u/jaysonl)\
**Replies:** 6\
**Last updated:** [April 6, 2022, 9:38am UTC](https://root-forum.cern.ch/t/how-to-print-a-variable-aka-the-newbiest-of-newbie-questions/49489 "2022-04-06T09:38:39Z")

</div>

This may be the most newbie question of all. Is there a way to get programmatic access to whatever magic ROOT does when you just enter an expression and hit ENTER? Example: I’m messing around with a YAML parser library…

---

## [Multiplication of histo](https://root-forum.cern.ch/t/multiplication-of-histo/49437)

<div class="topic-metadata">

**Author:** [@nmmalikroot](https://root-forum.cern.ch/u/nmmalikroot)\
**Replies:** 4\
**Last updated:** [April 5, 2022, 11:12am UTC](https://root-forum.cern.ch/t/multiplication-of-histo/49437 "2022-04-05T11:12:22Z")

</div>

I have pT specta of a particle, I want to find sqrt(pT^2 + ma^2 - mb^2) I am finding pt^2 by multpling pT sepctra two times . Is it right or wrong? I attached macro . mTScale\_rebin.C (2.7 KB)

---

## [Memory leak check](https://root-forum.cern.ch/t/memory-leak-check/49259)

<div class="topic-metadata">

**Author:** [@Ailema](https://root-forum.cern.ch/u/Ailema)\
**Replies:** 9\
**Last updated:** [April 5, 2022, 12:40am UTC](https://root-forum.cern.ch/t/memory-leak-check/49259 "2022-04-05T00:40:04Z")

</div>

Dear experts, I have a task that has to be ran in a controlled environment where the CPU and memory resources are limited. Therefore, even if my task runs perfectly locally, it not passes the test in the infrastructure …

---

## [Creating a Right Trapezoid Prism](https://root-forum.cern.ch/t/creating-a-right-trapezoid-prism/49458)

<div class="topic-metadata">

**Author:** [@Yasenya](https://root-forum.cern.ch/u/Yasenya)\
**Replies:** 5\
**Last updated:** [April 4, 2022, 3:06pm UTC](https://root-forum.cern.ch/t/creating-a-right-trapezoid-prism/49458 "2022-04-04T15:06:50Z")

</div>

Hello All, I am a newbie to ROOT programming. I am using ROOT version : v6-24-06@v6-24-06 . I am currently trying to construct a right triangular prism. I tried to do so by using the MakeTrd1 command. However I ended …

---

## [2+ TProfile can't draw in same canvas](https://root-forum.cern.ch/t/2-tprofile-cant-draw-in-same-canvas/49427)

<div class="topic-metadata">

**Author:** [@Alkegit21](https://root-forum.cern.ch/u/Alkegit21)\
**Replies:** 4\
**Last updated:** [March 31, 2022, 4:24pm UTC](https://root-forum.cern.ch/t/2-tprofile-cant-draw-in-same-canvas/49427 "2022-03-31T16:24:59Z")

</div>

Hello, I want to draw 2 ProfileX’s in the same canvas: void plotblem(){ gStyle-\>SetOptStat(0); TFile\* fIn = TFile::Open("nTup.root", "READ"); TFile\* fInH = TFile::Open("nTupH.root", "READ"); TH2D\* hfb…

---

## [Automatically separate histogram into X ~equally portions](https://root-forum.cern.ch/t/automatically-separate-histogram-into-x-equally-portions/49413)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 2\
**Last updated:** [March 31, 2022, 7:25am UTC](https://root-forum.cern.ch/t/automatically-separate-histogram-into-x-equally-portions/49413 "2022-03-31T07:25:41Z")

</div>

Hello, is there a way that I can divide a histogram into a number of sections, roughly equal in the number of entries? For example, I have a 2d histogram and I want to take the projection in 6 different regions, with a…

---

## [Error: no member named 'signbit' in the global namespace](https://root-forum.cern.ch/t/error-no-member-named-signbit-in-the-global-namespace/49130)

<div class="topic-metadata">

**Author:** [@preimer](https://root-forum.cern.ch/u/preimer)\
**Replies:** 7\
**Last updated:** [March 29, 2022, 11:04pm UTC](https://root-forum.cern.ch/t/error-no-member-named-signbit-in-the-global-namespace/49130 "2022-03-29T23:04:31Z")

</div>

Hello, I am trying to compile root from source. I have a new installation of OSX12.2.1, and just. installed Xcode 13.2.1 from the App Store (important since many solutions found with Google blame Xcode) and downloaded …

---

## [Variable bin size of histogram](https://root-forum.cern.ch/t/variable-bin-size-of-histogram/49402)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 3\
**Last updated:** [March 29, 2022, 8:23pm UTC](https://root-forum.cern.ch/t/variable-bin-size-of-histogram/49402 "2022-03-29T20:23:53Z")

</div>

I added a variable bin size to my histogram though it gives variable bin size it shift my entire histogram to right, I have tried the both ways but same shift in histogram occurs. Double\_t binEdges\[ \] = { 0, 1, 2, 3, 4…

---

## [Difference between fit panel and programmatically fit](https://root-forum.cern.ch/t/difference-between-fit-panel-and-programmatically-fit/49389)

<div class="topic-metadata">

**Author:** [@Pete](https://root-forum.cern.ch/u/Pete)\
**Replies:** 7\
**Last updated:** [March 29, 2022, 3:45pm UTC](https://root-forum.cern.ch/t/difference-between-fit-panel-and-programmatically-fit/49389 "2022-03-29T15:45:37Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.24.06 Platform: macOS Monterey 12.2.1 I have a histogram of several peaks but only want to fit one of the peaks. For that specif…

---

## [Getting Root started on Windows](https://root-forum.cern.ch/t/getting-root-started-on-windows/49398)

<div class="topic-metadata">

**Author:** [@Rahon](https://root-forum.cern.ch/u/Rahon)\
**Replies:** 3\
**Last updated:** [March 29, 2022, 3:33pm UTC](https://root-forum.cern.ch/t/getting-root-started-on-windows/49398 "2022-03-29T15:33:45Z")

</div>

Hello all, I am attempting to get Root up and running on my Windows machine (if this fails I guess I will partition my hard drive to run Linux). I see there have been a few questions on this but the responses don’t quit…

---

## [Drawing multiple graphs](https://root-forum.cern.ch/t/drawing-multiple-graphs/49395)

<div class="topic-metadata">

**Author:** [@Muugiikun](https://root-forum.cern.ch/u/Muugiikun)\
**Replies:** 1\
**Last updated:** [March 29, 2022, 12:52pm UTC](https://root-forum.cern.ch/t/drawing-multiple-graphs/49395 "2022-03-29T12:52:26Z")

</div>

Hello, I’m completely newbie at root. I’ve a root graphs from Geant4 simulation. What i want to do is compare my results on one canvas. How to draw multiple graphs on root?

---

## [Problem in creating root file](https://root-forum.cern.ch/t/problem-in-creating-root-file/49390)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 3\
**Last updated:** [March 29, 2022, 7:21am UTC](https://root-forum.cern.ch/t/problem-in-creating-root-file/49390 "2022-03-29T07:21:53Z")

</div>

I had been having problem in creating root file; I have been using given code to create tree and root file, current\_ntuple.C (656 Bytes) Thank You.

---

## [Generate root file event by event using RDataFrame for unknown number of events](https://root-forum.cern.ch/t/generate-root-file-event-by-event-using-rdataframe-for-unknown-number-of-events/49362)

<div class="topic-metadata">

**Author:** [@brencic](https://root-forum.cern.ch/u/brencic)\
**Replies:** 9\
**Last updated:** [March 28, 2022, 2:01pm UTC](https://root-forum.cern.ch/t/generate-root-file-event-by-event-using-rdataframe-for-unknown-number-of-events/49362 "2022-03-28T14:01:04Z")

</div>

Hey I have to generate a root tree and don’t know how many events I will have to store at compile time. So I’m forced to add to the tree event, by event, or every n events. I know how to do this in the “old ROOT”, but …

---

## [Your input to ROOT (please)](https://root-forum.cern.ch/t/your-input-to-root-please/49383)

<div class="topic-metadata">

**Author:** [@Axel](https://root-forum.cern.ch/u/Axel)\
**Replies:** 0\
**Last updated:** [March 28, 2022, 12:41pm UTC](https://root-forum.cern.ch/t/your-input-to-root-please/49383 "2022-03-28T12:41:56Z")

</div>

Hi, Are you in your first or second year of your PhD? Did you start using ROOT a year or two ago? For the ROOT Workshop 2022 we would love to hear from you: what works well, what’s really hard with ROOT? A significant …

---

## [Histogram styles with DrawNormalized](https://root-forum.cern.ch/t/histogram-styles-with-drawnormalized/49376)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 9:58am UTC](https://root-forum.cern.ch/t/histogram-styles-with-drawnormalized/49376 "2022-03-28T09:58:17Z")

</div>

Dear Experts, I want to compare the shapes of two histograms that have different entries. To do this, I am trying to draw two normalized histograms using the DrawNormalize option and sames. The y axis does change when …

---

## [Error of \*\*\*Break\*\*\*Segmentation violation](https://root-forum.cern.ch/t/error-of-break-segmentation-violation/49373)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 7:46am UTC](https://root-forum.cern.ch/t/error-of-break-segmentation-violation/49373 "2022-03-28T07:46:01Z")

</div>

my code shows an error; Thanks for help. \*\*\* Break \*\*\* segmentation violation \[/usr/lib/system/libsystem\_platform.dylib\] \_sigtramp (no debug info) \[\<unknown binary\>\] (no debug info) \[\<unknown binary\>\] (no debug info…

---

## [Numbers in scientific format on the x-axis of 1D histogram](https://root-forum.cern.ch/t/numbers-in-scientific-format-on-the-x-axis-of-1d-histogram/49365)

<div class="topic-metadata">

**Author:** [@Songshaptak\_De](https://root-forum.cern.ch/u/Songshaptak_De)\
**Replies:** 5\
**Last updated:** [March 28, 2022, 6:31am UTC](https://root-forum.cern.ch/t/numbers-in-scientific-format-on-the-x-axis-of-1d-histogram/49365 "2022-03-28T06:31:26Z")

</div>

I want to make the numbers appearing the x-axis of my 1D histogram to appear in a scientific format, i.e. 0.0006 will look like 6x10^-4. I am using ROOT Version: 5.34/09. Is there any function in this version of this ROO…

---

## [Binomial Distribution](https://root-forum.cern.ch/t/binomial-distribution/49353)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 2\
**Last updated:** [March 25, 2022, 4:10pm UTC](https://root-forum.cern.ch/t/binomial-distribution/49353 "2022-03-25T16:10:32Z")

</div>

I wanted to know if there is anyway to include the vertical bar of binomial uncertainty itself in the plot in histogram.

---

## [Variable Bins](https://root-forum.cern.ch/t/variable-bins/49318)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 6\
**Last updated:** [March 24, 2022, 2:41pm UTC](https://root-forum.cern.ch/t/variable-bins/49318 "2022-03-24T14:41:26Z")

</div>

I am new to root, I have used a variable bins in my histogram but instead the bins it shifted my histogram to right. ‘’’ const Int\_t NBINS = 42; Double\_t edges\[NBINS + 1\] =. {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,…

---

## [Output does not redirect in expected order](https://root-forum.cern.ch/t/output-does-not-redirect-in-expected-order/49348)

<div class="topic-metadata">

**Author:** [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Replies:** 1\
**Last updated:** [March 24, 2022, 5:46pm UTC](https://root-forum.cern.ch/t/output-does-not-redirect-in-expected-order/49348 "2022-03-24T17:46:31Z")

</div>

When I redirect stdout to a log file, ROOT output always appears at the top of the file, regardless of its sequence in the script. If I don’t redirect it, it appears where I would expect. Is there some kind of shell magi…

---

## [Histogram RVec branch in RDataFrame](https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342)

<div class="topic-metadata">

**Author:** [@certley](https://root-forum.cern.ch/u/certley)\
**Replies:** 2\
**Last updated:** [March 24, 2022, 2:58pm UTC](https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342 "2022-03-24T14:58:32Z")

</div>

In my TTree, I have an RVec branch for the energy in each detector channel. When using RDataFrame, why do I have to define a new column to create a histogram of a single channel? For example, why do you have to use this: …

---

## [Selecting events from multiple time ranges](https://root-forum.cern.ch/t/selecting-events-from-multiple-time-ranges/49315)

<div class="topic-metadata">

**Author:** [@Chinmay](https://root-forum.cern.ch/u/Chinmay)\
**Replies:** 4\
**Last updated:** [March 24, 2022, 8:02am UTC](https://root-forum.cern.ch/t/selecting-events-from-multiple-time-ranges/49315 "2022-03-24T08:02:47Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.24.06 Platform: Not Provided Compiler: Not Provided I have list of tuples which define chronologically ordered time ranges like …

---

## [Adding binomial Uncertainty in histogram](https://root-forum.cern.ch/t/adding-binomial-uncertainty-in-histogram/49201)

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 6\
**Last updated:** [March 24, 2022, 2:26am UTC](https://root-forum.cern.ch/t/adding-binomial-uncertainty-in-histogram/49201 "2022-03-24T02:26:20Z")

</div>

Trying to add the binomial uncertainty in my histogram. for(ULong64\_t i = 0; i \< NumBins; i++) { Threshold = i; Int\_t count = 0; for(ULong64\_t e = 0; e \< nEntries; e++) { …

---

## [Working with a histogram](https://root-forum.cern.ch/t/working-with-a-histogram/49139)

<div class="topic-metadata">

**Author:** [@Russell\_Marroquin](https://root-forum.cern.ch/u/Russell_Marroquin)\
**Replies:** 2\
**Last updated:** [March 23, 2022, 4:42pm UTC](https://root-forum.cern.ch/t/working-with-a-histogram/49139 "2022-03-23T16:42:23Z")

</div>

Hi everyone, I am newbie, and I have a quick question. Hopefully, you will be able to help me. I have a 1D histogram, which is a projectionX() of a TH2D histogram, and I am wondering if it is possible to get the entries…

---

## [Compatibility ROOT with new M1 processor for Mac](https://root-forum.cern.ch/t/compatibility-root-with-new-m1-processor-for-mac/49322)

<div class="topic-metadata">

**Author:** [@cob](https://root-forum.cern.ch/u/cob)\
**Replies:** 2\
**Last updated:** [March 23, 2022, 1:15pm UTC](https://root-forum.cern.ch/t/compatibility-root-with-new-m1-processor-for-mac/49322 "2022-03-23T13:15:44Z")

</div>

Hi, I need to buy a new Macbook and before, I would like to be sure that ROOT is compatible with its new M1 processor. Please, anyone have an idea about this ? Thank you

---

## [TEfficiency TH2 coloring](https://root-forum.cern.ch/t/tefficiency-th2-coloring/49320)

<div class="topic-metadata">

**Author:** [@dcentanni](https://root-forum.cern.ch/u/dcentanni)\
**Replies:** 9\
**Last updated:** [March 23, 2022, 12:16pm UTC](https://root-forum.cern.ch/t/tefficiency-th2-coloring/49320 "2022-03-23T12:16:27Z")

</div>

Hello everyone, I made an efficiency map, a TH2 with TEfficiency::CreateHistogram(), using two existing TH2 (the “passed” one and the “total” one). I just wanted to ask how can I make the empty bins white (the ones wher…

---

## [Library not loaded: @rpath/libGui.so](https://root-forum.cern.ch/t/library-not-loaded-rpath-libgui-so/49309)

<div class="topic-metadata">

**Author:** [@Pete](https://root-forum.cern.ch/u/Pete)\
**Replies:** 7\
**Last updated:** [March 23, 2022, 9:30am UTC](https://root-forum.cern.ch/t/library-not-loaded-rpath-libgui-so/49309 "2022-03-23T09:30:16Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.24.06 Platform: macOS Monterey 12.2.1 I have an executable that can run without any issues at the command line like follow: ./e…

---

## [How to draw new graph with new point?](https://root-forum.cern.ch/t/how-to-draw-new-graph-with-new-point/49308)

<div class="topic-metadata">

**Author:** [@roany01](https://root-forum.cern.ch/u/roany01)\
**Replies:** 1\
**Last updated:** [March 23, 2022, 7:47am UTC](https://root-forum.cern.ch/t/how-to-draw-new-graph-with-new-point/49308 "2022-03-23T07:47:08Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.24/06 Platform: Mac Apple M1 Compiler: XCODE 12 I wanted to ask for a information. I am studying ROOT. I have 100 files and e…

---

## [Ploting with dual monitors](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 2\
**Last updated:** [March 22, 2022, 2:56pm UTC](https://root-forum.cern.ch/t/ploting-with-dual-monitors/49306 "2022-03-22T14:56:18Z")

</div>

Hi all, I am currently using two monitors. Is it possible to create Canvas only in the monitor I am using? Currently, If I have the terminal open in my second monitor and I run a script, all canvas are being created in…

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

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