From: Giuseppe Battistoni (Giuseppe.Battistoni@mi.infn.it)
Date: Tue Oct 16 2007 - 10:04:20 CEST
Dear Vadim,
inside User routines you must use numbers instead of names.
In order to get correspondance between names and numbers you can call the
following subroutines:
1) To get the number starting from a region name
CALL GEON2R ( REGNAM, NREG, IERR )
* Input variable: *
* Regnam = region name *
* *
* Output variables: *
* Nreg = region number *
* Ierr = error code (0 on success, 1 on failure) *
2) To get the name of a region when you know the number:
CALL GEOR2N ( NREG, REGNAM, IERR )
* Input variable: *
* Nreg = region name *
* *
* Output variables: *
* Regname = region number *
* Ierr = error code (0 on success, 1 on failure) *
Be careful: these routines are time consuming. Therefore if you really
need to use them, you'd better fill a correspondance vector at
initialization time and put it into a common of yours
Note: there exist also the analogue routines for the lattice case:
1( CALL GEOL2N ( NLATT, LATNAM, IRTLAT, IERR )
* Input variable: *
* Nlatt = lattice number *
* *
* Output variables: *
* Latnam = lattice name (CHAR*8) *
* Irtlat = # of the (possibile) rotation associated *
* Ierr = error code (0 on success, 1 on failure) *
* *
2) CALL GEOL2N ( NLATT, LATNAM, IRTLAT, IERR )
* Input variable: *
* Nlatt =
* *
* Output variables: *
* Latnam = lattice name (CHAR*8) *
* Irtlat = # of the (possibile) rotation associated *
* Ierr = error code (0 on success, 1 on failure) *
Best regards
Giuseppe Battistoni
On Tue, 16 Oct 2007, Vadim Talanov wrote:
> Dear Vitaly,
>
> yes, you can do this in the MGDRAW routine (available as mgdraw.f in the
> /usermvax directory of FLUKA installation).
>
> At the BXDRAW entry of MGDRAW you have the MREG and NEWREG values for the FLUKA
> geometry regions from and where to the particle track goes that should be enough
> to record the particle information at the desired location. Most probably all
> information about a particle track that you will need is in the (TRACKR) common.
>
> By the way, this e-mail inspires other question, following the recent discussion
> how to use the names of FLUKA regions:
>
> Can one use the region name instead of the region number also in MGDRAW and
> other user routines, in the same manner as it can be used now in the FLUKA input?
>
> Kind regards, Vadim
>
> Vitaly Pronskikh wrote:
> > Dear FLUKA experts and users,
> >
> > could you please suggest how to obtain momenta and coordinates of particles
> > entering a volume.
> >
> > Is it possible to do that using standard estimators, or one should write own
> > subroutine (which) instead? Maybe this question has already been discussed,
> > there and there are any examples?
> >
> > Many thanks for any response in advance,
> >
> > Vitaly
> >
> >
> >
>
This archive was generated by hypermail 2.1.6 : Tue Oct 16 2007 - 10:32:00 CEST