Re: USRYIELD to look at photon emittance (mgdraw and BXDRAW)

From: Alberto Fasso' <fasso_at_SLAC.Stanford.EDU>
Date: Thu, 8 Dec 2011 08:32:49 -0800 (PST)

Hi Mina,

the compiler error messages are always cryptical.
Have you declared MREGNAM and NEWREGNAM as character variables?
You should have, at the beginning of mgdraw.f:

        CHARACTER*20 FILNAM, MREGNAM, NEWREGNAM
        LOGICAL LFCOPE
        etc....

Alberto

On Tue, 6 Dec 2011, Mina Nozar wrote:

> Hello Francesco,
>
> Thank you for your reply. I have tried looking into mdgraw and BXDRAW but haven't had success yet.
> This is what I have tried so far:
>
> 1) Added the following USRDUMP card without modifying mgdraw.f
> USERDUMP 100. 25.
>
> The above created a binary file named test001_MGDRAW (I am assuming one would get created for each independent run) and
> creation of the file added (substantially) to the processing time. I don't know how to process this file.
>
>
> 2) Modified mgdraw.f and tried to compile and build the executable. Made the following changes under BXDRAW
>
>> ENTRY BXDRAW ( ICODE, MREG, NEWREG, XSCO, YSCO, ZSCO )
>> * Write in event file the position, direction, energy, and weight of photons crossing Ta into target
>> IF(.NOT. LFCOPE)THEN
>> LFCOPE=.TRUE.
>> OPEN (UNIT=25, FILE="PhotEmit", STATUS='UNKNOWN')
>> END IF
>>
>> CALL GEOR2N ( MREG, MREGNAM, IERR1 )
>> CALL GEOR2N ( NEWREG, NEWREGNAM, IERR2 )
>> IF ((MREGNAM .EQ. "rTaEnUsW") .AND.
>> & ((NEWREGNAM.EQ."rdUCx0").OR.(NEWREGNAM.EQ."rdUCx1")
>> & .OR. (NEWREGNAM.EQ."rdUCx2").OR.(NEWREGNAM.EQ."rdUCx3")
>> & .OR. (NEWREGNAM.EQ."rdUCx4").OR.(NEWREGNAM.EQ."rdUCx5")
>> & .OR. (NEWREGNAM.EQ."rdUCx6"))
>> & .AND.
>> & (JTRACK .EQ. 7)) THEN
>> WRITE(25,*) XSCO,YSCO,ZSCO,CXTRCK,CYTRCK,CZTRCK,ETRACK,WTRACK
>> END IF
>>
>> 100 FORMAT(8(E10.4,1X))
>> RETURN
>
>
> Where rTaEnUsW is the upstream Tantalum window (region 1) and rdUCx0 through rdUCx6 are seven target cylinders (seven
> regions) just downstream of rTaEnUsW. So the object is to look at all photons crossing from rTaEnUsW to any of the
> target cylinders rdUCx0-rdUCx6.
>
>
> When I tried to compile, I see:
> > mgdraw.f: In subroutine `mgdraw':
> > mgdraw.f:115:
> > IF ((MREGNAM .EQ. "rTaEnUsW") .AND.
> 1 2
> > Equality operator at (1) must operate on two scalar (not array) subexpressions, two function invocations returning
> > arithmetic or character scalars, or a combination of both -- but the subexpression at (2) is an array
> > mgdraw.f:116:
> > & ((NEWREGNAM.EQ."rdUCx0").OR.(NEWREGNAM.EQ."rdUCx1")
> 1 2
> > Equality operator at (1) must operate on two scalar (not array) subexpressions, two function invocations returning
> > arithmetic or character scalars, or a combination of both -- but the subexpression at (2) is an array
> > mgdraw.f:116:
> > & ((NEWREGNAM.EQ."rdUCx0").OR.(NEWREGNAM.EQ."rdUCx1")
> 1 2
> > Equality operator at (1) must operate on two scalar (not array) subexpressions, two function invocations returning
> > arithmetic or character scalars, or a combination of both -- but the subexpression at (2) is an array
>
> > ...
> > ...
> > ...
> > ...
>
>
> Can anyone help me with this please?
> Also, are there good examples as to how to understand and use user routines? I feel like I am like one of the
> blind-folded individuals trying to figure out what the elephant in the room is.
> I have looked through one of the Advanced course set of slides titled "Why user routines" but it is not much help.
>
> Any suggestion is much appreciated.
> Best wishes,
> Mina
>
>
>
> On 11-11-26 07:43 AM, Francesco Cerutti wrote:
>> Dear Mina,
>>
>>> Just to make sure, is the region selection for USRYIELD the same as for
>>> YSRBDX? ie. Two consecutive regions sharing a boundary with first region
>>> the upstream region and the second the downstream region?
>>
>> yes
>>
>>> To look at the photon emittance on the dUC3Gr target, I have used the
>>> upstream Tantalum window as Reg. 1 and dUC3Gr as Reg. 2. Is this the
>>> best choice?
>>
>> I would say yes, but talking about emittance one should consider, together
>> with the angular distribution, also the spatial distribution. You could
>> get correlated info (photon position and direction, and energy) by a
>> customized scoring via the user routine mgdraw, entry BXDRAW
>>
>> Ciao
>>
>> Francesco
>
>

-- 
Alberto Fasso`
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762   Fax: (1 650) 926 3569
fasso_at_slac.stanford.edu
Received on Thu Dec 08 2011 - 19:31:59 CET

This archive was generated by hypermail 2.2.0 : Thu Dec 08 2011 - 19:32:00 CET