Parent Directory
|
Revision Log
|
Revision Graph
upgrade atlsim library to atlsim main level
* $Id: aghitset.age,v 1.2 2001/12/14 23:10:36 nevski Exp $
* $Name: $
* $Log: aghitset.age,v $
* Revision 1.2 2001/12/14 23:10:36 nevski
* upgrade atlsim library to atlsim main level
*
* Revision 1.1 2001/12/14 19:50:01 nevski
* upgrade atlsim library to atlsimmmain
*
* --------------------------------------------------------
#include <commons/config.h>
*************************************************************************
function AGHITset (Cs,Cd)
* *
* Description: prepares a map to convert any hit in the generic type *
* returns number of hits in a selected set/det *
* internal flags:
* Iflg(i)>0 variable available
*************************************************************************
#include "commons/typing.inc"
#include "geant321/gcflag.inc"
#include "geant321/gcunit.inc"
#include "atlsim/genhit.inc"
#include "atlsim/gentit.inc"
Character*4 Cs*(*),Cd*(*),Ch
Integer AGHITset,LENOCC,i,j,k,nh,Nhits,ia,jD2M
*
AGHITset=-1
*
k = 0
do i=5,LENOCC(Cd)
{ J=ICHAR(Cd(i:i))-ICHAR('0')
if 0<=J&J<=9 { if (1<=k&k<=Nmh) NVL(k)=NVL(k)*10+J; } else { K+=1; }
}
*
id=0; Cset=Cs; Cdet=Cd;
Call Agfdigi(Cset,Cdet,NVL,trac,numbv,HITS,id,Ia)
Check Id>=0; Id=0
*
* 1. flag hardwired information
*
If Lnam==0
{ Lnam = Lnam0
{ iX,iC,jX,jP,iET,iPT,iLP,iE }=0
do j=1,Lnam
{ If (Gname(j)== 'X' ) iX=j
If (Gname(j)== 'CX' ) iC=j
If (Gname(j)== 'XX' ) jX=j
If (Gname(j)== 'PX' ) jP=j
If (Gname(j)== 'ETOT') iET=j
If (Gname(j)== 'PTOT') iPT=j
If (Gname(j)== 'LPTO') iLP=j
} }
if (iX*iC*jX*jP<=0) <W>iX,iC,jX,jP;(' AGHITset: errenious G1 table ',4i5)
if (iET*iPT*iLP<=0) <W>iET,iPT,iLP;(' AGHITset: errenious G2 table ',4i5)
*
* 2. prepare map to unfold an input hit into the full hit
*
call VZERO (QQ, Lnmax)
call VZERO (iflg, Lnmax)
call VZERO (iadr, Nmh)
call VZERO (hits, Nmh)
call VZERO (numbv,Nmh)
call VZERO (NVL, Nmh)
do j=1,Lnam0 { If (Gname(j)==Tname(j)) iflg(j)=99 }
Call AgFDPAR (hits,Chit,FHmin,FHmax,FHbin)
nh=0
do k=1,Nmh
{ ch=chit(k); if (ch==' ') break; nh+=1
do j=1,Lnam { if (ch==Gname(j)) go to :old: }
*:new:
j=min(Lnam+1,Lnmax); Lnam=j
if (Idebug>0) <W> ch;(' AGHITset: introducing new hit element ',a)
Gname(j)=ch; Tname(j)=ch; call CUTOL(Tname(j))
:old: iadr(k) = j; iflg(j) = k
If (ch=='ELOS' | ch=='USER' | ch=='BIRK') iE=j
}
*
* 3. coordinate and direction transformations
*
xD2M=iflg(iX)+iflg(iX+1)+iflg(iX+2)
jD2M=iflg(jX)+iflg(jX+1)+iflg(jX+2)
pD2M=iflg(iC)+iflg(iC+1)+iflg(iC+2)
if (jD2M==0) xD2M=1 " make sure we have something in global coords "
* E-P transformation rules: Ptot<->LPtot, Etot<->Ptot
if (iflg(iPT)==0) iflg(iPT)=-iflg(iLP)
if (iflg(iLP)==0) iflg(iLP)=-iflg(iPT)
* transformation rules: cos<->Pi, Xhloc<->Xglob
do i=0,2
{ if (iflg(jP+i)==0) iflg(jP+i)=-iflg(iC+i)
if (iflg(iC+i)==0) iflg(iC+i)=-iflg(jP+i)
if (iflg(jX+i)==0) iflg(jX+i)=-iflg(iX+i)
if (iflg(iX+i)==0) iflg(iX+i)=-iflg(jX+i)
}
If Idebug>=3
{ <W> Cset; (' AGHITSET: ',a4,' hits provide the following elements')
do j=1,Nh { <W> Chit(j),iadr(j); (12x,': ',a4,' at ',i3) }
<W>; (8x,'filling the following standard items')
do j=1,Lnam { if(iflg(j)!=0) <W> Gname(j),iflg(j); (12x,': ',a4,i6) }
}
call GFNHIT (Cset,Cdet,Nhits)
AGHITset = Nhits
END
| CERN Central CVS service | ViewVC Help |
| Powered by ViewVC 1.0.9 |