# Newbie

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

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

---

## [Conda ROOT and Jupyter notebook](https://root-forum.cern.ch/t/conda-root-and-jupyter-notebook/41122)

<div class="topic-metadata">

**Author:** [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 9:25pm UTC](https://root-forum.cern.ch/t/conda-root-and-jupyter-notebook/41122 "2020-08-24T21:25:11Z")

</div>

Hi all, I’m having the same issue as reported in these two previous posts (https://root-forum.cern.ch/t/importing-root-in-jupyter-notebook-with-python3/40371/4, https://root-forum.cern.ch/t/problem-using-jupyter-noteboo…

---

## [Error in changing of root version from 6 to 5](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009)

<div class="topic-metadata">

**Author:** [@m.sadegh](https://root-forum.cern.ch/u/m.sadegh)\
**Replies:** 5\
**Last updated:** [August 24, 2020, 6:22pm UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009 "2020-08-24T18:22:22Z")

</div>

Dear All, I’m beginner in root. I had written a c++ code to our analysis using root-6-18-04. Everything works well. For some special reasons, I force to change root version to 5-34-3. When I try to run again my code, i…

---

## [Prevent info message when file is created](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 5:43pm UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096 "2020-08-24T17:43:45Z")

</div>

Dear, I’m running a script that loops over histograms and prints these as eps file Every time a eps is created, the terminal window is put in the background and a message saying: Info in TCanvas::Print: eps file has be…

---

## [Generate a new histogram using center bins from another histogram](https://root-forum.cern.ch/t/generate-a-new-histogram-using-center-bins-from-another-histogram/41112)

<div class="topic-metadata">

**Author:** [@clkong](https://root-forum.cern.ch/u/clkong)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 5:45am UTC](https://root-forum.cern.ch/t/generate-a-new-histogram-using-center-bins-from-another-histogram/41112 "2020-08-24T05:45:41Z")

</div>

Hello everyone, Please refer to to code below could draw a histogram h\_enu\_sub by getting the content from h\_ibd\_sub (which is a returned value / histogram that have been generated), Now I need to use the bin center o…

---

## [Setting scale and Merging two histograms](https://root-forum.cern.ch/t/setting-scale-and-merging-two-histograms/41051)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 5\
**Last updated:** [August 19, 2020, 2:25pm UTC](https://root-forum.cern.ch/t/setting-scale-and-merging-two-histograms/41051 "2020-08-19T14:25:51Z")

</div>

Hi, I wanna merge two histograms produced by single root file. But when i merged h10 and h20 then no effects occured after merging(may be due to empty h20). How one can adjust the scale and how it could be resolved? Mac…

---

## [Online learning in TMVA's MLP method](https://root-forum.cern.ch/t/online-learning-in-tmvas-mlp-method/41053)

<div class="topic-metadata">

**Author:** [@Kehi](https://root-forum.cern.ch/u/Kehi)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 1:15pm UTC](https://root-forum.cern.ch/t/online-learning-in-tmvas-mlp-method/41053 "2020-08-19T13:15:25Z")

</div>

Hi, I’m using Root and TMVA for my final project and I’m having some trouble understanding how the MLP method learns. The TMVA user guide says that gradient descent is used for the loss function value minimisation and th…

---

## [Making a Cut when Projecting a TNtuple?](https://root-forum.cern.ch/t/making-a-cut-when-projecting-a-tntuple/41047)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 10:37am UTC](https://root-forum.cern.ch/t/making-a-cut-when-projecting-a-tntuple/41047 "2020-08-19T10:37:23Z")

</div>

I have a TNtuple with columns “x” and “y”. I’d like to plot this on a 2D histogram, with “x” on the horizontal axis, and “y” on the vertical axis, using the “colz” option. I understand this is done with the syntax: N-\>D…

---

## [Combining any user defined function with a predefined function for fitting](https://root-forum.cern.ch/t/combining-any-user-defined-function-with-a-predefined-function-for-fitting/41019)

<div class="topic-metadata">

**Author:** [@rNov77](https://root-forum.cern.ch/u/rNov77)\
**Replies:** 1\
**Last updated:** [August 19, 2020, 7:23am UTC](https://root-forum.cern.ch/t/combining-any-user-defined-function-with-a-predefined-function-for-fitting/41019 "2020-08-19T07:23:45Z")

</div>

Dear all, I require help in understanding how to fit a histogram with two different functions, when one of the functions is user-defined. I have read about combining two or more predefined functions (gaus, expo, landau,…

---

## [Something sublty wrong with my ROOT code?](https://root-forum.cern.ch/t/something-sublty-wrong-with-my-root-code/41048)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 2\
**Last updated:** [August 19, 2020, 1:24am UTC](https://root-forum.cern.ch/t/something-sublty-wrong-with-my-root-code/41048 "2020-08-19T01:24:37Z")

</div>

I’m not sure if there is, in fact, some subtle issue with my code (and, if so, whether it’s a ROOT issue or a C++ issue), but perhaps someone here can shed light on what’s going on. The code below is designed to read TN…

---

## [Translating a th1](https://root-forum.cern.ch/t/translating-a-th1/41007)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 3\
**Last updated:** [August 18, 2020, 5:41pm UTC](https://root-forum.cern.ch/t/translating-a-th1/41007 "2020-08-18T17:41:43Z")

</div>

Dear, is there a simple way to translate a TH1 along the x-axis using a constant? thanks!

---

## [Invalid Memory Pointer Issue When Creating Plots](https://root-forum.cern.ch/t/invalid-memory-pointer-issue-when-creating-plots/40994)

<div class="topic-metadata">

**Author:** [@RobertSmith](https://root-forum.cern.ch/u/RobertSmith)\
**Replies:** 4\
**Last updated:** [August 18, 2020, 2:54pm UTC](https://root-forum.cern.ch/t/invalid-memory-pointer-issue-when-creating-plots/40994 "2020-08-18T14:54:40Z")

</div>

I’m using a pre-packaged piece of code to plot graphs for data on interaction rates that I have. The code should output three canvases but at the moment only one of the plots is being produced before an error occurs: \*\*…

---

## [\[cppyy\] No C-linkage wrappers for function that deal with enums](https://root-forum.cern.ch/t/cppyy-no-c-linkage-wrappers-for-function-that-deal-with-enums/41018)

<div class="topic-metadata">

**Author:** [@alexandrumc](https://root-forum.cern.ch/u/alexandrumc)\
**Replies:** 1\
**Last updated:** [August 18, 2020, 12:30pm UTC](https://root-forum.cern.ch/t/cppyy-no-c-linkage-wrappers-for-function-that-deal-with-enums/41018 "2020-08-18T12:30:51Z")

</div>

Hi, These 4 functions that deal with enums (https://github.com/root-project/root/blob/master/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx#L2058-L2084) don’t have C-linkage wrappers, so I can’t c…

---

## [Shift a histogram along the x-axis](https://root-forum.cern.ch/t/shift-a-histogram-along-the-x-axis/41017)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [August 17, 2020, 7:06pm UTC](https://root-forum.cern.ch/t/shift-a-histogram-along-the-x-axis/41017 "2020-08-17T19:06:54Z")

</div>

Dear, is there a simple way to shift a TH1 along the x-axis with a fixed constant? i.e. every bin of the histogram moves with a constant value C\_x to the left or right depending on the sign of the constant

---

## [Name Error \_\_file\_\_](https://root-forum.cern.ch/t/name-error-file/41005)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 1\
**Last updated:** [August 17, 2020, 8:43am UTC](https://root-forum.cern.ch/t/name-error-file/41005 "2020-08-17T08:43:12Z")

</div>

Hello, I am trying to understand how some code works, so I am trying to run it line by line. from ROOT import \* import sys sys.path.append("modules/") import math print 'Number of arguments:', len(sys.argv), 'argumen…

---

## [ROOT on condor lxplus](https://root-forum.cern.ch/t/root-on-condor-lxplus/40970)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 3\
**Last updated:** [August 16, 2020, 12:49am UTC](https://root-forum.cern.ch/t/root-on-condor-lxplus/40970 "2020-08-16T00:49:03Z")

</div>

Dear, not a long time ago I used to submit jobs using condor with a script using ROOT that just worked fine, but for some reasons, ROOT is failing to be imported now: Traceback (most recent call last): File “/afs/cern.…

---

## [Prevent TF1 from being automatically drawn on TH1 when added to list of functions](https://root-forum.cern.ch/t/prevent-tf1-from-being-automatically-drawn-on-th1-when-added-to-list-of-functions/41002)

<div class="topic-metadata">

**Author:** [@Erdrick](https://root-forum.cern.ch/u/Erdrick)\
**Replies:** 8\
**Last updated:** [August 15, 2020, 2:06pm UTC](https://root-forum.cern.ch/t/prevent-tf1-from-being-automatically-drawn-on-th1-when-added-to-list-of-functions/41002 "2020-08-15T14:06:12Z")

</div>

ROOT Version: root/6.14.06 Platform: Red Hat Enterprise Linux Server release 7.8 (Maipo) Compiler: gcc/8.3.0 Hello, If I add a function to a histogram, how do I make the function not be drawn when I draw the histog…

---

## [Error: cannot initialize a variable of type 'TH2D \*' with an rvalue of type 'TH1 \*'](https://root-forum.cern.ch/t/error-cannot-initialize-a-variable-of-type-th2d-with-an-rvalue-of-type-th1/40997)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 2\
**Last updated:** [August 14, 2020, 7:26pm UTC](https://root-forum.cern.ch/t/error-cannot-initialize-a-variable-of-type-th2d-with-an-rvalue-of-type-th1/40997 "2020-08-14T19:26:48Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.18 Platform: Not Provided Compiler: Not Provided Good day I am using ROOT 6.18 and I am trying to gate on a cube and these how…

---

## [Error propagation with root](https://root-forum.cern.ch/t/error-propagation-with-root/40943)

<div class="topic-metadata">

**Author:** [@RiccardoFarina](https://root-forum.cern.ch/u/RiccardoFarina)\
**Replies:** 2\
**Last updated:** [August 13, 2020, 8:59am UTC](https://root-forum.cern.ch/t/error-propagation-with-root/40943 "2020-08-13T08:59:15Z")

</div>

Hi, I’d like to know if is there any ROOT function or class to propagate errors of derived quantities. I’m talking about this formula: where F(x,y,z) is a function of x,y,z obtained through direct measurements. Tha…

---

## [Can't compile code](https://root-forum.cern.ch/t/cant-compile-code/40952)

<div class="topic-metadata">

**Author:** [@leon1122](https://root-forum.cern.ch/u/leon1122)\
**Replies:** 2\
**Last updated:** [August 13, 2020, 8:04am UTC](https://root-forum.cern.ch/t/cant-compile-code/40952 "2020-08-13T08:04:29Z")

</div>

I’m having trouble compiling code in ROOT. For instance, if I try to compile the following simple code #include \<iostream\> using namespace std; double test() { double x=5.0; return x; } I get the following message I…

---

## [Error with TTree](https://root-forum.cern.ch/t/error-with-ttree/40938)

<div class="topic-metadata">

**Author:** [@dmiguez2020](https://root-forum.cern.ch/u/dmiguez2020)\
**Replies:** 1\
**Last updated:** [August 13, 2020, 7:25am UTC](https://root-forum.cern.ch/t/error-with-ttree/40938 "2020-08-13T07:25:32Z")

</div>

Hello all, i am using a TTree called output. I also have some TH1D declared earlier in the code: TH1D \*DirTheta\_resto = new TH1D("DirTheta\_resto","Theta Distribution;Theta \[deg\]; # events", 180, 0,180.); Later I used …

---

## [Program using GetX() working in root 5.34 but not root 6.18](https://root-forum.cern.ch/t/program-using-getx-working-in-root-5-34-but-not-root-6-18/40796)

<div class="topic-metadata">

**Author:** [@Ricardo\_Lambo](https://root-forum.cern.ch/u/Ricardo_Lambo)\
**Replies:** 14\
**Last updated:** [August 13, 2020, 7:15am UTC](https://root-forum.cern.ch/t/program-using-getx-working-in-root-5-34-but-not-root-6-18/40796 "2020-08-13T07:15:47Z")

</div>

Dear Colleagues, I need to invert a very complicated function (i.e. given y = f(x), I wish to find x = g(y)) and neither the inverse nor the function can be given analytically. I have written a simple test program (atta…

---

## [TH1 Fit Method Error](https://root-forum.cern.ch/t/th1-fit-method-error/40895)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 2\
**Last updated:** [August 12, 2020, 3:38pm UTC](https://root-forum.cern.ch/t/th1-fit-method-error/40895 "2020-08-12T15:38:24Z")

</div>

Hello, I am trying to figure out how some code works, so I am trying to execute it line by line. Well, after the I executed the attached code line by line, I typed the following line: fitr=hh.Fit(back,"SMR0") and I ge…

---

## [\[cppyy\] Call function that returns unsigned long](https://root-forum.cern.ch/t/cppyy-call-function-that-returns-unsigned-long/40848)

<div class="topic-metadata">

**Author:** [@alexandrumc](https://root-forum.cern.ch/u/alexandrumc)\
**Replies:** 6\
**Last updated:** [August 12, 2020, 8:07am UTC](https://root-forum.cern.ch/t/cppyy-call-function-that-returns-unsigned-long/40848 "2020-08-12T08:07:05Z")

</div>

Hi, Is there an unsigned long / unsigned int version of this function? function

---

## [Scp error: lsetup](https://root-forum.cern.ch/t/scp-error-lsetup/39676)

<div class="topic-metadata">

**Author:** [@Jcrosby](https://root-forum.cern.ch/u/Jcrosby)\
**Replies:** 3\
**Last updated:** [August 11, 2020, 10:02pm UTC](https://root-forum.cern.ch/t/scp-error-lsetup/39676 "2020-08-11T22:02:57Z")

</div>

Hello! I am having an issue using scp to download a file from lxplus to my home directory. I’m writing: scp jcrosby@lxplus.cern.ch:/afs/cern.ch/work/j/jcrosby/public/topana/somefile.h . Which outputs: Warning: Perman…

---

## [\[cppyy\] GetNumMethods for namespaces](https://root-forum.cern.ch/t/cppyy-getnummethods-for-namespaces/40849)

<div class="topic-metadata">

**Author:** [@alexandrumc](https://root-forum.cern.ch/u/alexandrumc)\
**Replies:** 4\
**Last updated:** [August 11, 2020, 10:08am UTC](https://root-forum.cern.ch/t/cppyy-getnummethods-for-namespaces/40849 "2020-08-11T10:08:07Z")

</div>

Hi, I’ve tried to use this function, but it returns 0 for namespaces. Any ideas on how to avoid that? Thanks!

---

## [MnHesse on Minuit2 standalone: too many arguments](https://root-forum.cern.ch/t/mnhesse-on-minuit2-standalone-too-many-arguments/40668)

<div class="topic-metadata">

**Author:** [@Rdat](https://root-forum.cern.ch/u/Rdat)\
**Replies:** 2\
**Last updated:** [August 11, 2020, 8:46am UTC](https://root-forum.cern.ch/t/mnhesse-on-minuit2-standalone-too-many-arguments/40668 "2020-08-11T08:46:14Z")

</div>

I am using MINUIT 5.34.14 standalone version (downloaded from http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/) on Ubuntu 20.04 on WSL. I am trying to use the MnHesse class to estimate the covariance…

---

## [Can't use set function for TVector2](https://root-forum.cern.ch/t/cant-use-set-function-for-tvector2/40896)

<div class="topic-metadata">

**Author:** [@leon1122](https://root-forum.cern.ch/u/leon1122)\
**Replies:** 2\
**Last updated:** [August 10, 2020, 5:32pm UTC](https://root-forum.cern.ch/t/cant-use-set-function-for-tvector2/40896 "2020-08-10T17:32:17Z")

</div>

When I run the following code { TVector2 vec; Double\_t x=0.; Double\_t y=0.; vec.Set(x,y); } I get the following error. IncrementalExecutor::executeFunction: symbol ‘?Set@TVector2@@QAEXNN@Z’ unresolved while linki…

---

## [Trouble setting logarithmic axis scale](https://root-forum.cern.ch/t/trouble-setting-logarithmic-axis-scale/40928)

<div class="topic-metadata">

**Author:** [@Mctran1724](https://root-forum.cern.ch/u/Mctran1724)\
**Replies:** 1\
**Last updated:** [August 10, 2020, 6:30am UTC](https://root-forum.cern.ch/t/trouble-setting-logarithmic-axis-scale/40928 "2020-08-10T06:30:10Z")

</div>

Hello, I am trying to create a scatterplot using pyroot where the y-axis is logarithmically scaled. The first and second columns of the efficiencies array are the data in question and we want to plot 1/efficiencies\[1\] v…

---

## [Saving the plot generated inside root macro](https://root-forum.cern.ch/t/saving-the-plot-generated-inside-root-macro/40916)

<div class="topic-metadata">

**Author:** [@Liam\_hayden](https://root-forum.cern.ch/u/Liam_hayden)\
**Replies:** 2\
**Last updated:** [August 9, 2020, 9:58am UTC](https://root-forum.cern.ch/t/saving-the-plot-generated-inside-root-macro/40916 "2020-08-09T09:58:17Z")

</div>

Hi, So I have plotted a histogram. Now is there a command that can be given inside the macro which will allow me to save this in a folder in pdf format. ( I should be also able to set the path of the folder where I wan…

---

## [Using ROOT on lxplus](https://root-forum.cern.ch/t/using-root-on-lxplus/40795)

<div class="topic-metadata">

**Author:** [@Suchita\_Kulkarni](https://root-forum.cern.ch/u/Suchita_Kulkarni)\
**Replies:** 2\
**Last updated:** [August 9, 2020, 6:51am UTC](https://root-forum.cern.ch/t/using-root-on-lxplus/40795 "2020-08-09T06:51:45Z")

</div>

Dear all, I am trying to source a standalone root installation from lxplus6 as source /afs/cern.ch/sw/lcg/app/releases/ROOT/6.06.06/x86\_64-slc6-gcc49-opt/root/bin/thisroot.sh However I keep getting -bash: /afs/cern.ch…

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

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