SUBROUTINE VER_PADS ( COLOR_VER, FULL, SET_ID, x NH, NAMESH_V, x NBITSH_V, VORIG, VFACT ) C IMPLICIT NONE C C Description:- C ============= C This subroutine defines the geometry for the MVD endcaps C pads and the associated motherboard. One on each end of C the MVD. Also defines Geant hits structures. C Input variables (not changed inside this routine): C COLOR_VER = color for MVD in pictures C FULL = 'FULL' when the hits are "on" C SET_ID = set identifier for hits definition C NH = number of elements per hit C NAMESH_V = names for each hit element C NBITSH_V = # bits needed for eah hit element C VORIG = "origin" used in hits calculations C VFACT = "factor" used in hits calculations C for details on the parameters used for the Geant hits, C see section HITS-110 in the geant manual. C C Author:- C ======== C JPSullivan C C Creation Date: 7-Jan-1994 C =========================== C C Revisions:- C =========== C Date Name Description C ---- ---- ---------------------------------------- C 28-Jul-94 JPS Added hits structures for pads -- new calling C variables FULL,NH,NAMESH_V,NBITSH_V,VORIG,VFACT C added for use in hits definitions. Also changed C the shape of the pad detector from a Geant 'TUBE' C to a polygon with 12 sides. C 14-Sep-00 JPS Add flags to turn on/off installation of pads C 18-Sep-00 JPS Get the "install" flags from the zebra parameter bank C C Arguments:- C =========== C INTEGER COLOR_VER ! Color code for MVD CHARACTER*4 FULL ! used to turn on hits CHARACTER*4 SET_ID ! set identifier INTEGER NH ! elements/hit CHARACTER*4 NAMESH_V(NH) ! names of hit elements INTEGER NBITSH_V(NH) ! #bits per hit element REAL VORIG(NH) ! origin for each hit element REAL VFACT(NH) ! factor for each hit element C C Implicit inputs, outputs, side effects:- C ======================================== C C Called by: VER C Calls : GSVOLU, GSATT, GSPOS, GSDET, GSDETH C C Implicit input: C Most of the geometry parameters for the MVD pads are taken C from the zebra bank with offset LFV_PARA (from keep FPVLINK). This C bank should be created and filled before calling this routine. C Currently, this is done in subroutine VER_PARS. C C Implicit output: C The geant geometry banks are modified since this routine creates C and positions the geant volumes for the MVD pads. New hits banks C are also created. C C Global Specifications:- C ======================= C include 'fstore.inc' include 'sublink.inc' include 'fpvlink.inc' include 'gugeom.inc' C C External Specifications:- C ========================= C None C C Local Specifications:- C ====================== C INTEGER INSTALL_FLG(2) ! flags to turn on installation of N/S pads ! (1) = 1 means install south pads ! (2) = 1 means install north pads C C--> Parameters controlling the size of the MVD pads (taken from the C MVD geometry zebra bank) C REAL R1_VER_PAD !inner radius of Si in MVD pads REAL R2_VER_PAD !outer radius of Si in MVD pads REAL DZ_VER_PAD !Si pad thickness REAL Z_VER_PAD !Z position of MVD pads C C--> Parameters for the MVD pad detector's motherboard geometry C REAL DZ_VER_PMB !half-thickness of MVD pad motherboard REAL Z_VER_PMB !z position of pad motherboard REAL R_VER_PMB !outer radius of pad motherboard C INTEGER MED_VER_SEN ! Silicon sensitive INTEGER MED_VER_PMB ! MVD pad motherboard material C REAL PAR_VTMP(3) ! used to define motherbards REAL PAR_PADS(10) ! used to define pads polygon REAL POS_VTMP(3) ! used to position motherboards and pads C INTEGER NMED ! Medium number INTEGER IVOLU C C parameters used in booking Geant hits banks C INTEGER NV !number of volume descriptors PARAMETER (NV=1) !one volume is enough in this case INTEGER IDTYPE !detector type: used in GUSTEP CHARACTER*4 NAMESV(NV) !names of volumes descriptors INTEGER NBITSV(NV) !# bits to count this volume type INTEGER NWPA !# words for primary hits allocation INTEGER NWSA !# words for secondary allocation INTEGER ISET !Geant's set identifier INTEGER IDET !Geant's det identifier C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C DATA NBITSV / 2 / !only need to count to 2 DATA NWPA, NWSA / 1000, 1000 / DATA IDTYPE / 3 / C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C get the needed geometry parameters from the Zebra bank C R1_VER_PAD = QF(LFV_PARA + OFVA_R1_PAD) R2_VER_PAD = QF(LFV_PARA + OFVA_R2_PAD) DZ_VER_PAD = QF(LFV_PARA + OFVA_DVISL) Z_VER_PAD = QF(LFV_PARA + OFVA_Z_PAD) MED_VER_SEN = QF(LFV_PARA + OFVA_MED_SEN) DZ_VER_PMB = QF(LFV_PARA + OFVA_DZ_PMB) Z_VER_PMB = QF(LFV_PARA + OFVA_Z_PMB) R_VER_PMB = QF(LFV_PARA + OFVA_R_PMB) MED_VER_PMB = QF(LFV_PARA + OFVA_MED_PMB) C INSTALL_FLG(1) = NINT(QF(LFV_PARA + OFVA_PAD_INSTALL_FLAG)) INSTALL_FLG(2) = NINT(QF(LFV_PARA + OFVA_PAD_INSTALL_FLAG+1)) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C Motherboard for MVD endcap pads C NMED = MED_VER_PMB PAR_VTMP(1) = R1_VER_PAD PAR_VTMP(2) = R_VER_PMB PAR_VTMP(3) = DZ_VER_PMB C CALL GSVOLU ( 'VPMB','TUBE',NMED,PAR_VTMP,3,IVOLU ) CALL GSATT ( 'VPMB','SEEN',1 ) CALL GSATT ( 'VPMB','COLO',COLOR_VER ) C POS_VTMP(1) = 0. POS_VTMP(2) = 0. POS_VTMP(3) = Z_VER_PMB C CALL GSPOS ( 'VPMB',1,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C POS_VTMP(3) = -POS_VTMP(3) CALL GSPOS ( 'VPMB',2,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C Silicon in MVD pads: C NMED = MED_VER_SEN PAR_PADS( 1)= 0. !phi of first division PAR_PADS( 2)= 360. !delta_phi covered PAR_PADS( 3)= 12 !# phi segments PAR_PADS( 4)= 2 !# z planes PAR_PADS( 5)= -DZ_VER_PAD !z of first plane PAR_PADS( 6)= R1_VER_PAD !R inner at first z plane PAR_PADS( 7)= R2_VER_PAD !R outer at first z plane PAR_PADS( 8)=-PAR_PADS(5) !z of 2nd plane PAR_PADS( 9)= PAR_PADS(6) !R inner at 2nd z plane PAR_PADS(10)= PAR_PADS(7) !R outer at 2nd z plane C IF ( INSTALL_FLG(1).EQ.1 .OR. INSTALL_FLG(2).EQ.1 ) THEN CALL GSVOLU ( 'VPAD','PGON',NMED,PAR_PADS,10,IVOLU ) CALL GSATT ( 'VPAD','SEEN',1 ) CALL GSATT ( 'VPAD','COLO',COLOR_VER ) END IF C POS_VTMP(1) = 0. POS_VTMP(2) = 0. POS_VTMP(3) = Z_VER_PAD C IF ( INSTALL_FLG(2).EQ.1 ) THEN C north CALL GSPOS ( 'VPAD',1,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) END IF C POS_VTMP(3) = -POS_VTMP(3) IF ( INSTALL_FLG(1).EQ.1 ) THEN C south CALL GSPOS ( 'VPAD',2,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) END IF C C The "hits" structures for the pads: C IF ( FULL.EQ.'FULL') THEN C IF ( INSTALL_FLG(1).EQ.1 x .OR. INSTALL_FLG(2).EQ.1 ) THEN NAMESV(1) = 'VPAD' CALL GSDET ( SET_ID, 'VPAD', NV, NAMESV, NBITSV, x IDTYPE, NWPA, NWSA, ISET, IDET ) CALL GSDETH ( SET_ID, 'VPAD', NH, NAMESH_V, NBITSH_V, x VORIG, VFACT ) END IF END IF C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C RETURN END