# Newbie

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

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

---

## [Getting photon with maximum momentum?](https://root-forum.cern.ch/t/getting-photon-with-maximum-momentum/57942)

<div class="topic-metadata">

**Author:** [@somebody.nobody](https://root-forum.cern.ch/u/somebody.nobody)\
**Replies:** 6\
**Last updated:** [January 24, 2024, 8:04pm UTC](https://root-forum.cern.ch/t/getting-photon-with-maximum-momentum/57942 "2024-01-24T20:04:36Z")

</div>

I am trying to access the photon with maximum momentum from a root data frame. Can someone explain why this command does not accomplish this? I am receiving errors that the filter can not be interpreted as a boolean. …

---

## [Segmentation violation when creating a Th1D :(](https://root-forum.cern.ch/t/segmentation-violation-when-creating-a-th1d/57951)

<div class="topic-metadata">

**Author:** [@Laly86](https://root-forum.cern.ch/u/Laly86)\
**Replies:** 2\
**Last updated:** [January 24, 2024, 1:37pm UTC](https://root-forum.cern.ch/t/segmentation-violation-when-creating-a-th1d/57951 "2024-01-24T13:37:03Z")

</div>

Dear root experts, please help me with this silly question I am getting crazy and none of my colleagues found the error :frowning: I have a macro which opens a TFile, reads the Tree contained in the file (and in partic…

---

## [Adding multiple histograms preserving poisson statistical error](https://root-forum.cern.ch/t/adding-multiple-histograms-preserving-poisson-statistical-error/57796)

<div class="topic-metadata">

**Author:** [@elemental](https://root-forum.cern.ch/u/elemental)\
**Replies:** 8\
**Last updated:** [January 24, 2024, 8:13am UTC](https://root-forum.cern.ch/t/adding-multiple-histograms-preserving-poisson-statistical-error/57796 "2024-01-24T08:13:00Z")

</div>

I would like to obtain by adding and subtracting histograms using the Add() function in the TH1 class. The operation is as follows: hResult = h5 - h2 - h8 - h4 - h6 + h1 + h3 + h7 + h9 where h\*\* are all histogram objec…

---

## [Interactive root (6.28, x86\_64-el9-gcc11-opt) cannot find modules](https://root-forum.cern.ch/t/interactive-root-6-28-x86-64-el9-gcc11-opt-cannot-find-modules/57936)

<div class="topic-metadata">

**Author:** [@gouz](https://root-forum.cern.ch/u/gouz)\
**Replies:** 3\
**Last updated:** [January 23, 2024, 4:27pm UTC](https://root-forum.cern.ch/t/interactive-root-6-28-x86-64-el9-gcc11-opt-cannot-find-modules/57936 "2024-01-23T16:27:31Z")

</div>

ROOT Version: 6.28 Platform: x86\_64 el9 Compiler: gcc11 Dear All, I am trying to use root version 6.28.04 from lcg on a machine with RH9 (kernel 5.14, gcc11). Then the interactive root command produces several scr…

---

## [How to get bin content of all bins along x and y axis of a 2D histograms in python uproot](https://root-forum.cern.ch/t/how-to-get-bin-content-of-all-bins-along-x-and-y-axis-of-a-2d-histograms-in-python-uproot/57926)

<div class="topic-metadata">

**Author:** [@elemental](https://root-forum.cern.ch/u/elemental)\
**Replies:** 1\
**Last updated:** [January 22, 2024, 7:30pm UTC](https://root-forum.cern.ch/t/how-to-get-bin-content-of-all-bins-along-x-and-y-axis-of-a-2d-histograms-in-python-uproot/57926 "2024-01-22T19:30:49Z")

</div>

I would like to write a uproot script in python to get the bin content in all bins(boxes) in a 2D histogram and add it to a vector and then print it to a .txt file with bin size on x and y axis as first line and then bin…

---

## [Reading Ttree from ROOT file](https://root-forum.cern.ch/t/reading-ttree-from-root-file/57923)

<div class="topic-metadata">

**Author:** [@souvikc](https://root-forum.cern.ch/u/souvikc)\
**Replies:** 1\
**Last updated:** [January 22, 2024, 11:50am UTC](https://root-forum.cern.ch/t/reading-ttree-from-root-file/57923 "2024-01-22T11:50:33Z")

</div>

I want to read i\_th and j\_th entry from a Ttree using a for loop, for example: for (Long64\_t entryi = 0; entryi \< tree\_sig-\>GetEntries(); ++entryi) { tree\_sig-\>GetEntry(entryi); entryj=4; tree\_si…

---

## [Problems with ROOT7 after macOS update](https://root-forum.cern.ch/t/problems-with-root7-after-macos-update/57918)

<div class="topic-metadata">

**Author:** [@Alex\_Gavin](https://root-forum.cern.ch/u/Alex_Gavin)\
**Replies:** 5\
**Last updated:** [January 20, 2024, 7:18pm UTC](https://root-forum.cern.ch/t/problems-with-root7-after-macos-update/57918 "2024-01-20T19:18:21Z")

</div>

Hi, I’m having problems with ROOT7 after installing the new macOS and Xcode updates. Up until yesterday I was having problems with sdk paths until someone recommended changing the path which I did, but now I’m having pr…

---

## [Problem in adding histogram](https://root-forum.cern.ch/t/problem-in-adding-histogram/57907)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 3:24pm UTC](https://root-forum.cern.ch/t/problem-in-adding-histogram/57907 "2024-01-19T15:24:29Z")

</div>

Hi, I want to add 3 histogarms (which are generated from a function). Unfortunately i get the following error : Info in \<TH1D::Add\>: Attempt to add histograms with different number of bins - trying to use TH1::Merge Er…

---

## [TH2D covariance with error](https://root-forum.cern.ch/t/th2d-covariance-with-error/57837)

<div class="topic-metadata">

**Author:** [@zainingwang](https://root-forum.cern.ch/u/zainingwang)\
**Replies:** 2\
**Last updated:** [January 19, 2024, 3:17am UTC](https://root-forum.cern.ch/t/th2d-covariance-with-error/57837 "2024-01-19T03:17:29Z")

</div>

Hi, experts! Actually I face some problems when I calculate covariance of TH2D. I know that we can get error of Mean with GetMeanError. Is there a way to obtain the error of GetCovariance? For example, I generate a T…

---

## [My root6 broke down](https://root-forum.cern.ch/t/my-root6-broke-down/57286)

<div class="topic-metadata">

**Author:** [@AdaP](https://root-forum.cern.ch/u/AdaP)\
**Replies:** 2\
**Last updated:** [January 18, 2024, 12:06pm UTC](https://root-forum.cern.ch/t/my-root6-broke-down/57286 "2024-01-18T12:06:07Z")

</div>

Hi! My root suddenly broke down… Please can you help me? error: entry with relative path at the root level is not discoverable { ‘name’: ‘’, ‘type’: ‘directory’, ^~ Error in modulemap.overlay! ROOT Version: root-6.…

---

## [Getting this weird error: unknown type name 'fsteam'](https://root-forum.cern.ch/t/getting-this-weird-error-unknown-type-name-fsteam/57890)

<div class="topic-metadata">

**Author:** [@HitMan01KW9](https://root-forum.cern.ch/u/HitMan01KW9)\
**Replies:** 2\
**Last updated:** [January 18, 2024, 9:15am UTC](https://root-forum.cern.ch/t/getting-this-weird-error-unknown-type-name-fsteam/57890 "2024-01-18T09:15:32Z")

</div>

ROOT Version: 6.30.2 Platform: Windows10 I’m getting this error when trying to read a data file data.txt. I’m new to Root, I don’t know where is the problem and no one seemed to get this error. Can anyone help me ? T…

---

## [Creating TEventList by comparing values from 2 root files](https://root-forum.cern.ch/t/creating-teventlist-by-comparing-values-from-2-root-files/57869)

<div class="topic-metadata">

**Author:** [@Satoko\_Asahi](https://root-forum.cern.ch/u/Satoko_Asahi)\
**Replies:** 3\
**Last updated:** [January 18, 2024, 12:56am UTC](https://root-forum.cern.ch/t/creating-teventlist-by-comparing-values-from-2-root-files/57869 "2024-01-18T00:56:30Z")

</div>

Hi, I have 2 root files which have a branch called “eventLabel”. When 2 root files have the same entries (made it so) all the time, I want to make a TEventList of when “eventLabel” of the same entry, i, is the same la…

---

## [Is there an efficient way for filling TH1 histogram with numpy arrays in 2024?](https://root-forum.cern.ch/t/is-there-an-efficient-way-for-filling-th1-histogram-with-numpy-arrays-in-2024/57874)

<div class="topic-metadata">

**Author:** [@sarthchoudhary](https://root-forum.cern.ch/u/sarthchoudhary)\
**Replies:** 2\
**Last updated:** [January 17, 2024, 5:51pm UTC](https://root-forum.cern.ch/t/is-there-an-efficient-way-for-filling-th1-histogram-with-numpy-arrays-in-2024/57874 "2024-01-17T17:51:18Z")

</div>

Is there a better way to fill a TH1 histogram with numpy array than using a ‘for loop’ to loop through the the array. PS: I have seen the answers which suggests to use root\_numpy but the thing is that root\_numpy is not …

---

## [Error while compiling a Go4(ROOT dependent) project](https://root-forum.cern.ch/t/error-while-compiling-a-go4-root-dependent-project/57863)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 17\
**Last updated:** [January 17, 2024, 1:40pm UTC](https://root-forum.cern.ch/t/error-while-compiling-a-go4-root-dependent-project/57863 "2024-01-17T13:40:05Z")

</div>

\_ROOT Version:6.28/06 \_Platform:Ubuntu 22.04 \_Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Hi everyone, I am unsure if this is the right place to request help. But I was trying to compile a Go4 project which …

---

## [Getting charge of a particle from TDatabasePDG fails for (PID=42)](https://root-forum.cern.ch/t/getting-charge-of-a-particle-from-tdatabasepdg-fails-for-pid-42/57859)

<div class="topic-metadata">

**Author:** [@Arshad\_Ahmad\_Masoodi](https://root-forum.cern.ch/u/Arshad_Ahmad_Masoodi)\
**Replies:** 6\
**Last updated:** [January 16, 2024, 4:41pm UTC](https://root-forum.cern.ch/t/getting-charge-of-a-particle-from-tdatabasepdg-fails-for-pid-42/57859 "2024-01-16T16:41:55Z")

</div>

ROOT Version: 6.30/02 Platform: Ubuntu 22.04.3 LTS Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Hi, I have a macro where I want to get the charge of a particle from its pid. But my macro is giving the follo…

---

## [Usage of TRolke](https://root-forum.cern.ch/t/usage-of-trolke/57852)

<div class="topic-metadata">

**Author:** [@AndrejL](https://root-forum.cern.ch/u/AndrejL)\
**Replies:** 2\
**Last updated:** [January 16, 2024, 11:23am UTC](https://root-forum.cern.ch/t/usage-of-trolke/57852 "2024-01-16T11:23:02Z")

</div>

Which TRolke method is correct for determining the upper limits of a signal for the following case: Nsig and Nbkg are determined from the fit (RooFit) signal PDF shape is fixed from signalMC signal is very small and si…

---

## [How to add optional libraries by Homebrew](https://root-forum.cern.ch/t/how-to-add-optional-libraries-by-homebrew/56550)

<div class="topic-metadata">

**Author:** [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Replies:** 5\
**Last updated:** [October 5, 2023, 10:46am UTC](https://root-forum.cern.ch/t/how-to-add-optional-libraries-by-homebrew/56550 "2023-10-05T10:46:48Z")

</div>

Dear experts I used Homebrew to install root, recently I found that I need the fftw3 library, so I want to add it into root. But I can’t find how to do so (just like cmake arguments or ccmake), can someone tell how to d…

---

## [Drawing TGraph over THStack](https://root-forum.cern.ch/t/drawing-tgraph-over-thstack/46544)

<div class="topic-metadata">

**Author:** [@Francisco\_Lopez\_Gome](https://root-forum.cern.ch/u/Francisco_Lopez_Gome)\
**Replies:** 6\
**Last updated:** [August 31, 2021, 7:32am UTC](https://root-forum.cern.ch/t/drawing-tgraph-over-thstack/46544 "2021-08-31T07:32:29Z")

</div>

Hi there I have two figures, one created with THStack and the ohter with TMultiGraph Is there any way to combine the stack with one of the TGraphs which i use in the figure in the same canvas? I tried to use the …

---

## [Unable to get Root from Conda to start using pyroot for python scripts](https://root-forum.cern.ch/t/unable-to-get-root-from-conda-to-start-using-pyroot-for-python-scripts/57842)

<div class="topic-metadata">

**Author:** [@HitMan01KW9](https://root-forum.cern.ch/u/HitMan01KW9)\
**Replies:** 13\
**Last updated:** [January 16, 2024, 8:06am UTC](https://root-forum.cern.ch/t/unable-to-get-root-from-conda-to-start-using-pyroot-for-python-scripts/57842 "2024-01-16T08:06:25Z")

</div>

ROOT Version: not yet installed Platform: Windows Hello, I’m getting started with ROOT and I’m looking to use it with python for my work. But I can’t seem to install it in a wat that it could be used for python. I tri…

---

## [Segmentation Violation when coverting CORSIKA DAT file to ROOT file](https://root-forum.cern.ch/t/segmentation-violation-when-coverting-corsika-dat-file-to-root-file/57850)

<div class="topic-metadata">

**Author:** [@garlicrayburst](https://root-forum.cern.ch/u/garlicrayburst)\
**Replies:** 4\
**Last updated:** [January 16, 2024, 7:50am UTC](https://root-forum.cern.ch/t/segmentation-violation-when-coverting-corsika-dat-file-to-root-file/57850 "2024-01-16T07:50:09Z")

</div>

Dear experts, I recently started using CORSIKA and I tried using their example file to plot energy from the output DAT file. I using CorsikaRead option and the CorsikaPlotter.cc file that was used is attached. CorsikaP…

---

## [Could I generate several outputs during one calculation in RDataFrame?](https://root-forum.cern.ch/t/could-i-generate-several-outputs-during-one-calculation-in-rdataframe/57819)

<div class="topic-metadata">

**Author:** [@zainingwang](https://root-forum.cern.ch/u/zainingwang)\
**Replies:** 4\
**Last updated:** [January 16, 2024, 1:52am UTC](https://root-forum.cern.ch/t/could-i-generate-several-outputs-during-one-calculation-in-rdataframe/57819 "2024-01-16T01:52:54Z")

</div>

Hi experts! I’m starting to use RDataFrame to do tree analysis. When I try to do some calculations, I wonder if it is possible to generate several outputs in one Define for calculations? For example: If I want to calc…

---

## [Aligning two histograms by shifting bins](https://root-forum.cern.ch/t/aligning-two-histograms-by-shifting-bins/57845)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 6\
**Last updated:** [January 15, 2024, 1:42pm UTC](https://root-forum.cern.ch/t/aligning-two-histograms-by-shifting-bins/57845 "2024-01-15T13:42:30Z")

</div>

Hello users, I have two histograms that are shifted by some factor Is it possible to shift the bins of one wrt to the other to align them? So far, I am having the centroids of the peaks for both the histograms obta…

---

## [CMake warning about UpdateGitInfo](https://root-forum.cern.ch/t/cmake-warning-about-updategitinfo/57838)

<div class="topic-metadata">

**Author:** [@hohshita](https://root-forum.cern.ch/u/hohshita)\
**Replies:** 3\
**Last updated:** [January 15, 2024, 11:29am UTC](https://root-forum.cern.ch/t/cmake-warning-about-updategitinfo/57838 "2024-01-15T11:29:41Z")

</div>

Dear Root Experts, Is the following warning during ROOT installation a problem? The installation is source build. CMake Warning at /opt/keksoft/ana/root/root-6.30.02/cmake/modules/UpdateGitInfo.cmake:45 (message): Ca…

---

## [Combing 1D histograms from different files into a single 2D histogram using the file ID?](https://root-forum.cern.ch/t/combing-1d-histograms-from-different-files-into-a-single-2d-histogram-using-the-file-id/57839)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 1\
**Last updated:** [January 15, 2024, 9:56am UTC](https://root-forum.cern.ch/t/combing-1d-histograms-from-different-files-into-a-single-2d-histogram-using-the-file-id/57839 "2024-01-15T09:56:20Z")

</div>

Hi everyone, I have a set of .root files of the form xyz\_1.root xyz\_2.root … xyz\_2362.root (various numbers are missing in between the files) Each file has a stored 1D histogram containing energy spectra. I am try…

---

## [Linking ROOT in CORSIKA](https://root-forum.cern.ch/t/linking-root-in-corsika/53298)

<div class="topic-metadata">

**Author:** [@Basharat](https://root-forum.cern.ch/u/Basharat)\
**Replies:** 3\
**Last updated:** [January 13, 2024, 3:51pm UTC](https://root-forum.cern.ch/t/linking-root-in-corsika/53298 "2024-01-13T15:51:08Z")

</div>

I recently installed CORSIKA, but I don’t understand how to enable root in CORSIKA to analyze the data file generated from running the simulation. Please help. Operating system: Ubuntu 22.04

---

## [Cling Build Instructions Don't Work](https://root-forum.cern.ch/t/cling-build-instructions-dont-work/57797)

<div class="topic-metadata">

**Author:** [@salz-root](https://root-forum.cern.ch/u/salz-root)\
**Replies:** 2\
**Last updated:** [January 12, 2024, 4:02pm UTC](https://root-forum.cern.ch/t/cling-build-instructions-dont-work/57797 "2024-01-12T16:02:18Z")

</div>

Has anyone built Cling from source (Manual Build) following the instructions on this page? I had manually built Cling from source about a year ago on xubuntu 22.04. At that time, I had found and posted the errors in the…

---

## [Visualising a 3D histogram?](https://root-forum.cern.ch/t/visualising-a-3d-histogram/57737)

<div class="topic-metadata">

**Author:** [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Replies:** 2\
**Last updated:** [January 12, 2024, 4:19am UTC](https://root-forum.cern.ch/t/visualising-a-3d-histogram/57737 "2024-01-12T04:19:49Z")

</div>

Hi everyone, A very naive query: is it possible to visualize the 3D histogram in ROOT since the structure now is (x,y,z, and counts)? Is there some way to highlight the total counts for each (x,y,z) bin? Any suggestio…

---

## [Creating trees or branches from histograms](https://root-forum.cern.ch/t/creating-trees-or-branches-from-histograms/56795)

<div class="topic-metadata">

**Author:** [@elemental](https://root-forum.cern.ch/u/elemental)\
**Replies:** 4\
**Last updated:** [January 10, 2024, 6:29pm UTC](https://root-forum.cern.ch/t/creating-trees-or-branches-from-histograms/56795 "2024-01-10T18:29:17Z")

</div>

Hi, I am performing analysis over a dataset and it usually entails creating a load of histograms (atleast 30-40). I wish to be able to group/bunch these histograms into branches like we do in trees-\>braches-\>leafs struc…

---

## [Using RDataFrame Vary function and save histograms](https://root-forum.cern.ch/t/using-rdataframe-vary-function-and-save-histograms/57782)

<div class="topic-metadata">

**Author:** [@eneb](https://root-forum.cern.ch/u/eneb)\
**Replies:** 2\
**Last updated:** [January 10, 2024, 8:37am UTC](https://root-forum.cern.ch/t/using-rdataframe-vary-function-and-save-histograms/57782 "2024-01-10T08:37:12Z")

</div>

Hello experts, i have a question regarding the Vary function and usage of these histograms afterwards. In short, I want to use the Vary function for bootstrapping. Afterwards, I want to save all the histograms in a root…

---

## [Saving arrays of objects of my class on a Tfile](https://root-forum.cern.ch/t/saving-arrays-of-objects-of-my-class-on-a-tfile/57764)

<div class="topic-metadata">

**Author:** [@GioCamia](https://root-forum.cern.ch/u/GioCamia)\
**Replies:** 4\
**Last updated:** [January 10, 2024, 7:49am UTC](https://root-forum.cern.ch/t/saving-arrays-of-objects-of-my-class-on-a-tfile/57764 "2024-01-10T07:49:08Z")

</div>

Hi, I have this class named Q where i can save the value and the error of a Q object. I am analyzing a lot of data so i thought to separate in two macros the analysis so that in the first one i simply evaluate some arr…

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

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