# Newbie

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

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

---

## [Trying to print option ...on terminal after giving the command root...for TF1..but I am getting this](https://root-forum.cern.ch/t/trying-to-print-option-on-terminal-after-giving-the-command-root-for-tf1-but-i-am-getting-this/35483)

<div class="topic-metadata">

**Author:** [@sv3048](https://root-forum.cern.ch/u/sv3048)\
**Replies:** 2\
**Last updated:** [August 3, 2019, 2:15pm UTC](https://root-forum.cern.ch/t/trying-to-print-option-on-terminal-after-giving-the-command-root-for-tf1-but-i-am-getting-this/35483 "2019-08-03T14:15:23Z")

</div>

root \[0\] TF1( root (cont’ed, cancel with .@) \[1\] root (cont’ed, cancel with .@) \[1\]

---

## [Incorrect legend displayed](https://root-forum.cern.ch/t/incorrect-legend-displayed/35480)

<div class="topic-metadata">

**Author:** [@diwakar](https://root-forum.cern.ch/u/diwakar)\
**Replies:** 3\
**Last updated:** [August 3, 2019, 9:41am UTC](https://root-forum.cern.ch/t/incorrect-legend-displayed/35480 "2019-08-03T09:41:02Z")

</div>

I am plotting two histograms together. One histogram is plotted in black line and the other in red line. But the legend shows black color for both the histograms. The relevant part of my script is below. I have also uplo…

---

## [TLatex - Combine a string and char\*](https://root-forum.cern.ch/t/tlatex-combine-a-string-and-char/35477)

<div class="topic-metadata">

**Author:** [@Ethan\_Nguyen](https://root-forum.cern.ch/u/Ethan_Nguyen)\
**Replies:** 1\
**Last updated:** [August 2, 2019, 7:35pm UTC](https://root-forum.cern.ch/t/tlatex-combine-a-string-and-char/35477 "2019-08-02T19:35:10Z")

</div>

Hi all, I’m using the TLatex class to make a label, but I’d like it to read “Average” \[string\] with only one TLatex. The label is in the bottom right. Thanks! Here’s what I have so far. Relevant code: char averag…

---

## [Looping over tree branches to find index of leading jet](https://root-forum.cern.ch/t/looping-over-tree-branches-to-find-index-of-leading-jet/35435)

<div class="topic-metadata">

**Author:** [@asidley](https://root-forum.cern.ch/u/asidley)\
**Replies:** 9\
**Last updated:** [August 1, 2019, 12:04pm UTC](https://root-forum.cern.ch/t/looping-over-tree-branches-to-find-index-of-leading-jet/35435 "2019-08-01T12:04:01Z")

</div>

Hi, extreme newbie here. I am not sure if this is a ROOT problem per se or just a c++ problem, since I’m very new to the language. I am writing a function that goes through a Chain of trees from 5 files, and looks for th…

---

## [Fail to build Root on OpenBSD because G\_\_Core.cxx would initialize std::string with a null value](https://root-forum.cern.ch/t/fail-to-build-root-on-openbsd-because-g-core-cxx-would-initialize-std-string-with-a-null-value/35426)

<div class="topic-metadata">

**Author:** [@tuanhtrng](https://root-forum.cern.ch/u/tuanhtrng)\
**Replies:** 2\
**Last updated:** [August 1, 2019, 4:19am UTC](https://root-forum.cern.ch/t/fail-to-build-root-on-openbsd-because-g-core-cxx-would-initialize-std-string-with-a-null-value/35426 "2019-08-01T04:19:20Z")

</div>

I fail to build ROOT 6.18 on OpenBSD 6.5 guest VirtualBox Windows 10 host. The source is taken from GitHub, and the build configuration is gcc-4.9.4 with libcxx=on. The compilation fails to generate G\_\_Core.cxx because…

---

## [Loading Delphes and ExRootAnalysis libraries](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543)

<div class="topic-metadata">

**Author:** [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Replies:** 7\
**Last updated:** [July 31, 2019, 11:00pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543 "2019-07-31T23:00:08Z")

</div>

Hi all, I have a very very naive question, but I would really appreciate if you can help me with it. I’m trying to run a macro .C but I’m having some problemas when I try to load the Delphes and ExRootAnalysis libraries…

---

## [Using MakeClass and Chains](https://root-forum.cern.ch/t/using-makeclass-and-chains/35384)

<div class="topic-metadata">

**Author:** [@KatR](https://root-forum.cern.ch/u/KatR)\
**Replies:** 2\
**Last updated:** [July 31, 2019, 9:21am UTC](https://root-forum.cern.ch/t/using-makeclass-and-chains/35384 "2019-07-31T09:21:54Z")

</div>

Hi everyone! I’ve been trying to run a macro over multiple root files. I used MakeClass on one of these trees to generate a template and then tried to change it to read in a Chain. When I try to run the macro though, it …

---

## [Download ROOT for Visual Studio 2015 platform](https://root-forum.cern.ch/t/download-root-for-visual-studio-2015-platform/35389)

<div class="topic-metadata">

**Author:** [@yupi](https://root-forum.cern.ch/u/yupi)\
**Replies:** 2\
**Last updated:** [July 29, 2019, 3:06pm UTC](https://root-forum.cern.ch/t/download-root-for-visual-studio-2015-platform/35389 "2019-07-29T15:06:29Z")

</div>

Where can I find the link to download the binary files for installing the correct version of ROOT to use it with my Windows Visual Studio 2015? I browsed through past/earlier releases at https://root.cern.ch/releases T…

---

## [Need help with simple root to text file command](https://root-forum.cern.ch/t/need-help-with-simple-root-to-text-file-command/35309)

<div class="topic-metadata">

**Author:** [@jeonyboy](https://root-forum.cern.ch/u/jeonyboy)\
**Replies:** 6\
**Last updated:** [July 29, 2019, 1:07pm UTC](https://root-forum.cern.ch/t/need-help-with-simple-root-to-text-file-command/35309 "2019-07-29T13:07:42Z")

</div>

Hello, I used to use the below command to extract root data and write to a text file. My computer got wiped and I got the latest version of root and it does not work anymore. I am not great with C language so if anyone c…

---

## [Installing ROOT on Mac OS Fatal Error](https://root-forum.cern.ch/t/installing-root-on-mac-os-fatal-error/34365)

<div class="topic-metadata">

**Author:** [@PaulK](https://root-forum.cern.ch/u/PaulK)\
**Replies:** 9\
**Last updated:** [July 29, 2019, 12:35pm UTC](https://root-forum.cern.ch/t/installing-root-on-mac-os-fatal-error/34365 "2019-07-29T12:35:49Z")

</div>

Hello everyone, So I am fairly new to programming in ROOT, so I apologise in advance for my lack of understanding. So far I have followed the guide lines indicated by the ROOT installation procedure Here. First method …

---

## [Take histo from file and overwrite it!](https://root-forum.cern.ch/t/take-histo-from-file-and-overwrite-it/35375)

<div class="topic-metadata">

**Author:** [@siragoni](https://root-forum.cern.ch/u/siragoni)\
**Replies:** 2\
**Last updated:** [July 28, 2019, 2:04pm UTC](https://root-forum.cern.ch/t/take-histo-from-file-and-overwrite-it/35375 "2019-07-28T14:04:15Z")

</div>

Dear All, I am facing this apparently very simple problem. I have even googled on the Root Forum but to no avail… The incriminated piece of code is the following: // TFile\* fileSyst = new TFile("pngResults/Systemat…

---

## [3D Histogram - Labeling the Color Bar](https://root-forum.cern.ch/t/3d-histogram-labeling-the-color-bar/35355)

<div class="topic-metadata">

**Author:** [@Ethan\_Nguyen](https://root-forum.cern.ch/u/Ethan_Nguyen)\
**Replies:** 4\
**Last updated:** [July 26, 2019, 3:49pm UTC](https://root-forum.cern.ch/t/3d-histogram-labeling-the-color-bar/35355 "2019-07-26T15:49:31Z")

</div>

Hi, I’ve enclosed a photo of the 3D histogram. How do I label the colored bar? Thank you so much! ROOT v6.18 on MacOS 10.14.5 void sandbox(){ struct input\_t { Double\_t transmittance; }; input\_t …

---

## [Root Minuit Fitting Discrepancy: Mac versus Linux installation](https://root-forum.cern.ch/t/root-minuit-fitting-discrepancy-mac-versus-linux-installation/34422)

<div class="topic-metadata">

**Author:** [@terjavec](https://root-forum.cern.ch/u/terjavec)\
**Replies:** 2\
**Last updated:** [July 26, 2019, 8:35am UTC](https://root-forum.cern.ch/t/root-minuit-fitting-discrepancy-mac-versus-linux-installation/34422 "2019-07-26T08:35:27Z")

</div>

Hello, Let me preface and say that I am quite green at root; I have had very little experience up until about 3 weeks ago, so I apologize :slight\_smile: I have code that I am running to extract two fit parameters from …

---

## [Error in Parameter settings](https://root-forum.cern.ch/t/error-in-parameter-settings/35328)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 1\
**Last updated:** [July 25, 2019, 3:22pm UTC](https://root-forum.cern.ch/t/error-in-parameter-settings/35328 "2019-07-25T15:22:41Z")

</div>

When I am trying to run this macro I am getting an error in parameter settings. Can someone help me to fix that? I am attaching the input files and executable. Here is the macro mg25yields.cpp (5.8 KB) It includes th…

---

## [3D Histogram - Changing the Physical Length of an Axis](https://root-forum.cern.ch/t/3d-histogram-changing-the-physical-length-of-an-axis/35327)

<div class="topic-metadata">

**Author:** [@Ethan\_Nguyen](https://root-forum.cern.ch/u/Ethan_Nguyen)\
**Replies:** 1\
**Last updated:** [July 25, 2019, 7:40am UTC](https://root-forum.cern.ch/t/3d-histogram-changing-the-physical-length-of-an-axis/35327 "2019-07-25T07:40:38Z")

</div>

Hi, I’m working with 3D histograms. Is it possible to change the physical length of the x-axis? Right now, no matter the ranges for x,y,z, the axis length is identical. Thanks! void sandbox() { //Create and fill T…

---

## [Graphing a 3D Map of a Crystal](https://root-forum.cern.ch/t/graphing-a-3d-map-of-a-crystal/35120)

<div class="topic-metadata">

**Author:** [@Ethan\_Nguyen](https://root-forum.cern.ch/u/Ethan_Nguyen)\
**Replies:** 7\
**Last updated:** [July 23, 2019, 2:49pm UTC](https://root-forum.cern.ch/t/graphing-a-3d-map-of-a-crystal/35120 "2019-07-23T14:49:28Z")

</div>

Hi, I am trying to develop an application to create a 3D map of optical transmittance as a function of position (example attached). Where would be a good place to start? Thanks Root Version: 6.18/00 Platform: OsX 10…

---

## [Multiple particles in event RDataFrame](https://root-forum.cern.ch/t/multiple-particles-in-event-rdataframe/35270)

<div class="topic-metadata">

**Author:** [@gasar8](https://root-forum.cern.ch/u/gasar8)\
**Replies:** 4\
**Last updated:** [July 23, 2019, 2:14pm UTC](https://root-forum.cern.ch/t/multiple-particles-in-event-rdataframe/35270 "2019-07-23T14:14:25Z")

</div>

Hi, I am new to the ROOT and trying to plot some histograms using RDataFrame. However, I encountered some difficulties. After MC generation I converted .lhe files to .root files and loaded them successfully, but I don’t…

---

## [Set Precision in pyROOT](https://root-forum.cern.ch/t/set-precision-in-pyroot/35283)

<div class="topic-metadata">

**Author:** [@Otto\_P](https://root-forum.cern.ch/u/Otto_P)\
**Replies:** 3\
**Last updated:** [July 23, 2019, 1:20pm UTC](https://root-forum.cern.ch/t/set-precision-in-pyroot/35283 "2019-07-23T13:20:50Z")

</div>

Hello everyone. I have copied and modified the following code in pyROOT. I keep getting the error message: Fit:0: RuntimeWarning: Abnormal termination of minimization. Invalid FitResult (status = 4 ). Now and I …

---

## [\`diffsig\` option in TRatioPlot class](https://root-forum.cern.ch/t/diffsig-option-in-tratioplot-class/35264)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 3\
**Last updated:** [July 22, 2019, 2:00pm UTC](https://root-forum.cern.ch/t/diffsig-option-in-tratioplot-class/35264 "2019-07-22T14:00:00Z")

</div>

Hi, I don’t think I understand the diffsig option in the TRatioPlot class, and I was hoping for some clarification: Say that I’m using the constructor new TRatioPlot(hist1, hist2, "diffsig"). If I understand it correct…

---

## [Need to remove the alpha background present in the spectrum](https://root-forum.cern.ch/t/need-to-remove-the-alpha-background-present-in-the-spectrum/35217)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 3\
**Last updated:** [July 22, 2019, 8:27am UTC](https://root-forum.cern.ch/t/need-to-remove-the-alpha-background-present-in-the-spectrum/35217 "2019-07-22T08:27:04Z")

</div>

Hi, I need to remove the alpha background present in the background spectrum. The run244.root is the background run. I am using the following macro to make the cut. But I don’t know how to save the spectrum. Also I wan…

---

## [Aesthetics of Tick Marks and Axis Titles](https://root-forum.cern.ch/t/aesthetics-of-tick-marks-and-axis-titles/35284)

<div class="topic-metadata">

**Author:** [@earguell](https://root-forum.cern.ch/u/earguell)\
**Replies:** 1\
**Last updated:** [July 22, 2019, 7:40am UTC](https://root-forum.cern.ch/t/aesthetics-of-tick-marks-and-axis-titles/35284 "2019-07-22T07:40:56Z")

</div>

ROOT Version: 5.34/18 Platform: Not Provided Compiler: Not Provided How can you change the direction of the tick marks on a plot without changing the placement of the numbering and the title of the axis? For example…

---

## [How to create a histogam from a .dat file](https://root-forum.cern.ch/t/how-to-create-a-histogam-from-a-dat-file/35286)

<div class="topic-metadata">

**Author:** [@mrc1104](https://root-forum.cern.ch/u/mrc1104)\
**Replies:** 1\
**Last updated:** [July 21, 2019, 11:07am UTC](https://root-forum.cern.ch/t/how-to-create-a-histogam-from-a-dat-file/35286 "2019-07-21T11:07:13Z")

</div>

I know this question has been asked a lot on this site but I cannot find an example that pertains to my current situation. I have a .dat that has data for a time calibration spectrum. My problem is that it is just a wal…

---

## [What is the correct way to save a histogram which takes a lot of data from Many input files?](https://root-forum.cern.ch/t/what-is-the-correct-way-to-save-a-histogram-which-takes-a-lot-of-data-from-many-input-files/35254)

<div class="topic-metadata">

**Author:** [@Todd\_H](https://root-forum.cern.ch/u/Todd_H)\
**Replies:** 7\
**Last updated:** [July 21, 2019, 11:01am UTC](https://root-forum.cern.ch/t/what-is-the-correct-way-to-save-a-histogram-which-takes-a-lot-of-data-from-many-input-files/35254 "2019-07-21T11:01:06Z")

</div>

Hello, This must be a topic that other people have encountered, and this is my first post, so I’m putting it here in the hope that there’s a dead-easy fix out there. I have a set of over 1000 input files. Each file ha…

---

## [Error in jet reconstruction using RDataFrame with NanoAOD dataset](https://root-forum.cern.ch/t/error-in-jet-reconstruction-using-rdataframe-with-nanoaod-dataset/35244)

<div class="topic-metadata">

**Author:** [@noobuji](https://root-forum.cern.ch/u/noobuji)\
**Replies:** 1\
**Last updated:** [July 18, 2019, 10:12am UTC](https://root-forum.cern.ch/t/error-in-jet-reconstruction-using-rdataframe-with-nanoaod-dataset/35244 "2019-07-18T10:12:31Z")

</div>

Hello everyone! I am trying to reconstruct Z Boson from the quark and anti-quark generated particles using the NanoAOD dataset. So far I have done the following: #include “analyse.hpp” #include #include “TLorentzV…

---

## [Plotting on .csv file is not displaying](https://root-forum.cern.ch/t/plotting-on-csv-file-is-not-displaying/35227)

<div class="topic-metadata">

**Author:** [@emetere](https://root-forum.cern.ch/u/emetere)\
**Replies:** 7\
**Last updated:** [July 17, 2019, 10:50pm UTC](https://root-forum.cern.ch/t/plotting-on-csv-file-is-not-displaying/35227 "2019-07-17T22:50:13Z")

</div>

I am trying to plot from a csv file that looks like: |1980-01-01;01:00;297.19;89.76;1006.71;2.59;181.01;0.012526;0.000000;0.000000;0.0000| |1980-01-01;02:00;296.99;90.49;1006.07;2.44;183.91;0.018802;0.000000;0.000000;0…

---

## [Looping over the Tree branches](https://root-forum.cern.ch/t/looping-over-the-tree-branches/35232)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 8\
**Last updated:** [July 17, 2019, 6:30pm UTC](https://root-forum.cern.ch/t/looping-over-the-tree-branches/35232 "2019-07-17T18:30:04Z")

</div>

Hi, I have a rootfile which has a tree and it has branches (energy, channel, board, energyshort, timestamp). I want to loop over all the channel and board number. How to do that. I have the macro which does for one chan…

---

## [How to specify the initial values for the parameters](https://root-forum.cern.ch/t/how-to-specify-the-initial-values-for-the-parameters/35230)

<div class="topic-metadata">

**Author:** [@DANTE0316](https://root-forum.cern.ch/u/DANTE0316)\
**Replies:** 4\
**Last updated:** [July 17, 2019, 12:33pm UTC](https://root-forum.cern.ch/t/how-to-specify-the-initial-values-for-the-parameters/35230 "2019-07-17T12:33:42Z")

</div>

Hi all，I am facing the following problem：How to initialize parameters when fitting functions with Chi2 Fits？Whether the initial value is arbitrarily given？But I don’t know anything about the range of initial values. Tha…

---

## [Creating Legend for Upper Plot in TRatioPlot](https://root-forum.cern.ch/t/creating-legend-for-upper-plot-in-tratioplot/35235)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 2\
**Last updated:** [July 17, 2019, 8:27am UTC](https://root-forum.cern.ch/t/creating-legend-for-upper-plot-in-tratioplot/35235 "2019-07-17T08:27:27Z")

</div>

Hi, could anyone show me how to create a legend for the top graph in a TRatioPlot? I can’t seem to find any examples in the Class Reference.

---

## [Fitting of Tsallis function](https://root-forum.cern.ch/t/fitting-of-tsallis-function/35207)

<div class="topic-metadata">

**Author:** [@Abh](https://root-forum.cern.ch/u/Abh)\
**Replies:** 4\
**Last updated:** [July 16, 2019, 4:55pm UTC](https://root-forum.cern.ch/t/fitting-of-tsallis-function/35207 "2019-07-16T16:55:54Z")

</div>

Hi. I am facing problems with fitting the Levy-Tsallis function. I can’t set the power term(-n). Like here… //Function TF1 \*LEVY=new TF1("LEVY","pow((x)\*\[0\]\*(((\[1\]-1)\*(\[1\]-2))/((\[1\]\*\[2\])\*(\[1\]\*\[2\]+1.019\*(\[1\]-2))))\*(1…

---

## [Cannot create a proper TMap](https://root-forum.cern.ch/t/cannot-create-a-proper-tmap/35193)

<div class="topic-metadata">

**Author:** [@Christoph\_Vogl](https://root-forum.cern.ch/u/Christoph_Vogl)\
**Replies:** 5\
**Last updated:** [July 15, 2019, 8:29pm UTC](https://root-forum.cern.ch/t/cannot-create-a-proper-tmap/35193 "2019-07-15T20:29:09Z")

</div>

I am trying to create a TMap. The keys are going to be strings, the values vectors with 3 elements. I have created a code which is creating exactly that: void mapTest() { TFile \* file = TFile::Open("mapTest.root", "R…

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

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