C$Id: svx_fvtx.f,v 1.12 2009/04/22 04:29:05 youzy Exp $ C File name: svx_fvtx.f ( was previously part of svx.f) C -------------------- C C Original author: Hubert van Hecke, Dave Lee C Creation date: March, 2008 C C Purpose: Set up the Silicon Vertex Detector (FVTX) C C Revision History: code was lifted out of svx.f C C 16 Oct 08 HvH: fixed rotation matrices for placing si05-si12 disks. C 06 Nov 08 HvH: small move of SNCC after moving barrel supports C 04 Jan 11 HvH: Split disks into East and West halves. This is a major C reorganization C C===================================================================================== SUBROUTINE svx_fvtx implicit none #include "gugeom.inc" #include "gconst.inc" character*4 sil_name character*4 cag_name character*4 set_id /'SVX '/ ! Detector/hit set ID integer nbitsv(7) /7*8/ ! Bits to pack vol. copy # integer idtype /2001/ ! User def. detector type integer nwpa /500/ ! Init. size of HITS banks integer nwsa /500/ ! Init. size of DIGI banks integer iset, idet Character*4 namesw(9) /'HALL','SIEN','SICG', & 'SEWx','SCMy','SIzz','SIPq','SISq','SISI'/ integer sili_med_silicon /10/ ! Sensitive silicon nmed (nmat=50,Si) integer sili_med_silipass/11/ ! Non-sensitive silicon nmed (nmat=50,Si) integer sili_med_coldair /121/ ! Gas inside the SICG (cold air) integer sili_med_carbon /123/ ! carbon-carbon composite integer sili_med_passive /26/ ! Ladder passive nmed (nmat=09,Al) integer sili_med_honeycomb /125/ ! 1/4" honeycomb, .5mm c-c skin, Al core c Hit component names character*4 inrNMSH(21) /'POSX','POSY','POSZ' ! Global positions & ,'DELE','TOFL' ! Energy loss & TOF & ,'P_ID','MOMX', 'MOMY', 'MOMZ' ! Particle ID & Entry mom. & ,'XILC','YILC','ZILC','XOLC','YOLC','ZOLC' ! Local entry & exit & ,'XIGL','YIGL','ZIGL','XOGL','YOGL','ZOGL'/ ! global entry & exit integer nhh /21/ ! Number of hit components integer*4 inrNBITSH(21) /21*32/ ! Bits for packing the hits c Default setting of offsets and gains real inrORIG(21) /3*1000.,3*0.,3*1000.,6*1000.,6*1000./ ! offsets real inrFACT(21) /3*100000.,1.E7,1.e12,1.0,3*100000. & ,6*100000.,6*100000./ ! These gains give: c - 0.1 keV energy deposition resolution c - 0.0001 mm position resolution c - 0.01 MeV/c momentum resolution integer ivol1, ii, i, j, k, l, irx(24), istation, & irstation, icopy, irot1, irot2, wedges, nmed, idisk, & icag, ivolu, irot3, irot4, ibgsm, half_cage, jdisk character*4 wedge_name, support_name, cage_name integer sili_endcap_layers /8/ ! 4 south, 4 north real stagger /0.0/ ! turn on endcap staggering in phi real stag_ang(20) /20*0.0/ ! small rotations of endcap planes real sili_endcap_z(8), panthk, rinner, routerb, routers, & support_thk, sens_off, chipwid, chiplen, chipthk, cstep, & dd, z_disk, stationzthick, deg, rad, alpha, beta, & pangle, wedge_thk, par(18), par_sisi_b(4), par_sisi_s(4), & par_s1(4), parb(9), pars(9), bwedge_lowx, bwedge_highx, & bwedge_len, swedge_lowx, swedge_highx, swedge_len, & bsil_lowx, bsil_highx, bsil_len, ssil_lowx, ssil_highx, & ssil_len, back_planthk, hdithk, silthk, bchipoff, schipoff, & bsic_lowx, bsic_highx, bsic_len, bsic_posx, bsic_posz, & ssic_lowx, ssic_highx, ssic_len, ssic_posx, ssic_posz, & sili_endcap_strip_on, back_lowx, back_highx,sback_lowx, & sback_highx integer itf_lun ! phnx(Sili).par logical unit common /interface/itf_lun ! in pisa core; namelist is read namelist /sili_endcap_par/ ! from there. & sili_endcap_layers, sili_endcap_z, panthk, stagger, wedges, & bwedge_lowx, bwedge_highx, bwedge_len, & swedge_lowx, swedge_highx, swedge_len, & bsil_lowx, bsil_highx, bsil_len, & ssil_lowx,ssil_highx,ssil_len,back_lowx,back_highx,sback_lowx, & sback_highx, & back_planthk, hdithk, silthk, chiplen, chipwid, chipthk, & bchipoff, schipoff, rinner, support_thk, & bsic_lowx, bsic_highx, bsic_len, bsic_posx, bsic_posz, & ssic_lowx, ssic_highx, ssic_len, ssic_posx, ssic_posz, & sili_endcap_strip_on c Copied from svx.f: c--- VTX Envelope/Cage parameters: Volumes SIEN(outer)/SICG(inner) c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Real sili_cg_rmn /2.2/ ! Inner cage radius, cm Real sili_cg_thck /0.5/ ! Cage wall thickness, cm Real sili_cg_inthck /0.2/ ! Thickness of the beam pipe ins., cm Real sili_cg_tempc /0.0/ ! Temperature inside the Cage, deg. C Integer sili_cg_npcon /6/ ! Number of corners for SIEN's PCON Real sili_cg_z(6) /6*0.0/ ! z-pos. of the Cage corners Real sili_cg_rmx(10)/10*0.0/ ! Outer SIEN radii at the corners, cm Real sili_cg_xdisp /0.0/ ! x-displacement of SIEN in HALL, cm Real sili_cg_ydisp /0.0/ ! y-displacement of SIEN in HALL, cm Real sili_cg_zdisp /0.0/ ! z-displacement of SIEN in HALL, cm real sili_cg_rinner ! part of fvtx cage definition real sili_cg_swedge_len ! '' note thet these are copied from real sili_cg_bwedge_len ! '' the endcap namelist. real sili_cg_support_thk ! '' Integer sili_endcap_config ! fvtx (1), ifvtx (2) or none (0) real fcg_z1, fcg_z2, fcg_z3, fcg_r1, fcg_r2, fcg_t, fcg_alpha, & fcg_sina, fcg_cosa, fcg_tana, fcg_z ! forward vertex cage variables namelist /sili_cg_par/ sili_cg_npcon,sili_cg_z & ,sili_cg_rmn,sili_cg_rmx,sili_cg_thck,sili_cg_inthck & ,sili_cg_xdisp,sili_cg_ydisp,sili_cg_zdisp & ,sili_cg_tempc, sili_cg_rinner, sili_cg_swedge_len, & sili_cg_bwedge_len, sili_cg_support_thk, & fcg_z1, fcg_z2, fcg_z3, fcg_r1, fcg_r2, fcg_t, fcg_z, & sili_endcap_config c ...End copied from svx.f real rotoff, ddb, dds *========================================================================================================================= rewind( unit = itf_lun ) read( itf_lun, nml = sili_endcap_par, err = 996 ) rewind( unit = itf_lun ) read( itf_lun, nml = sili_cg_par, err = 997 ) write (6,*)' SVX_FVTX.F:: installing split-disk endcaps' deg = 2*PI/360 ! To convert degrees into radians rad = 360/(2*PI) ! To convert radians into degrees pangle = (360/wedges) ! The total angle of each carbon panel rotoff = 2.366 ! common rotation of support disk if (stagger.gt.0.0) then stag_ang(1) = 0. ! staggering angle in +phi direction stag_ang(2) = 0.9375 ! 1x 360 / 96 / 4 stag_ang(3) = 1.8750 ! 2x stag_ang(4) = 2.8125 ! 3x stagger >0 PATTERN: elseif(stagger.lt.0.0) then stag_ang(1) = 0.9375 + rotoff ! staggering angle in +phi direction, stag_ang(2) = 1.8750 + rotoff ! changed to match midplane crossing page stag_ang(3) = 0.0000 + rotoff ! rotoff = 2.366 degrees stag_ang(4) = 2.8125 + rotoff endif c =========================================================== c Defining FVTX half-cage mother volumes. c =========================================================== c SCM*: FVTX / IFVTX cage mother: a PCON. Origin is that of SICG, shape is designed c to have a ~0.1 cm buffer outside SLCC and to accomodate the small radius FVTX disks c closest to the interaction region. -- A. Barron 7/14/2010 nmed = sili_med_coldair !rinner = 1.1 ! xxx pick up real value hvh par(1) = 0. ! This is the volume holding all of the South FVTX. The real par(2) = 360. ! function of this volume is to stop geant searches of the par(3) = 3 ! volume tree higher up, caused by the use of 'MANY' below. par(4) = +sili_cg_z(1) + sili_cg_thck par(5) = sili_cg_rinner - 0.1 par(6) = sili_cg_rmx(3) - sili_cg_thck par(7) = -(fcg_z2 - 0.05 + fcg_z) -0.5 ! z2 par(8) = sili_cg_rinner - 0.1 par(9) = sili_cg_rmx(3) - sili_cg_thck par(10) = -(fcg_z1 - 1.65 + fcg_z)+0.1 ! z1 par(11) = sili_cg_rinner - 0.1 routers = rinner + swedge_len par(12) = routers + 0.5 + 0.1 call gsvolu('SCMS','PCON', nmed, par, 12, ivol1) ! SCMS: call GSPOS('SCMS',1,'SICG', 0.0, 0.0, 0.0, irotnull,'ONLY') irot = irot+1 ! SCMN call gsrotm(irot,90., 0., 90.,270., 180.,0.) ! from scms: 180 about z, 180 around y call gsvolu('SCMN','PCON', nmed, par, 12, ivol1) ! SCMN: call GSPOS('SCMN',1,'SICG', 0.0, 0.0, 0.0, irot,'ONLY') par(1) = 45. ! take a bite out of the 'unused' side par(2) = 270. ! so we can see the orientation par(3) = 3 par(4) = -(fcg_z3 + 0.1 + fcg_z) ! z3, 0.1 cm outside SLCC z par(5) = sili_cg_rinner - 0.1 par(6) = fcg_r2 + 0.1 par(7) = -(fcg_z2 - 0.05 + fcg_z) ! z2 par(8) = sili_cg_rinner - 0.1 par(9) = fcg_r2 + 0.1 ! 0.1 cm larger than outer SLCC r par(10) = -(fcg_z1 - 1.65 + fcg_z) ! z1, accomodating Si disk width outside SLCC par(11) = sili_cg_rinner - 0.1 ! 0.1 cm smaller than Si disk mothers par(12) = routers +0.5 call gsvolu('SCM1','PCON',nmed,par,12,ivol1) ! SCM1: call GSPOS('SCM1',1,'SCMS', 0.0, 0.0, 0.0, irotnull,'MANY') irot = irot+1 ! SCM2: call gsrotm(irot,90.,180.,90.,270.,0.,0.) ! from scm1: 180 about z call gsvolu('SCM2','PCON',nmed,par,12,ivol1) call GSPOS('SCM2',1,'SCMS', 0.0, 0.0, 0.0, irot,'MANY') call gsvolu('SCM3','PCON',nmed,par,12,ivol1) call GSPOS('SCM3',1,'SCMN', 0.0, 0.0, 0.0, irotnull,'MANY') irot = irot+1 ! SCM4 call gsrotm(irot,90.,180.,90.,270.,0.,0.) ! from scm1: 180 about z call gsvolu('SCM4','PCON',nmed,par,12,ivol1) call GSPOS('SCM4',1,'SCMN',0.0, 0.0, 0.0, irot,'MANY') call gsatt('SCM1','SEEN',1) call gsatt('SCM2','SEEN',1) call gsatt('SCM3','SEEN',1) call gsatt('SCM4','SEEN',1) Call GSATT('SCM1','COLO', 3) ! 3 = green Call GSATT('SCM2','COLO', 3) Call GSATT('SCM3','COLO', 3) Call GSATT('SCM4','COLO', 3) c =========================================================== c Defining FVTX / IFVTX carbon cages c =========================================================== c FVTX / IFVTX cage: a PCON. What is given is the z,r of the 'outer 3 corners' c of the volume, plus the thickness. Everything else is derived. HvH may 08 c nmed = sili_med_honeycomb fcg_alpha = atan2( fcg_r2-fcg_r1, fcg_z2-fcg_z1) fcg_sina = sin(fcg_alpha) fcg_cosa = cos(fcg_alpha) fcg_tana = tan(fcg_alpha) c place cages in each cage mother - SLC1 par(1) = 90. par(2) = 180. par(3) = 5 par(4) = -fcg_z1 ! 1 par(5) = fcg_r1 par(6) = fcg_r1 par(7) = -(fcg_z1+fcg_t/fcg_sina) ! 2 par(8) = fcg_r1 par(9) = fcg_r1+fcg_t/fcg_cosa par(10) = -fcg_z2 ! 3 par(11) = fcg_r2-fcg_t/fcg_cosa par(12) = fcg_r2 par(13) = -(fcg_z2+fcg_t/fcg_tana) ! 4 par(14) = fcg_r2-fcg_t par(15) = fcg_r2 par(16) = -fcg_z3 ! 5 par(17) = fcg_r2-fcg_t par(18) = fcg_r2 call gsvolu('SLC1','PCON',nmed,par,18,ivol1) call GSPOS('SLC1',1,'SCM1', 0.0, 0.0, -fcg_z, & irotnull,'MANY') call GSPOS('SLC1',2,'SCM2', 0.0, 0.0, -fcg_z, & irotnull,'MANY') call GSPOS('SLC1',3,'SCM3', 0.0, 0.0, -fcg_z, & irotnull,'MANY') call GSPOS('SLC1',4,'SCM4', 0.0, 0.0, -fcg_z, & irotnull,'MANY') call gsatt('SLC1','SEEN',1) Call GSATT('SLC1','COLO', 4) c C (1) This is the big wedge mother panel. Wedge mother volume contains the carbon back plane, c the HDI, the silicon sensor, and the 13 x 2 chips in mother volume SCHM wedge_thk=silthk+back_planthk+hdithk PAR(1) = bwedge_lowx/2 ! half length along x at -z PAR(2) = bwedge_highx/2 ! half length along x at +z PAR(3) = (wedge_thk)/2 ! half thickness (y) PAR(4) = bwedge_len/2 ! half length along z CALL GSVOLU( 'SIPB', 'TRD1 ', sili_med_coldair, PAR, 4, IVOL1) c c Wedge Back Plane c PAR(1) = back_lowx/2 ! This is wedge carbon back plane inside SIPB PAR(2) = back_highx/2 PAR(3) = back_planthk/2 PAR(4) = bwedge_len/2 CALL GSVOLU( 'SICB', 'TRD1 ', sili_med_carbon, PAR, 4, IVOL1) c c The HDI c PAR(1) = bwedge_lowx/2 ! This is wedge HDI inside SIPB PAR(2) = bwedge_highx/2 PAR(3) = hdithk/2 PAR(4) = bwedge_len/2 CALL GSVOLU( 'HDIB', 'TRD1 ', sili_med_carbon, PAR, 4, IVOL1) call gsatt ( 'HDIB', 'COLO', 3) ! HDI is green c c Silicon Sensor from 6" wafer c PAR(1) = bsil_lowx/2 ! This is a silicon sensor in SIPB, including dead area PAR(2) = bsil_highx/2 ! PAR(3) = silthk/2 PAR(4) = bsil_len/2 CALL GSVOLU( 'SISB', 'TRD1 ', sili_med_silipass, PAR, 4, IVOL1) call gsatt ( 'SISB','COLO',6) ! silicon is magenta c c Silicon sensor active volume c PAR_sisi_b(1) = bsic_lowx/2 ! This is a silicon sensor column in SISB PAR_sisi_b(2) = bsic_highx/2 ! PAR_sisi_b(3) = silthk/2 PAR_sisi_b(4) = bsic_len/2 CALL GSVOLU( 'SISI', 'TRD1 ', sili_med_silicon, ! big sensitive silicon & PAR_sisi_b, 0, IVOL1) ! 0 parameters - POSP later CALL GSATT( 'SISI', 'WORK', 1) ! make volume sensitive call gsatt( 'SISI','COLO',6) ! silicon is magenta if (sili_endcap_strip_on.eq.1) then CALL GSDVT( 'STRP', 'SISI', 0.0075, 3, sili_med_silicon, 255) ! divide a sensitive silicon into 75micron strips endif c Small Disk wedges C (1) This is the small wedge mother panel. Wedge mother volume contains the carbon back plane, c the HDI, the silicon sensor, and the 5 x 2 chips in mother volume SCHM PAR(1) = swedge_lowx/2 ! half length along x at -z PAR(2) = swedge_highx/2 ! half length along x at +z PAR(3) = (wedge_thk)/2 ! half thickness (y) PAR(4) = swedge_len/2 ! half length along z CALL GSVOLU( 'SIPS', 'TRD1 ', sili_med_coldair, PAR, 4, IVOL1) c c Wedge Back Plane c PAR(1) = sback_lowx/2 ! This is wedge carbon back plane inside PAR(2) = sback_highx/2 ! SIPS PAR(3) = back_planthk/2 PAR(4) = swedge_len/2 CALL GSVOLU( 'SICS', 'TRD1 ', sili_med_carbon, PAR, 4, IVOL1) c c The HDI c PAR(1) = swedge_lowx/2 ! This is wedge HDI inside SIPS PAR(2) = swedge_highx/2 PAR(3) = hdithk/2 PAR(4) = swedge_len/2 CALL GSVOLU( 'HDIS', 'TRD1 ', sili_med_carbon, PAR, 4, IVOL1) c c Silicon Sensor from 6" wafer c PAR_s1(1) = ssil_lowx/2 ! This is a silicon sensor SIPS PAR_s1(2) = ssil_highx/2 ! PAR_s1(3) = silthk/2 PAR_s1(4) = ssil_len/2 CALL GSVOLU('SISS','TRD1', sili_med_silipass, PAR_s1, 4, IVOL1) ! 0 parameters c c Silicon sensor active volume c PAR_sisi_s(1) = ssic_lowx/2 ! This is a silicon sensor in SISS PAR_sisi_s(2) = ssic_highx/2 ! PAR_sisi_s(3) = silthk/2 PAR_sisi_s(4) = ssic_len/2 c c FPHX chips c FPHX big Mother volume first, contains 13 FPHX chips c PAR(1) = chipwid/2 ! This is one row of readout chips inside SIPB PAR(2) = silthk/2 PAR(3) = .96*13./2 CALL GSVOLU( 'CHMR', 'BOX ', sili_med_silipass, PAR, 3, IVOL1) ! c c FPHX small Mother volume first, contains 5 FPHX chips c PAR(1) = chipwid/2 ! This is one row of readout chips inside SIPS PAR(2) = silthk/2 PAR(3) = .96*5./2 CALL GSVOLU( 'CHMS', 'BOX ', sili_med_silipass, PAR, 3, IVOL1) ! c c Now we need four support plates for disks c Big half-disk support plate routerb = rinner + bwedge_len parb( 1) = -90 !- 2.68 ! 2.68 = rotation from the support disk to HDI @ midplane parb( 2) = 180 parb( 3) = 2 parb( 4) = -support_thk/2. parb( 5) = rinner ! inner radius parb( 6) = routerb ! outer radius for station 2,3,4 parb( 7) = support_thk/2. parb( 8) = rinner parb( 9) = routerb CALL GSVOLU('SUPB','PCON',sili_med_honeycomb,parb, 9,ivolu) c small support plate cxx routers = rinner + swedge_len pars( 1) = -90 !- 2.029 ! 2.029 = rotation from the support disk to HDI @ midplane pars( 2) = 180 pars( 3) = 2 pars( 4) = -support_thk/2. pars( 5) = rinner ! inner radius pars( 6) = routers ! outer radius for station 1 pars( 7) = support_thk/2. pars( 8) = rinner pars( 9) = routers CALL GSVOLU('SUPS','PCON',sili_med_honeycomb,pars, 9,ivolu) c c Disk mother volume to hold Wedges and support plate c stationzthick=support_thk+wedge_thk*2.+hdithk*2.+silthk*2.+1. parb(1) = 257 ! leave a 158-degree bite out of the 'unused' side parb(2) = 202 parb(3) = 2 parb(4) = -stationzthick/2. ! parb(5) = rinner ! inner radius parb(6) = routerb +.5 ! outer radius for station 2,3,4 parb(7) = stationzthick/2. ! parb(8) = rinner ! inner radius parb(9) = routerb +.5 ! outer radius for station 2,3,4 pars(1) = parb(1) ! leave 110 out pars(2) = parb(2) pars(3) = parb(3) pars(4) = parb(4) ! pars(5) = parb(5) ! inner radius pars(6) = routers +.5 ! outer radius for station 1 pars(7) = parb(7) ! pars(8) = parb(8) ! inner radius pars(9) = routers +.5 ! outer radius for station 1 c SCM2 West SCM4 c +-------------\ /------------+ c | si06 08 10 \ / 16 18 20 | c | 12 14 | c South +--------------- --------------+ North c | 11 13 | c | 05 07 09 / \ 15 17 19 | c +-------------/ \------------+ c SCM1 East SCM3 do idisk=5,20 ! define 16 copies SI05 - SI20 write (sil_name, '(''SI'',I2.2)') idisk if (idisk.ge.11 .and. idisk.le.14) then ! small disks CALL GSVOLU(sil_name,'PCON',sili_med_coldair,pars, 9,ivolu) ! small half-disks else ! big disks CALL GSVOLU(sil_name,'PCON',sili_med_coldair,parb, 9,ivolu) !large half-disks endif enddo c================= now build the big wedge ======================= c position backplane,HDI,sensor and chip mother volume in wedge c irot=irot+1 irot1 = irot irot=irot+1 irot2 = irot sens_off=(bwedge_len-bsil_len)/2. CALL GSROTM(irot1,93.75,0.,90.,90.,3.75,0.) CALL GSROTM(irot2,90.-3.75,0.,90.,90.,-3.75,0.) panthk=back_planthk CALL GSPOS('SICB',1,'SIPB',0., ! carbon support & -wedge_thk/2.+panthk/2.,0.,irotnull,'ONLY') CALL GSPOS('HDIB',1,'SIPB',0., ! HDI & -wedge_thk/2.+panthk+hdithk/2.,0.,irotnull,'ONLY') CALL GSPOS('SISB',1,'SIPB',0., ! all silicon & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irotnull,'ONLY') irot=irot+1 irot3 = irot irot=irot+1 irot4 = irot CALL GSROTM(irot3,88.125,0.,90.,90.,1.875,180.) CALL GSROTM(irot4,91.875,0.,90.,90.,1.875,0.) CALL GSPOSP('SISI',1,'SISB',-bsic_posx,0.,bsic_posz, & irot3,'ONLY',par_sisi_b,4) CALL GSPOSP('SISI',2,'SISB',bsic_posx,0.,bsic_posz, & irot4,'ONLY',par_sisi_b,4) CALL GSPOS('CHMR',1,'SIPB', bchipoff, ! readout chips & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irot1,'ONLY') CALL GSPOS('CHMR',2,'SIPB', -bchipoff, ! readout chips & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irot2,'ONLY') c================= now build the small wedge ======================= c position backplane,HDI,sensor and chip mother volume in wedge c CALL GSPOS('SICS',1,'SIPS',0., & -wedge_thk/2.+panthk/2.,0.,irotnull,'ONLY') CALL GSPOS('HDIS',1,'SIPS',0., & -wedge_thk/2.+panthk+hdithk/2.,0.,irotnull,'ONLY') CALL GSPOS('SISS',1,'SIPS',0., & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irotnull,'ONLY') CALL GSPOSP('SISI',3,'SISS',-ssic_posx,0.,ssic_posz, & irot3,'ONLY',par_sisi_s,4) CALL GSPOSP('SISI',4,'SISS',ssic_posx,0.,ssic_posz, & irot4,'ONLY',par_sisi_s,4) CALL GSPOS('CHMS',1,'SIPS', schipoff, & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irot1,'ONLY') CALL GSPOS('CHMS',2,'SIPS', -schipoff, & -wedge_thk/2.+panthk+hdithk+silthk/2.,sens_off,irot2,'ONLY') C================= Position the detectors ======================c dds = rinner + (routers-rinner)/2 ddb = rinner + (routerb-rinner)/2 do idisk = 5,20 ! 5-20 ! Place (half-)disks: loop south to north, east - west write (sil_name, '(''SI'',I2.2)') idisk ! SI05, SI06 ... SI20 if (mod(idisk,2) .eq. 1) then ! placement of odd # disk mothers (=East) if (idisk.le.11) then ! 5,7,9,11 SE quadrant cag_name = "SCM1" else ! 13,15,17,19 NE cag_name = "SCM3" endif else ! place even # disk mothers (West halves) if (idisk.le.12) then cag_name = "SCM2" ! 6,8,10,12 SW else cag_name = "SCM4" ! 14 16 18 20 NW endif endif istation = idisk ! south 5-12 if (idisk.gt.12) istation = 25 - idisk ! map north 13-20 into 5-12 istation = 1 + (istation-5)/2 ! transform 5-12 into 4-1 z_disk = sili_endcap_z(istation) ! z from par file irot = irot + 1 call gsrotm(irot,90.,180.-stag_ang(istation), & 90.,270.-stag_ang(istation),0.,0.) ! 180deg + delta about z CALL GSPOS (sil_name, 1, cag_name, ! Place this disk & 0., 0., z_disk , irot, 'MANY') ! z = -zdist+(idisk-5)*zsep+halfzc c Position support disks: if (idisk.ge.11 .and. idisk.le.14) then ! 11,12,13,14 = small wedge parameters: wedge_name = 'SIPS' support_name = 'SUPS' ! small support panel dd = rinner + (routers-rinner)/2 ! center distance else ! big wedge parameters: wedge_name = 'SIPB' ! big wedge name support_name = 'SUPB' dd = rinner + (routerb-rinner)/2 endif CALL GSPOS (support_name, idisk-4, sil_name, ! Place this support disk & 0., 0., 0., irotnull, 'MANY') c Now fill them with wedges: if (idisk.ge.11 .and. idisk.le.14) then ! Unfortunately, station 1 module staggering ibgsm = -1 ! small wedges ! is different from stations 2,3,4, and this else ! affects the offsets and the rotations. ibgsm = +1 ! big wedges ! I use ibgsm = +-1 to do the switching. endif ! ! do i = 0, 23 ! loop over wedges-1 (0-23) if (mod(i+1,4).eq.1)then ! make the z-offset 0.9 or 0.49 mm, cstep = 0.29 - ibgsm*0.20 ! depending on big or small module. else if (mod(i+1,4).eq.2)then cstep = 0.29 + ibgsm*0.20 else if (mod(i+1,4).eq.3)then cstep = 0.29 + ibgsm*0.20 else if (mod(i+1,4).eq.0)then cstep = 0.29 - ibgsm*0.20 endif alpha = 360.*i/wedges ! beta=0 means the centerline of si#1 is on the supp edge. beta = 3.20 + 2.322 ! 3.20 is the angle which puts the top corner of the top ! Silicon SISB (which contains SISI) on the edge of the ! support plane SUPB. ! 2.322 is the angle between SUPB and SISB if( mod(i,2).eq.1 ) then ! odd irot = irot+1 call gsrotm(irot, 90.0, 0.0-alpha-beta, & 180.0, 0.0, & 90.0, 90.0-alpha-beta) else ! even irot = irot+1 call gsrotm(irot, 90.0, 180.0-alpha-beta, & 0.0, 0.0, & 90.0, 90.0-alpha-beta) endif ! place wedges in disks, 'MANY' !!! CALL GSPOS (wedge_name , i+1, sil_name , & dd*sin(2*PI*(i)/wedges +deg*beta), & dd*cos(2*PI*(i)/wedges +deg*beta), & (support_thk/2. +wedge_thk/2.+cstep)*(-1)**i, & irot, 'ONLY') ! was MANY enddo ! loop over modules enddo ! loop over all half-disks *---------------------- ifvtx cables SNCC, SOCC: -------------------------------------* irot=irot+1 irot1 = irot CALL GSROTM(irot1,90.,0.,90.,270.,180.,0.) par(1) = (sili_endcap_z(6)-sili_endcap_z(5)-1.0)/2. ! between station 1 and station 2 par(2) = rinner + swedge_len+0.8 ! a half-cone par(3) = par(2) + hdithk par(4) = rinner + bwedge_len+0.8 !+0.6 par(5) = par(4) + hdithk par(6) = 91.0 par(7) = 269.0 nmed = sili_med_passive Call GSVOLU('SNCC','CONS',nmed,PAR,7,IVOL1) ! Now a tapered cone for FVTX cables - parb(1) = (sili_endcap_z(8)-sili_endcap_z(6)+.9)/2. ! between station 2 and station 4 parb(2) = rinner + bwedge_len+0.7 parb(3) = parb(2) + hdithk*2. parb(4) = rinner + bwedge_len+0.7 parb(5) = parb(4) + hdithk*4. parb(6) = 91.0 parb(7) = 269.0 nmed = sili_med_passive Call GSVOLU('SOCC','CONS',nmed,parb,7,IVOL1) do i=1,4 ! place in each of the 4 cages SCM1-4 write (cage_name,'(''SCM'',i1)') i call GSPOS('SNCC', i, cage_name, 0., 0., & -sili_endcap_z(5)-par(1)+0.01, irot1, 'ONLY') call GSPOS('SOCC', i, cage_name, 0., 0., & -sili_endcap_z(6)-parb(1)+.9, irot1, 'ONLY') enddo call gsatt('SNCC','SEEN',1) call GSATT('SNCC','COLO',4) call gsatt('SOCC','SEEN',1) call GSATT('SOCC','COLO',4) *================= make disks part of set SVX ====================* * namesw = HALL, SIEN, SICG, SCMx, SCMy, SIzz, SIPu, SISv, SISI, c where x=N-S, yy=1-4, zz=05-12, u = B-S, v=B-S c SCM2 West SCM4 c +-------------\ /------------+ c | si06 08 10 \ / 16 18 20 | c | 12 14 | c South +--------------- --------------+ North c | 11 13 | c | 05 07 09 / \ 15 17 19 | c +-------------/ \------------+ c SCM1 East SCM3 do half_cage=1,4 ! namesw(4) = 'SCMN' if ( half_cage.le.2 ) namesw(4) = 'SCMS' do jdisk = 0,6,2 ! 0 2 4 6 idisk = ((half_cage-1)/2)*8+5 + & mod(half_cage-1,2) + jdisk write (namesw(5),'(''SCM'',I1.1)') half_cage write (namesw(6),'(''SI'',I2.2)') idisk namesw(7) = 'SIPB' namesw(8) = 'SISB' if (idisk.ge.11 .and. idisk.le. 14) then namesw(7) = 'SIPS' namesw(8) = 'SISS' endif namesw(9) = 'SISI' c write (6,*)"*** NAMESW *** ",(namesw(i),' ',i=1,8) call gsdet (set_id, namesw(6), 9, namesw, nbitsv, idtype, & nwpa, nwsa, iset, idet) call gsdeth(set_id, namesw(6), nhh,inrNMSH,inrNBITSH, & inrORIG,inrFACT) enddo enddo *---- Hide some of the volumes, and set colors ----------------------* do idisk = 5,20 ! SI05, SI06 ... SI20 write (sil_name, '(''SI'',I2.2)') idisk call gsatt(sil_name, 'SEEN', 1) ! call gsatt(sil_name, 'COLO', 1) ! enddo CALL GSATT( 'SIPB', 'SEEN ', 0) ! big wedges in big stations CALL GSATT( 'SIPS', 'SEEN ', 0) ! small '' small '' CALL GSATT( 'SICB', 'SEEN ', 1) ! big carbon backplate CALL GSATT( 'HDIB', 'SEEN ', 1) ! big HDI CALL GSATT( 'SUPS', 'SEEN ', 1) ! small support plate CALL GSATT( 'SUPB', 'SEEN ', 1) ! BIG support plate CALL GSATT( 'SISB', 'SEEN ', 1) ! Big silicon CALL GSATT( 'SICS', 'SEEN ', 1) ! small carbon backplate CALL GSATT( 'HDIS', 'SEEN ', 1) ! small HDI CALL GSATT( 'SISS', 'SEEN ', 1) ! small silicon CALL GSATT( 'CHMR', 'SEEN ', 1) ! big readout chips CALL GSATT( 'CHMS', 'SEEN ', 1) ! small readout chips ! Add color to individual pieces CALL GSATT( 'SICB', 'COLO', 1) ! 1=black 2=red 5=yellow 8=white CALL GSATT( 'SICS', 'COLO', 1) ! 6=magenta CALL GSATT( 'SUPB', 'COLO', 2) ! 7=lightblue CALL GSATT( 'SUPS', 'COLO', 2) ! 8=white call GSATT( 'HDIS', 'COLO', 3) ! HDI is green call GSATT( 'SISS', 'COLO', 6) ! silicon is magenta call GSATT( 'SISI', 'COLO', 6) ! silicon is magenta call GSATT( 'CHMR', 'COLO', 4) ! readout chips are blue call GSATT( 'CHMS', 'COLO', 4) ! readout chips are blue if (sili_endcap_strip_on.eq.1) then CALL GSATT( 'STRP', 'SEEN ', 0) ! strips call GSATT( 'STRP', 'COLO', 7) ! readout chips are cyan endif return ! from subroutine svx_fvtx 996 stop 'FVTX - read error in sili_fvtx_par segment.' 997 stop 'FVTX - read error in sili_cg_par segment.' end ! end of subroutine svx_fvtx c=============================================================================c