# Newbie

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

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

---

## [pyROOT not responding when running a file, but responds in terminal](https://root-forum.cern.ch/t/pyroot-not-responding-when-running-a-file-but-responds-in-terminal/60057)

<div class="topic-metadata">

**Author:** [@abrac](https://root-forum.cern.ch/u/abrac)\
**Replies:** 2\
**Last updated:** [June 30, 2024, 8:54pm UTC](https://root-forum.cern.ch/t/pyroot-not-responding-when-running-a-file-but-responds-in-terminal/60057 "2024-06-30T20:54:00Z")

</div>

Hi, I just downloaded root onto my Mac for the first time and used the conda install method, which installed ROOT Version 6.30/04. I was running a python file that would open a canvas and display a histogram I have save…

---

## [.dat to .root](https://root-forum.cern.ch/t/dat-to-root/60045)

<div class="topic-metadata">

**Author:** [@Mukul](https://root-forum.cern.ch/u/Mukul)\
**Replies:** 24\
**Last updated:** [June 30, 2024, 12:14pm UTC](https://root-forum.cern.ch/t/dat-to-root/60045 "2024-06-30T12:14:40Z")

</div>

Hi. This topic is to covert .dat file to .root file I found the basic2.C program in the tutorial and I use it for the conversion. The few of the entries in my ‘txtdata.dat’ file are given in the file below: txtdata.…

---

## [Position of the Title](https://root-forum.cern.ch/t/position-of-the-title/60038)

<div class="topic-metadata">

**Author:** [@archiron](https://root-forum.cern.ch/u/archiron)\
**Replies:** 2\
**Last updated:** [June 28, 2024, 8:14am UTC](https://root-forum.cern.ch/t/position-of-the-title/60038 "2024-06-28T08:14:02Z")

</div>

Hi, since the last versions of ROOT, the display of my pictures are modified. In particular I would like to recover the title position of my histo. previously I had : and now I have with gStyle.SetTitleX(0) : o…

---

## [Unable to download ROOT .qch reference guide for use in Qt Creator](https://root-forum.cern.ch/t/unable-to-download-root-qch-reference-guide-for-use-in-qt-creator/60041)

<div class="topic-metadata">

**Author:** [@ConformalSymmetry](https://root-forum.cern.ch/u/ConformalSymmetry)\
**Replies:** 4\
**Last updated:** [June 28, 2024, 7:19am UTC](https://root-forum.cern.ch/t/unable-to-download-root-qch-reference-guide-for-use-in-qt-creator/60041 "2024-06-28T07:19:30Z")

</div>

Hello. I’m not sure if this is the forum for this. Please point me in the right direction if not. My problem is not with ROOT per se but with a dead link on the main ROOT reference page . The link to the ROOT.qch.gz file…

---

## [How to combine two C++ user defined function in one function with some calculation of both?](https://root-forum.cern.ch/t/how-to-combine-two-c-user-defined-function-in-one-function-with-some-calculation-of-both/59939)

<div class="topic-metadata">

**Author:** [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Replies:** 14\
**Last updated:** [June 27, 2024, 1:05pm UTC](https://root-forum.cern.ch/t/how-to-combine-two-c-user-defined-function-in-one-function-with-some-calculation-of-both/59939 "2024-06-27T13:05:05Z")

</div>

Ref: https://root.cern.ch/doc/master/classTF1.html // Macro myfunc.C Double\_t myfunction(Double\_t \*x, Double\_t \*par) { Float\_t xx =x\[0\]; Double\_t f = TMath::Abs(par\[0\]\*sin(par\[1\]\*xx)/xx); return f; } void myfunc(…

---

## [Makefile errors when compiling executable program using rootcling-generated dictionaries](https://root-forum.cern.ch/t/makefile-errors-when-compiling-executable-program-using-rootcling-generated-dictionaries/59740)

<div class="topic-metadata">

**Author:** [@crafter312](https://root-forum.cern.ch/u/crafter312)\
**Replies:** 4\
**Last updated:** [June 24, 2024, 8:00pm UTC](https://root-forum.cern.ch/t/makefile-errors-when-compiling-executable-program-using-rootcling-generated-dictionaries/59740 "2024-06-24T20:00:05Z")

</div>

Root Version: 6.26/10 Platform: AlmaLinux 8.7 Compiler: g++ Issue to address: I’ve written a simple program with the goal of learning how to generate dictionaries for use in ROOT programs using a Makefile. However, w…

---

## [New to ROOT and Data Analysis](https://root-forum.cern.ch/t/new-to-root-and-data-analysis/59772)

<div class="topic-metadata">

**Author:** [@Constantino](https://root-forum.cern.ch/u/Constantino)\
**Replies:** 2\
**Last updated:** [June 25, 2024, 9:07am UTC](https://root-forum.cern.ch/t/new-to-root-and-data-analysis/59772 "2024-06-25T09:07:02Z")

</div>

Greetings all, this upcoming school year I will be a first year physics student and I found ROOT via youtube videos and it interested me, I truly do hope to learn the framework and perhaps even be a contributor to it whe…

---

## [Fitting problem with TGraph and TF1](https://root-forum.cern.ch/t/fitting-problem-with-tgraph-and-tf1/59444)

<div class="topic-metadata">

**Author:** [@spyhunter01](https://root-forum.cern.ch/u/spyhunter01)\
**Replies:** 24\
**Last updated:** [June 25, 2024, 8:10am UTC](https://root-forum.cern.ch/t/fitting-problem-with-tgraph-and-tf1/59444 "2024-06-25T08:10:53Z")

</div>

Hi all, I couldn’t see the mistake . Please help me , why the code cannot do the fitting. Cheers. codes: Si\_estar.txt (6.4 KB) fittingcode3.cpp (4.8 KB) source.h (1.6 KB)

---

## [Cannot get both stat boxes to show when using draw-\>(SAME)](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737)

<div class="topic-metadata">

**Author:** [@lneidlin](https://root-forum.cern.ch/u/lneidlin)\
**Replies:** 3\
**Last updated:** [June 24, 2024, 2:37pm UTC](https://root-forum.cern.ch/t/cannot-get-both-stat-boxes-to-show-when-using-draw-same/59737 "2024-06-24T14:37:43Z")

</div>

ROOT Version: Not Sure I’m Sorry Platform: Visual Studio Code C++ Compiler: Also not sure I am using the -\>Draw(“SAME”) command for two histograms on the same canvas and I cannot get the first stat box to show up, onl…

---

## [Can I add buttons on a TGraph?](https://root-forum.cern.ch/t/can-i-add-buttons-on-a-tgraph/59707)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 28\
**Last updated:** [June 24, 2024, 7:25am UTC](https://root-forum.cern.ch/t/can-i-add-buttons-on-a-tgraph/59707 "2024-06-24T07:25:02Z")

</div>

Dear experts I wonder if one can add buttons on a TGraph, to be more specific, I have a event display of drift chamber like this: And dots represents the hits (wire positions) in the chamber. I want to make all hits…

---

## [I had installed fftw3 but I don't find it in features](https://root-forum.cern.ch/t/i-had-installed-fftw3-but-i-dont-find-it-in-features/59671)

<div class="topic-metadata">

**Author:** [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Replies:** 4\
**Last updated:** [June 21, 2024, 3:10pm UTC](https://root-forum.cern.ch/t/i-had-installed-fftw3-but-i-dont-find-it-in-features/59671 "2024-06-21T15:10:36Z")

</div>

If I try root-config --features I got these: cxx11 asimage builtin\_afterimage builtin\_clang builtin\_llvm builtin\_lz4 builtin\_lzma builtin\_openssl builtin\_pcre builtin\_tbb builtin\_vdt builtin\_xrootd builtin\_xxhash buil…

---

## [Can one access glviewer in glvox2 tutorial?](https://root-forum.cern.ch/t/can-one-access-glviewer-in-glvox2-tutorial/59733)

<div class="topic-metadata">

**Author:** [@phifle](https://root-forum.cern.ch/u/phifle)\
**Replies:** 2\
**Last updated:** [June 21, 2024, 1:39pm UTC](https://root-forum.cern.ch/t/can-one-access-glviewer-in-glvox2-tutorial/59733 "2024-06-21T13:39:23Z")

</div>

I have a question regarding the tutorial gl/glvox2.C I assume that internally some kind of TGLViewer is used. Is there a way to get a pointer to this viewer? Or is my assumption wrong? ROOT Version: 6.30/04

---

## [Can not write std::vector\<TVector3\> to a TTree](https://root-forum.cern.ch/t/can-not-write-std-vector-tvector3-to-a-ttree/59703)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 5\
**Last updated:** [June 21, 2024, 4:43am UTC](https://root-forum.cern.ch/t/can-not-write-std-vector-tvector3-to-a-ttree/59703 "2024-06-21T04:43:20Z")

</div>

Dear experts I want to write std::vector\<TVector3\> to a TTree, but I can not find it in the output ROOT file. I have already generated the dictionary and linked it in CMakeLists.txt The code is like: std::vector\<TVec…

---

## [Fit a linear regression to a 3D plot](https://root-forum.cern.ch/t/fit-a-linear-regression-to-a-3d-plot/59702)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 7\
**Last updated:** [June 20, 2024, 4:35pm UTC](https://root-forum.cern.ch/t/fit-a-linear-regression-to-a-3d-plot/59702 "2024-06-20T16:35:00Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.30/06 Platform: ubuntu Compiler: Not Provided I save my data in an textfile and it it loos like this (2 21 0 4 13 1 15 31 2) i.…

---

## [Hot to use TMinuit2](https://root-forum.cern.ch/t/hot-to-use-tminuit2/59670)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 6\
**Last updated:** [June 20, 2024, 3:38pm UTC](https://root-forum.cern.ch/t/hot-to-use-tminuit2/59670 "2024-06-20T15:38:29Z")

</div>

Dear experts I want to use TMinuit2 to fit some straight tracks (I assume it’s better than TMinuit), but all legacy code I can get are using TMinuit instead of TMinuit2, so here I have two questions: Is TMinuit2 bette…

---

## [Fit integral issue](https://root-forum.cern.ch/t/fit-integral-issue/59701)

<div class="topic-metadata">

**Author:** [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Replies:** 3\
**Last updated:** [June 20, 2024, 10:01am UTC](https://root-forum.cern.ch/t/fit-integral-issue/59701 "2024-06-20T10:01:52Z")

</div>

Attached is the test macro I am trying to calculate integral under the fit curve. I do not understand why the fit integral is approx (or maybe exactly) 10 times the expected value or the corresponding th1::integral value…

---

## [How to write a copy of a root file but with data in one branch in one tree modified, in Python](https://root-forum.cern.ch/t/how-to-write-a-copy-of-a-root-file-but-with-data-in-one-branch-in-one-tree-modified-in-python/59494)

<div class="topic-metadata">

**Author:** [@lcolange](https://root-forum.cern.ch/u/lcolange)\
**Replies:** 3\
**Last updated:** [June 20, 2024, 6:32am UTC](https://root-forum.cern.ch/t/how-to-write-a-copy-of-a-root-file-but-with-data-in-one-branch-in-one-tree-modified-in-python/59494 "2024-06-20T06:32:53Z")

</div>

Hi, How do I copy all the contents of an input root file, write it to an output root file, but with the data within one branch, a jet collection called “AntiKt4EMPFlowJets”, of one tree, called “CollectionTree”, modifie…

---

## [Error in TUnixSystem::SetDisplay: Can't figure out DISPLAY, set it manually](https://root-forum.cern.ch/t/error-in-tunixsystem-cant-figure-out-display-set-it-manually/59674)

<div class="topic-metadata">

**Author:** [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Replies:** 2\
**Last updated:** [June 18, 2024, 8:50am UTC](https://root-forum.cern.ch/t/error-in-tunixsystem-cant-figure-out-display-set-it-manually/59674 "2024-06-18T08:50:12Z")

</div>

As a simple case TH1F \*h = new TH1F("h", "Test Histogram", 100, -4, 4); h-\>FillRandom("gaus", 10000); h-\>Draw(); The result is: Error in \<TUnixSystem::SetDisplay\>: Can't figure out DISPLAY, set it manually In case you…

---

## [Unknown problem with root\_v6.30.02.win64.vc17.exe on win10](https://root-forum.cern.ch/t/unknown-problem-with-root-v6-30-02-win64-vc17-exe-on-win10/59547)

<div class="topic-metadata">

**Author:** [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Replies:** 5\
**Last updated:** [June 18, 2024, 3:12am UTC](https://root-forum.cern.ch/t/unknown-problem-with-root-v6-30-02-win64-vc17-exe-on-win10/59547 "2024-06-18T03:12:48Z")

</div>

After download .zip of root\_v6.30.02.win64.vc17 and faild to set up required environment variables(thisroot.ps1 &thisroot.bat can’t execute even “refreshenv”). I try .exe of root\_v6.30.02.win64.vc17. It says "a regular W…

---

## [Load existing cut files and plot the TCutg on existing 2d hists in diff sub-canvas](https://root-forum.cern.ch/t/load-existing-cut-files-and-plot-the-tcutg-on-existing-2d-hists-in-diff-sub-canvas/59650)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 2\
**Last updated:** [June 17, 2024, 11:37am UTC](https://root-forum.cern.ch/t/load-existing-cut-files-and-plot-the-tcutg-on-existing-2d-hists-in-diff-sub-canvas/59650 "2024-06-17T11:37:55Z")

</div>

Hi everyone, I am having trouble plotting the previously created TCutG files (filenames: x2vsx1\_0\_0.C, x2\_x1\_0\_1.C, etc., and TCutG of the form TCutG \*cutx\_0\_0, and so on, inside a directory) on top of the existing 2D hi…

---

## [Output file is blank](https://root-forum.cern.ch/t/output-file-is-blank/59586)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 5\
**Last updated:** [June 15, 2024, 7:47pm UTC](https://root-forum.cern.ch/t/output-file-is-blank/59586 "2024-06-15T19:47:30Z")

</div>

ROOT Version: 6.30/06 I want to print to a text file. I can print on the terminal but when I tried to print on the text file it is always blank. Please help. Test.C (5.1 KB)

---

## [ROOT installation problem in windows](https://root-forum.cern.ch/t/root-installation-problem-in-windows/59647)

<div class="topic-metadata">

**Author:** [@Aditya\_Sharma](https://root-forum.cern.ch/u/Aditya_Sharma)\
**Replies:** 3\
**Last updated:** [June 14, 2024, 7:43pm UTC](https://root-forum.cern.ch/t/root-installation-problem-in-windows/59647 "2024-06-14T19:43:56Z")

</div>

I have installed root for windows from root\_v6.32.00.win64.vc17.exe and then typed the command c:\\root\\root\\bin\\thisroot.bat in developer command prompt of visual studio for some reason it shows error and is not starting…

---

## [Use TTree::Query before the event is written to the tree](https://root-forum.cern.ch/t/use-ttree-query-before-the-event-is-written-to-the-tree/59645)

<div class="topic-metadata">

**Author:** [@mfglinux\_gmail](https://root-forum.cern.ch/u/mfglinux_gmail)\
**Replies:** 2\
**Last updated:** [June 14, 2024, 12:59pm UTC](https://root-forum.cern.ch/t/use-ttree-query-before-the-event-is-written-to-the-tree/59645 "2024-06-14T12:59:34Z")

</div>

Hello I have a selection criteria to fill a TTree which is passed as a string by the user, for instance: “signal\>0.1 && noise\<0.001 && charge\>12.3” The selection can be any combination of the variables in the branches…

---

## [Empty histogram](https://root-forum.cern.ch/t/empty-histogram/59637)

<div class="topic-metadata">

**Author:** [@rafal4](https://root-forum.cern.ch/u/rafal4)\
**Replies:** 14\
**Last updated:** [June 13, 2024, 7:30pm UTC](https://root-forum.cern.ch/t/empty-histogram/59637 "2024-06-13T19:30:50Z")

</div>

Hello everyone I’m trying to draw three histograms on one Canvas. Unfortunately, the resulting histogram is empty. There are no errors in the console. I checked and the original histograms contain correct data, the X ax…

---

## [Derivative of histogram](https://root-forum.cern.ch/t/derivative-of-histogram/52762)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 5\
**Last updated:** [June 13, 2024, 9:57am UTC](https://root-forum.cern.ch/t/derivative-of-histogram/52762 "2024-06-13T09:57:42Z")

</div>

Hi, I want to find the derivative of a histogram with respect to each point on the histogram. The following is my macro and unfortunately it doesnt works : { auto h1 = new TH1D(“h1”,“h1”,101.0,39.5,140.5); auto h2 = …

---

## [How to read a data file (.txt) and fill a one-dimensional histogram?](https://root-forum.cern.ch/t/how-to-read-a-data-file-txt-and-fill-a-one-dimensional-histogram/59611)

<div class="topic-metadata">

**Author:** [@alfredo10101](https://root-forum.cern.ch/u/alfredo10101)\
**Replies:** 8\
**Last updated:** [June 13, 2024, 2:28am UTC](https://root-forum.cern.ch/t/how-to-read-a-data-file-txt-and-fill-a-one-dimensional-histogram/59611 "2024-06-13T02:28:38Z")

</div>

Hello, I am trying to read a data file (.txt) and fill a one-dimensional histogram with the data from this file, but I have not been able to do this. What can I do?, or what am I doing wrong?. What would be the macro tha…

---

## [Touble save custom class using PyROOT RDataFrame (e.g. Delphes object)](https://root-forum.cern.ch/t/touble-save-custom-class-using-pyroot-rdataframe-e-g-delphes-object/59634)

<div class="topic-metadata">

**Author:** [@qiqiqi](https://root-forum.cern.ch/u/qiqiqi)\
**Replies:** 1\
**Last updated:** [June 12, 2024, 2:36pm UTC](https://root-forum.cern.ch/t/touble-save-custom-class-using-pyroot-rdataframe-e-g-delphes-object/59634 "2024-06-12T14:36:20Z")

</div>

Dear experts, I have questions about writing the vector of objects in the TTree with RDataFrame. I wish to process the object (custom class from Delphes) saved in the tree and re-save some of the branches in the output.…

---

## [Root\_generate\_dictionary](https://root-forum.cern.ch/t/root-generate-dictionary/59624)

<div class="topic-metadata">

**Author:** [@William\_Koch](https://root-forum.cern.ch/u/William_Koch)\
**Replies:** 5\
**Last updated:** [June 12, 2024, 1:04pm UTC](https://root-forum.cern.ch/t/root-generate-dictionary/59624 "2024-06-12T13:04:01Z")

</div>

I am trying to use CMake to compile a simple gui. The program compiles and links, then fails at run time. Makefile and files posted below. Thank you in advance! CMakeLists.txt: cmake\_minimum\_required(VERSION 3.16...…

---

## [ROOT\_GENERATE\_DICTIONARY with header only target?](https://root-forum.cern.ch/t/root-generate-dictionary-with-header-only-target/59625)

<div class="topic-metadata">

**Author:** [@EdwinYZ](https://root-forum.cern.ch/u/EdwinYZ)\
**Replies:** 12\
**Last updated:** [June 12, 2024, 11:53am UTC](https://root-forum.cern.ch/t/root-generate-dictionary-with-header-only-target/59625 "2024-06-12T11:53:52Z")

</div>

Hi I’m try to create a root dictionary with a CMake target. Most of the time, my data structures are only defined in header files without any source files. Therefore, the CMake target that includes those header files ar…

---

## [How to find and open the file I create?](https://root-forum.cern.ch/t/how-to-find-and-open-the-file-i-create/59631)

<div class="topic-metadata">

**Author:** [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Replies:** 1\
**Last updated:** [June 12, 2024, 6:41am UTC](https://root-forum.cern.ch/t/how-to-find-and-open-the-file-i-create/59631 "2024-06-12T06:41:06Z")

</div>

I bulid a xxx.C and execute in root, the result is Info in \<TCanvas::Print\>: eps file ecm\_cs.eps has been created Info in \<TCanvas::Print\>: pdf file ecm\_cs.pdf has been created how can I find and open these 2 files? \_…

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

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