Re: [ROOT] MC particles, TPythia6 ...cfortran.h

From: Pasha Murat (630)840-8237@169G ((630)840-8237@169G)
Date: Fri Jan 26 2001 - 17:19:41 MET


Rene Brun wrote:
> 
> Hi Pasha,
> 
> Pasha Murat (630)840-8237 FNAL (630)859-3463 home wrote:
> >
> > Dear ROOTers,
> >
> > I think it would be quite helpful if TParticle in addition to 2 indices of
> > mothers and 2 indices of daughters would also "remember" its own index in
> > the original list of MC particles produced by event generator. I know that
> > it is not strictly necessary, however whenever one is trying (and one
> > is always doing it) to save just a small subset of the original list of
> > particles, then in order to preserve a piece of original history each
> > and every time he has to add this integer to TParticle in this or that way.
> >
> >                         Any possible showstoppers?
> 
> You can use the TObject UniqueID.  myTParticle->SetUniqueID(index in list)
> 
	Hi Rene, 

this would be great and I'd love to do it. However, how solid is the statement
(I believe its scope is more general, than just the case of TParticle) 
that TObject::fUniqueID can be used by the user and will never be used by ROOT 
or disappear in ROOT 4.0?

> - describing FORTRAN common-blocks in C++  using cfortan.h (like it is done
> >   in eg/inc/Hepevt.h) is not the best idea. cfortan.h  declares an external C++ GLOBAL,
> >   corresponding to a FORTRAN common-block. In order to resolve this reference that at
> >   linking stage linker picks up an ARBITRARY (the first one found!) FORTRAN
> >   routine where this common block is described and links it in. In case
> >   this first routine calls some other FORTRAN routines, one gets completely
> >   unexplainable unresolved references resulting from a "cross-talk" between C++
> >   and FORTRAN.  This is very similar to parasitic signal pick-up in
> >   electronics.
> >
> 
> We had a simple solution with cfortran.h. If you find a more elegant,
> safe and PORTABLE solution (Unix/Windows), I will include it.
> 
	The same solution is used by CDF and by ALICE - on C++ side one 
describes POINTERS to the common-blocks and writes a FORTRAN
routine to initialize these pointers. I know that you have access to AliRoot - 
there are 2 small routines in AliRoot/*/GEANT321/comad area which do the job. 
CDF is not using Windows, but I believe that ALICE does (there is a bunch of
#ifdef WINNT's in AliRoot), so this solution is as portable, as AliRoot is. 
However I don't see right away why it may not be portable.

						best, Pasha



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:34 MET