Old version vs. New Version Installation Processes

Try root_v6.02.08.

Hi,

Release is out.

Axel.

Wow that Coyote is too fast for me :slight_smile:

Axel.

Hi
But where can I get pythia 8180. On their webpate they don’t have it.

Sincerely,

Try the newest ROOT 6 (i.e. v6.02/08) with the newest Pythia8 (i.e. 8.205).

Thanks everyone,
One last question (I cannot promise)
As I am following the following instructionshttp://zuysal.web.cern.ch/zuysal/root.html, it seems that I cannot do “make install” where it says at the end of the page. I am receiving this error message:

However, I do see that make has been successful and I can run root in every terminal just by typing root.
So the question is,
Is something wrong with that link I am following if I want to use pythia via root? If not, what would be the specific procedure (command lines) of running pythia examples via root?

Here is the path to my pythia8180 and root6-02.08
/home/…/pythia_root/pythia8
/home/…/pythia_root/root

I have tried running pythia in root through .x $PYTHIA8/examples/main01.cc
But, I am getting:

[quote]In file included from input_line_27:1:
/home/…/pythia_root/pythia8/examples/main01.cc:9:10: fatal error:
‘Pythia8/Pythia.h’ file not found
#include “Pythia8/Pythia.h”[/quote]
Again, thanks

Hi,

You cannot run a function called main() in ROOT’s interpreter; all the Pythia8 examples I have looked at seem to be called main(). You’ll need to compile them as a binary.

If you cannot do make install you probably lost / moved your ROOT source directory?

Cheers, Axel.

I noticed that in root depository (not root software), I have a folder called “root” but it is empty. What does that mean? Have I deleted those accidentally? Is there anyway to restore it?

Hi,

I don’t know what you mean.

Cheers, Axel.

There is two main directory called Home and Root. In Root, there is a folder called “root” along with other normal folders such as bin, boot, dev, etc, home, lib, lost+found, media, mnt, opt, proc, run, sbin, srv, sys, tmp, usr and var.

root one is empty.

See, for example, “Introduction to Linux -> 3. About files and the file system -> 3.1. General overview of the Linux file system -> 3.1.3. More file system layout” (your “Root” directory is “/” and your “Home” directory is probably something like “/home/ashur”, while “/root” is the home directory of the administrative “root” user which has nothing to do with your ROOT).

Thank You Wile,
My issue is resolved after going through the steps more carefully. It seems now both root and pythia are cooperating with each other. However, I still don’t know why the following command is not operating in terminal.

And Axel, would you mind letting me know how to compile them in binary? I didn’t quite get that. An example would help.
________________________________________-
Just to give you some info:
In my bashrc file I have the following lines:

export PYTHIA8=/home/.../pythia_root/pythia8 export PYTHIA8DATA=$PYTHIA8/xmldoc export ROOTSYS=/home/.../pythia_root/root-6.02.08 export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

root -?

Do you mean I should include the exaxt version? Something like this?
root-6.02.08 x PATH-TO-FILENAME

What would be exact command line?

ROOT Primer -> ROOT Macros
ROOT User’s Guide -> Getting Started -> Start and Quit a ROOT Session

Thanks Wile,
Without knowing the basics, I was trying to jump into complicated things. Now, that root runs normally. I am learning its basics.

As I am trying to compile and run macro6 from the tutorial directly from terminal via

I am receiving the following error message:

[quote]Example6.C: In function ‘void macro6()’:
Example6.C:34:9: error: ‘exp_h’ was not declared in this scope
exp_h->Fill(rndgen.Exp(4));[/quote]
Even though I have included all the headers needed to run the code but I am still missing one. How to know what is that?


[code]#include
#include “TFile.h”
#include “TF2.h”
#include “TH1F.h”
#include “TCanvas.h”
#include “TMath.h”
#include “TGraphErrors.h”
#include “TGraph2DErrors.h”
#include “TLegend.h”
#include “TApplication.h”
#include “TGraphPolar.h”
#include “TRandom3.h”
#include “TStyle.h”

#include <math.h>

// Divide and add 1D Histograms

void format_h(TH1F* h, int linecolor){
h->SetLineWidth(3);
h->SetLineColor(linecolor);
}

void macro6(){

TH1F* sig_h=new TH1F("sig_h","Signal Histo",50,0,10);
TH1F* gaus_h1=new TH1F("gaus_h1","Gauss Histo 1",30,0,10);
TH1F* gaus_h2=new TH1F("gaus_h2","Gauss Histo 2",30,0,10);
TH1F* bkg_h=new TH1F("exp_h","Exponential Histo",50,0,10);

// simulate the measurements
TRandom3 rndgen;
for (int imeas=0;imeas<4000;imeas++){
    exp_h->Fill(rndgen.Exp(4));
    if (imeas%4==0) gaus_h1->Fill(rndgen.Gaus(5,2));
    if (imeas%4==0) gaus_h2->Fill(rndgen.Gaus(5,2));
    if (imeas%10==0)sig_h->Fill(rndgen.Gaus(5,.5));}

// Format Histograms
TH1F* histos[4]={sig_h,bkg_h,gaus_h1,gaus_h2};
for (int i=0;i<4;++i){
    histos[i]->Sumw2(); // *Very* Important
    format_h(histos[i],i+1);
    }

// Sum
TH1F* sum_h= new TH1F(*bkg_h);
sum_h->Add(sig_h,1.);
sum_h->SetTitle("Exponential + Gaussian");
format_h(sum_h,kBlue);

TCanvas* c_sum= new TCanvas();
sum_h->Draw("hist");
bkg_h->Draw("SameHist");
sig_h->Draw("SameHist");

// Divide
TH1F* dividend=new TH1F(*gaus_h1);
dividend->Divide(gaus_h2);

// Graphical Maquillage
dividend->SetTitle(";X axis;Gaus Histo 1 / Gaus Histo 2");
format_h(dividend,kOrange);
gaus_h1->SetTitle(";;Gaus Histo 1 and Gaus Histo 2");
gStyle->SetOptStat(0);

TCanvas* c_divide= new TCanvas();
c_divide->Divide(1,2,0,0);
c_divide->cd(1);
c_divide->GetPad(1)->SetRightMargin(.01);
gaus_h1->DrawNormalized("Hist");
gaus_h2->DrawNormalized("HistSame");

c_divide->cd(2);
dividend->GetYaxis()->SetRangeUser(0,2.49);
c_divide->GetPad(2)->SetGridy();
c_divide->GetPad(2)->SetRightMargin(.01);
dividend->Draw();

}

#ifndef CINT
void StandaloneApplication(int argc, char** argv) {
// eventually, evaluate the application parameters argc, argv
// ==>> here the ROOT macro is called
macro6();
}
// This is the standard “main” of C++ starting
// a ROOT application
int main(int argc, char** argv) {
TApplication app(“ROOT Application”, &argc, argv);
StandaloneApplication(app.Argc(), app.Argv());
app.Run();
return 0;
}
#endif
[/code]


Thanks,

Hi,

That’s an bug in the Pythia example macro :frowning: You could report it to them.

Axel.

But, I am running a root example named macro6 from /root-6.02.08/Documentation/Primer/Macros without relying on pythia. I tried to report it to root.cern.com but it says:

Try to replace exp_h->Fill(…); with bkg_h->Fill(…);
Report this problem in the ROOT Documentation forum.