[atlas] / offline / atlsim / atgeant / aghitset.age Repository:
ViewVC logotype

View of /offline/atlsim/atgeant/aghitset.age

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (download) (annotate)
Fri Dec 14 23:10:36 2001 UTC (11 years, 5 months ago) by nevski
Branch: MAIN
CVS Tags: offline-04-00-00, offline-04-00-01, offline-10-03-00, offline-10-00-03, offline-10-00-02, offline-10-00-01, offline-10-00-00, offline-07-01-00, offline-10-00-06, offline-10-00-04, offline-08-00-04, offline-08-00-05, offline-08-00-06, offline-08-00-07, offline-08-00-00, offline-08-00-01, offline-08-00-02, offline-08-00-03, offline-08-00-08, offline-04-01-00, offline-07-05-00, atlsim-01-42-24, offline-11-02-00, atlsim-01-42-22, atlsim-01-42-21, offline-08-05-00, offline-09-03-00, offline-06-01-00, offline-11-00-06, offline-09-00-00, offline-11-00-04, offline-11-00-05, offline-11-00-02, offline-11-00-03, offline-11-00-00, offline-11-00-01, offline-02-06-00, offline-07-02-00, offline-10-05-00, offline-05-00-00, offline-07-06-00, offline-09-02-00, offline-08-02-00, offline-11-01-00, atlsim-01-41-04, atlsim-01-41-05, atlsim-01-41-06, atlsim-01-41-07, atlsim-01-41-03, offline-10-02-00, atlsim-01-42-01, atlsim-01-42-03, atlsim-01-42-02, atlsim-01-42-05, offline-08-03-00, offline-04-06-00, atlsim-01-42-06, atlsim-01-42-09, atlsim-01-42-08, offline-04-05-00, offline-08-04-00, offline-04-02-00, atlsim-01-42-09-01, atlsim-01-42-18, atlsim-01-42-19, atlsim-01-42-16, atlsim-01-42-23, atlsim-01-42-14, atlsim-01-42-15, atlsim-01-42-12, atlsim-01-42-13, atlsim-01-42-10, atlsim-01-42-11, offline-07-08-00, offline-09-04-00, atlsim-01-42-20, offline-04-04-00, offline-04-03-00, offline-11-00-41, offline-06-04-00, atlsim-01-42-17, offline-06-06-00, offline-03-02-00, offline-03-00-01, offline-03-00-00, offline-06-05-00, offline-09-00-01, offline-09-00-03, offline-09-00-02, offline-03-01-00, offline-09-00-04, offline-08-06-00, offline-05-02-00, offline-06-03-00, offline-02-05-00, offline-07-04-00, offline-09-01-02, offline-07-03-00, offline-07-00-03, offline-07-00-02, offline-07-00-01, offline-07-00-00, offline-08-01-00, offline-05-03-00, offline-07-07-00, atlsim-01-42-04, offline-06-02-00, atlsim-01-42-07, offline-08-08-00, offline-08-08-01, offline-10-04-01, offline-08-07-00, offline-06-00-04, offline-10-04-00, offline-06-00-02, offline-06-00-03, offline-06-00-00, offline-06-00-01, HEAD
Changes since 1.1: +8 -3 lines
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