# Newbie

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

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

---

## [Fitting a function on top of a color map](https://root-forum.cern.ch/t/fitting-a-function-on-top-of-a-color-map/50567)

<div class="topic-metadata">

**Author:** [@xaratustra](https://root-forum.cern.ch/u/xaratustra)\
**Replies:** 2\
**Last updated:** [July 14, 2022, 4:37pm UTC](https://root-forum.cern.ch/t/fitting-a-function-on-top-of-a-color-map/50567 "2022-07-14T16:37:18Z")

</div>

I have a 2D histogram which I plot as a color map, color is the quantity, horizontal axis is frequency and the vertical axis is the time. Now I see that in this color map, the quantity is changing position in a parabolic…

---

## [4vector transformation](https://root-forum.cern.ch/t/4vector-transformation/50772)

<div class="topic-metadata">

**Author:** [@psyduck](https://root-forum.cern.ch/u/psyduck)\
**Replies:** 1\
**Last updated:** [July 12, 2022, 3:48pm UTC](https://root-forum.cern.ch/t/4vector-transformation/50772 "2022-07-12T15:48:48Z")

</div>

Hello! I am currently working on a decay of a moving particle and I want to transform the 4vector energy-momentum of the products, to the frame of reference of the mother particle. My TLorentzVector is defined with Set.…

---

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

<div class="topic-metadata">

**Author:** [@Roy](https://root-forum.cern.ch/u/Roy)\
**Replies:** 4\
**Last updated:** [July 12, 2022, 10:33am UTC](https://root-forum.cern.ch/t/error-of-break-segmentation-violation/50763 "2022-07-12T10:33:53Z")

</div>

my program is giving the Segmentation violation error. Please could you help me figure the error. ifstream in; in.open("Temperature01-12-2021-09-12-2021.txt"); int lincent; float date\_index; double tempe…

---

## [Is there a way to use Eval() for a histogram?](https://root-forum.cern.ch/t/is-there-a-way-to-use-eval-for-a-histogram/50717)

<div class="topic-metadata">

**Author:** [@Nisha](https://root-forum.cern.ch/u/Nisha)\
**Replies:** 4\
**Last updated:** [July 11, 2022, 8:37pm UTC](https://root-forum.cern.ch/t/is-there-a-way-to-use-eval-for-a-histogram/50717 "2022-07-11T20:37:09Z")

</div>

Hello Experts, I have an efficiency histogram. I want to divide an energy histogram with the efficiency and used this - \\\\ h2-\>Divide(h1); However, this is not working since the binning for both is different. Is the…

---

## [Sort a RDataFrame](https://root-forum.cern.ch/t/sort-a-rdataframe/50739)

<div class="topic-metadata">

**Author:** [@Yannis\_Kingdom](https://root-forum.cern.ch/u/Yannis_Kingdom)\
**Replies:** 3\
**Last updated:** [July 11, 2022, 7:43pm UTC](https://root-forum.cern.ch/t/sort-a-rdataframe/50739 "2022-07-11T19:43:19Z")

</div>

Hello everyone Can I please ask, is it now possible to sort a (cached) dataframe? This thread suggests it is for my current version of Root: 31426 (sorry, not allowed to post links - search for “sorting a dataframe”). H…

---

## [TF1.Eval() as a function in RDataframe](https://root-forum.cern.ch/t/tf1-eval-as-a-function-in-rdataframe/50699)

<div class="topic-metadata">

**Author:** [@toicca](https://root-forum.cern.ch/u/toicca)\
**Replies:** 5\
**Last updated:** [July 11, 2022, 1:27pm UTC](https://root-forum.cern.ch/t/tf1-eval-as-a-function-in-rdataframe/50699 "2022-07-11T13:27:00Z")

</div>

Hi! I’m currently using pyROOT to fit a function to a histogram and after fitting I would like to use the TF1 function to evaluate points given in a RDataFrame column for example such as dataframe = ROOT.RDataFrame("my…

---

## [Root and python are in different directory](https://root-forum.cern.ch/t/root-and-python-are-in-different-directory/50737)

<div class="topic-metadata">

**Author:** [@isbara](https://root-forum.cern.ch/u/isbara)\
**Replies:** 2\
**Last updated:** [July 11, 2022, 8:09am UTC](https://root-forum.cern.ch/t/root-and-python-are-in-different-directory/50737 "2022-07-11T08:09:53Z")

</div>

I am new in root. I cannot import ROOT. I use zsh. When I try to run some code that include import ROOT code line I get an error like that. ModuleNotFoundError: No module named ‘ROOT’ When I run the where root command…

---

## [Using LorentzVector/PtEtaPhiM](https://root-forum.cern.ch/t/using-lorentzvector-ptetaphim/50729)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 3\
**Last updated:** [July 8, 2022, 7:46pm UTC](https://root-forum.cern.ch/t/using-lorentzvector-ptetaphim/50729 "2022-07-08T19:46:33Z")

</div>

Hello ROOT friends I am trying to work with LorentzVector and am struggling to set it up properly. From the documentation, I declare the vector as: LorentzVector\<PtEtaPhiM4D\<double\>\> vectorName; With include \<Math/V…

---

## [Error calculation of 2D histogram](https://root-forum.cern.ch/t/error-calculation-of-2d-histogram/50712)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 5\
**Last updated:** [July 8, 2022, 5:38pm UTC](https://root-forum.cern.ch/t/error-calculation-of-2d-histogram/50712 "2022-07-08T17:38:33Z")

</div>

Hello Rooters, I have two histograms called h\_QSq\_xBj and h\_QSq\_xBj\_MC. I applied Sumw2 option for these histograms. Then I took the division of these two histograms h\_ratio= h\_QSq\_xBj\_MC/h\_QSq\_xBj. (not applied sum…

---

## [Reposition Color Legend TH2 Lego Draw](https://root-forum.cern.ch/t/reposition-color-legend-th2-lego-draw/50710)

<div class="topic-metadata">

**Author:** [@Alkegit21](https://root-forum.cern.ch/u/Alkegit21)\
**Replies:** 1\
**Last updated:** [July 7, 2022, 4:55pm UTC](https://root-forum.cern.ch/t/reposition-color-legend-th2-lego-draw/50710 "2022-07-07T16:55:55Z")

</div>

Hi, How to move the color legend in TH2 lego like this: to this: inside the code? Notice that “6” was overlapped with the color legend in the first figure. I know we can move it manually in canvas, but how to do…

---

## [Output file location](https://root-forum.cern.ch/t/output-file-location/50701)

<div class="topic-metadata">

**Author:** [@pocarski](https://root-forum.cern.ch/u/pocarski)\
**Replies:** 5\
**Last updated:** [July 7, 2022, 1:25pm UTC](https://root-forum.cern.ch/t/output-file-location/50701 "2022-07-07T13:25:26Z")

</div>

I have ROOT macros which create .png files, but I have no idea where those files are or how to access them. Where does the Print() instruction output the files it creates?

---

## [Creating multiple Graphs from one data sheet](https://root-forum.cern.ch/t/creating-multiple-graphs-from-one-data-sheet/50690)

<div class="topic-metadata">

**Author:** [@GabeO](https://root-forum.cern.ch/u/GabeO)\
**Replies:** 3\
**Last updated:** [July 6, 2022, 3:53pm UTC](https://root-forum.cern.ch/t/creating-multiple-graphs-from-one-data-sheet/50690 "2022-07-06T15:53:16Z")

</div>

Hello, I’m trying to create multiple graphs from one data file. Data is in form time amplitude … 2e-010,0.653698 4e-010,0.650884 6e-010,0.645658 8e-010,0.644854 1e-009,0.649276 1.2e-009,0.653296 1.4e-009,0.6500…

---

## [6.26.04 build error in Debian Bullseye](https://root-forum.cern.ch/t/6-26-04-build-error-in-debian-bullseye/50412)

<div class="topic-metadata">

**Author:** [@steffen.aei](https://root-forum.cern.ch/u/steffen.aei)\
**Replies:** 8\
**Last updated:** [July 6, 2022, 10:49am UTC](https://root-forum.cern.ch/t/6-26-04-build-error-in-debian-bullseye/50412 "2022-07-06T10:49:52Z")

</div>

Attempting to build ROOT 6.26.04 in a Debian Bullseye pbuilder (sandbox build environment), with only the required packages installed as build dependencies, and cmake run with a minimal set of options (-Dgnuninstall=ON -…

---

## [Label Points on Log-Log graph](https://root-forum.cern.ch/t/label-points-on-log-log-graph/50679)

<div class="topic-metadata">

**Author:** [@OmnipotentEntity1](https://root-forum.cern.ch/u/OmnipotentEntity1)\
**Replies:** 3\
**Last updated:** [July 6, 2022, 4:48am UTC](https://root-forum.cern.ch/t/label-points-on-log-log-graph/50679 "2022-07-06T04:48:29Z")

</div>

So I’m trying to use Root to graph a bunch of functions and points, and then label these points. I’m following the graphtext.C example (cannot link to it due to new user restrictions), but my labels don’t seem to be show…

---

## [Trouble with getting GetChiSquare() function running properly](https://root-forum.cern.ch/t/trouble-with-getting-getchisquare-function-running-properly/50677)

<div class="topic-metadata">

**Author:** [@scheng5134](https://root-forum.cern.ch/u/scheng5134)\
**Replies:** 1\
**Last updated:** [July 5, 2022, 8:29pm UTC](https://root-forum.cern.ch/t/trouble-with-getting-getchisquare-function-running-properly/50677 "2022-07-05T20:29:56Z")

</div>

Hello I have a code which I simplified down below My issue stems from the second to last line where if I try to use it It spits out a long error which I show at the bottom. I’m not sure on where I’m going wrong with us…

---

## [Installing Pythia8 through Madgraph5](https://root-forum.cern.ch/t/installing-pythia8-through-madgraph5/50670)

<div class="topic-metadata">

**Author:** [@sscoville](https://root-forum.cern.ch/u/sscoville)\
**Replies:** 3\
**Last updated:** [July 5, 2022, 3:32pm UTC](https://root-forum.cern.ch/t/installing-pythia8-through-madgraph5/50670 "2022-07-05T15:32:16Z")

</div>

I am trying to install pythia8 through madgraph5 from mac Terminal running 12.4 Monterey and Python 3.10.5. When I run MG5\_aMC\>install LHPADF6 it then asks LHAPDF was not found. Do you want to install LHPADF6? (recommend…

---

## [AttributeError: 'TObject' object has no attribute 'SetLineColor'](https://root-forum.cern.ch/t/attributeerror-tobject-object-has-no-attribute-setlinecolor/50649)

<div class="topic-metadata">

**Author:** [@beg1nner](https://root-forum.cern.ch/u/beg1nner)\
**Replies:** 2\
**Last updated:** [July 4, 2022, 8:25am UTC](https://root-forum.cern.ch/t/attributeerror-tobject-object-has-no-attribute-setlinecolor/50649 "2022-07-04T08:25:44Z")

</div>

Dear experts, I have a script in python that uses ROOT and I am getting a following error: AttributeError: ‘TObject’ object has no attribute ‘SetLineColor’ for this line: gr.SetLineColor(ROOT.kViolet) . Could you p…

---

## [Data transformation in tmva](https://root-forum.cern.ch/t/data-transformation-in-tmva/50639)

<div class="topic-metadata">

**Author:** [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Replies:** 1\
**Last updated:** [July 4, 2022, 7:34am UTC](https://root-forum.cern.ch/t/data-transformation-in-tmva/50639 "2022-07-04T07:34:24Z")

</div>

I have come across two types of variable transformation: at TMVA::Factory \*factory = new TMVA::Factory( "TMVAClassification", outputFile"Transformations=I;D;P;G,D" ); at factory-\>BookMethod( dataloader, TMVA::Types::…

---

## [Find address of variable using name](https://root-forum.cern.ch/t/find-address-of-variable-using-name/50631)

<div class="topic-metadata">

**Author:** [@ACalcaterra](https://root-forum.cern.ch/u/ACalcaterra)\
**Replies:** 5\
**Last updated:** [July 2, 2022, 4:37pm UTC](https://root-forum.cern.ch/t/find-address-of-variable-using-name/50631 "2022-07-02T16:37:41Z")

</div>

Hi, and thank you in advance for reading this. Double thanks for actual helping! :grin: I have an Rtuple where variables are stored with names such as “PionMomentum\[100\]”, “KaonMomentum\[100\]” and analogously for many ot…

---

## [&& vs \* in TTree-\>Draw](https://root-forum.cern.ch/t/vs-in-ttree-draw/50628)

<div class="topic-metadata">

**Author:** [@smitmatt](https://root-forum.cern.ch/u/smitmatt)\
**Replies:** 6\
**Last updated:** [July 1, 2022, 4:19pm UTC](https://root-forum.cern.ch/t/vs-in-ttree-draw/50628 "2022-07-01T16:19:47Z")

</div>

Hello, I was wondering if anyone can explain why the psudocode below would print two different values instead of the same values. Please note, this is rewritten psudo-code to illustrait my confusion, and would not work…

---

## [Getting pyROOT for conda environment](https://root-forum.cern.ch/t/getting-pyroot-for-conda-environment/50584)

<div class="topic-metadata">

**Author:** [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Replies:** 3\
**Last updated:** [July 1, 2022, 8:52am UTC](https://root-forum.cern.ch/t/getting-pyroot-for-conda-environment/50584 "2022-07-01T08:52:51Z")

</div>

Hi, I got my ROOT from cvmfs in windows WSL2. I plan to get pyROOT of this installation to work in my conda environment. Is that possible without an new installation of ROOT in the conda environment ? \_ROOT Version: …

---

## [Trouble with TFile](https://root-forum.cern.ch/t/trouble-with-tfile/50590)

<div class="topic-metadata">

**Author:** [@Nisha](https://root-forum.cern.ch/u/Nisha)\
**Replies:** 2\
**Last updated:** [June 30, 2022, 2:54am UTC](https://root-forum.cern.ch/t/trouble-with-tfile/50590 "2022-06-30T02:54:26Z")

</div>

Hello Experts, I have multiple .ROOT files that I want to open and plot. Since I have many files, I am trying to write a separate function that I can call every time I need, instead of repeating the same process over an…

---

## [Minuit output to a txt file](https://root-forum.cern.ch/t/minuit-output-to-a-txt-file/50583)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 1\
**Last updated:** [June 29, 2022, 5:09am UTC](https://root-forum.cern.ch/t/minuit-output-to-a-txt-file/50583 "2022-06-29T05:09:13Z")

</div>

Hello all, May be this is a simple question. Is there a way to write Minuit output(terminal output) to a .txt/pdf file? I have a long output.It’s easy to check results in a file instead of terminal? Thanks Dil

---

## [Drawing Graphs with an offset in Y axis](https://root-forum.cern.ch/t/drawing-graphs-with-an-offset-in-y-axis/50490)

<div class="topic-metadata">

**Author:** [@Nisha](https://root-forum.cern.ch/u/Nisha)\
**Replies:** 15\
**Last updated:** [June 28, 2022, 9:01pm UTC](https://root-forum.cern.ch/t/drawing-graphs-with-an-offset-in-y-axis/50490 "2022-06-28T21:01:02Z")

</div>

Hello Rooters, I am stuck at a step which I am pretty sure must have a straightforward fix. I have tried a few things and I am not sure what to do. I have multiple graphs. I want to draw all these graphs in a single pl…

---

## [Understanding MINUIT results](https://root-forum.cern.ch/t/understanding-minuit-results/50574)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 3\
**Last updated:** [June 28, 2022, 8:36pm UTC](https://root-forum.cern.ch/t/understanding-minuit-results/50574 "2022-06-28T20:36:42Z")

</div>

Hello Experts, I have tried to work on the log-likelihood method. For that i tried the following example to do it using MINUIT. https://root.cern.ch/doc/master/NumericalMinimization\_8C.html I did this with the simulat…

---

## [Adding two histograms wih different x-axis](https://root-forum.cern.ch/t/adding-two-histograms-wih-different-x-axis/50580)

<div class="topic-metadata">

**Author:** [@NishuGoyal](https://root-forum.cern.ch/u/NishuGoyal)\
**Replies:** 2\
**Last updated:** [June 28, 2022, 3:53pm UTC](https://root-forum.cern.ch/t/adding-two-histograms-wih-different-x-axis/50580 "2022-06-28T15:53:21Z")

</div>

Hi, I wanted to superimpose my simulated decay spectra of Bi-207 with one from the experiment. I saved the two histgram as a .C file and tried to superimpose them but the issue is my simulated spectra is in MeV range wh…

---

## [Pythia8 compliation error, Pythia8/Pythia.h not found](https://root-forum.cern.ch/t/pythia8-compliation-error-pythia8-pythia-h-not-found/50549)

<div class="topic-metadata">

**Author:** [@Shrey\_Upadhyay](https://root-forum.cern.ch/u/Shrey_Upadhyay)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 12:02pm UTC](https://root-forum.cern.ch/t/pythia8-compliation-error-pythia8-pythia-h-not-found/50549 "2022-06-27T12:02:32Z")

</div>

Hello Experts I tried to install pythia on linux, but my program does not work, however the examples does ~/pythia/pythia8307/examples$ make ptu1 g++ ptu1.cc -o ptu1 ptu1.cc:3:10: fatal error: Pythia8/Pythia.h: N…

---

## [Production process of particles with TVirtualMC](https://root-forum.cern.ch/t/production-process-of-particles-with-tvirtualmc/50378)

<div class="topic-metadata">

**Author:** [@Cas](https://root-forum.cern.ch/u/Cas)\
**Replies:** 3\
**Last updated:** [June 25, 2022, 10:06am UTC](https://root-forum.cern.ch/t/production-process-of-particles-with-tvirtualmc/50378 "2022-06-25T10:06:56Z")

</div>

Dear all, I am trying to figure out how to get the production process of a particle in an event in with TVirtualMC. This class has a function has a function ProdProcess() which takes the parameter Int\_t isec. What is th…

---

## [Better way to determine most common difference of two columns of an RDataFrame](https://root-forum.cern.ch/t/better-way-to-determine-most-common-difference-of-two-columns-of-an-rdataframe/46996)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 3\
**Last updated:** [June 24, 2022, 9:09pm UTC](https://root-forum.cern.ch/t/better-way-to-determine-most-common-difference-of-two-columns-of-an-rdataframe/46996 "2022-06-24T21:09:09Z")

</div>

I have an RDataFrame, which consists of three columns (A, B, and run). Here’s what it might look like in tabular form: +-----+-----+-----+ | run | A | B | +-----+-----+-----+ | 001 | 35 | 5 | | 001 | 40 | 10 | …

---

## [Root interpolator embedded in a TF1](https://root-forum.cern.ch/t/root-interpolator-embedded-in-a-tf1/50170)

<div class="topic-metadata">

**Author:** [@Ricardo\_Lambo](https://root-forum.cern.ch/u/Ricardo_Lambo)\
**Replies:** 9\
**Last updated:** [June 23, 2022, 7:47pm UTC](https://root-forum.cern.ch/t/root-interpolator-embedded-in-a-tf1/50170 "2022-06-23T19:47:09Z")

</div>

Hello Colleagues, Is it possible to use Root interpolator embedded in TF1 in direct analogy as has been done here with TSpline3: My attempt with the data set attached gave me the error ‘ERROR: x values must be strictl…

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

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