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:
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>
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 ==========================================================
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];
for(i=0;i<fNUMSUB;i++){
fISUB[i]=ns[i]; fNGEN[i]=fPythia->GetNGEN(ns[i], 3); fXSEC[i]=fPythia->GetXSEC(ns[i], 3);}
(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 Received on Mon Feb 14 2005 - 22:08:04 MET
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET