Re: Pythia and generated particles

From: Carsten Hof <Carsten.Hof_at_physik.rwth-aachen.de>
Date: Tue, 15 Feb 2005 00:30:28 +0100


Hi Mario,

you can access the total cross section via

Double_t xsection = eg-> GetPARI(1);

where eg is an instance of the TPythia6() event generator class.

For further details you should see the Pythia manual. (The methods in Root have similar names to the one in Pythia)#

All the details for writing and reading should be in PythiaExample.C. If you want to create your own tree see. The tree0-3 tutorials and the manual section are really helpfull.

Regards,
Carsten

Mario Kadastik <mario.kadastik_at_cern.ch> schrieb am 15.02.05 00:07:13:
>
> Rene BRUN wrote:
>
> >Mario,
> >
> >We already have many examples with TClonesArray in the tutorials.
> >See, for instance: tcl.C, Jets.C, pythiaExample.C
> >
> >
> well it was quite difficult to find a way to actually address the n-th
> element of the TClonesArray. I finally just tried ->At(index) and found
> out that it worked :) I checked into the tutorial examples and it was
> quite difficult to actually understand that with the At() subroutine you
> can access the real objects that are in the TClonesArray. I am new to
> root and may be looking at a different viewpoint, but to me it seems
> that a lot of important aspects haven't been covered :) For example I
> haven't found a nice way to do these things:
>
> 1. after writing an array as a branch, to read it back into an array
> without SIGSEGV
> 2. write a simple Float_t variable into a root file
>
> For example I'm currently stuck with the next big thing :) Namely I want
> to generate a number of events with Pythia, write all the generated
> particles into root tree for later analysis and in addition I want to
> save the total process cross section also into that root tree.
>
> What I would have expected is that I can access the cross section with this:
> pythia->GetXSEC(isub, 3)
> as it seems to be missing I wen't for the Pyint5 common block. But for
> some reason it's not working either:
>
> root [2] TPythia6 *pythia = new TPythia6
> root [3] generalProperties(pythia)
> root [4] useDoubleHiggs(pythia,200,400,1,8,8)
> root [5] pythia->Initialize("cms","p","p",14000)
> <skipped the info text>
> ******** PYMAXI: summary of differential cross-section maximum search
> ********
>
> ==========================================================
> I I I
> I ISUB Subprocess name I Maximum value I
> I I I
> ==========================================================
> I I I
> I 96 Semihard QCD 2 -> 2 I 2.0977E+04 I
> I 349 f + fbar -> H_L++ + H_L-- I 1.6608E-09 I
> I I I
> ==========================================================
>
> ****** PYMULT: initialization of multiple interactions for MSTP(82) = 4
> ******
> pT0 = 2.64 GeV gives sigma(parton-parton) = 1.04E+03 mb: accepted
>
> ********************** PYINIT: initialization completed
> **********************
> root [6] for (Int_t i=0; i<1000; i++) {
> end with '}', '@':abort > pythia->GenerateEvent();
> end with '}', '@':abort > }
> root [7] Pyint5_t *pint5=pythia->GetPyint5()
> root [8] pint5->XSEC[2][348]
> Error: Symbol pint5 is not defined in current scope FILE:(tmpfile) LINE:1
> Error: Failed to evaluate pint5->XSEC[2][348]*** Interpreter error
> recovered ***
>
> well for some reason I couldn't access the cross section information
> while I did find someone else use an earlier version of root similarily:
>
> #if __PYTHIA_VERSION__ >= 6
> Pyint5_t *pyint5=fPythia->GetPyint5();
> for(i=0;i<fNUMSUB;i++){
> fISUB[i]=ns[i];
> fNGEN[i]=pyint5->NGEN[2][i-1];
> fXSEC[i]=pyint5->XSEC[2][i-1];
> }
> #else
> for(i=0;i<fNUMSUB;i++){
> fISUB[i]=ns[i];
> fNGEN[i]=fPythia->GetNGEN(ns[i], 3);
> fXSEC[i]=fPythia->GetXSEC(ns[i], 3);
> }
> #endif
>
> (taken from: http://www-jlc.kek.jp/subg/offl/jsf/html/src/PythiaGenerator.cxx.html)
>
> I'm unable to understand how should I access the XSEC information from pythia. And also how to store just one float number in a root file for later usage???
>
> Mario
>
>
>

-- 

//-----------------------------------------------------------// 


 _____ |  Carsten Hof
|_|  III. Physikalisches Institut 3A
|_|  Physikzentrum
|_|  52056 Aachen

|_|  work: +49-(0)241-80-27285
|______| Email: Carsten.Hof_at_physik.rwth-aachen.de Received on Tue Feb 15 2005 - 00:30:55 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET