# Newbie

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

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

---

## [How to use the Crystal Ball Roofit if the tail is on the right side rather than the left side?](https://root-forum.cern.ch/t/how-to-use-the-crystal-ball-roofit-if-the-tail-is-on-the-right-side-rather-than-the-left-side/51852)

<div class="topic-metadata">

**Author:** [@Dyson](https://root-forum.cern.ch/u/Dyson)\
**Replies:** 1\
**Last updated:** [October 6, 2022, 8:21am UTC](https://root-forum.cern.ch/t/how-to-use-the-crystal-ball-roofit-if-the-tail-is-on-the-right-side-rather-than-the-left-side/51852 "2022-10-06T08:21:32Z")

</div>

Thank you very much!

---

## [" \*\*\* Break \*\*\* segmentation violation " while trying to use TLorentzVector](https://root-forum.cern.ch/t/break-segmentation-violation-while-trying-to-use-tlorentzvector/51845)

<div class="topic-metadata">

**Author:** [@Raseeb\_Haroon](https://root-forum.cern.ch/u/Raseeb_Haroon)\
**Replies:** 8\
**Last updated:** [October 6, 2022, 7:37am UTC](https://root-forum.cern.ch/t/break-segmentation-violation-while-trying-to-use-tlorentzvector/51845 "2022-10-06T07:37:57Z")

</div>

Hi everybody, I have been trying to reconstruct the Z boson using Pythia output, I am getting a perfect .root file and histogram. Here I was trying to use the tree and LorentzVector to reconstruct the Z boson. Any help w…

---

## [Fit TGraphErrors with an Inverse function](https://root-forum.cern.ch/t/fit-tgrapherrors-with-an-inverse-function/51803)

<div class="topic-metadata">

**Author:** [@AirBlock](https://root-forum.cern.ch/u/AirBlock)\
**Replies:** 11\
**Last updated:** [October 5, 2022, 7:07pm UTC](https://root-forum.cern.ch/t/fit-tgrapherrors-with-an-inverse-function/51803 "2022-10-05T19:07:42Z")

</div>

Hello, I’m new to Root. My question is if it is possible to fit some points with error bars using the inverse of a user-defined function. Here is the code: const Int\_t n1 = 15; Float\_t x1\[\] = {0.51, 0.54, 0.56, 0.58…

---

## [Problem while installing Delphes via MG5](https://root-forum.cern.ch/t/problem-while-installing-delphes-via-mg5/51843)

<div class="topic-metadata">

**Author:** [@yburkard](https://root-forum.cern.ch/u/yburkard)\
**Replies:** 1\
**Last updated:** [October 5, 2022, 1:32pm UTC](https://root-forum.cern.ch/t/problem-while-installing-delphes-via-mg5/51843 "2022-10-05T13:32:24Z")

</div>

Hello, After successfully installing root (6.26/06), MadGraph5 (3.4.1) and phythia8, I tried installing delphes by running install Delphes on the MadGraph platform, which yielded the following error: \[...\] compile De…

---

## [Pointer not allocated when adding RResultPtr to vector](https://root-forum.cern.ch/t/pointer-not-allocated-when-adding-rresultptr-to-vector/51831)

<div class="topic-metadata">

**Author:** [@JSHeines](https://root-forum.cern.ch/u/JSHeines)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 12:12pm UTC](https://root-forum.cern.ch/t/pointer-not-allocated-when-adding-rresultptr-to-vector/51831 "2022-10-05T12:12:14Z")

</div>

When running the macro below with root -l pointer\_not\_allocated\_error.cc, it throws the expected runtime\_error and exits. However, when run from the root prompt, either with root \[0\] .X pointer\_not\_allocated\_error.cc o…

---

## [ROOT can't find Pythia8 lib?](https://root-forum.cern.ch/t/root-cant-find-pythia8-lib/51790)

<div class="topic-metadata">

**Author:** [@Mango](https://root-forum.cern.ch/u/Mango)\
**Replies:** 4\
**Last updated:** [October 5, 2022, 7:53am UTC](https://root-forum.cern.ch/t/root-cant-find-pythia8-lib/51790 "2022-10-05T07:53:34Z")

</div>

Hi! I am new to Linux, ROOT, Pythia, and coding in general. At the moment, I am trying to run Pythia example ‘main91.cc’ using ROOT. I go into ~/…/pythia8307/examples$ root then root\[0\] .x main91.cc and receive t…

---

## [Projection onto Y axis](https://root-forum.cern.ch/t/projection-onto-y-axis/51787)

<div class="topic-metadata">

**Author:** [@alex14](https://root-forum.cern.ch/u/alex14)\
**Replies:** 2\
**Last updated:** [October 2, 2022, 5:35pm UTC](https://root-forum.cern.ch/t/projection-onto-y-axis/51787 "2022-10-02T17:35:24Z")

</div>

Hi, I’m new to root, and I have a question regarding the 2D histogram - projection to the Y axis. I’ve opened a file and extracted the TH2D histogram that I want, projected and drew it onto the X axis as a TH1D histogram…

---

## [Applying cut conditions in Draw-\>("", ... ,"")](https://root-forum.cern.ch/t/applying-cut-conditions-in-draw/51769)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 5\
**Last updated:** [October 2, 2022, 5:29pm UTC](https://root-forum.cern.ch/t/applying-cut-conditions-in-draw/51769 "2022-10-02T17:29:13Z")

</div>

Hi all, I’m trying to plot a (7,4) canvas using a branch of the tree. To be more specific, my tree looks something like this Tree\[i\]\[j\] where i takes 7 values and for each i we have 4 values of j and in each section, I w…

---

## [Monte Carlo method using TF1](https://root-forum.cern.ch/t/monte-carlo-method-using-tf1/51516)

<div class="topic-metadata">

**Author:** [@lila](https://root-forum.cern.ch/u/lila)\
**Replies:** 3\
**Last updated:** [October 1, 2022, 1:09pm UTC](https://root-forum.cern.ch/t/monte-carlo-method-using-tf1/51516 "2022-10-01T13:09:13Z")

</div>

Hello everyone, I’m new to ROOT. I need some help learning Monte Carlo methods, and I’m very much stuck. I need to use the Central limit theorem and Box-Muller methods to generate random numbers distributed as a Gaussian…

---

## [Chi-square test help](https://root-forum.cern.ch/t/chi-square-test-help/51527)

<div class="topic-metadata">

**Author:** [@DTMsurf](https://root-forum.cern.ch/u/DTMsurf)\
**Replies:** 2\
**Last updated:** [September 30, 2022, 7:22pm UTC](https://root-forum.cern.ch/t/chi-square-test-help/51527 "2022-09-30T19:22:10Z")

</div>

\_ROOT Version:6.26.04\_1 \_Platform: macOS Monterey \_Compiler: C++ I am working on a macro that applies a chi-square test to many different histograms and then creates a chi-square distribution using the outputted chi s…

---

## [Issue building root](https://root-forum.cern.ch/t/issue-building-root/51771)

<div class="topic-metadata">

**Author:** [@Paul\_Morrrison](https://root-forum.cern.ch/u/Paul_Morrrison)\
**Replies:** 3\
**Last updated:** [September 30, 2022, 6:08pm UTC](https://root-forum.cern.ch/t/issue-building-root/51771 "2022-09-30T18:08:12Z")

</div>

Not sure how to resolve this. Running, from the build directory, cmake -DCMAKE\_CXX\_STANDARD=17 -DCMAKE\_INSTALL\_PREFIX=../root\_install ../root\_src cmake --build . -- -j6 I get the error, \[ 75%\] Building CXX object bind…

---

## [Counting the number of entries in a TCutG](https://root-forum.cern.ch/t/counting-the-number-of-entries-in-a-tcutg/51731)

<div class="topic-metadata">

**Author:** [@asanch25](https://root-forum.cern.ch/u/asanch25)\
**Replies:** 3\
**Last updated:** [September 29, 2022, 7:56am UTC](https://root-forum.cern.ch/t/counting-the-number-of-entries-in-a-tcutg/51731 "2022-09-29T07:56:18Z")

</div>

Hi, I am having issues with getting the number of entries within a graphical cut. The histogram I am looking at is within a directory in the root file, that is the reason for cd’ing into a directory at the beginning. My …

---

## [Retrieve TVectorD from a root file](https://root-forum.cern.ch/t/retrieve-tvectord-from-a-root-file/51744)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 8\
**Last updated:** [September 28, 2022, 3:28pm UTC](https://root-forum.cern.ch/t/retrieve-tvectord-from-a-root-file/51744 "2022-09-28T15:28:17Z")

</div>

Hello experts, I stored TVectorD in a root file.But I cannot receive it from the root file. Could someone help me who’s the error? void mxtrix\_multiplication(){ const int nx=3,nQ2=4,ntmin\_t=10,n\_weight=6; …

---

## [Why I use tree-\>Draw("branch") but got nothing?](https://root-forum.cern.ch/t/why-i-use-tree-draw-branch-but-got-nothing/51740)

<div class="topic-metadata">

**Author:** [@Dyson](https://root-forum.cern.ch/u/Dyson)\
**Replies:** 1\
**Last updated:** [September 28, 2022, 9:17am UTC](https://root-forum.cern.ch/t/why-i-use-tree-draw-branch-but-got-nothing/51740 "2022-09-28T09:17:45Z")

</div>

mode3-\>Print() //mode3 is a tree name in a root file \*Tree :mode3 : ks N-Tuple example \* \*Entries : 0 : Total = 18194 bytes File Size = 1708 \* …

---

## [Python-CPP Interoperativity: Accessing TTree generated by external macros in python (conda environment)](https://root-forum.cern.ch/t/python-cpp-interoperativity-accessing-ttree-generated-by-external-macros-in-python-conda-environment/51736)

<div class="topic-metadata">

**Author:** [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Replies:** 1\
**Last updated:** [September 28, 2022, 5:06am UTC](https://root-forum.cern.ch/t/python-cpp-interoperativity-accessing-ttree-generated-by-external-macros-in-python-conda-environment/51736 "2022-09-28T05:06:24Z")

</div>

I am writting an external macro that looks like this: TTree\* t2(string fname, int num){ cout \<\< "file number: "\<\< num \<\< endl; TTree\* tree=new TTree(fname.c\_str(),"tttname"); return tree; } Then in jupyterlab, I run…

---

## [Matrix multiplication in two files](https://root-forum.cern.ch/t/matrix-multiplication-in-two-files/51730)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 2\
**Last updated:** [September 27, 2022, 6:34pm UTC](https://root-forum.cern.ch/t/matrix-multiplication-in-two-files/51730 "2022-09-27T18:34:11Z")

</div>

Dear experts, This is kind of simple question for you. I have 120(6X6 matrix) TMatrixD(from generated) and 120 TvectorD(from data) made from two different runs. I can print them in the terminal /copy and paste into a …

---

## [When does the TObject pointed to by TFile::Get(name) go out of scope?](https://root-forum.cern.ch/t/when-does-the-tobject-pointed-to-by-tfile-get-name-go-out-of-scope/51708)

<div class="topic-metadata">

**Author:** [@ackuhlma](https://root-forum.cern.ch/u/ackuhlma)\
**Replies:** 6\
**Last updated:** [September 27, 2022, 5:31pm UTC](https://root-forum.cern.ch/t/when-does-the-tobject-pointed-to-by-tfile-get-name-go-out-of-scope/51708 "2022-09-27T17:31:21Z")

</div>

I want to write a function which returns a TH1D\* without getting a dangling pointer. But I am confused about when the histogram read from a TFile would go out of scope. TH1D\* get\_histogram() { TFile filename ("input…

---

## [Error in plotting inside a for loop using tree-\>Draw()](https://root-forum.cern.ch/t/error-in-plotting-inside-a-for-loop-using-tree-draw/51686)

<div class="topic-metadata">

**Author:** [@thegame](https://root-forum.cern.ch/u/thegame)\
**Replies:** 3\
**Last updated:** [September 23, 2022, 7:02pm UTC](https://root-forum.cern.ch/t/error-in-plotting-inside-a-for-loop-using-tree-draw/51686 "2022-09-23T19:02:52Z")

</div>

Hi, I’m trying to have a correlation plot (6 columns \* 4 rows) between two branches inside two “for” loops. A snippet of the code is below: for(int ippac=0; ippac\<7; ippac++){ if (ippac == 5) { continue; …

---

## [Problem on reading files](https://root-forum.cern.ch/t/problem-on-reading-files/51629)

<div class="topic-metadata">

**Author:** [@AndreM](https://root-forum.cern.ch/u/AndreM)\
**Replies:** 5\
**Last updated:** [September 23, 2022, 10:20am UTC](https://root-forum.cern.ch/t/problem-on-reading-files/51629 "2022-09-23T10:20:38Z")

</div>

Good evening everyone, sorry to bother but i have a question regarding reading ROOT files. Im trying to perform some analysis and help was already provided here so i was able to analyse data from a given file. It was a .…

---

## [View contents of ROOT file like a csv viewer](https://root-forum.cern.ch/t/view-contents-of-root-file-like-a-csv-viewer/51604)

<div class="topic-metadata">

**Author:** [@Yannis\_Kingdom](https://root-forum.cern.ch/u/Yannis_Kingdom)\
**Replies:** 4\
**Last updated:** [September 23, 2022, 7:00am UTC](https://root-forum.cern.ch/t/view-contents-of-root-file-like-a-csv-viewer/51604 "2022-09-23T07:00:15Z")

</div>

Hello Is there a way to view data in a ROOT file in the same way that Jupyter lab shows the contents of a csv file? There doesn’t seem to be any way at the moment - this would be a really helpful addition. Thank you! Y…

---

## [Propagation error of inverse matrix](https://root-forum.cern.ch/t/propagation-error-of-inverse-matrix/51641)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 5\
**Last updated:** [September 22, 2022, 10:00pm UTC](https://root-forum.cern.ch/t/propagation-error-of-inverse-matrix/51641 "2022-09-22T22:00:02Z")

</div>

Hello Rooters, I want to calculate the propagation error of inverse matrix. Is there a direct way to do it in root? I found an equation related to propagation error of inverse matrix from a document(attcached the docu…

---

## [Retracting primary particles from a root tree](https://root-forum.cern.ch/t/retracting-primary-particles-from-a-root-tree/51647)

<div class="topic-metadata">

**Author:** [@azinbeigi](https://root-forum.cern.ch/u/azinbeigi)\
**Replies:** 6\
**Last updated:** [September 22, 2022, 8:44pm UTC](https://root-forum.cern.ch/t/retracting-primary-particles-from-a-root-tree/51647 "2022-09-22T20:44:56Z")

</div>

Hi everyone, I have a question regarding my data that is stored in root trees. In my simulations, I start from electrons and I score bremsstrahlung photons somewhere at the outer layer of my x-ray tube. I get output roo…

---

## [From log to linear scale axis](https://root-forum.cern.ch/t/from-log-to-linear-scale-axis/51627)

<div class="topic-metadata">

**Author:** [@robygru](https://root-forum.cern.ch/u/robygru)\
**Replies:** 1\
**Last updated:** [September 20, 2022, 2:52pm UTC](https://root-forum.cern.ch/t/from-log-to-linear-scale-axis/51627 "2022-09-20T14:52:07Z")

</div>

Hi, i want to change the log scale of a multigraph to linear scale, is there a way to do that?

---

## [Problem initializing a 4-vector](https://root-forum.cern.ch/t/problem-initializing-a-4-vector/50789)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 5\
**Last updated:** [September 20, 2022, 12:20pm UTC](https://root-forum.cern.ch/t/problem-initializing-a-4-vector/50789 "2022-09-20T12:20:07Z")

</div>

Hello, I am working with root 6.24/06 on lxplus in eventloop. I declare a 4 vector and initialize it: ROOT::Math::LorentzVector\<ROOT::Math::PtEtaPhiM4D\<double\>\> myVector; ... myVector = cluster-\>p4(xAOD::CaloCluster\_v…

---

## [Question about compiling root with c++ 17](https://root-forum.cern.ch/t/question-about-compiling-root-with-c-17/51597)

<div class="topic-metadata">

**Author:** [@Colin\_Chan](https://root-forum.cern.ch/u/Colin_Chan)\
**Replies:** 7\
**Last updated:** [September 19, 2022, 3:43pm UTC](https://root-forum.cern.ch/t/question-about-compiling-root-with-c-17/51597 "2022-09-19T15:43:53Z")

</div>

My system wsl Ubuntu 20 Root version 6.24 default c++ compiler version :9.4 My PI wants me to do the testing for a DAQ project on the local machine. And the error message tells me to compile ROOT with c++17. I follow…

---

## [ProfileX error calculation after scaling 2d histogram](https://root-forum.cern.ch/t/profilex-error-calculation-after-scaling-2d-histogram/51603)

<div class="topic-metadata">

**Author:** [@haha123](https://root-forum.cern.ch/u/haha123)\
**Replies:** 1\
**Last updated:** [September 18, 2022, 4:55pm UTC](https://root-forum.cern.ch/t/profilex-error-calculation-after-scaling-2d-histogram/51603 "2022-09-18T16:55:56Z")

</div>

I have a question about the error bar calculation when calling TProfileX from a TH2D. The problem occurs when I first scale the TH2D by a value (e.g. Scale(1./10000)). ProfileX() gives the correct the error. However, dir…

---

## [Example for Integrating ROOT into CMake projects](https://root-forum.cern.ch/t/example-for-integrating-root-into-cmake-projects/51591)

<div class="topic-metadata">

**Author:** [@enpg\_qz](https://root-forum.cern.ch/u/enpg_qz)\
**Replies:** 4\
**Last updated:** [September 18, 2022, 7:13am UTC](https://root-forum.cern.ch/t/example-for-integrating-root-into-cmake-projects/51591 "2022-09-18T07:13:24Z")

</div>

I have a question about Integrating ROOT into CMake projects, I want a simple cmake example to use ROOT and it’s dictionary mechanism. I find an very nice example wrote by Enrico: with\_cmake example It has only 5 files…

---

## [Creating multiple histograms from columnar dataset with different conditions](https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584)

<div class="topic-metadata">

**Author:** [@PKimPhysics](https://root-forum.cern.ch/u/PKimPhysics)\
**Replies:** 4\
**Last updated:** [September 16, 2022, 4:55pm UTC](https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584 "2022-09-16T16:55:16Z")

</div>

Hello everyone! I have basic knowledge of how to use ROOT but I can’t come up with a good idea to create a set of histograms, each containing cross-sections for a specific range of angles using a set of data we gathered.…

---

## [Changing ROOT version in SWAN](https://root-forum.cern.ch/t/changing-root-version-in-swan/51578)

<div class="topic-metadata">

**Author:** [@pkalbhor](https://root-forum.cern.ch/u/pkalbhor)\
**Replies:** 1\
**Last updated:** [September 16, 2022, 2:31pm UTC](https://root-forum.cern.ch/t/changing-root-version-in-swan/51578 "2022-09-16T14:31:51Z")

</div>

It might be easy but I am NOT sure how to change default ROOT version in SWAN session? Setting . /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.24.06/x86\_64-centos7-gcc48-opt/bin/thisroot.sh in script at start of the sess…

---

## [Storing C Struct in Tree](https://root-forum.cern.ch/t/storing-c-struct-in-tree/51583)

<div class="topic-metadata">

**Author:** [@newbie2](https://root-forum.cern.ch/u/newbie2)\
**Replies:** 1\
**Last updated:** [September 15, 2022, 11:05pm UTC](https://root-forum.cern.ch/t/storing-c-struct-in-tree/51583 "2022-09-15T23:05:11Z")

</div>

ROOT Version : 6.26 Platform : Debian 11 Compiler : GCC 10.2 #include \<iostream\> #include "TFile.h" #include "TTree.h" struct Event{ int NParticle; double b, PsiEP; }; int main(int argc, char \*\*argv){ TFile Fil…

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

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