*CMZ : 2.04/00 23/11/94 14.21.58 by Charles F. Maguire *-- Author : John P. Sullivan 06/01/94 SUBROUTINE VER_ENCL ( COLOR_VER) C IMPLICIT NONE C C Description:- C ============= C This subroutine defines the geometry for the MVD enclosure. C The enclosure is a cylinder with closed ends. The end C caps are made of relatively thick Al. C C Author:- C ======== C JPSullivan C C Creation Date: 6-Jan-1994 C =========================== C C Revisions:- C =========== C Date Name Description C ---- ---- ---------------------------------------- C 30-Jan-96 JPS Inner wall thickness is half outer wall thickness, C where DR_VER_ENC2 gives the outer wall thickness. C Previously inner and outer wall thicknesses were C the same. C C Arguments:- C =========== C INTEGER COLOR_VER ! Color code for MVD C C Implicit inputs, outputs, side effects:- C ======================================== C C Called by: VER C Calls : GSVOLU, GSATT, GSPOS C C Implicit input: C Most of the geometry parameters for ther MVD enclosure 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 enclosure. C C Global Specifications:- C ======================= C *KEEP,GCUNIT. include 'gcunit.inc' *KEEP,FSTORE. include 'fstore.inc' *KEEP,SUBLINK. include 'sublink.inc' *KEEP,FPVLINK. include 'fpvlink.inc' *KEEP,GUGEOM. include 'gugeom.inc' *KEND. C C External Specifications:- C ========================= C None C C Local Specifications:- C ====================== C C--> Parameters controlling the size of the enclosure (taken from the C MVD geometry zebra bank) C REAL R1_VER_ENC !inner radius of cylindrical enclosure shell REAL R2_VER_ENC !outer radius of cylindrical enclosure shell REAL DR_VER_ENC1 !thickness of "skin" layers (inside/outside) REAL DR_VER_ENC2 !thickness of "core" layer of enclosure wall in !the outer shell, the inner shell wall is half ! this thickness. REAL DZ_VER_ENC !half-length of cylindrical enclosure shell REAL DZ_VER_STRUT !half-length of strut REAL R_VER_STRUT !inner radius of enclosure shell strut REAL DR_VER_STRUT !thickness of walls in strut tube REAL DZ_VER_ENDPL !half-thickness of walls on enclosure's endplate. C INTEGER MED_VER_ENC1 ! enclosure skin material INTEGER MED_VER_ENC2 ! enclosure core material INTEGER MED_VER_STRUT ! enclosure strut material INTEGER MED_VER_ENDPL ! enclosure end-plate material C REAL PAR_VTMP(3) ! used to define parts of enclosure REAL POS_VTMP(3) ! used to position parts of enclosure C INTEGER NMED ! Medium number INTEGER IVOLU C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C R1_VER_ENC = QF(LFV_PARA + OFVA_R1_ENC) R2_VER_ENC = QF(LFV_PARA + OFVA_R2_ENC) DR_VER_ENC1 = QF(LFV_PARA + OFVA_DR_ENC1) DR_VER_ENC2 = QF(LFV_PARA + OFVA_DR_ENC2) DZ_VER_ENC = QF(LFV_PARA + OFVA_DZ_ENC) DZ_VER_STRUT= QF(LFV_PARA + OFVA_DVISL+2) !temp: use ladder length R_VER_STRUT = QF(LFV_PARA + OFVA_R_STRUT) DR_VER_STRUT= QF(LFV_PARA + OFVA_DR_STRUT) DZ_VER_ENDPL= QF(LFV_PARA + OFVA_DZ_ENDPL) MED_VER_ENC1= QF(LFV_PARA + OFVA_MED_ENC1) MED_VER_ENC2= QF(LFV_PARA + OFVA_MED_ENC2) MED_VER_STRUT=QF(LFV_PARA + OFVA_MED_STRUT) MED_VER_ENDPL=QF(LFV_PARA + OFVA_MED_ENDPL) C C 3 layers of the inner shell C NMED = MED_VER_ENC1 PAR_VTMP(1) = R1_VER_ENC - (2.0*DR_VER_ENC1 + DR_VER_ENC2/2.) PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC1 PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN1', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN1', 'SEEN', 1 ) CALL GSATT( 'VEN1', 'COLO', COLOR_VER ) C NMED = MED_VER_ENC2 PAR_VTMP(1) = PAR_VTMP(2) PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC2/2. PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN2', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN2', 'SEEN', 1 ) CALL GSATT( 'VEN2', 'COLO', COLOR_VER ) C NMED = MED_VER_ENC1 PAR_VTMP(1) = PAR_VTMP(2) PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC1 PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN3', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN3', 'SEEN', 1 ) CALL GSATT( 'VEN3', 'COLO', COLOR_VER ) C CALL GSPOS ( 'VEN1', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') CALL GSPOS ( 'VEN2', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') CALL GSPOS ( 'VEN3', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') C C 3 layers of the outer shell C NMED = MED_VER_ENC1 PAR_VTMP(1) = R2_VER_ENC PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC1 PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN4', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN4', 'SEEN', 1 ) CALL GSATT( 'VEN4', 'COLO', COLOR_VER ) C NMED = MED_VER_ENC2 PAR_VTMP(1) = PAR_VTMP(2) PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC2 PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN5', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN5', 'SEEN', 1 ) CALL GSATT( 'VEN5', 'COLO', COLOR_VER ) C NMED = MED_VER_ENC1 PAR_VTMP(1) = PAR_VTMP(2) PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_ENC1 PAR_VTMP(3) = DZ_VER_ENC CALL GSVOLU( 'VEN6', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VEN6', 'SEEN', 1 ) CALL GSATT( 'VEN6', 'COLO', COLOR_VER ) C CALL GSPOS ( 'VEN4', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') CALL GSPOS ( 'VEN5', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') CALL GSPOS ( 'VEN6', 1, 'VERT',0.,0.,0.,IROTNULL,'ONLY') C C 4 supporting tubes (one volume definition, positioned 4 times) C NMED = MED_VER_STRUT PAR_VTMP(1) = R_VER_STRUT PAR_VTMP(2) = PAR_VTMP(1) + DR_VER_STRUT PAR_VTMP(3) = DZ_VER_STRUT CALL GSVOLU( 'VSTR', 'TUBE', NMED, PAR_VTMP, 3, IVOLU ) CALL GSATT( 'VSTR', 'SEEN', 1 ) CALL GSATT( 'VSTR', 'COLO', COLOR_VER ) C POS_VTMP(1) = R_VER_STRUT + DR_VER_STRUT !outer radius POS_VTMP(2) = R2_VER_ENC**2 - 2.0*POS_VTMP(1)*R2_VER_ENC C IF ( POS_VTMP(2).LT.0 ) THEN WRITE ( 6,* ) ' VER_ENCL: Error in definition of struts' WRITE ( 6,* ) ' Radius of enclosure=',R2_VER_ENC, x ' must be a least twice as large' WRITE ( 6,* ) ' as outer radius of strut=',POS_VTMP(1), x ' -- struts not included in geometry' ELSE POS_VTMP(2) = SQRT(POS_VTMP(2)) POS_VTMP(3) = 0. CALL GSPOS ( 'VSTR', 1, 'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C POS_VTMP(1) = -POS_VTMP(1) CALL GSPOS ( 'VSTR', 2, 'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C POS_VTMP(2) = -POS_VTMP(2) CALL GSPOS ( 'VSTR', 3, 'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C POS_VTMP(1) = -POS_VTMP(1) CALL GSPOS ( 'VSTR', 4, 'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) END IF C C enclosure end-caps (define one volume, positioned twice) C NMED = MED_VER_ENDPL PAR_VTMP(1) = R1_VER_ENC PAR_VTMP(2) = R2_VER_ENC PAR_VTMP(3) = DZ_VER_ENDPL CALL GSVOLU ( 'VENP','TUBE',NMED,PAR_VTMP,3,IVOLU ) CALL GSATT ( 'VENP','SEEN',1 ) CALL GSATT ( 'VENP','COLO',COLOR_VER ) C POS_VTMP(1) = 0. POS_VTMP(2) = 0. POS_VTMP(3) = DZ_VER_ENC - DZ_VER_ENDPL CALL GSPOS ( 'VENP',1,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) POS_VTMP(3) = -POS_VTMP(3) CALL GSPOS ( 'VENP',2,'VERT',POS_VTMP(1),POS_VTMP(2), x POS_VTMP(3),IROTNULL,'ONLY' ) C RETURN END