*CMZ : 2.04/00 23/11/94 14.21.30 by Charles F. Maguire *CMZU: 2.03/00 13/08/93 10.42.26 by John P. Sullivan *CMZ : 2.00/00 30/09/92 13.51.40 by Charles F. Maguire *-- Author : C ============================================================ Subroutine VER(FULL,NH) C ============================================================ C C Description:- C ============= C This subroutine defines the geometry for the silicon C vertex detector. C C Author:- C ======== C JHK C C Creation Date: 17-Apr-1992 C =========================== C C Revisions:- C =========== C Date Name Description C ---- ---- ---------------------------------------- C 5-22-92 TKH Renamed include file GCONST.INC to C lower case gconst.inc C C 5-22-92 TKH Moved data statements BEYOND all declarations C (i.e. VERY last thing before executables). C Listings in older, more logical positions C are retained behind comment marks. c 9/28/92 JHK make compatible with the PISA Release 2 C C 12/16/92 JPS make the detector cover the full azimuth. C This involved adding loops from 1 to NPH_SEGS C when positioning the active elements, the C electronics, and the rhoacell support -- 3 loops. C The number of rotation matrices defined was reduced C in the process since there are only 6 different C ones used. C 12/17/92 JPS replace namelist input parameter SV1PH (real) C with NPH_SEGS -- allowing the user to define C the number of phi segments (6=full coverage) C in the vertex detector. This required changing C the corresponding variable in the phnx.par file. C SV1PH remains, as before, the azimuthal angle of C the first ladder. C C 3/17/93 JPS Change geometry to be more like the version in the CDR C including arranging the electronics packages to be C in a radial orientation relative to be beam. C In the process some comments were added and some old code C which was commented out was removed. Also, move the code to C save the geometric parameters into subroutine VER_PARS. C Previously, but the geometry of the rhoacell support C was calculated from the detector geometry of the detectors C after the parameters had been saved -- therefore the C rhoacell support geometry was not stored in the output C zebra bank. C C 1/4/94 JPS Add MVD enclosure and mother board for (MVD) pad detectors. C C 7/28/94 JPS Use the FULL input variable instead of CVOLU_OPT(1,1), C add more calling parameters to VER_PADS in order to define hits C for pads, pass position of MVD center to VER_PARS. C 5/8/94 JPS Add call to VERMATDEF which defines materials for MVD. C C 1/2/96 JPS Put in some changes which I had been testing C (21 Mar 95) in the cmz version of this code. The C plena around the electronics are now included (for C cooling air) and individual mcm chips are positioned C rather than a single large block which previously C approximated all the MCM's in each ladder. Also put C in commented out code to put in the cables. This code C caused the code to crash before, but I do not know C why. C C 2/1/96 JPS Moved code which defines the electronics and associated C cooling plenum into subroutine VER_PLEN. Also, add the C code which defines the kapton cables which go from C the detector wafers to the MCM's. c c 2/7/96 CFM Put in continuation line for VER_SIZ_CAB4(3) c evaluation; original line went beyond column 72 C C Arguments:- C =========== C FULL = "FULL" if the hits are turned "on" C NH = expected number of elements per hit -- VNH is the number C of hit elements defined internally. The smaller of the two C is used. C C Implicit inputs, outputs, side effects:- C ======================================== C C Called by: GUGEOM C Calls : GSVOLU, GSATT, GSPOS, GSROTM, GSDET, GSDETH, C VER_PARS, VER_PLEN, VER_FRAM, VER_ENCL, VER_PADS, C VERMATDEF C Side effects: Numerous changes to Geant's GEOM, HITS, JMATE banks. C C Global Specifications:- C ======================= IMPLICIT NONE C C GUPHNX contains "variables of general interest", data-card defs, flags. C+CDE,GUPHNX. C *KEEP,GUGEOM. include 'gugeom.inc' *KEEP,GCUNIT. include 'gcunit.inc' *KEND. C *KEEP,FSTORE. include 'fstore.inc' *KEEP,SUBLINK. include 'sublink.inc' *KEEP,FPVLINK. include 'fpvlink.inc' *KEND. C +CDE,GCONST. C C External Specifications:- C ========================= C None C C Local Specifications:- C ====================== REAL VER_DELPHI ! delta phi between ladders (deg) INTEGER IROT0 ! save initial rotation matrix # INTEGER NENDS ! # wafers on each end of top, outer layer PARAMETER (VER_DELPHI= 60.) C C Following contains the geometry data for the silicon vertex C detector C C Vertex detector has NPH_SEGS (an input parameter) ladders each C covering approximately 60 degrees in azimuthal angle. C The first of the ladders (here defined as one inner detector C plane, one outer detector plane, a rhoacell support structure C to hold then, and an electronics plane which is oriented radially C and appears near the outer detector plane) is at iazimuthal angle C SV1PH (an input parameter). Additional ladders appear at angles C SV1PH + (I-1)*VER_DELPHI, where VER_DELPHI is 60 degrees ("hardwired" C into this subroutine). C C Y-axis C /|\ C | C ------------------ :Azimuthal angle is 90 degree C /|\ \ :for the first ladder in this C (VOSLR)| \ :case. Two ladders are shown. C | \ C ----+---- \ C /|\ \ \ C (VISLR)| \ \ C | \ \ C X-axis <-------------+ C (Beam) C C C C Following is the local coordinate convention in each ladder: C C C X-axis (Detector thickness, toward beam) C Strip direction / C | Y-axis / C \|/ /|\ / C +-----------------+-----------------+ C | | | | / | C | | | |/ | C | | | o-----------------------> Z-axis C | | | |(same as beam direction) C | | | | C +-----------------------------------+ C 1st wafer C C C The electronics planes are described similarly to the Si C detector planes, but their thickness is defined as being in C the y dimension instead of x C C C Following support structure(Rohacell) is in between inner C and outer layers: C C Z-axis C /|\ C ---------------------------- C ---------------------------- C \ \ | / / C \ \ | / / C \ \ o--------/-/-------> X-axis C \ \ / / C \ \ / / C ----------------- C ----------------- C C*************************************************************************** C C--> Define dimensions of silicon strip ladders: C REAL DVISL(3) ! Box with X, Y, Z REAL DVOSL(3) ! Box with X, Y, Z C C--> Define dimensions of two different types of wafers: C REAL DVWR1(3) ! Box with X, Y, Z REAL DVWR2(3) ! Box with X, Y, Z INTEGER NWHOLE ! Number of wafers left out in the middle ! of the top outer detector layers INTEGER NWPERP ! Number of wafers for perpendicular strips C C--> Define dimensions of sensitive volume (strips) inside the wafer: C REAL DVSL1(3) ! Box with X, Y, Z REAL DVSL2(3) ! Box with X, Y, Z REAL PITCH ! Read-out interval INTEGER NSTRIP ! Number of strips in the wafer C C--> Distance from the ladders to the beam axis: C REAL VISLR ! Radius for VISL REAL VOSLR ! Radius for VOSL C C--> Azimuthal angle to the middle of inner or outer panels: C REAL SV1PH ! For VISL_1 VOSL_1 INTEGER NPH_SEGS ! number of phi segments (ladders) C C-------------------------------------------------------------------------- C INTEGER COLOR_VER ! Color (visible/invisible) INTEGER MED_VER_SEN ! Silicon sensitive INTEGER MED_VER_INS ! Silicon insensitive INTEGER MED_VER_HE ! helium is default fill material C C======================================================================== C Following contains the parameters in the geant hit C structure for silicon vertex detector. C------------------------------------------------------------------------------- C CHARACTER*4 SET_ID !Set identifier: C INTEGER IDTYPE ! Detector type C INTEGER*4 NH ! set before call in gugeom INTEGER*4 NHH ! smaller of VNH and NH CHARACTER*4 FULL ! set before call in gugeom INTEGER VNH ! special NH for VER INTEGER IX_IX , IX_IY , IX_IZ , & IX_DE , IX_TF , IX_ID , & IX_PX , IX_PY , IX_PZ , IX_PL, IX_ET PARAMETER ( VNH = 11 ) ! number of elements per hit PARAMETER ( IX_IX = 1 ) !indices of entrance position PARAMETER ( IX_IY = 2 ) !in local coord. (cm) PARAMETER ( IX_IZ = 3 ) PARAMETER ( IX_DE = 4 ) !dE/dx (keV) PARAMETER ( IX_TF = 5 ) !TOF (ns) PARAMETER ( IX_ID = 6 ) !particle ID (GEANT) PARAMETER ( IX_PX = 7 ) !local momentum components PARAMETER ( IX_PY = 8 ) ! (GeV/c) PARAMETER ( IX_PZ = 9 ) ! PARAMETER ( IX_PL =10 ) !path length (cm) PARAMETER ( IX_ET =11 ) !Total energy (GeV) C c cfm: name change for special Vertex resolution factors and origins c REAL VFACT ( VNH ) ! Multiplier for hit elements REAL VORIG ( VNH ) ! Offset for each hit element INTEGER NBITSH_V( VNH ) ! # bits per element c c NAMESH is standardized in GUGEOM.INC C INTEGER NV ! Number of volume descriptors INTEGER NBITSV( 3 ) ! # of bits for each volume number INTEGER NWPA ! INTEGER NWSA ! INTEGER ISET ! GEANT's set identifier INTEGER IDET ! GEANT's det identifier C CHARACTER*4 NAMESV ( 3 ) ! Names for each volume descriptors C C======================================================================== C INTEGER IVOLU ! Error flag returned by GSVOLU INTEGER I ! Loop index INTEGER NMED ! Medium number C REAL RADIUS ! Perpendicular distance to beam axis REAL X,Y,Z ! Positioning coordinates REAL ANGLE ! Angle for rotation matrix C REAL VER_TH_CABL !thickness of kapton+copper cables INTEGER MED_VER_CABL REAL RCABLE REAL VER_POS_CAB1(3) REAL VER_POS_CAB2(3) REAL VER_POS_CAB3(3) REAL VER_POS_CAB4(3) REAL VER_SIZ_CAB1(3) REAL VER_SIZ_CAB2(3) REAL VER_SIZ_CAB3(3) REAL VER_SIZ_CAB4(3) C REAL VERSCIBOX(3) !size of test scintillator C DATA SET_ID / 'VER ' / C------------------------------------------------------------------------- C C--> Set offsets for zebra storage. Only positve #s can be stored. C So add largest expected neg number to number stored. It is subtracted C on fetch so user never sees it. C DATA VORIG( IX_IX ) / 80.0 / ! -80 cm X min (OK for ver) DATA VORIG( IX_IY ) / 80.0 / ! -80 cm Y min (OK for ver) DATA VORIG( IX_IZ ) / 80.0 / ! -80 cm Z min (OK for ver) DATA VORIG( IX_DE ) / 0.0 / ! DELE always > 0 DATA VORIG( IX_TF ) / 0.0 / ! TOF always > 0 DATA VORIG( IX_ID ) / 0.0 / ! P_ID always > 0 DATA VORIG( IX_PX ) / 500.0 / ! -500 GeV/c Px min DATA VORIG( IX_PY ) / 500.0 / ! -500 GeV/c Py min DATA VORIG( IX_PZ ) / 500.0 / ! -500 GeV/c Pz min DATA VORIG( IX_PL ) / 0.0 / ! Path length always > 0 DATA VORIG( IX_ET ) / 0.0 / ! Total energy always > 0 C C--> Set the factors for Hit storage. This determines the resolution C--> for hits inforamtion because these are stored as integers. Again C on fetching they are divided so it is transparent to user C DATA VFACT( IX_IX ) / 100000.0 / ! one-tenth micron resolution DATA VFACT( IX_IY ) / 100000.0 / ! one-tenth micron resolution DATA VFACT( IX_IZ ) / 100000.0 / ! one-tenth micron resolution DATA VFACT( IX_DE ) / 1.0E+7 / ! 0.1 keV resolution DATA VFACT( IX_TF ) / 100.0 / ! 10 picosecond timing DATA VFACT( IX_ID ) / 1. / ! IDs are integers DATA VFACT( IX_PX ) / 1000.0 / ! 1.0 MeV/c momentum resolution DATA VFACT( IX_PY ) / 1000.0 / ! 1.0 MeV/c momentum resolution DATA VFACT( IX_PZ ) / 1000.0 / ! 1.0 MeV/c momentum resolution DATA VFACT( IX_PL ) / 10000.0 / ! 1 micron path resolution DATA VFACT( IX_ET ) / 2000.0 / ! 0.5 MeV total energy resolution C C--> The max number of bits needed for any element of the hits array, C combined with the offset (VORIG which sets a minimum value) and C resolution (controlled by VFACT), this sets the maximum value of C any hit element. C DATA NBITSH_V( IX_IX ) / 24 / ! max x is about 80cm DATA NBITSH_V( IX_IY ) / 24 / ! max y is about 80cm DATA NBITSH_V( IX_IZ ) / 24 / ! max z is about 80cm DATA NBITSH_V( IX_DE ) / 20 / ! max dE is about 100MeV DATA NBITSH_V( IX_TF ) / 16 / ! max TOF is 640ns DATA NBITSH_V( IX_ID ) / 8 / ! max PID is 256 DATA NBITSH_V( IX_PX ) / 20 / ! max px is 500GeV DATA NBITSH_V( IX_PY ) / 20 / ! max py is 500GeV DATA NBITSH_V( IX_PZ ) / 20 / ! max pz is 500GeV DATA NBITSH_V( IX_PL ) / 20 / ! max path in detector is 5cm DATA NBITSH_V( IX_ET ) / 20 / ! 512GeV max C C------------------------------------------------------------------------- DATA NWPA, NWSA/ 1000, 1000 / DATA NBITSV/ 3, 6, 3 / C C------------------------------------------------------------------------- C C Executable Statements:- C ======================= C C Read the vertex geometry parameters and save them in a Zebra bank. C CALL VER_PARS ( COLOR_VER,POS_VERT(3) ) C C------------------------------------------------------------------ C C--> Booking only when volume option was chosen for this detector 'VER' C IF (FULL.NE.'FULL' .AND. & FULL.NE.'VOLS') THEN RETURN ENDIF C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C Extract the relavant material codes from the Zebra bank C MED_VER_SEN = QF(LFV_PARA + OFVA_MED_SEN) MED_VER_INS = QF(LFV_PARA + OFVA_MED_INS) MED_VER_HE = QF(LFV_PARA + OFVA_MED_HE) C C Define tracking media (and some materials) used in the MVD: C CALL VERMATDEF C C C--> Define volumes for inner and outer ladders: C First define a big box, representing all the Si detectors C in a given layer and azimuthal segment. This is call "not C sensitive" Si at this point. When the detector chips are placed C inside these larger volumes, they are called "sensitive". C The sensitive volume is not necessarily as large as the C total volume (dead spaces at the edges). C DVISL(1) = QF(LFV_PARA + OFVA_DVISL) DVISL(2) = QF(LFV_PARA + OFVA_DVISL+1) DVISL(3) = QF(LFV_PARA + OFVA_DVISL+2) DVOSL(1) = QF(LFV_PARA + OFVA_DVOSL) DVOSL(2) = QF(LFV_PARA + OFVA_DVOSL+1) DVOSL(3) = QF(LFV_PARA + OFVA_DVOSL+2) C NMED = MED_VER_INS ! Silicon CALL GSVOLU( 'VISL', 'BOX ', NMED, DVISL, 3, IVOLU ) CALL GSATT ( 'VISL', 'SEEN', 1 ) CALL GSATT ( 'VISL', 'COLO', COLOR_VER ) CALL GSVOLU( 'VOSL', 'BOX ', NMED, DVOSL, 3, IVOLU ) CALL GSATT ( 'VOSL', 'SEEN', 1 ) CALL GSATT ( 'VOSL', 'COLO', COLOR_VER ) C C--> As of Nov 1993, there are two types of outer ladder, C the first type (above=VOSL=the only type in the previous C versions) will contain a full set of detector wafers. C The following new type (VOS2) will not have detector C wafers in the middle. Because the middle is empty space, C this volume is filled with He. Also, make this volume C "unseen" in the pictures to make it clear that it C has no material inside it. C NMED = MED_VER_HE CALL GSVOLU( 'VOS2', 'BOX ', NMED, DVOSL, 3, IVOLU ) CALL GSATT( 'VOS2', 'SEEN', 0 ) CALL GSATT( 'VOS2', 'COLO', COLOR_VER ) C C--> Define volumes for two different types of wafers: C DVWR1(1) = QF(LFV_PARA + OFVA_DVWR1) DVWR1(2) = QF(LFV_PARA + OFVA_DVWR1+1) DVWR1(3) = QF(LFV_PARA + OFVA_DVWR1+2) DVWR2(1) = QF(LFV_PARA + OFVA_DVWR2) DVWR2(2) = QF(LFV_PARA + OFVA_DVWR2+1) DVWR2(3) = QF(LFV_PARA + OFVA_DVWR2+2) C NMED = MED_VER_INS ! Silicon CALL GSVOLU( 'VWR1', 'BOX ', NMED, DVWR1, 3, IVOLU ) CALL GSATT ( 'VWR1', 'SEEN', 1 ) CALL GSATT ( 'VWR1', 'COLO', COLOR_VER ) CALL GSVOLU( 'VWR2', 'BOX ', NMED, DVWR2, 3, IVOLU ) CALL GSATT ( 'VWR2', 'SEEN', 1 ) CALL GSATT ( 'VWR2', 'COLO', COLOR_VER ) CALL GSVOLU( 'VWR3', 'BOX ', NMED, DVWR2, 3, IVOLU ) CALL GSATT ( 'VWR3', 'SEEN', 1 ) CALL GSATT ( 'VWR3', 'COLO', COLOR_VER ) C C--> Define sensitive volume inside the wafer: C PITCH = QF(LFV_PARA + OFVA_PITCH) NSTRIP = NINT(QF(LFV_PARA + OFVA_NSTRIP)) NMED = MED_VER_SEN ! Silicon (Sensitive) DVSL1(1) = DVWR1(1) DVSL1(2) = DVWR1(2) DVSL1(3) = FLOAT(NSTRIP)*PITCH/2. CALL GSVOLU( 'VSL1', 'BOX ', NMED, DVSL1, 3, IVOLU ) CALL GSATT ( 'VSL1', 'SEEN', 1 ) CALL GSATT ( 'VSL1', 'COLO', COLOR_VER ) CALL GSPOS ( 'VSL1', 1, 'VWR1', 0.0,0.0,0.0, 1, 'ONLY' ) C NMED = MED_VER_SEN ! Silicon (Sensitive) DVSL2(1) = DVWR2(1) DVSL2(2) = DVWR2(2) DVSL2(3) = FLOAT(NSTRIP)*PITCH/2. CALL GSVOLU( 'VSL2', 'BOX ', NMED, DVSL2, 3, IVOLU ) CALL GSATT ( 'VSL2', 'SEEN', 1 ) CALL GSATT ( 'VSL2', 'COLO', COLOR_VER ) CALL GSPOS ( 'VSL2', 1, 'VWR2', 0.0,0.0,0.0, 1, 'ONLY' ) C CALL GSVOLU( 'VSL3', 'BOX ', NMED, DVSL2, 3, IVOLU ) CALL GSATT ( 'VSL3', 'SEEN', 1 ) CALL GSATT ( 'VSL3', 'COLO', COLOR_VER ) CALL GSPOS ( 'VSL3', 1, 'VWR3', 0.0,0.0,0.0, 1, 'ONLY' ) C C--> Positioning these wafers into the volumes: C NWPERP = NINT(QF(LFV_PARA + OFVA_NWPERP)) DO I = 1, NWPERP Z = DVWR1(3) + FLOAT(I-1)*(2.*DVWR1(3)) - DVISL(3) CALL GSPOS ( 'VWR1', I, 'VISL', 0.0,0.0,Z, 1, 'ONLY' ) ENDDO DO I = 1, NWPERP Z = DVWR2(3) + FLOAT(I-1)*(2.*DVWR2(3)) - DVOSL(3) CALL GSPOS ( 'VWR2', I, 'VOSL', 0.0,0.0,Z, 1, 'ONLY' ) ENDDO C NWHOLE = NINT(QF(LFV_PARA + OFVA_NWHOLE)) NENDS = (NWPERP-NWHOLE)/2. !# wafers on each end DO I=1,NWPERP IF ( I.LE.NENDS .OR. I.GT.(NWPERP-NENDS) ) THEN Z = DVWR2(3) + FLOAT(I-1)*(2.*DVWR2(3)) - DVOSL(3) CALL GSPOS ( 'VWR3', I, 'VOS2', 0.0,0.0,Z, 1, 'ONLY' ) END IF END DO C C--> Position NPH_SEGS inner and outer ladders at a series of C phi values. In the process, NPH_SEGS new rotation matrices are C defined. Before starting, save the current rotation matrix C number. This is done to avoid redefining the same rotations C later in this subroutine when the electronics packages C are positioned. C NPH_SEGS = NINT(QF(LFV_PARA + OFVA_NPHSEG)) SV1PH = QF(LFV_PARA + OFVA_SV1PH) VISLR = QF(LFV_PARA + OFVA_VISLR) VOSLR = QF(LFV_PARA + OFVA_VOSLR) VER_TH_CABL = QF(LFV_PARA + OFVA_TH_CABL) MED_VER_CABL= NINT(QF(LFV_PARA + OFVA_MED_CABL)) C IROT0 = IROT DO I=1,NPH_SEGS C C--> inner layer (VISL #1-6): C ANGLE = SV1PH + (I-1)*VER_DELPHI C RADIUS = VISLR + DVISL(1) X = RADIUS * COSD(ANGLE) Y = RADIUS * SIND(ANGLE) C IROT = IROT + 1 CALL GSROTM( IROT, 90.0, ANGLE, 90.0, 90.0+ANGLE, 0.0,0.0 ) C CALL GSPOS ( 'VISL', I, 'VERT', X,Y,0.0, IROT,'ONLY' ) C C--> outer layer (VOSL #1-2, VOS2 #1-4): C RADIUS = VOSLR + DVOSL(1) X = RADIUS * COSD(ANGLE) Y = RADIUS * SIND(ANGLE) C C there are two kinds of outer ladder: C IF ( I.LE.2 ) THEN CALL GSPOS ( 'VOSL', I, 'VERT', X,Y,0.0, IROT,'ONLY' ) ELSE CALL GSPOS ( 'VOS2',I-2,'VERT', X,Y,0.0, IROT,'ONLY' ) END IF C C Now, put in some pieces of cable: C C Install those cable segments which lie flat on the surface C of a silicon layer. C IF ( I.EQ.1 ) THEN c c outer layer, on the bottom, 2 layers of cables on each end, c but no cables in the middle since these are the cables c from the layers above this one c RCABLE = VOSLR + 2.0*VER_TH_CABL + DVWR2(1)*4. VER_SIZ_CAB4(1) = VER_TH_CABL VER_SIZ_CAB4(2) = RCABLE*TAND(VER_DELPHI/2.) VER_SIZ_CAB4(3) = 0.5*DVOSL(3)*FLOAT(NWPERP-NWHOLE)/ + FLOAT(NWPERP) C VER_POS_CAB4(1) = -(RCABLE+VER_TH_CABL)*COSD(VER_DELPHI) VER_POS_CAB4(2) = -(RCABLE+VER_TH_CABL)*SIND(VER_DELPHI) VER_POS_CAB4(3) = DVOSL(3) - VER_SIZ_CAB4(3) C NMED = MED_VER_CABL CALL GSVOLU ( 'VCA4','BOX ', NMED, VER_SIZ_CAB4, 3, IVOLU ) C CALL GSATT ( 'VCA4', 'SEEN', 1 ) CALL GSATT ( 'VCA4', 'COLO', COLOR_VER ) CALL GSPOS ( 'VCA4', 1, 'VERT', VER_POS_CAB4(1), x VER_POS_CAB4(2), VER_POS_CAB4(3), x IROT, 'ONLY' ) C CALL GSPOS ( 'VCA4', 2, 'VERT', VER_POS_CAB4(1), x VER_POS_CAB4(2), -VER_POS_CAB4(3), x IROT, 'ONLY' ) C RCABLE = VISLR - 2.0*VER_TH_CABL - 2.0*DVWR1(1) VER_SIZ_CAB3(1) = VER_TH_CABL !double thickness VER_SIZ_CAB3(2) = RCABLE*TAND(VER_DELPHI/2.) VER_SIZ_CAB3(3) = DVOSL(3) C VER_POS_CAB3(1) =-(RCABLE+VER_TH_CABL)*COSD(VER_DELPHI) VER_POS_CAB3(2) =-(RCABLE+VER_TH_CABL)*SIND(VER_DELPHI) VER_POS_CAB3(3) = 0. C NMED = MED_VER_CABL CALL GSVOLU ( 'VCA3','BOX ',NMED,VER_SIZ_CAB3,3,IVOLU ) CALL GSATT ( 'VCA3', 'SEEN', 1 ) CALL GSATT ( 'VCA3', 'COLO', COLOR_VER ) C C CALL GSPOS ( 'VCA3', 1, 'VERT', VER_POS_CAB3(1), x VER_POS_CAB3(2), VER_POS_CAB3(3), x IROT, 'ONLY' ) C ELSE IF ( I.EQ.2 ) THEN CALL GSPOS ( 'VCA4', 3, 'VERT',-VER_POS_CAB4(1), x VER_POS_CAB4(2), VER_POS_CAB4(3), x IROT, 'ONLY' ) CALL GSPOS ( 'VCA4', 4, 'VERT',-VER_POS_CAB4(1), x VER_POS_CAB4(2), -VER_POS_CAB4(3), x IROT, 'ONLY' ) C CALL GSPOS ( 'VCA3', 2, 'VERT',-VER_POS_CAB3(1), x VER_POS_CAB3(2), VER_POS_CAB3(3), x IROT, 'ONLY' ) ELSE IF ( I.EQ.3 ) THEN RCABLE = VOSLR + VER_TH_CABL + DVWR2(1)*4. VER_SIZ_CAB1(1) = VER_TH_CABL/2. VER_SIZ_CAB1(2) = RCABLE*TAND(VER_DELPHI/2.) VER_SIZ_CAB1(3) = VER_SIZ_CAB4(3) C VER_POS_CAB1(1) = RCABLE + VER_TH_CABL/2. VER_POS_CAB1(2) = 0. VER_POS_CAB1(3) = VER_POS_CAB4(3) C NMED = MED_VER_CABL CALL GSVOLU ( 'VCA1','BOX ', NMED, VER_SIZ_CAB1, 3, IVOLU ) C CALL GSATT ( 'VCA1', 'SEEN', 1 ) CALL GSATT ( 'VCA1', 'COLO', COLOR_VER ) CALL GSPOS ( 'VCA1', 1, 'VERT', VER_POS_CAB1(1), x VER_POS_CAB1(2), VER_POS_CAB1(3), x IROT, 'ONLY' ) C CALL GSPOS ( 'VCA1', 2, 'VERT', VER_POS_CAB1(1), x VER_POS_CAB1(2), -VER_POS_CAB1(3), x IROT, 'ONLY' ) C RCABLE = VISLR - VER_TH_CABL - 2.0*DVWR1(1) VER_SIZ_CAB2(1) = VER_TH_CABL/2. VER_SIZ_CAB2(2) = RCABLE*TAND(VER_DELPHI/2.) VER_SIZ_CAB2(3) = DVOSL(3) C VER_POS_CAB2(1) = RCABLE + VER_TH_CABL/2. VER_POS_CAB2(2) = 0. VER_POS_CAB2(3) = 0. C NMED = MED_VER_CABL CALL GSVOLU ( 'VCA2', 'BOX ', NMED,VER_SIZ_CAB2,3,IVOLU) CALL GSATT ( 'VCA2', 'SEEN', 1 ) CALL GSATT ( 'VCA2', 'COLO', COLOR_VER ) C CALL GSPOS ( 'VCA2', 1, 'VERT', VER_POS_CAB2(1), x VER_POS_CAB2(2), VER_POS_CAB2(3), x IROT, 'ONLY' ) C ELSE IF ( I.EQ.6 ) THEN CALL GSPOS ( 'VCA1', 3, 'VERT',-VER_POS_CAB1(1), x VER_POS_CAB1(2), VER_POS_CAB1(3), x IROT, 'ONLY' ) C CALL GSPOS ( 'VCA1', 4, 'VERT',-VER_POS_CAB1(1), x VER_POS_CAB1(2), -VER_POS_CAB1(3), x IROT, 'ONLY' ) C CALL GSPOS ( 'VCA2', 2, 'VERT',-VER_POS_CAB2(1), x VER_POS_CAB2(2), VER_POS_CAB2(3), x IROT, 'ONLY' ) END IF C END DO C C------------------------------------------------------------------- C--> Book hit structure for the sensitive volumes: C------------------------------------------------------------------- C IF (FULL.EQ.'FULL') THEN ! check volume option NHH = MIN ( NH, VNH ) NV = 3 NAMESV(1) = 'VISL' NAMESV(2) = 'VWR1' NAMESV(3) = 'VSL1' IDTYPE = 3 CALL GSDET (SET_ID,'VSL1',NV, & NAMESV , NBITSV, & IDTYPE , NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,'VSL1',NHH, & NAMESH , NBITSH_V,VORIG,VFACT ) C NV = 3 NAMESV(1) = 'VOSL' NAMESV(2) = 'VWR2' NAMESV(3) = 'VSL2' IDTYPE = 3 CALL GSDET (SET_ID,'VSL2',NV, & NAMESV , NBITSV, & IDTYPE , NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,'VSL2',NHH, & NAMESH , NBITSH_V,VORIG,VFACT ) C NV = 3 NAMESV(1) = 'VOS2' NAMESV(2) = 'VWR3' NAMESV(3) = 'VSL3' IDTYPE = 3 CALL GSDET (SET_ID,'VSL3',NV, & NAMESV , NBITSV, & IDTYPE , NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,'VSL3',NHH, & NAMESH , NBITSH_V,VORIG,VFACT ) C ENDIF C C section for test scintillator: C NMED = 98 !scintillator VERSCIBOX(1) = 0.25 VERSCIBOX(2) = 2.5 ! should be 2.5 VERSCIBOX(3) = 2.5 ! should be 2.5 CALL GSVOLU( 'VSCI', 'BOX ', NMED, VERSCIBOX, 3, IVOLU ) CALL GSATT ( 'VSCI', 'SEEN', 1 ) CALL GSATT ( 'VSCI', 'COLO', 2 ) CALL GSPOS ( 'VSCI', 1, 'VERT', 30.25,0.0,0.0, 1, 'ONLY' ) IF (FULL.EQ.'FULL') THEN ! check volume option C NV = 1 NAMESV(1) = 'VSCI' IDTYPE = 3 CALL GSDET (SET_ID,'VSCI',NV,NAMESV,NBITSV,IDTYPE, & NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,'VSCI',NHH,NAMESH,NBITSH_V,VORIG,VFACT ) C ENDIF C C=========================================================================== C C--> Define volumes for the plena containing the electronics MCM's C CALL VER_PLEN ( COLOR_VER ) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C CALL VER_FRAM ( COLOR_VER, VER_DELPHI ) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C Create and position the enclosure C CALL VER_ENCL( COLOR_VER ) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C Motherboard for MVD endcap pads C CALL VER_PADS ( COLOR_VER, FULL, SET_ID, x NHH, NAMESH, NBITSH_V, VORIG, VFACT ) C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C RETURN END