+TITLE. * SS: shared sequences for SDC simulation/reconstruction * B. Hubbard, U.C.Santa Cruz, 8-Apr-1992. +PATCH,SSDOC. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz +DECK,HISTORY,T=TEXT. *CMZ : 22/10/92 11.42.43 by Bradley Hubbard, UC Santa Cruz *-- Author : History of SS package, most recent updates at the top 29-Apr-1993 KO 1) Increase MXTRFD in RWDIM to 5500. 15-Apr-1993 K. O'Shaughnessy 1)Put in changes to WRCON at FL and MJC's request 2) Put WRFLAG sequence into WRSHARED. 09-Mar-1992 PXEstabrooks Modifications to PM geometry 05-Mar-1993 D. Schmid Cleaned up the SHCCTL common block Moved SHCCWK sequence from SH.CAR to inside SHSHARED patch 22-Oct-1992 F. Luehring Modifications to WR and one RW sequences. 13-Oct-1992 F. Luehring New WR and RW sequences, enlarging array dimensions 26-Aug-1992 B. Hubbard Remove SG sequences from this file. SG has no shared sequences 14-Aug-1992 PXEstabrooks sequence PMDIM: Change MPMDIG,MPMHIT from 100 to 500 29-May-1992 PXEstabrooks Add shared sequences from PM package 19-May-1992 B. Hubbard, F.Luehring 1) Add shared sequences from WR package 2) Change name of TSSPAR and TSTPAR to TSEGPARS and TRAKPARS, respectively. These define parameter offsets in segment and track banks. The old sequence names will still work for the time being. 8-Apr-1992, B. Hubbard. 1) initial creation. +DECK,DESCRIPTION,T=TEXT. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz *-- Author : SS: shared sequences for SDC simulation and reconstruction This package is not fully implemented yet. Each package which has sequence which are to be shared should have them put in a patch within this package. To use this, you need the following lines in the cradle file sdcsim.cra: &SELF. ---------------------------------------------------------------- &SELF. shared sequences &USE,P= *SSLIB,T=EXE.............Pilot patch. &PAM, LUN= 11,T=CARDS, T=ATTACH. sdccar:ss.car &SELF. ---------------------------------------------------------------- with & replaced by +. This should appear before any other +PAM lines. +DECK,SHORT,T=TEXT.........................SHORT DOCUMENTATION *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz *-- Author : C C Short documentation about the package C Package Name: SS Purpose of package: shared sequences for SDC simulation and reconstruction Name of Code Manager: Date of Last Update: Input banks: Output banks: Default control file name: Additional parameter file names: External package name referenced by this package: New release Info: Future plan for code development and milestone: +PATCH,*SSLIB. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz +DECK,SSUSE. *CMZ : 04/06/92 22.03.50 by Bradley Hubbard, UC Santa Cruz *-- Author : Bradley Hubbard, UC Santa Cruz 08/04/92 * +USE,P=SHSHARED. +USE,P=SGSHARED. +USE,P=STSHARED. +USE,P=WRSHARED. +USE,P=PMSHARED. +USE,P=TFSHARED. +USE,P=TSSHARED. +USE,P=RWSHARED. * +PATCH,SHSHARED. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from SH package (SDC shell): * * The following sequences are included in this patch: * SHIMPNON - implicit none declaration * SHCCTL - shell control common, with run,event number * SHCCTLZZ - documentation for patch SHCCTL * SHCONST - constants like pi and c, formerly taken from GCONST. * SHCCWK - contains the workstation number * +KEEP,SHIMPNON,IF=IMPNONE. IMPLICIT NONE +KEEP,SHIMPNON,IF=-IMPNONE. IMPLICIT COMPLEX (A-Z) +KEEP,SHCCWK. INTEGER IWK COMMON /CWK/ IWK +KEEP,SHCCTLZZ,IF=DOC. SHELL CONTROL *********************************************************************** * * * JRECTY I record type * * JEVTTY I event type * * * * JRUN1 I first run number requested by user * * JRUN2 I last run number requested by user * * (IURUN1=IURUN2 for now) * * JRUNC I current run number * * ( JRUNC is set in S/R SHEVID, if no input) * * * * JEVT1 I first event number requested by user * * JEVT2 I last event number requested by user * * JEVTC I current event number * * ( JRUNC is set in S/R SHEVID, if no input) * * * * SHSELT B Event Selection mode switch to use * * EVENT_SELECT * * * * JNSECT I Number of events selected * * * * MAXSEL I Maximum number of events that can be selected * * * * * * JSELCT I20 Event selected are processed, others are * * skipped. * * * * JEVTOT I total number of events to be processed * * this word is tested against NEVTOT, i.e. * * limit for total number of event-records. * * NEVTOT I counter for the total number of events * * this is counted up at the begining of event * * loop. This is set in S/R SHPROC. * * This is a counter fo event-record. * * * * NRCTOT I total number of record including begin-run * * and end-run record. * * * * JENDJ I flag to terminate job if non zero * * 1 = end job requested by user (SH/ENDJOB) * * JENDR I flag to terminate run if non zero * * JENDE I flag to terminate event loop if non zero * * 1 = reach to limit of total num. of events * * 2 = out of range of event number * * (1,2 are set in S/R SHPROC) * * * * JPRINT I flag to print out if non zero * * * * IOREAD I logical unit number to read 'card' * * IOWRIT I logical unit number to print out * * IOLOG I logical unit number for log file * * IOHBK I logical unit number for HBOOK output * * * * CPULIM F CPU time limit in second * * CPURES F CPU time reserved for final processing * * CPU000 F CPU time at the beginnig of job * * CPUBEG F begin of CPU time at init, event, last * * CPUEND F end of CPU time * * * * LBATCH L logical flag for opertion mode * * F=interactive, T=batch * * LSHPAW L logical flag for PAW in SHELL. * * T=on, F=off * * LHIGZI L flag for HIGZ initialization * * T=done, F=not yet done * * CSHHBK C8 'FULL', 'HBOOK', OR 'OFF' * *********************************************************************** +KEEP,SHCCTL. SHELL CONTROL. INTEGER MAXSEL PARAMETER(MAXSEL=20) INTEGER JRECTY,JEVTTY INTEGER JRUN1,JRUN2,JRUNC,JEVT1,JEVT2,JEVTC,JEVTOT,NEVTOT,NRCTOT INTEGER JENDJ,JENDR,JENDE INTEGER JPRINT,IOREAD,IOWRIT,IOLOG,IOHBK,IWKTYP REAL CPULIM,CPURES,CPU000,CPUBEG,CPUEND LOGICAL LBATCH,LSHPAW,LHIGZI,SHSELT INTEGER JNSECT,JSELCT(MAXSEL) CHARACTER*8 CSHHBK C COMMON /SHCCTL/ JRECTY,JEVTTY,JRUN1,JRUN2,JRUNC,JEVT1,JEVT2,JEVTC 1,JEVTOT,NEVTOT,NRCTOT 2,JENDJ,JENDR,JENDE,JPRINT,IOREAD,IOWRIT,IOLOG,IOHBK 3,CPULIM,CPURES,CPU000,CPUBEG,CPUEND,LBATCH,LSHPAW,LHIGZI,IWKTYP 4,SHSELT,JNSECT,JSELCT,CSHHBK C +KEEP,SHCONST. C C Fundamental constants, formerly taken from GCONST. C Copied from GCONSP with single precision declarations. C C Created: 10-Apr-1992 B. Hubbard. C REAL PI,TWOPI,PIBY2,DEGRAD,RADDEG,CLIGHT,BIG,EMASS REAL EMMU,PMASS,AVO C DOUBLE PRECISION PI,TWOPI,PIBY2,DEGRAD,RADDEG,CLIGHT,BIG,EMASS C DOUBLE PRECISION EMMU,PMASS,AVO PARAMETER (PI=3.14159265358979324) PARAMETER (TWOPI=6.28318530717958648) PARAMETER (PIBY2=1.57079632679489662) PARAMETER (DEGRAD=0.0174532925199432958) PARAMETER (RADDEG=57.2957795130823209) PARAMETER (CLIGHT=29979245800.) PARAMETER (BIG=10000000000.) PARAMETER (EMASS=0.0005109990615) PARAMETER (EMMU=0.105658387) PARAMETER (PMASS=0.9382723128) PARAMETER (AVO=0.60221367) +PATCH,SGSHARED. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 26/08/92 10.29.18 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from SG package * * All sequences have been removed from this patch. SG has no shared sequences. * Users can obtain tracking medium indices by calling the new routine SGFTRM. * Boundaries can be obtained from /STPS/SGSG/SGBO and other * common variables from /STPS/SGSG/SGPA. See the SG documentation for details. * +PATCH,STSHARED. *CMZ : 15/05/92 07.59.30 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 25/09/92 12.25.30 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from ST package (silicon tracking simulation): * * The following sequences are included in this patch: +KEEP,STBFIELD. C C Magnetic field. Retrieved from SGCKUI or from /STPS/GEOM/BFLD zebra bank C REAL*4 BFSI,BCSI COMMON/SICONS/BFSI,BCSI +KEEP,STDI. C C Silicon digitization common block. These two arrays are C assumed to be filled when unpacking the SIDI raw digitized C data structure. STDIGI will be changed to reside in Zebra C work space in the near future. For this reason, data in C STDIGI should be accessed by the statement functions defined C in include SIFUNC. C C Created: BH,KO 25-JAN-91 C Modified: BH 24-Sep-92 Remove STMXDI (local parameter in STDICR) C ========================================================== C C ! Number of words per digitization INTEGER STNWDI PARAMETER(STNWDI=6) C C ! Max number of layers in a module allowed INTEGER SIMXLA PARAMETER(SIMXLA=25) C C Information stored for each digitization. Name on the C left is function name used to retrieve info. The arguments C are specified as M (module number), L(layer number), C W(wafer number), T (type number) and H (hit number). C C SIWPHI(M,L,T,H) - wafer number in phi for a hit C SIWAFZ(M,L,T,H) - readout unit number in r,z for a hit (eg z for barrel) C SISTRP(M,L,T,H) - strip number in the wafer for a hit C SITYPE(M,L,T,H) - strip type (1=axial, 2=stereo) C SIWIDD(M,L,T,H) - cluster width C SIMCVT(M,L,T,H) - packed MC vertex and track number C SIMCVX(M,L,T,H) - MC vertex number C SIMCTR(M,L,T,H) - MC track number C C Additional useful functions (in include SIFUNC) C C SIHITS(M,L,T,H) - like the old HITSI, it returns the azimuthal hit C position, taking into account the width C SINDIG(M,L) - total number of digitizations in a layer C SINAXD(M,L) - number of axial digitizations in a layer C SINSTD(M,L) - number of stereo digitizations in a layer C C Offset to beginning of data in STDIGI (somewhere in temporary space) INTEGER OFSTDI C C Offset to data in STDIGI array for module (1:barrel, 2:-z forward C 3:+z forward) and layer and type (1:axial, 2:stereo) INTEGER STDIGO(SINMOD,SIMXLA+1,2) INTEGER STDIGI(1) COMMON/STDI/OFSTDI,STDIGO,STDIGI C +KEEP,STCO. C C Silicon strip coordinate temporary common. C assumed to be filled when unpacking the STCO coordinate C data structure. Data in SRCOOR should be accessed by the C statement functions defined in include STFUNC. C C Created: BH 10-May-91 C Modified: 24-Sep-92 BH Change dimension of SRCOOR to be (1) C Remove STMXCO (local parameter in TSUPCO) C ========================================================== C C ! Number of words per coordinate (in STCO array) INTEGER STNWCO PARAMETER(STNWCO=8) C C Information stored for each coordinate. C Name on the left is function name used to retrieve info. C The arguments are specified as M (module number), L(layer number), C and H (hit number). C C STCRAD(M,L,H) - radius C STCPHI(M,L,H) - phi coordinate C STCZ (M,L,H) - z coordinate C STVPHI(M,L,H) - phi variance C STVZOR(M,L,H) - z or r variance C STCOVR(M,L,H) - covariance C STCAXD(M,L,H) - index of axial digi C STCSTD(M,L,H) - index of stereo digi C STCQUA(M,L,H) - quality word C C Additional useful functions (in include STFUNC) C C STNCOO(M,L) - total number of digitizations in a layer C C Offset to data in SRCOOR array for module (1:barrel, 2:-z forward C 3:+z forward) and layer INTEGER OFSTCO C offset to data in SRCOOR structure INTEGER STCOOO(SINMOD,SIMXLA+1) REAL SRCOOR(1) INTEGER SICOOR(1) EQUIVALENCE (SRCOOR(1),SICOOR(1)) COMMON/STCO/OFSTCO,STCOOO,SRCOOR C +KEEP,SIGE. C =========================================================== C C Common block to store the geometry information C C Version: 1.1 C Author: K. O'Shaughnessy, B. Hubbard C Date: 4/7/91 C INTEGER SIGESZ PARAMETER(SIGESZ=10000) C C The information is stored in one array, starting with C values common to the whole system and then information C for subdivisions eg by module, by layer and by wafer. C INTEGER SIGEOM(SIGESZ) COMMON /SIGE/SIGEOM REAL SRGEOM(SIGESZ) EQUIVALENCE (SIGEOM(1),SRGEOM(1)) C C The order of the information is the following: C C -------------------------------------------------------------- C C SINMOD - number of modules = 3 C module 1 = barrel, 2= -z and 3=+z C SIGOMD(M) - offset to the start C of the information for that module C (constants for the system:) C SIGVER (real) version number of bank structure C (none at present) C -------------------------------------------------------------- C information for each module C C (constants for each module:) C SIMLLI(M) - inner position eg inner radius for barrel C SIMHLI(M) - Outer position eg outer z position for module 2,3 C SIMLAN(M) - Low angle limit wrt +z direction (eg barrel is pi/2) C SIMHAN(M) - High angle limit wrt +z direction (eg barrel is 3pi/2) C SIMDFA(M) - Density factor for support material C SIMDAR(M,EDGE) - dead area in cm at sides and ends of wafers C SIMDAR(M,1) - dead area on sides of wafer C SIMDAR(M,2) - dead area at end edge which has readout chips C SIMDAR(M,3) - dead area at end edge which has no readout chips C SIMDTY(M) - Detector type: barrel: 1:rectangular (BOX) C forward: 1:section of tube (TUBS) C 2:trapezoid (TRD1) C SIMNLA(M) - number of layers in the module C SIGOLA(M,L) - offset from the start of the module info C to the start of the information for that layer C C------------------------------------------------------------------ C C information for each layer C C (constants for each layer:) C SILPOS(M,L) - position of the (inner) edge of layer; r in barrel, C z in disks C SILLLI(M,L) - lower limit C SILHLI(M,L) - high limit C SILTHK(M,L) - wafer thickness C SILTLT(M,L) - tilt angle C SILETH(M,L) - energy threshold that was used to determine if the C strip was hit or not C SILRLN(M,L) - number of radiation lengths of SI and support, (est) C at normal incidence. Support material is assumed to be C uniformly distributed within layer. C SILNRU(M,L) - number of readout units along length of layer C (ie 2 of the above wafers may be bonded together C to form a readout unit) C SIGORU(M,L,R) - offset from start of the layer information to C the start of the information for the readout units C C (number and offset:) C SILNWA(M,L) - number of wafer divisions along extent of layer C (eg number of wafers in z in barrel, C number of rings in r in disks) C this should be at the WAFER level (not coupled C readout units) C SIGOWA(M,L,W) - offset from the start of the layer information to C the start of the information for the divisions C (z wafers in barrel, r rings in disk) C C----------------------------------------------------------------------- C C information for each z wafer ring or r ring C C SIWLLI(M,L,W) - lower limit of wafer set (eg z position of wafer in barrel C SIWHLI(M,L,W) - high limit of wafer set ( ") C SIWOOF(M,L,W) - position offset of odd phi wafers C SIWEOF(M,L,W) - position offset of even phi wafers C SIWWID(M,L,W) - wafer width (cm in barrel, phi in forward) including dead C SIWPCH(M,L,W) - wafer pitch (in cm) C SIWSAN(M,L,W) - wafer stereo angle C SIWSOF(M,L,W) - offset in cm between stereo strip 1 and axial strip 1, C defined at the readout end of the wafer. This is C used to take into account additional stereo dead area C in multiple wafer readout units. C SIWPH0(M,L,W) - lowest phi position for start of one wafer C SIWNPH(M,L,W) - number of detectors counted along phi C SIWNST(M,L,W) - number of strips in one wafer C SIWTYP(M,L,W) - the type of wafer in this ring. This word indicates C the sequence of the wafer in a larger readout unit. C Positive (negative) values indicate that the readout C unit has chips at the low (high) limit end. C 1 => chips bonded to low limit end of this wafer C -1 => chips bonded to high limit end of this wafer C 2 => the wafer has no chips, and is bonded to wafer type 1 C at its lower limit C -2 => no chips, bonded to wafer type -1 at higher limit C SIWRUN(M,L,W) - Readout unit number for this wafer C SIWSCH(M,L,W) - Stereo scheme for this wafer. C 1 => default scheme (only one defined at present) C C----------------------------------------------------------------------- C C Information for each readout unit C C SIRWBE(M,L,R) - beginning wafer number for readout unit C (the one with the chips) C SIRWEN(M,L,R) - end wafer number for readout unit C C================================================= C C System block parameters C ----------------------- C C Version number of geometry bank structure C Integer SIGVER Parameter (SIGVER=1003) C C Number of Z modules C Integer SINMOD Parameter (SINMOD=3) C C Offset to bank version number C Integer SIGBVO Parameter (SIGBVO=0) C C Offset to number of modules C Integer SIGNMO Parameter (SIGNMO=SIGBVO+1) C C Offset to geometry file name C Integer SIGGFO Parameter (SIGGFO=SIGNMO+1) C C Number of overall system words (not including pointers) C Integer SIGNSW Parameter (SIGNSW=SIGGFO+8) C C=========================================== C C Module block parameters C ----------------------- C Offset to module number C Integer SIMMNO Parameter (SIMMNO=0) C C Offset to number of layers C Integer SIMNLO Parameter (SIMNLO=SIMMNO+1) C C Offset to detector type C Integer SIMDTO Parameter (SIMDTO=SIMNLO+1) C C Offset to low position limit C Integer SIMLLO Parameter (SIMLLO=SIMDTO+1) C C Offset to high position limit C Integer SIMHLO Parameter (SIMHLO=SIMLLO +1) C C Offset to low angle limit C Integer SIMLAO Parameter (SIMLAO= SIMHLO+1) C C Offset to high angle limit C Integer SIMHAO Parameter (SIMHAO=SIMLAO +1) C C Offset to density factor C Integer SIMDFO Parameter (SIMDFO= SIMHAO+1) C C Offset to dead area words C Integer SIMDAO Parameter (SIMDAO=SIMDFO +1) C C Number of overall module words (not including pointers) C Integer SIGNMW Parameter (SIGNMW=SIMDAO+3) C C======================================== C C Layer block parameters C ---------------------- C C Offset to layer number Integer SILLNO Parameter (SILLNO=0) C C Offset to number of wafers along z or r C Integer SILNWO Parameter (SILNWO=SILLNO+1) C C Offset to # read out units in layer C Allow SIMXRU words pointing to readout unit blocks C at end of this block INTEGER SIMXRU PARAMETER (SIMXRU=20) C Integer SILNRO Parameter (SILNRO=SILNWO+1) C C Offset to total # of readout channels in layer Integer SILNCO Parameter (SILNCO=SILNRO+1) C C Offset to layer radius or z, inner edge C For the barrel, this is the radius of the center of the tilted wafer C Integer SILPSO Parameter (SILPSO=SILNCO+1) C C Offset to lower limit in z or r C Integer SILLLO Parameter (SILLLO=SILPSO+1) C C Offset to upper limit in z or r C Integer SILHLO Parameter (SILHLO=SILLLO+1) C C Offset to wafer thickness for layer C Integer SILTHO Parameter (SILTHO=SILHLO+1) C C Offset to tilt angle for layer C Integer SILTLO Parameter (SILTLO=SILTHO+1) C C Offset to energy threshold for layer C Integer SILETO Parameter (SILETO=SILTLO+1) C C Offset to # radiation lengths of SI and support C Integer SILRLO Parameter (SILRLO=SILETO+1) C C Number of overall layer words (not including pointer) C Integer SIGNLW Parameter (SIGNLW=SILRLO+1) C C========================================== C C Wafer block parameters C ---------------------- C C Offset to wafer number Integer SIWWNO Parameter (SIWWNO=0) C C Offset to number of detectors in phi C Integer SIWNPO Parameter (SIWNPO=SIWWNO+1) C C Offset to number of strips in the wafer C Integer SIWNSO Parameter (SIWNSO=SIWNPO+1) C C Offset to stereo scheme for wafer C Integer SIWSCO Parameter (SIWSCO=SIWNSO+1) C C Offset to wafer type word C Integer SIWTYO Parameter (SIWTYO=SIWSCO+1) C C Offset to readout unit number C Integer SIWRUO Parameter (SIWRUO=SIWTYO+1) C C Offset to low z or r limit of wafer C Integer SIWLLO Parameter (SIWLLO=SIWRUO+1) C C Offset to high Z or r limit of wafer C Integer SIWHLO Parameter (SIWHLO=SIWLLO+1) C C Offset to position offset of odd phi wafers C Integer SIWOOO Parameter (SIWOOO=SIWHLO+1) C C Offset to position offset of even phi wafers C Integer SIWEOO Parameter (SIWEOO=SIWOOO+1) C C Offset to wafer width including dead regions (phi extent, for forward) C Integer SIWWDO Parameter (SIWWDO=SIWEOO+1) C C Offset to wafer pitch C Integer SIWPCO Parameter (SIWPCO=SIWWDO+1) C C Offset to stereo angle for wafer C Integer SIWSAO Parameter (SIWSAO=SIWPCO+1) C C Offset to stereo-axial strip 1 offset C Integer SIWSOO Parameter (SIWSOO=SIWSAO+1) C C Offset to phi of first wafer C Integer SIWP0O Parameter (SIWP0O=SIWSOO+1) C C Total number of words in wafer block C Integer SIGNWW Parameter (SIGNWW=SIWP0O+1) C C=============================================== C C Readout unit block parameters C ----------------------------- C Offset to readout unit number Integer SIRRNO Parameter (SIRRNO=0) C C Offset to beginning wafer number C Integer SIRWBO Parameter (SIRWBO=SIRRNO+1) C C Offset to end wafer number C Integer SIRWEO Parameter (SIRWEO=SIRWBO+1) C C Total number of words in readout unit block C Integer SIGNRW Parameter (SIGNRW=SIRWEO+1) +KEEP,SIFUND. C C Statement function declarations for accessing silicon data. C (See include SIFUNC for descriptions) C C Statement functions for accessing geometry C ------------------------------------------ INTEGER SIGOMD,SIGOLA,SIGOWA,SIGORU INTEGER SIMNLA,SIMDTY REAL SIMLLI,SIMHLI,SIMLAN,SIMHAN,SIMDFA,SIMDAR REAL SILPOS,SILLLI,SILHLI,SILTHK,SILTLT,SILETH,SILRLN INTEGER SILNRU,SILNWA REAL SIWLLI,SIWHLI,SIWOOF,SIWEOF,SIWWID,SIWPCH,SIWSAN,SIWPH0 REAL SIWSOF,SIWPOS INTEGER SIWNPH,SIWNST,SIWSCH,SIWTYP,SIWRUN INTEGER SIRWBE,SIRWEN C C Statement functions used for accessing digitized data C ----------------------------------------------------- INTEGER SINDIG,SINAXD,SINSTD INTEGER SIWPHI,SIWAFZ,SISTRP,SITYPE,SIWIDD INTEGER SIMCVT,SIMCVX,SIMCTR REAL SIHITS C C Statement functions used for accessing coordinates C ------------------------------------------------- INTEGER STNCOR REAL STCPHI,STCRAD,STCZ,STVPHI,STVZOR,STCOVR INTEGER STCAXD,STCSTD,STCQUA C C Dummy variables used in statement function definitions C ------------------------------------------------------ INTEGER SIMOD,SILAY,SIWAF,SITYP,SIWPH,SIHIT,SIEDG,SIRUN +KEEP,SIFUNC. C C Statement function definitions for accessing silicon geometry and data. C Include this block before first executable statement in code. C C Created: BH,KO 25-JAN-91 C Modified: C ============================================================ C C Statement functions for accessing SIGE geometry data structure C =============================================================== C Offset to module block for module SIMOD C --------------------------------------- SIGOMD(SIMOD) = 1+SIGEOM(1+SIGNSW+SIMOD-1) C C Low position limit (minimum radius or z) C ---------------------------------------- SIMLLI(SIMOD) = SRGEOM(SIGOMD(SIMOD)+SIMLLO) C C High position limit (maximum radius or z) C -------------------------------------------- SIMHLI(SIMOD) = SRGEOM(SIGOMD(SIMOD)+SIMHLO) C C Lower angle limit for module (radians) C -------------------------------------------- SIMLAN(SIMOD) = SRGEOM(SIGOMD(SIMOD)+SIMLAO) C C High angle limit for module (radians) C -------------------------------------------- SIMHAN(SIMOD) = SRGEOM(SIGOMD(SIMOD)+SIMHAO) C C Density factor for support material C SIMDFA(SIMOD) = SRGEOM(SIGOMD(SIMOD)+SIMDFO) C C Dead area at edges of wafers, in cm. The 3 possible edges are C 1:side, 2:end with chips, 3:end without chips C SIMDAR(SIMOD,SIEDG) = SRGEOM(SIGOMD(SIMOD)+SIMDAO+SIEDG-1) C C Number of layers in module SIMOD C -------------------------------- SIMNLA(SIMOD) = SIGEOM(SIGOMD(SIMOD)+SIMNLO) C C Detector type in module SIMOD C -------------------------------- SIMDTY(SIMOD) = SIGEOM(SIGOMD(SIMOD)+SIMDTO) C C Offset to layer block for layer SILAY, module SIMOD C --------------------------------------------------- SIGOLA(SIMOD,SILAY) = SIGOMD(SIMOD)+ > SIGEOM(SIGOMD(SIMOD)+SIGNMW+SILAY-1) C C Position of inner edge of layer (r for barrel, z for forward) C SILPOS(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILPSO) C C Low and high limits of layer (z for barrel, r for forward) C SILLLI(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILLLO) SILHLI(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILHLO) C C Wafer thickness for layer C SILTHK(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILTHO) C C Wafer tilt angle for layer C SILTLT(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILTLO) C C Energy threshold for layer C SILETH(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILETO) C C # Radiation lengths of SI+Support in layer C SILRLN(SIMOD,SILAY) = SRGEOM(SIGOLA(SIMOD,SILAY)+SILRLO) C C # Readout units in layer C SILNRU(SIMOD,SILAY) = SIGEOM(SIGOLA(SIMOD,SILAY)+SILNRO) C C Number of wafers along extent of layer (along z for barrel, C along r for forward). Not the same as readout units C ---------------------------------------------------- SILNWA(SIMOD,SILAY) = SIGEOM(SIGOLA(SIMOD,SILAY)+SILNWO) C C Offset to wafer block for wafer SIWAF, layer SILAY, module SIMOD C ---------------------------------------------------------------- SIGOWA(SIMOD,SILAY,SIWAF) = SIGOLA(SIMOD,SILAY)+ > SIGEOM(SIGOLA(SIMOD,SILAY)+SIGNLW+SIMXRU+SIWAF-1) C C Low position limit of wafer C SIWLLI(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWLLO) C C High position limit of wafer C SIWHLI(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWHLO) C C Position offset to odd numbered phi wafers C SIWOOF(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWOOO) C C Position offset to even numbered phi wafers C SIWEOF(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWEOO) C C Wafer width (barrel) or phi extent (forward) including dead regions C SIWWID(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWWDO) C C Wafer pitch C SIWPCH(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWPCO) C C Wafer stereo angle C SIWSAN(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWSAO) C C Offet in cm between stereo strip 1 and axial strip 1 at readout end C SIWSOF(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWSOO) C C Phi of first phi wafer C SIWPH0(SIMOD,SILAY,SIWAF)=SRGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWP0O) C C Number of phi wafers C SIWNPH(SIMOD,SILAY,SIWAF)=SIGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWNPO) C C Number of strips per phi wafer C SIWNST(SIMOD,SILAY,SIWAF)=SIGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWNSO) C C Stereo scheme for this wafer C SIWSCH(SIMOD,SILAY,SIWAF)=SIGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWSCO) C C Wafer type word C SIWTYP(SIMOD,SILAY,SIWAF)=SIGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWTYO) C C Readout unit number C SIWRUN(SIMOD,SILAY,SIWAF)=SIGEOM(SIGOWA(SIMOD,SILAY,SIWAF)+SIWRUO) C C Position of wafer including offsets: layer position + displacement C appropriate for odd or even phi wafers C SIWPOS(SIMOD,SILAY,SIWAF,SIWPH) = SILPOS(SIMOD,SILAY) + > MOD(SIWPH,2) * SIWOOF(SIMOD,SILAY,SIWAF) + > (1-MOD(SIWPH,2))* SIWEOF(SIMOD,SILAY,SIWAF) C C Offset to readout unit block for unit SIRUN, layer SILAY, module SIMOD C SIGORU(SIMOD,SILAY,SIRUN) = SIGOLA(SIMOD,SILAY)+ > SIGEOM(SIGOLA(SIMOD,SILAY)+SIGNLW+SIRUN-1) C C Beginning wafer number in readout unit (the one with the chips) C SIRWBE(SIMOD,SILAY,SIRUN)=SIGEOM(SIGORU(SIMOD,SILAY,SIRUN)+SIRWBO) C C End wafer number in readout unit C SIRWEN(SIMOD,SILAY,SIRUN)=SIGEOM(SIGORU(SIMOD,SILAY,SIRUN)+SIRWEO) C C Statement functions for accessing SIDI digitized data structure C =============================================================== C Total number of digitizations for layer SILAY in module SIMOD. C ------------------------------------------------------------ SINDIG(SIMOD,SILAY)=STDIGO(SIMOD,SILAY+1,1)-STDIGO(SIMOD,SILAY,1) C C Number of axial digitizations for layer SILAY in module SIMOD. C ------------------------------------------------------------ SINAXD(SIMOD,SILAY)=STDIGO(SIMOD,SILAY, 2)-STDIGO(SIMOD,SILAY,1) C C Number of stereo digitizations for layer SILAY in module SIMOD. C ------------------------------------------------------------ SINSTD(SIMOD,SILAY)=STDIGO(SIMOD,SILAY+1,1)-STDIGO(SIMOD,SILAY,2) C C Wafer number in phi for the SIHITth hit in layer SILAY of module SIMOD. C SITYP=1 for axial data, SITYP=2 for stereo data. C ------------------------------------------------ SIWPHI(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+1) C C Wafer number in z for the SIHITth hit in layer SILAY of module SIMOD. C SITYP=1 for axial data, SITYP=2 for stereo data. C ------------------------------------------------ SIWAFZ(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+2) C C Strip number in wafer for the SIHITth hit in layer SILAY of module SIMOD. C SITYP=1 for axial data, SITYP=2 for stereo data. C ------------------------------------------------ SISTRP(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+3) C C Strip type (axial or stereo) : redundant C ---------------------------------------- SITYPE(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+4) C C Cluster width (maybe need to add 1) C ----------------------------------- SIWIDD(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+5) C C Monte Carlo packed vertex (upper half) and track(lower)number C -------------------------------------------------------------------- SIMCVT(SIMOD,SILAY,SITYP,SIHIT) = > STDIGI(OFSTDI+STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+6) C C Monte Carlo vertex number (note: for APOLLO's sake, no ISHFT) C -------------------------------------------------------------------- SIMCVX(SIMOD,SILAY,SITYP,SIHIT) = > SIMCVT(SIMOD,SILAY,SITYP,SIHIT)/(2**16) C > ISHFT(STDIGI(STNWDI*(STDIGO(SIMOD,SILAY,SITYP)+SIHIT-1)+6),-16) C C Monte Carlo track number (note: for APOLLO, IAND defined to be AND C in sequence STFAPL, which must be included before SIFUNC) C -------------------------------------------------------------------- SIMCTR(SIMOD,SILAY,SITYP,SIHIT) = IAND(2**16-1, > SIMCVT(SIMOD,SILAY,SITYP,SIHIT)) C C Azimuthal hit position, taking into account the hit width C ---> This is the moral equivalent of the old HITSI <--- C ---------------------------------------------------------- SIHITS(SIMOD,SILAY,SITYP,SIHIT) = > SISTRP(SIMOD,SILAY,SITYP,SIHIT)+ > .5*SIWIDD(SIMOD,SILAY,SITYP,SIHIT)-1. C C Statement functions for accessing STCO coordinate data C ====================================================== C Total number of coordinates for layer STLAY in module STMOD. C ------------------------------------------------------------ STNCOR(SIMOD,SILAY)=STCOOO(SIMOD,SILAY+1)-STCOOO(SIMOD,SILAY) C C Radius STCRAD(SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+1) C Phi coordinate STCPHI(SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+2) C Z coordinate STCZ (SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+3) C phi variance STVPHI(SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+4) C z or r variance STVZOR(SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+5) C covariance STCOVR(SIMOD,SILAY,SIHIT) = > SRCOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+6) C quality word STCQUA(SIMOD,SILAY,SIHIT) = > SICOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+7) C axial digitization STCAXD(SIMOD,SILAY,SIHIT) = IAND(2**16-1, > SICOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+8)) C stereo digitization STCSTD(SIMOD,SILAY,SIHIT) = > SICOOR(OFSTCO+STNWCO*(STCOOO(SIMOD,SILAY)+SIHIT-1)+8)/2**16 +KEEP,STDAPOL. C C Statement function declarations for Apollo only C INTEGER IAND,IOR INTEGER IIIII,JJJJJ +KEEP,STFAPOL. C C Sequence for Apollo only, to resolve intrinsic functions C which are different on the Apollo from the other machines. C IAND(IIIII,JJJJJ) = AND(IIIII,JJJJJ) IOR(IIIII,JJJJJ) = OR(IIIII,JJJJJ) C C what else? C +KEEP,SICOMM. C C General silicon common blocks C +CDE,STBFIELD. +CDE,SIGE. +CDE,STDI. +CDE,STCO. +CDE,SIFUND. +CDE,STDAPOL,IF=APOLLO. * +PATCH,WRSHARED. *CMZ : 13/10/92 11.53.34 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 22/10/92 11.41.37 by Bradley Hubbard, UC Santa Cruz *-- Author : Fred Luehring * * Shared sequences from WR package (straw tube simulation): * * The following sequences are included in this patch: * WRCON,WRCONZZ - constants for straw system * WRDIM,WRDIMZZ - dimensions for arrays, need to include before WRGEOC * WRGEOC,WRGEOCZZ - geometry description of straw system * +KEEP,WRFLAGZZ. C IWRDIG - 0 ==> SKIP DIGITIZATION OF HITS [WRDIGI] C IWRHIT - 0 ==> DO NOT STORE HITS [WRSTEP, WRDIGI] C 1 ==> STORE ALL HITS [WRSTEP, WRDIGI] in GEANT structure C 2 ==> STORE HITS IN WRDIGI [WRSTEP, WRDIGI] C (in shell structure) C -1 ==> Retrieve hits from shell structure & redigitize C (not yet implemented) C IWRTRK - 0 ==> NO LOOP OVER TRACKS [WRTREV] (dummy now) C IWRSTP - 0 ==> NO LOOP OVER STEP (SKIP DOING WRSTEP) C WRSWIT - SWITCHES FOR DEBUGGING C WRSWIT(1) -- general DEBUG flag C WRSWIT(2) -- print hits for checking segment finding C WRSWIT(3) -- do not add propagation time to drift time C +KEEP,WRFLAG. COMMON/WRFLAG/IWRDIG,IWRHIT,IWRTRK,IWRSTP,WRSWIT(20) INTEGER IWRDIG, IWRHIT, IWRTRK, IWRSTP, WRSWIT C +KEEP,WRCONZZ. C The following parameter in the keep sequence WRDIM must be altered C if one adds words to the /WRCON/: C C NWRCON parameter giving the length of /WRCON/. (Value = MWRSLA+12) C C IWRFLD INTEGER type of GEANT magnetic field(-1 GUSWIM,0 no mag field,etc.) C WRBFLD REAL Magnetic field central value. C WRVDR REAL electron drift velocity (cm/nsec) C WRVPRP REAL propagation time of signal along wire (cm/nsec) C WRERR REAL sigma of error on distance of closest approach (cm) C WRLSTC REAL constant to shift drift time from GEANT standard (nsec) C to "clicks" and to SHELL standard (100 psec) C WRTSEP REAL allowed time separation between hits (nsec) C WRTMIN REAL minimum allowed signal arrival time (nsec) C WRTMAX REAL maximum allowed signal arrival time (nsec) C WREFF REAL wire efficiency (0. to 1.) C WRSALT REAL wire random noise rate C WRPEPR REAL noise rate (MHz/cm) from neutrons + photons C WRPINE REAL extra inefficiency/unit length due to longer C dead time associated with neutrons + photons. C WRCABL REAL Fraction of module height occupied by cabling C WRT0 REAL time offset per superlayer (nsec) +KEEP,WRCON. COMMON /WRCON/ IWRBFL,WRBFLD,WRVDR,WRVPRP,WRERR,WRLSTC,WRTSEP, + WRTMIN,WRTMAX,WREFF,WRSALT,WRPEPR,WRPINE, + WRCABL,WRT0(MWRSLA) INTEGER IWRBFL C REAL WRBFLD REAL WRVDR REAL WRVPRP REAL WRERR REAL WRLSTC REAL WRTSEP REAL WRTMIN REAL WRTMAX REAL WREFF REAL WRSALT REAL WRPEPR REAL WRPINE REAL WRCABL REAL WRT0 +KEEP,WRDIMZZ. C MWRLAY INTEGER PARAMETER Maximum number of layers in a WR superlayer. C MWRSLA INTEGER PARAMETER Maximum number of wire spacers in a straw. C MWRSPA INTEGER PARAMETER Maximum number of superlayers in the straw C MWRWIR INTEGER PARAMETER Maximum number of wires in a layer. C MWRVOL INTEGER PARAMETER Maximum number of structure volumes in a C superlayer. These volumes are things like the C modules, the electronics, and the space frame. C MWRZMO INTEGER PARAMETER Maximum number of Z divisions (i.e. 2 halves) C in the straw system. C NVDIM INTEGER PARAMETER Number of volumes stored with a GEANT hit. C NHDIM INTEGER PARAMETER Number of data stored for each GEANT hit. C NHMAX INTEGER PARAMETER Maximum number of GEANT hits stored in one C event for one layer. C NDDIM INTEGER PARAMETER Number of data stored for each GEANT digi. C NDMAX INTEGER PARAMETER Maximum number of GEANT digis stored in one C event for one layer. C NWRCON INTEGER PARAMETER The total length (in variables) of the common C /WRCONS/. C LENDIB INTEGER PARAMETER Maximum length of the digitization data C buffer. C LENBUF INTEGER PARAMETER Maximum length of buffer for short shell zebra C accesses. CFRED The product of MWRLAY*MWRSLA*MWRZMD must be the same as CFRED the product of MXGLLA*MXGLLA*MXGLMD. See RWDIM. +KEEP,WRDIM. INTEGER MWRLAY PARAMETER (MWRLAY=9) INTEGER MWRSLA PARAMETER (MWRSLA=5) INTEGER MWRSPA PARAMETER (MWRSPA=6) INTEGER MWRWIR PARAMETER (MWRWIR=3000) INTEGER MWRVOL PARAMETER (MWRVOL=16) INTEGER MWRZMD PARAMETER (MWRZMD=2) INTEGER NVDIM PARAMETER (NVDIM=1) INTEGER NHDIM PARAMETER (NHDIM=7) INTEGER NHMAX PARAMETER (NHMAX=8000) INTEGER NDDIM PARAMETER (NDDIM=4) INTEGER NDMAX PARAMETER (NDMAX=4000) INTEGER NWRCON PARAMETER (NWRCON=MWRSLA+12) INTEGER LENDIB PARAMETER (LENDIB=4*NDMAX+3) INTEGER LENBUF PARAMETER (LENBUF=150) C +KEEP,WRGEOCZZ. C C IWRGEV INTEGER Primary geometry version. C IWRGES INTEGER Geometry sub-version. C IWRPRV INTEGER Primary program version. C IWRPRS INTEGER Program sub-version. C WRHFNM CHARACTER*4 Names of the WR mother volumes (length 2). C WRBOUN REAL Used to define the limits of the straw tube tracker. C WRROUT REAL The outer radius of the outer tracking volume. C C NWRSLA INTEGER Number of straw superlayers. C WRRLEN REAL Radial width for each type of object (one per sup. lay. C WRRMIN REAL Minimum radius for each type of object (one per sup. la C WRRMAX REAL Maximum radius for each type of object (one per sup. la C WRRMID REAL Middle radius for each type of object (one per sup. lay C WRZLEN REAL Z length for each type of object (one per sup. lay.) C WRZOFF REAL Z offset for each type of object (one per sup. lay.) C WRZMIN REAL Minimum Z for each type of object (one per sup. lay.) C WRZMAX REAL Maximum Z for each type of object (one per sup. lay.) C C The object types (second subscript) are as follows: C C 1 Module mother volume. C 2 Support cylinder foam. C 3 Inner support cylinder. C 4 Outer support cylinder. C 5 Z=0 module endplate. C 6 Electronics module end endplate. C 7 Barium capicitors. C 8 Electronics. C 9 High density foam for support cylinder end. C 10 Space frame elements running parallal to beam. C 11 Space frame struts. C 12 Space frame lower mounting plate. C 13 Space frame upper mounting plate. C (Not all superlayers have all of the space frame parts 10 --> 13.) C C NWRWIR REAL The number of sense wires for a given superlayer. C WRSDIA REAL The diameter of a straw for a given superlayer. C WRSTER REAL The stereo angle (degrees) for a given superlayer. C NWRFRT INTEGER The number of straws in the shortest layer for the C modules in each superlayers. C WRTHST REAL The thickness of the straw walls for a given superlayer C WRTHCS REAL The thickness of the carbon module shell for a C given superlayer. C WRTHSW REAL The thickness of the foam in the module sidewalls for C a given superlayer (unused). C WRTHTB REAL The thickness of the foam in the module top and bottom C for a given superlayer (unused). C NWRMOD REAL The number of modules in the superlayer (unused). C C NWRLAY INTEGER The number of layers for each superlayer. C WRPHIL REAL The phi offset of each layer of each superlayer. C (Nominally zero or half a straw diameter.) C WRRLMD REAL The radius of the middle of each layer of each C superlayer. C WRRLMN REAL The radius of the bottom of each layer of each C superlayer. C WRRLMX REAL The radius of the top of each layer of each C superlayer. C C NWRSPA REAL Number of wire spacers in a straw. C WRZSLN REAL Length of the wire spacers in a superlayer. C WRZSMN REAL Minimum Z end location of each wire spacer. C WRZSMX REAL Maximum Z end location of each wire spacer +KEEP,WRGEOC CHARACTER*4 WRHFNM INTEGER IWRGEV INTEGER IWRGES INTEGER IWRPRV INTEGER IWRPRS INTEGER NWRSLA,NWRMOD,NWRLAY,NWRWIR,NWRFRT,NWRSPA LOGICAL LWRCLO,LWRSVL REAL WRBOUN, WRROUT REAL WRRLEN, WRRMIN, WRRMAX, WRRMID REAL WRZLEN, WRZMIN, WRZMAX, WRZOFF REAL WRSDIA, WRSTER REAL WRTHCS, WRTHST, WRTHSW, WRTHTB REAL WRPHIL, WRRLMD, WRRLMN, WRRLMX REAL WRZSLN, WRZSMN, WRZSMX C COMMON /WRGEOC/ WRHFNM(2), WRBOUN(3), + WRROUT, NWRSLA, + WRRLEN(MWRSLA,MWRVOL), + WRRMIN(MWRSLA,MWRVOL), + WRRMAX(MWRSLA,MWRVOL), + WRRMID(MWRSLA,MWRVOL), + WRZLEN(MWRSLA,MWRVOL), + WRZOFF(MWRSLA,MWRVOL), + WRZMIN(MWRSLA,MWRVOL), + WRZMAX(MWRSLA,MWRVOL), + NWRWIR(MWRSLA),WRSDIA(MWRSLA), + WRSTER(MWRSLA),NWRFRT(MWRSLA), + WRTHST(MWRSLA),WRTHCS(MWRSLA), + WRTHSW(MWRSLA),WRTHTB(MWRSLA), + NWRMOD(MWRSLA),NWRLAY(MWRSLA), + WRPHIL(MWRLAY,MWRSLA), + WRRLMN(MWRLAY,MWRSLA), + WRRLMX(MWRLAY,MWRSLA), + WRRLMD(MWRLAY,MWRSLA), + NWRSPA(MWRSLA), + WRZSLN(MWRSLA), + WRZSMN(MWRSPA,MWRSLA), + WRZSMX(MWRSPA,MWRSLA), + LWRCLO,LWRSVL, + IWRGEV,IWRGES,IWRPRV,IWRPRS +PATCH,PMSHARED. *CMZ : 04/06/92 22.01.43 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 14/08/92 14.46.17 by Bradley Hubbard, UC Santa Cruz *-- Author : Penny Estabrooks * * Shared sequences from PM package (intermediate tracker simulation): * * The following sequences are included in this patch: * PMDIM,PMDIMZZ - dimensions for arrays, need to include before * PMDI,PMGEOC,PMWRKC * PMGEOC - geometry description of intermediate tracker * PMWRKC - more (derived) geometry numbers * PMDI - PM digitization common block * +KEEP,PMDIMZZ. C C specify array limits c c geometry c MPMSUP is maximum number of superlayers allowed (per half) c MPMLAY is maximum number of layers allowed (per superlayer) c MPMANO is maximum number of annuli allowed (per layer) c MPMVOL is maximum number of volume divisions allowed c c hits, digitizations c NPMWHI is the number of words per hit (for Geant) c MPMHIT is the maximum number of hits allowed (per tile) c c PMNWDI is the number of words per digi (for Geant) c MPMDIG is the maximum number of digis allowed (per tile) c c NPMTRK is the maximum number of tracks to associate with a digi C C Modified: 14/08/92 BH Change MPMDIG,MPMHIT from 100 to 500 C +KEEP,PMDIM. INTEGER MPMSUP PARAMETER (MPMSUP=6) INTEGER MPMLAY PARAMETER (MPMLAY=6) INTEGER MPMANO PARAMETER (MPMANO=5) INTEGER MPMVOL PARAMETER (MPMVOL =2) c INTEGER NPMWHI PARAMETER (NPMWHI=8) INTEGER MPMHIT PARAMETER (MPMHIT=200) c INTEGER PMNWDI PARAMETER (PMNWDI=8) INTEGER MPMDIG PARAMETER (MPMDIG=200) c INTEGER NPMTRK PARAMETER(NPMTRK=10) C +KEEP,PMGEOC. C C geometry c NPMSUP is the number of superlayers (per end) c NPMLAY(S) is the number of z layers in superlayer S c NPMANN(S) is the number of R layers (annuli) in superlayer S c NPMPHI(A,S) is the number of (phi) wavers in annulus A of superlayer S c NPMANO(A,S) is the number of anodes in annulus A of superlayer S c ZAVE(S) is the average z of superlayer S c RINNER(A,S) is the inner radius of annulus A of superlayer S c ROUTER(A,S) is the outer radius of annulus A of superlayer S c ZTHICK(S) is the total thickness of superlayer S c THKDSK(S) is the thickness of the support disk of superlayer S c PHIEDG(A,S) is the width (in phi) of the dead area at the phi edge c of annulus A of superlayer S c REDGE(1:2,A,S) is the radial width of the dead area at the inner/outer edges c of annulus A of superlayer S c PMTANS(L,A,S) is the tangent of the stereo angle for layer L c of annulus A of superlayer S...the stereo pitch c is assumed to be axial pitch/cos (stang) c PMSTOF(L,A,S) is the offset (cm at inner edge) between axial strip 1 and c stereo strip 1 c THKTIL(S) is the thickness of the tiles in slay S c PMZDSK(S) is the (z) position of the support disk centre within the slay c PMZTIL(L,A,S) is the (z) pos'n of the tile centre C PMPHI0(S) is the phi offset (in tiles) of the tiles in slay S c LPMCLO is a flag to indicate whether or not the geometry has been defined c CHARACTER*4 PMHALF REAL ZAVE, RINNER, ROUTER, ZTHICK,THKDSK,PHIEDG,REDGE INTEGER NPMSUP, NPMLAY, NPMANN, NPMPHI, NPMANO REAL PMTANS,PMSTOF REAL THKTIL,PMZDSK,PMZTIL,PMPHI0 LOGICAL LPMCLO COMMON /PMGEOC/ PMHALF(2), + NPMSUP, NPMLAY(MPMSUP), + NPMANN(MPMSUP),NPMPHI(MPMANO,MPMSUP), + NPMANO(MPMANO,MPMSUP), + ZAVE(MPMSUP), + RINNER(MPMANO,MPMSUP),ROUTER(MPMANO,MPMSUP), + ZTHICK(MPMSUP), THKDSK(MPMSUP), + PHIEDG(MPMANO,MPMSUP),REDGE(2,MPMANO,MPMSUP), + PMTANS(MPMLAY,MPMANO,MPMSUP), + PMSTOF(MPMLAY,MPMANO,MPMSUP), + THKTIL(MPMSUP),PMZDSK(MPMSUP), + PMZTIL(MPMLAY,MPMANO,MPMSUP), + PMPHI0(MPMSUP), + LPMCLO C C C +KEEP,PMWRKC. C C ZMIN(L,A,S,H) is min. /z/ for layer L, ann A of superlayer S of half H C MAX(L,A,S,H) max. c c RAMIN(A,S) is min. R for annulus A of superlayer S c MAX max C C RDMIN(A,S) is min. R for active area of annulus A of superlayer S c RDMAX(A,S) is max. R for active area of annulus A of superlayer S c c PMCOFF(1:3,L,A,S,H) is x:z offset of layer L of annulus A of superlayer S c of end H C PMPHIW(A,S) is phi bite of wafers in annulus A, superlayer S C PMPHIA(A,S) is phi bite of anodes in annulus A, superlayer S c c ZEDMIN(S) is the min /z/ for superlayer S c ZEDMAX(S) is the max /z/ for superlayer S c REAL ZMIN(MPMLAY,MPMANO,MPMSUP,2),ZMAX(MPMLAY,MPMANO,MPMSUP,2), + RAMIN(MPMANO,MPMSUP),RAMAX(MPMANO,MPMSUP), + RDMIN(MPMANO,MPMSUP),RDMAX(MPMANO,MPMSUP), + PMCOFF(3,MPMLAY,MPMANO,MPMSUP,2), + PMPHIW(MPMANO,MPMSUP), + PMPHIA(MPMANO,MPMSUP), + ZEDMIN(MPMSUP),ZEDMAX(MPMSUP) COMMON /PMWRKC/ ZMIN, ZMAX, RAMIN, RAMAX, RDMIN,RDMAX, + PMCOFF,PMPHIW,PMPHIA,ZEDMIN,ZEDMAX C +KEEP,PMDI. C C Planar microstrip digitization common block (taken directly from c ST code). These two arrays are C assumed to be filled when unpacking the PMDI raw digitized C data structure. C Created: copied from ST.CAR PXE 25-Nov-91 C Modified: C ========================================================== C C C Offset to beginning of data in PMDIGI (somewhere in temporary space) INTEGER OFPMDI,NWPMDI PARAMETER(NWPMDI=7) C C PMDIGI array contains the following c 1 ISECT C 2 IANN C 3 ILAY C 4 ISTRP (1st+last strip numbers for cluster) c 5 ITYPE (0 for axial, 1 for stereo) C 6 NSTRP number of strips c 7 MCPART = MC particle number + 2**16*vertex number C C Offset to data start, end in PMDIGI array for c half, superlayer, annulus, layer c INTEGER PMDIGO(MPMLAY,MPMANO,MPMSUP,2) + ,PMDIGE(MPMLAY,MPMANO,MPMSUP,2) INTEGER PMDIGI(1) COMMON/PMDI/OFPMDI,PMDIGO,PMDIGE,PMDIGI C +PATCH,TFSHARED. *CMZ : 15/05/92 07.59.31 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 19/05/92 13.31.43 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from TF package (combined tracking): * * The following sequences are included in this patch: * TFCTRL : control variables and detector indices for TF package * TFCTRLZZ : documentation for TFCTRL sequence * TRAKPARS : parameter definitions for track banks (TRCT) * TSEGPARS : parameter definitions for segment banks (xxSG) * +KEEP, TFCTRLZZ, IF=DOC. C Description: C ------------ C Control common for track reconstruction code C C Each integer*4 word contains up to 32 logical flags (0=off, 1=on) C indexed by subdetector or algorithm. C C Created : Bradley Hubbard, UC Santa Cruz 9/1/91 C Modified : C +KEEP, TFCTRL. C C Whether to drop reconstruction header info (all reconstructed data) INTEGER LDRPHD C Whether to drop reconstructed coordinates INTEGER LDRPCO C Whether to drop reconstructed segments INTEGER LDRPSG C Whether to drop TRCT combined tracks LOGICAL LDRPTR C Whether raw data is present for each system INTEGER LRAWDT C Whether to reconstruct coordinates INTEGER LRECCO C Whether to reconstruct segments INTEGER LRECSG C Whether to reconstruct tracks INTEGER LRECTR C Whether to fit tracks INTEGER LFITTR C Whether to invoke monitor code INTEGER LMONIT C Whether detector/algorithm code is linked in INTEGER LLNKDT C Bits to indicate whether or not to use layers in a C given subdetector. Have one word for each module in C each of the 16 possible subdetectors. Then each layer C in the module is one bit (use JBYT convention, bit 1 C is the lowest order bit). A value of 1 means DON'T C use the layer. Default (set in BLKDAT) is all 0. INTEGER LLAYER(3,16) C C (temporary?, make up for shell deficiency) C Whether to stop after reconstruction for viewing LOGICAL LBREAK,LPRINT C CHARACTER*2 CHDETI(0:31) C COMMON /TFCTRL/LDRPHD,LDRPCO,LDRPSG,LDRPTR, > LRAWDT,LRECCO,LRECSG,LRECTR,LFITTR,LMONIT, > LBREAK,LPRINT,LLNKDT,CHDETI,LLAYER C C Subdetector/algorithm bits. First 16 for subdetectors C These duplicate the ISDET codes C ------------------------------------------------------ C Generic detector (All detectors) Integer IDETAL Parameter (IDETAL=0) C C Silicon strip detector Integer IDETST Parameter (IDETST=1) C C Scintillating fiber detector Integer IDETSF Parameter (IDETSF=3) C C Wire fiber hybrid detector Integer IDETWF Parameter (IDETWF=5) C C Straw tube detector Integer IDETWR Parameter (IDETWR=7) C C Gas microstrip intermediate angle detector Integer IDETPM Parameter (IDETPM=8) C C Silicon pixel detector Integer IDETPX Parameter (IDETPX=11) C C Next 16 for algorithms C ---------------------- C Inclusive algorithm (generic) Integer IALGAL Parameter (IALGAL=16) C C AT track reconstruction algorithm Integer IALGAT Parameter (IALGAT=17) C C TS track reconstruction algorithm Integer IALGTS Parameter (IALGTS=18) C C AR wire segment reconstruction algorithm Integer IALGAR Parameter (IALGAR=19) C C RW wire segment and track reconstruction algorithm Integer IALGRW Parameter (IALGRW=20) C C TR fiber+silicon track reconstruction algorithm Integer IALGTR Parameter (IALGTR=21) C +KEEP,TRAKPARS. CA)========================================================================== C Sequence TRAKPARS : Parameter description for general track bank CB)========================================================================== C Description: C ============ C This include sequence defines offsets to integer and real parameters C within the general track banks. The error matrix is a full 5 C paramter version. C C Bank version no : 2 C C Created: 14-Jun-1991 Bradley Hubbard, U.C.Santa Cruz C Modified: 10-JUL-91 KO renamed some things for general tracks C 24-Dec-91 BH add two user words at end of bank C ****** backwards incompatible change ****** C 15-May-92 BH Change name to TRAKPARS, put in SS.CAR. C Change parameter definitions to fixed numbers C---------------------------------------------------------------------------- C Offsets to integer quantities C C Offset to track or segment ID (ISEG or ITRK) C -------------------------------------------- Integer TRTIDO Parameter (TRTIDO=1) C C Offset to number of points on track or segment (NPTS) C ----------------------------------------------------- Integer TRNPTO Parameter (TRNPTO=2) C C Offset to word describing which variables used in fit (FITV) C ------------------------------------------------------------ Integer TRFTVO Parameter (TRFTVO=3) C C Offset to Monte-Carlo vertex/track indicies (INDMC) C --------------------------------------------------- Integer TRMCTO Parameter (TRMCTO=4) C C Number of integer words in bank C ------------------------------- Integer TRNIWD Parameter (TRNIWD=TRMCTO) C C Offsets to real quantities C C Offset to first word of track parameters C ---------------------------------------- Integer TRTPAO Parameter (TRTPAO=5) C C Offset to radius of segment (not a parameter but made available) C ----------------------------------------------------------------- Integer TRRADO Parameter (TRRADO = TRTPAO) C C Offset to impact parameter (signed) C ----------------------------------- Integer TRB0O Parameter (TRB0O=6) C C Offset to PHI0 C -------------- Integer TRPH0O Parameter (TRPH0O=7) C C Offset to curvature (signed) (RHO) C ---------------------------------- Integer TRRHOO Parameter (TRRHOO=8) C C Offset to Z intercept (Z0) C -------------------------- Integer TRZ0O Parameter (TRZ0O=9) C C Offset to tangent of dip angle (TANL) C ------------------------------------- Integer TRTANO Parameter (TRTANO=10) C C Offset to track chi**2 (CHI2) C ----------------------------- Integer TRCH2O Parameter (TRCH2O=11) C C Offset to track or segment length C --------------------------------- Integer TRLENO Parameter (TRLENO=12) C C Offset to fitted T0 C ------------------- Integer TRT0O Parameter (TRT0O=13) C C Offset to error on fitted T0 C ---------------------------- Integer TRDT0O Parameter (TRDT0O=14) C C Offset to start of error matrix C Integer TRERMO Parameter (TRERMO=15) C C Offset to various error quantities C C Offset to C -------------------------- Integer TREBBO Parameter (TREBBO=15) C C Offsets to , C --------------------------------------------- Integer TREBPO,TREPPO Parameter (TREBPO=16,TREPPO=17) C C Offsets to , , C ----------------------------------------------------- Integer TREBRO,TREPRO,TRERRO Parameter (TREBRO=18,TREPRO=19,TRERRO=20) C C Offsets to , , , C ------------------------------------------------ Integer TREBZO,TREPZO,TRERZO,TREZZO Parameter (TREBZO=21,TREPZO=22,TRERZO=23,TREZZO=24) C C Offsets to ,,,, C --------------------------------------------------------------------- Integer TREBTO,TREPTO,TRERTO,TREZTO,TRETTO Parameter (TREBTO=25,TREPTO=26,TRERTO=27,TREZTO=28,TRETTO=29) C C The above accounts for 29 words. Two additional user words at end C make a total of 31 C C Total number of words in bank C ----------------------------- Integer TRNTWD Parameter (TRNTWD=31) C C Number of real words in track bank C --------------------------------------- Integer TRNRWD Parameter (TRNRWD=TRNTWD-TRNIWD) CD)======================================================================== +KEEP,TSEGPARS. CA)========================================================================== C Sequence TSEGPARS : Parameter description for track segment banks CB)========================================================================== C Description: C ============ C This include sequence defines offsets to integer and real parameters C within the silicon forward and barrel segment banks. The parameters C should be interpreted as below, and the error matrix is assumed C to hold only the information for the usual 4 parameters that are C determined. C C Bank version no : 1 C C Created: 14-Jun-1991 Bradley Hubbard, U.C.Santa Cruz C Modified: 14-JUN-91 KO changed some things to use with TV C 26-JUN-91 KO new (and last?) segment format C 15-May-92 BH Change name to TSEGPARS, put in SS.CAR. C---------------------------------------------------------------------------- C Offsets to integer quantities C C Offset to track or segment ID (ISEG or ITRK) C -------------------------------------------- Integer TSTIDO Parameter (TSTIDO=1) C C Offset to number of points on track or segment (NPTS) C ----------------------------------------------------- Integer TSNPTO Parameter (TSNPTO=2) C C Offset to word describing which variables used in fit (FITV) C ------------------------------------------------------------ Integer TSFTVO Parameter (TSFTVO=3) C C Offset to Monte-Carlo vertex/track indicies (INDMC) C --------------------------------------------------- Integer TSMCTO Parameter (TSMCTO=4) C C Number of integer words in bank C ------------------------------- Integer TSNIWD Parameter (TSNIWD=TSMCTO) C C Offsets to real quantities C C Offset to first word of track parameters C ---------------------------------------- Integer TSTPAO Parameter (TSTPAO=5) C C Offset to radius of segment C ----------------------------- Integer TSRADO Parameter (TSRADO = 5) C C Offset to signed impact parameter (silicon-style segments) C or PHIP (for outer segments) C ------------------------------------------- Integer TSB0O,TSPHPO Parameter (TSB0O=6, TSPHPO=6) C C Offset to PHI0 (silicon-style segments) or ALPHA (outer segments) C -------------- Integer TSPH0O,TSALPO Parameter (TSPH0O=7, TSALPO=7) C C Offset to curvature (signed) (RHO) C ---------------------------------- Integer TSRHOO Parameter (TSRHOO=8) C C Offset to Z intercept (Z0) C -------------------------- Integer TSZ0O Parameter (TSZ0O=9) C C Offset to tangent of dip angle (TANL) C ------------------------------------- Integer TSTANO Parameter (TSTANO=10) C C Offset to track chi**2 (CHI2) C ----------------------------- Integer TSCH2O Parameter (TSCH2O=11) C C Offset to track or segment length C --------------------------------- Integer TSLENO Parameter (TSLENO=12) C C Offset to fitted T0 C ------------------- Integer TST0O Parameter (TST0O=13) C C Offset to error on fitted T0 C ---------------------------- Integer TSDT0O Parameter (TSDT0O=14) C C Offset to start of error matrix C Integer TSERMO Parameter (TSERMO=15) C C Offset to various error quantities C C Offsets to (or , see above) C ---------------------- Integer TSEPPO Parameter (TSEPPO=15) C C Offsets to , C (or , ) C -------------------------------- Integer TSEPRO,TSERRO Parameter (TSEPRO=16, TSERRO=17) Integer TSEPAO,TSEAAO Parameter (TSEPAO=16, TSEAAO=17) C C Offsets to , , C --------------------------------------- Integer TSEPZO,TSERZO,TSEZZO Parameter (TSEPZO=18,TSERZO=19,TSEZZO=20) C C Offsets to ,,, C --------------------------------------------------------------------- Integer TSEPTO,TSERTO,TSEZTO,TSETTO Parameter (TSEPTO=21,TSERTO=22,TSEZTO=23,TSETTO=24) C C Total number of words in bank C ----------------------------- Integer TSNTWD Parameter (TSNTWD=TSETTO) C C Number of real words in track bank C --------------------------------------- Integer TSNRWD Parameter (TSNRWD=TSNTWD-TSNIWD) CD)======================================================================== +KEEP,TSTPAR. +CDE,TRAKPARS. +KEEP,TSSPAR. +CDE,TSEGPARS. +PATCH,TSSHARED. *CMZ : 15/05/92 07.59.31 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 15/05/92 07.59.31 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from TS package (track reconstruction): * * The following sequences are included in this patch: * TSTMTK : temporary array for unpacking tracks * +KEEP,TSTMTK C C Temporary arrays for tracks C Author: Bill Lockman C C Offsets to information in TKTMTK and TSTMPT, respectively INTEGER OFTSTK,TSTMTK COMMON / TSTMTK / OFTSTK,TSTMTK(1) C REAL*4 TSTMTR(1) EQUIVALENCE (TSTMTK(1),TSTMTR(1)) C INTEGER OFTSPT,TSTMPT C C TSTMPT - array of pointers into TSTMTK. C Format: C TSTMPT(OFTSPT+1) = number of tracks C TSTMPT(OFTSPT+2) = offset to track 1 data C TSTMPT(OFTSPT+3) = length of track 1 data C TSTMPT(OFTSPT+4) = offset to track 2 data C TSTMPT(OFTSPT+5) = length of track 2 data C etc C where the first TRNTWD words of data for each track are the C track parameters, error matrices, etc C The remaining words in each block are pointer information to C segments and points. C COMMON / TSTMPT / OFTSPT,TSTMPT(1) C +PATCH,RWSHARED. *CMZ : 15/05/92 07.59.31 by Bradley Hubbard, UC Santa Cruz +DECK,BLANKDEK. *CMZ : 22/10/92 11.39.23 by Bradley Hubbard, UC Santa Cruz *-- Author : * * Shared sequences from RW package (track reconstruction): * * The following sequences are included in this patch: * RWDIM * RWSPAR * +KEEP,RWDIMZZ. C LENDAB INTEGER Length of the data buffer used to unpack header and track C information banks. C LENSGB INTEGER Length of the segment bank buffer. C LENSPB INTEGER Length of the segment pointer bank buffer. C MXGLDT INTEGER Maximum number of detectors the RW system can use (currentl C three: ST, WR and PM.) C MXGLMD INTEGER Maximum number of Z sections the RW system can use (current C three because of the ST simulation). C MXGLSL INTEGER Maximum number of superlayers the RW system can use. C MXGLSG INTEGER Maximum number of segments in one superlayer of one Z C section of on detector the RW can use. C MXRWPT INTEGER Naximum number of points that are fit by the RW fitting C routine, RWFTHL. C MXSGLK INTEGER Maximum number of segments linked onto a track. C MXTRFD INTEGER Maximum number of possible tracks found during the segment C linking and track subdivision processes. CFRED The product of MWRLAY*MWRSLA*MWRZMD must be the same as CFRED the product of MXGLLA*MXGLLA*MXGLMD. See WRDIM. +KEEP,RWDIM. INTEGER LENDAB PARAMETER (LENDAB=100) INTEGER LENSGB PARAMETER (LENSGB=29) INTEGER LENSPB PARAMETER (LENSPB=11) INTEGER MXGLDT PARAMETER (MXGLDT=3) INTEGER MXGLLA PARAMETER (MXGLLA=2) INTEGER MXGLMD PARAMETER (MXGLMD=3) INTEGER MXGLSG PARAMETER (MXGLSG=2000) INTEGER MXGLSL PARAMETER (MXGLSL=15) INTEGER MXRWPT PARAMETER (MXRWPT=50) INTEGER MXSGLK PARAMETER (MXSGLK=150) INTEGER MXTRFD PARAMETER (MXTRFD=5500) +KEEP,RWSPARZZ. C Offsets to various segment bank (/WRSG) items (form copied from TS code C sequence TSSPAR.) C C RWNPTO INTEGER PARAMETER Offset to number of hits on segment. C RWMCTO INTEGER PARAMETER Offset to segment Monte Carlo track id. C RWRADO INTEGER PARAMETER Offset to segment radius. C RWPHIO INTEGER PARAMETER Offset to segment phi. C RWALPO INTEGER PARAMETER Offset to segment alpha. C RWRHOO INTEGER PARAMETER Offset to segment curvature. C RWZO INTEGER PARAMETER Offset to segment z. C RWTANO INTEGER PARAMETER Offset to segment tan(lambda). C RWEPPO INTEGER PARAMETER Offset to segment phi error. C RWEAAO INTEGER PARAMETER Offset to segment alpha error. C RWEZZO INTEGER PARAMETER Offset to segment z error. +KEEP,RWSPAR. INTEGER RWNPTO PARAMETER (RWNPTO=2) INTEGER RWMCTO PARAMETER (RWMCTO=4) INTEGER RWRADO PARAMETER (RWRADO=5) INTEGER RWPHIO PARAMETER (RWPHIO=6) INTEGER RWALPO PARAMETER (RWALPO=7) INTEGER RWRHOO PARAMETER (RWRHOO=8) INTEGER RWZO PARAMETER (RWZO=9) INTEGER RWTANO PARAMETER (RWTANO=10) INTEGER RWEPPO PARAMETER (RWEPPO=15) INTEGER RWEAAO PARAMETER (RWEAAO=17) INTEGER RWEZZO PARAMETER (RWEZZO=24)