C File name: svx.f ( was previously inr.f) C ---------------- C C Original author: Shaheen Tonse (LLNL) C Creation date: March 18, 1993 C C Purpose: Set up the Silicon Vertex Detector (SVX) C C Revision History: c """""""""""""""" C C.F. Maguire June 28, 2001 Convert to use for PHENIX upgrades group c c V. L. Rykov 26-Aug-2003: c 1) The vertex detector encloser ("envelope", cooling bag) c is introduced. c 2) For the barrel VTX, "plain" Si cylinders are replaced with c something more realistic (ladders and sensors). c 3) Set of hit components extended with the "wish list", but, c for the time being, only 8 the first components are stored. c 4) The gains for position resolution set for resolution 0.1 mkm. c V. L. Rykov 03-Sep-2003: c Using the full (extended) set for hit components. c V. L. Rykov 19-Feb-2004: c inrORIG & inrFACT adjusted for geting rid of the bad diagnostic c due to endcap, which still is not splitted into sensors. c V. L. Rykov 29-Mar-2004: c Fixed the bug in the passive layer definition. c V. L. Rykov 16-Apr-2004: c SVX cage and barrel parameters along with the sensor rotation c matrices and translation vestors are written into the c svxPISA.par file. c V. L. Rykov 21-Apr-2004: c Fixed some strange volume interference of SVX & MUI first c reported by Hua Pei on 04/19/2004. c c Hubert van Hecke, Aug 2004: replaced endcap geometry with detailed lampshade c description from Gerd Kunde and xxx C c The tree structure for the barrel is: c HALL c | c SIEN (VTX Envelope/cage) c | c SICG (VTX cage inner surface) c | c ------------------------------------------------------------------------ c | | | | | | | | c SI01(1) SI01(2)... SI02(1) SI02(2) ... (B-ladders) SInn ... (EC-layers) c | | | c ------ ------ ------------------ c | |... | |... | | c SISN(1) SISN(2) ... (B-sensors) * *==================== The tree structure for the endcaps is: ============================ * * HALL * ( Single-letter vol names ) | * ( get prefix TRP, for example ) SIEN (VTX Envelope/Cage) * ( A -> TRPA ) | * SICG (VTX cage inner surface) * | * ++----------------------+----------++ * || || * SI05,9 SI06,7,8 - 10,11,12 * || || * +----+---++-------+----+ +----+---++--------+-----+---+ * | | | | | | | | | * C,D G,H O,P BOX1 A,B E,F M,N BOX1 BOX2 * | | | | * +---+--+ +-+--+ +------+ +------+ * | | | | | | | | * K*,L* CHP3,4 S*,T* CHP3,4 I*,J* CHP1,2 Q*,R* CHP1,2 * * SI06,07,08 are the big lampshades North * SI10,11,12 are the big lampshades South * SI05 and 9 are the small lampshades N and S * The *starred* volumes are sensitive silicon * *=====================================================================================* SUBROUTINE SVX(FULL,NH) C Implicit none C C--- Formal Argument Declarations C ---------------------------- c... Input (?): character*4 full ! set before call in gugeom C... Output: number of components of a hit integer*4 nh ! set before call in gugeom C C--- External Functions C ------------------ C C ================================================================ C--- Global Declarations C ================================================================ include 'guphnx.inc' include 'gclist.inc' include 'gconst.inc' include 'gcflag.inc' include 'gugeom.inc' include 'gcvolu.inc' C C need to access zebra to write parameters to FZOUT file C include 'fstore.inc' include 'sublink.inc' include 'fpdlink.inc' C C ================================================================ C--- Local declarations of the input data from phnx.par file C ================================================================ 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(10) /-40.0,-25.6,-13.0 ! z-pos. of the Cage corners: * ,13.0,25.6,40.0,4*0./ ! MUST: z(1)=0) or c ! sensor z-overlap (if <0), cm Real sili_br_tilt(20) /10.0,6.0 ! Ladder tilt in layers, deg. * ,5.5,5.0 * ,16*0./ Integer sili_br_nsn(20) /4,19*5/ ! Number of Si sensors/ladder Real sili_br_r(20) /2.5,6.,8.,10.,16*20./ ! Radial positions ... c ! (read carefully!!!) c ! of the center line, c ! x=y=0 (loca Si sensor c ! coordinates), of the Si c ! sensors in the layers Real sili_br_z(20) /20*0./ ! Z-pos. of the ladder centers in SICG Real sili_br_dphi(20) /29.40,29.40 ! Azim. spacing of ladders, deg. * ,22.87,18.71 * ,16*0./ Integer sili_br_nsec(20) /20*2/ ! Number of cont. phi-sections/layer Real sili_br_phic(5,20) /0.,180.,3*0. ! Sect. center azimuth pos. * ,0.,180.,3*0. * ,0.,180.,3*0. * ,0.,180.,3*0. * ,80*0./ Integer sili_br_nlad(5,20) /5*5 ! Number of ladders/phi-section * ,5*5 * ,5*7 * ,5*9 * ,80*1/ c ====================================================================== c The parameters between === are for the temporary fake support emulation c with "plain" discs introduced for accomodating the request of c some people. You are welcome to spread this brand new "artificial c butter" over your piece of bread. Just, please, do not eat it! - VR Integer sili_br_nspring /2/ ! Number of rings Real sili_br_spz(20) /-17.,17.,18*0./ ! Z-positions, cm Real sili_br_sprin(20) /20*2.4/ ! Inner radii, cm Real sili_br_sprout(20) /20*10./ ! Outer radii, cm Real sili_br_spthck(20) /20*0.25/ ! Half-hickness, cm c ====================================================================== namelist /sili_br_par/ sili_br_nlayers,sili_br_r,sili_br_z $ ,sili_br_nsn,sili_br_snhalfx,sili_br_snhalfy $ ,sili_br_snhalfz,sili_br_x0add,sili_br_snzgap $ ,sili_br_nsec,sili_br_nlad,sili_br_phic,sili_br_dphi $ ,sili_br_tilt $ ,sili_br_nspring,sili_br_spz,sili_br_sprin $ ,sili_br_sprout,sili_br_spthck c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&& To take care for the Endcap programer &&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c--- VTX Endcap parameters c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" integer sili_sideLayers /20/ real sili_zCenter_side(20) /20*3/ real sili_phi1_side(20) /20*3/ real sili_dph_side(20) /20*3/ integer sili_npdv_side(20) /20*3/ integer sili_nz_side(20) /20*3/ real sili_z1_side(20) /20*3/ real sili_rmin1_side(20) /20*3/ real sili_rmax1_side(20) /20*3/ real sili_z2_side(20) /20*3/ real sili_rmin2_side(20) /20*3/ real sili_rmax2_side(20) /20*3/ namelist /siliside_par/ $ sili_sideLayers, $ sili_zCenter_side, $ sili_phi1_side, sili_dph_side, $ sili_npdv_side, sili_nz_side, $ sili_z1_side, sili_rmin1_side, sili_rmax1_side, $ sili_z2_side, sili_rmin2_side, sili_rmax2_side c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" cxxx---------------------------vvv new *---------1---------2---------3---------4---------5---------6---------7-- real panels, plength, plength2, plen3, plen4, panthk, strip, & strip2, strip3, strip4, strip5, strip6, gap1, chiplen, chipwid, & chipthk, sithk, silen, silen2, silen3, silen4, silen5, silen6, & silen7, silen8, silen9, rinner, zangle, zsep, zdist, zdist2, & sangle2, panthick, d, d2, halfz, halfz2, deg, rad, pangle, & sangle, stripz, stripx, plen5, plen6, stripz2, stripx2, L1, & stripz3, stripx3, stripy3 real PAR(4) integer ivol1, ii, i, jj, j, k, l integer ir3, ir4, ir5, ir6, ir7, irx1, irx2, irx3, irx4 cxxx-----------------------------^^^ new c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& C ================================================================ C--- Local definitions C ================================================================ c Input filename character*50 par_file /'phnx.par'/ ! Input filename character*50 svxpar_file /'svxPISA.par'/ ! Output file for parameters character*4 set_id /'SVX '/ ! Detector/hit set ID c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c VTX cage volume names character*4 siliEnvelope/'SIEN'/ ! Envelope (outer cage surface) character*4 siliCage /'SICG'/ ! Cage inner surface character*4 siliInCage /'SIIC'/ ! Thermal insulation around beam-pipe character*4 siliSupport /'SISP'/ ! Fake barrel support c VTX layer names (for barrel, names of ladders in a layer) character*4 siliNames(20) /'SI01', 'SI02', 'SI03', 'SI04', & 'SI05', 'SI06', 'SI07', 'SI08', & 'SI09', 'SI10', 'SI11', 'SI12', & 'SI13', 'SI14', 'SI15', 'SI16', & 'SI17', 'SI18', 'SI19', 'SI20'/ character*4 siliBrSensor /'SISN'/ ! Barrel sensor name character*4 siliBrPassive /'SIPV'/ ! Barrel passive material name c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c The following are used in GSDET: namesv(4) is to be replaced with c 'SI01', 'SI02', ... at running time c Integer nwpa /500/ ! Init. size of HITS banks Integer nwsa /500/ ! Init. size of DIGI banks Integer idtype /2001/ ! User def. detector type Integer nbrv /5/ ! Num. of br. vol. desc. Integer necv /6/ ! Num. of ec vol. desc. Integer nv /6/ ! max(nbrv,necv) Integer nbitsv(6) /6*8/ ! Bits to pack vol. copy # Character*4 namesv(6) /'HALL','SIEN','SICG' * ,'SIxx',2*'SISN'/ ! Volume names, barrel Character*4 namesw(6) /'HALL','SIEN','SICG' * ,'TRPx','TRPy','TRPz'/ ! Volume names, endcaps c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c The following are used in GSDETH c """""""""""""""""""""""""""""""" c Hit parameters will be global position(3), energy loss, time of flight, c particle type and c entry momentum(3), local in & out positions(6), c Integer nhh /15/ ! Number of hit components integer*4 inrNBITSH(15) /15*32/ ! Bits for packing the hits c Hit component names character*4 inrNMSH(15) /'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 c Default setting of offsets and gains REAL inrORIG(15) /3*1000.,3*0.,3*1000.,6*1000./ ! offsets REAL inrFACT(15) /3*100000.,1.E7,1.e12,1.0,3*100000. & ,6*100000./ ! gains c c The above gains give c - 0.1 keV energy deposition resolution c - 0.0001 mm position resolution c - 0.01 MeV/c momentum resolution c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c Rotation matrices c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Integer irot_cage ! Cage (SIEN) rotation matrix # c /*--- null rotation ---*/ * real nul_rot(6) /90.0,0.0,90.0,90.0,0.0,0.0/ * real rot1, rot2, rot3, rot4, rot5, rot6, x_ang, y_ang c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" C ================================================================ C--- Local definitions of materials/media C ================================================================ Integer sili_med_silicon /10/ ! Sensitive silicon nmed Integer sili_med_passive /26/ ! Ladder passive nmed (Al) Integer sili_med_cg /1102/ ! Cage (SIEN-SICG) nmat/nmed (Rohacell) Integer sili_med_coldair /1019/ ! Gas inside the SICG (cold air) Integer sili_med_gfrp /1490/ ! GFRP for the fake support c Material for the cage, volumes SIEN-SICG c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" C Copied from pisa200/src/ver/vermatdef.f, Rev 1.2 C Rohacell(H11-C8-N1-O12) Mixture Parameters for the vertex detector: REAL AROHA(4)/ 1.008 , 12.01 , 14.008 , 16. / ! A for Rohacell REAL ZROHA(4)/ 1. , 6. , 7. , 8. / ! Z for Rohacell REAL WROHA(4)/ 11. , 8. , 1. , 2. / ! Weights for Rohacell c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" C ================================================================ c--- Local work variables (counters, etc) C ================================================================ CHARACTER*20 NAMTMED INTEGER NMAT, ISVOL, IFIELD, NWBUF, LNAM(6), LNUM(6) REAL FIELDM,TMAXFD,DMAXMS,DEEMAX,EPSIL,STMIN & ,WMAT(3),UBUF(10),ANUMB,ZNUMB,DENS,RADL,ABSL CHARACTER*80 CHFORM character*4 v_m_name,v_i_name, si_name Integer iLayer,iPoint,icnt,nr,npar,nmed,ivolu & ,iset,idet,iod Integer nladd, iladd, isec, isen Real dim_sili(20),philadd,dphid,dphir,dphit,sgn & ,phi1,phi2,dthck,phirotladd,rladd,xladd,yladd & ,ladd_halfx,ladd_halfthck,ladd_halfz,pasv_radl,pasv_halfy & ,sen_y(2) C ================================================================ C ================================================================ C C Executable code C =============== C c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c BEGIN c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c c Read the geometery file segments c open(unit=15,file=par_file,status='OLD',err=999) read(15,nml=sili_cg_par,err=998) read(15,nml=sili_br_par,err=997) read(15,nml=siliside_par,err=996) close(unit=15) C C only book volumes if input parameters are OK C IF(CVOLU_OPT(1,3).EQ.'FULL'.OR.CVOLU_OPT(1,3).EQ.'VOLS')THEN NH = nhh ! Number of hit components to NH output parameter nv = max(nbrv, necv) ! Number of volume descriptors C... Create outer surface of the cage, SIEN dim_sili(1) = 0. dim_sili(2) = 360. dim_sili(3) = sili_cg_npcon npar = 3 Do icnt = 1, sili_cg_npcon npar = npar + 1 dim_sili(npar) = sili_cg_z(icnt) npar = npar + 1 dim_sili(npar) = sili_cg_rmn npar = npar + 1 dim_sili(npar) = sili_cg_rmx(icnt) Enddo nwbuf = 1 C************************************************************************** C Define mixture ROHACELL for the SIEN C Copied from pisa200/src/ver/vermatdef.f, Rev 1.2 C NMAT = sili_med_cg ! Rohacell CALL GSMIXT (NMAT,' ROHACELL$',AROHA,ZROHA,0.075,-4,WROHA) C C Tracking media # sili_cg_wall - Rohacell C NMED = sili_med_cg ! Rohacell ISVOL = 0 ! Not sensitive IFIELD = 1 ! Magnetic field FIELDM = 10.0 ! max field TMAXFD = 45.0 ! maximum angle due to field (one step) in deg DMAXMS = 0.2 ! max disp. due to mulsct. in one step (cm) DEEMAX = 0.1 ! max fractional energy loss in one step EPSIL = .001 ! tracking precision (cm) STMIN = 0.5 ! min step due to e loss or mulsct. (cm) UBUF(1) = 0. ! tracking stop switch CALL GSTMED(NMED,'Rohacell$',NMAT,ISVOL,IFIELD 1 ,FIELDM,TMAXFD,DMAXMS,DEEMAX,EPSIL,STMIN,UBUF,NWBUF) C************************************************************************** v_m_name = 'HALL' v_i_name = siliEnvelope nr = 1 call gsvolu(v_i_name,'PCON',nmed,dim_sili,npar,ivolu) call gsatt(v_i_name,'SEEN',1) call gspos(v_i_name,nr,v_m_name * ,sili_cg_xdisp,sili_cg_ydisp,sili_cg_zdisp * ,irotnull,'ONLY') C... Create inner volume of the cage SICG npar = 3 sgn = 1. If(sili_cg_z(1).GT.sili_cg_z(sili_cg_npcon)) sgn = -1. phi1 = 1.570796327 Do icnt = 1, sili_cg_npcon npar = npar + 3 If(icnt .LT. sili_cg_npcon) THEN phi2 = ATAN2(sili_cg_rmx(icnt+1)-sili_cg_rmx(icnt), * sili_cg_z(icnt+1)-sili_cg_z(icnt)) Else phi2 = -1.570796327 Endif dphir = 0.5*(phi1 + phi2) dthck = sili_cg_thck/COS(0.5*(phi1-phi2)) dim_sili(npar-2) = sili_cg_z(icnt) + dthck*SIN(dphir) dim_sili(npar-1) = sili_cg_rmn ! Inner radius dim_sili(npar) = sili_cg_rmx(icnt) - dthck*COS(dphir) If(dim_sili(npar) .LT. sili_cg_rmn) THEN If(icnt .EQ. 1) THEN dphir = phi2 Elseif(icnt .EQ. sili_cg_npcon) THEN dphir = phi1 Endif dim_sili(npar) = sili_cg_rmn dim_sili(npar-2) = (sili_cg_rmx(icnt)-sili_cg_rmn)/ * TAN(dphir) dim_sili(npar-2) = sili_cg_z(icnt) + * sgn*(sili_cg_thck/SIN(dphir) - dim_sili(npar-2)) Endif phi1 = phi2 Enddo ! loop over sili_cg_npcon C************************************************************************** c Define material 'AIRCOLD' at 0C ubuf(1) = sili_cg_tempc nmat = sili_med_coldair anumb = 14.61 znumb = 7.3 dens = 1.293e-3*273./(sili_cg_tempc+273.) radl = 0.283e5*(sili_cg_tempc+273.)/273 absl = 0.696e5*(sili_cg_tempc+273.)/273. CALL GSMATE(nmat,'AIRCOLD',anumb,znumb,dens 1 ,radl,absl,ubuf,nwbuf) nmed = sili_med_coldair ! Air at temperature sili_cg_tempc C isvol = 0 ! Not sensitive ifield = 1 ! magnetic field fieldm = 10. ! max field, kGs tmaxfd = 0.2 ! max angle due to field (one step) in degrees dmaxms = 0.1 ! max disp. due to mulsct. in one step, cm deemax = 0.01 ! max fractional energy loss in one step epsil = 0.001 ! tracking precision, cm stmin = 0.1 ! min step due to e-loss or multsct., cm ubuf(1) = 0. ! tracking stop switch CALL GSTMED(nmed,'AIRCOLD$',nmat,isvol,ifield,fieldm * ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) C************************************************************************** v_i_name = siliCage v_m_name = siliEnvelope nr = 1 call gsvolu(v_i_name,'PCON',nmed,dim_sili,npar,ivolu) call gsatt(v_i_name,'SEEN',1) call gspos(v_i_name,nr,v_m_name,0.,0.,0.,irotnull,'ONLY') c Create and position thermal insulation of the beam-pipe made of Rohacell v_i_name = siliInCage v_m_name = siliEnvelope nmed = sili_med_cg ! Rohacell nr = 1 npar = 3 dim_sili(1) = sili_cg_rmn - sili_cg_inthck dim_sili(2) = sili_cg_rmn dim_sili(3) = 0.5*(sili_cg_z(sili_cg_npcon)-sili_cg_z(1)) dim_sili(4) = 0.5*(sili_cg_z(sili_cg_npcon)+sili_cg_z(1)) call gsvolu(v_i_name,'TUBE',nmed,dim_sili,npar,ivolu) call gsatt(v_i_name,'SEEN',1) call gspos(v_i_name,nr,v_m_name,0.,0.,dim_sili(4) * ,irotnull,'ONLY') c ====================================================================== c The parameters between === are for the temporary fake support emulation c with "plain" discs introduced for accomodating the request of c some people. You are welcome to spread this brand new "artificial c butter" over your piece of bread. Just, please, do not eat it! - VR c Define material/media 'GFRP' (slightly modified G10 from ../itr/pc1gem.f) nmat = sili_med_gfrp anumb = 18.14 znumb = 9.065 dens = 1.68 radl = 25. absl = 56.7 CALL GSMATE(nmat,'GFRP',anumb,znumb,dens 1 ,radl,absl,ubuf,nwbuf) nmed = sili_med_gfrp isvol = 0 ! Not sensitive ifield = 1 ! magnetic field fieldm = 10. ! max field, kGs tmaxfd = 0.2 ! max angle due to field (one step) in degrees dmaxms = 0.1 ! max disp. due to mulsct. in one step, cm deemax = 0.01 ! max fractional energy loss in one step epsil = 0.001 ! tracking precision, cm stmin = 0.1 ! min step due to e-loss or multsct., cm ubuf(1) = 0. ! tracking stop switch CALL GSTMED(nmed,'GFRP$',nmat,isvol,ifield,fieldm * ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) C v_i_name = siliSupport v_m_name = siliCage call gsvolu(v_i_name,'TUBE',nmed,dim_sili,0,ivolu) call gsatt(v_i_name,'SEEN',1) npar = 3 Do nr = 1, sili_br_nspring dim_sili(1) = sili_br_sprin(nr) dim_sili(2) = sili_br_sprout(nr) dim_sili(3) = sili_br_spthck(nr) call gsposp(v_i_name,nr,v_m_name,0.,0.,sili_br_spz(nr) * ,irotnull,'ONLY',dim_sili,npar) Enddo c ====================================================================== C c... Build barrel VTX c Get passive material radiation length nmed = sili_med_passive CALL GFTMED(nmed,NAMTMED,nmat,isvol,ifield,fieldm * ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) CALL GFMATE(nmat,NAMTMED,anumb,znumb,dens,pasv_radl,absl * ,ubuf,nwbuf) c Create a layer of passive material behind the sensor nmed = sili_med_passive npar = 0 call gsvolu(siliBrPassive,'BOX ',nmed,dim_sili,npar,ivolu) call GSATT(siliBrPassive,'SEEN',1) call GSATT(siliBrPassive,'COLO',3) c Create Si sensors SISN nmed = sili_med_silicon npar = 0 call gsvolu(siliBrSensor,'BOX ',nmed,dim_sili,npar,ivolu) call GSATT(siliBrSensor,'SEEN',1) call GSATT(siliBrSensor,'COLO',2) CALL GSATT(siliBrSensor,'WORK',1) ! Make volume sensitive c--- Cycle over the layers ( 4 barrel layers ) --------------------------------------- Do iLayer = 1, sili_br_nlayers c... Define ladder volume, SInn v_m_name = siliNames(iLayer) c Define ladder dimensions pasv_halfy = 0.5*sili_br_x0add(iLayer)*pasv_radl ! Al Thick/2 ladd_halfx = sili_br_snhalfx(iLayer) ! Width/2 dim_sili(1) = ladd_halfx ladd_halfthck = pasv_halfy + sili_br_snhalfy(iLayer) ! Thick/2 If(sili_br_snzgap(iLayer) .LT. 0.) Then ladd_halfthck = 2.*ladd_halfthck Endif dim_sili(2) = ladd_halfthck ladd_halfz = sili_br_nsn(iLayer)*sili_br_snhalfz(iLayer) * + 0.5*sili_br_snzgap(iLayer)*(sili_br_nsn(iLayer)-1) ! Length/2 dim_sili(3) = ladd_halfz c Create a ladder volume SInn made of cold air npar = 3 nmed = sili_med_coldair call gsvolu(v_m_name,'BOX ',nmed,dim_sili,npar,ivolu) call GSATT(v_m_name,'SEEN',0) call GSATT(v_m_name,'COLO',4) c Position sensors SISN and passive layers in the ladder SInn dim_sili(2) = sili_br_snhalfz(iLayer) - ladd_halfz npar = 3 dim_sili(3) = sili_br_snhalfx(iLayer) dim_sili(5) = sili_br_snhalfz(iLayer) sen_y(1) = sili_br_snhalfy(iLayer) - ladd_halfthck If(sili_br_snzgap(iLayer) .GE. 0.) Then sen_y(2) = sen_y(1) Else sen_y(2) = sen_y(1) + * 2.*(sili_br_snhalfy(iLayer) + pasv_halfy) Endif Do nr = 1, sili_br_nsn(iLayer) c Sensor v_i_name = siliBrSensor dim_sili(1) = sen_y(mod(nr-1,2)+1) dim_sili(4) = sili_br_snhalfy(iLayer) call gsposp(v_i_name,nr,v_m_name * ,0.,dim_sili(1),dim_sili(2),irotnull,'ONLY' * ,dim_sili(3),npar) c Passive layer v_i_name = siliBrPassive dim_sili(1) = dim_sili(1) + dim_sili(4) + pasv_halfy dim_sili(4) = pasv_halfy call gsposp(v_i_name,nr,v_m_name * ,0.,dim_sili(1),dim_sili(2),irotnull,'ONLY' * ,dim_sili(3),npar) dim_sili(2) = dim_sili(2) + 2.*sili_br_snhalfz(iLayer) * + sili_br_snzgap(iLayer) Enddo c--- Place ladders SInn in the cage SICG rladd = sili_br_r(iLayer) dphit = DEGRAD*sili_br_tilt(iLayer) xladd = ladd_halfthck - sili_br_snhalfy(iLayer) yladd = rladd + xladd*COS(dphit) xladd = xladd*SIN(dphit) rladd = sqrt(xladd*xladd + yladd*yladd) dphit = RADDEG*ATAN(xladd/rladd) dphid = sili_br_dphi(iLayer) dphir = DEGRAD*dphid v_i_name = v_m_name v_m_name = siliCage nr = 1 Do isec = 1, sili_br_nsec(iLayer) nladd = sili_br_nlad(isec,iLayer) philadd = sili_br_phic(isec,iLayer) + dphit * - (0.5*dphid)*(nladd-1) phirotladd = -90.+sili_br_tilt(iLayer) + philadd philadd = DEGRAD*philadd DO iladd = 1, nladd xladd = rladd*cos(philadd) yladd = rladd*sin(philadd) irot = irot + 1 CALL GSROTM(irot,90.,phirotladd,90. * ,phirotladd+90.,0.,0.) call gspos(v_i_name,nr,v_m_name * ,xladd,yladd,sili_br_z(iLayer),irot,'ONLY') philadd = philadd + dphir phirotladd = phirotladd + dphid nr = nr + 1 Enddo Enddo c put SInn in set 'SVX' c Note here v_i_names = SI01,2,3,4 namesv(4) = v_i_name call gsdet(set_id,v_i_name,nv,namesv,nbitsv,idtype,nwpa & ,nwsa,iset,idet) call gsdeth(set_id,v_i_name,nhh,inrNMSH,inrNBITSH & ,inrORIG,inrFACT) Enddo ! loop over 4 barrel layers c======================================================================c c============================= Endcaps code ===================c c======================================================================c c this section needs to move up to 'namelist' area: cxxx---------------------------------vvv new C ---------Define the physical dimensions of each object--------------- C panels=24. ! total # of carbon panels per "cone" section plength=14.4 ! overall length of each large carbon panel plength2=10.6 ! overall length of each small carbon panel plen3=.94 ! length along x of small end on large carbon panel plen4=4.45 ! length along x of large end on large carbon panel panthk=.3 ! total thickness of a carbon panel (along y) strip=6.5 ! length along z of inner(radius) carbon strips strip2=.10 ! total thickness of inner carbon strip (along y) strip3=.38 ! total length along x of one carbon strip strip4=7.8 ! length along z of outer(radius) carbon strips strip5=.05 ! total thickness of outer carbon strip (along y) strip6=6.41 ! distance of outer carbon strips from sm end of panel gap1=.11 ! tiny gap between carbon strip and edge of panel chiplen=1.3 ! total length of one chip (along z) chipwid=.38 ! total length of one chip (along x) chipthk=.025 ! total thickness of one chip (along y) sithk=.03 ! total thickness of silicon panel silen=6.6 ! overall length of INNER silicon panel silen2=1.6 ! length along x of large end of INNER Si panel silen3=.54 ! length along x of small end of INNER Si panel silen4=7.9 ! overall length of the larger, OUTER silicon panel silen5=2.7 ! length along x of large end of larger OUTER Si panel silen6=1.6 ! length along x of small end of larger OUTER Si panel silen7=4.0 ! overall length of the smaller, OUTER silicon panel silen8=2.16 ! length along x of large end of smaller OUTER Si panel silen9=1.6 ! length along x of small end of smaller OUTER Si panel rinner=3.5 ! inner "radius" of each "cone" dist from z-axis zangle=68. ! angle each panel makes with z-axis zsep=6. ! distance between "cone" sections zdist=19.86+18 ! z dist of outermost edge on outermost "cone" ! Note: zdist depends on zsep. zdist2=19.86 ! z dist of outermost edge on small "cones" sangle2=0.0 ! just a place holder for now C ----These values (below) are calculated from those entered above----- C C d = distance from z-axis to the midpoint of each large carbon panel C d2 = dist from z-axis to midpoint of each small carbon panel C halfz = the half length along z for each large carbon panel C halfz2 = half length along z for each small carbon panel panthick = panthk/2 ! half-z thickness of each carbon panel d = (plength/2)*SIN(zangle*2*PI/360)+rinner C + +panthick*COS(zangle*2*PI/360) d2 = (plength2/2)*SIN(zangle*2*PI/360)+rinner C + +panthick*COS(zangle*2*PI/360) halfz = (plength/2)*COS(zangle*2*PI/360) halfz2 = (plength2/2)*COS(zangle*2*PI/360) deg = 2*PI/360 ! To convert degrees into radians rad = 360/(2*PI) ! To convert radians into degrees pangle = (360/panels) ! The total angle of each carbon panel sangle = 3.47433 ! angle of carbon strips stripz = plength/2-(gap1+strip/2)*COS(sangle*deg) !z-position of strips stripx = plen3/4+(gap1+strip/2)*SIN(sangle*deg) !x-position of strips plen5 = plen3 ! length along x of small end on small carbon panel C Length along x of large end on small carbon panel plen6 = 2*plength2*TAN(2*sangle*deg)+plen3 stripz2 = plength2/2-(gap1+strip/2)*COS(sangle*deg) stripx2 = plen5/4+(gap1+strip/2)*SIN(sangle*deg) L1 = rinner/SIN(zangle*deg) stripz3 = plength/2-(strip6+strip4/2)*COS(sangle*deg) stripx3 = plen3/4 +(strip6+strip4/2)*SIN(sangle*deg) stripy3 = (panthk+strip5)/2 c============= Now define the endcap volumes: =============================c C (L1) This is for one large mother panel at the -z axis PAR(1) = plen3/2 ! half length along x at -z PAR(2) = plen4/2 ! half length along x at +z PAR(3) = sithk+chipthk+strip2+panthk/2 ! half length along y PAR(4) = plength/2 ! half length along z cxxx CALL GSVOLU( 'TRP1', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI06', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI07', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI08', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is for one large carbon panel at -z axis (inside SI06,7,8) PAR(1) = plen3/2 PAR(2) = plen4/2 PAR(3) = panthk/2 PAR(4) = plength/2 CALL GSVOLU( 'TRPA', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is the mother volume for the inner silicon & chips (in SI06,7,8) PAR(1) = silen3/2 PAR(2) = silen2/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPE', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is for one inner silicon panel at -z (inside TRPE) PAR(1) = silen3/2 PAR(2) = silen2/2 PAR(3) = sithk/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPI', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is the mother volume for the outer silicon & chips (in SI06,7,8) PAR(1) = silen6/2 PAR(2) = silen5/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen4/2 CALL GSVOLU( 'TRPM', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is for one outer silicon panel at -z (inside TRPM) PAR(1) = silen6/2 PAR(2) = silen5/2 PAR(3) = sithk/2 PAR(4) = silen4/2 CALL GSVOLU( 'TRPQ', 'TRD1 ', 1, PAR, 4, IVOL1) C (L1) This is for one computer chip inside TRPE & TRPM PAR(1) = chipwid/2 ! half length along x PAR(2) = chipthk/2 ! half length along y PAR(3) = chiplen/2 ! half length along z CALL GSVOLU( 'CHP1', 'BOX ', 1, PAR, 3, IVOL1) C (L2) This is for one large mother panel at the +z axis PAR(1) = plen4/2 PAR(2) = plen3/2 PAR(3) = sithk+chipthk+strip2+panthk/2 PAR(4) = plength/2 c CALL GSVOLU( 'TRP2', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI10', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI11', 'TRD1 ', 1, PAR, 4, IVOL1) CALL GSVOLU( 'SI12', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is for one large carbon panel at the +z axis (inside SI10,11,12) PAR(1) = plen4/2 PAR(2) = plen3/2 PAR(3) = panthk/2 PAR(4) = plength/2 CALL GSVOLU( 'TRPB', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is the mother volume for the inner silicon & chips (in SI10,11,12) PAR(1) = silen2/2 PAR(2) = silen3/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPF', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is for one inner silicon panel at +z (inside TRPf) PAR(1) = silen2/2 PAR(2) = silen3/2 PAR(3) = sithk/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPJ', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is the mother volume for the outer silicon & chips (in SI10,11,12) PAR(1) = silen5/2 PAR(2) = silen6/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen4/2 CALL GSVOLU( 'TRPN', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is for one outer silicon panel at +z (inside TRPN) PAR(1) = silen5/2 PAR(2) = silen6/2 PAR(3) = sithk/2 PAR(4) = silen4/2 CALL GSVOLU( 'TRPR', 'TRD1 ', 1, PAR, 4, IVOL1) C (L2) This is for one computer chip inside TRPF & TRPN PAR(1) = chipwid/2 ! half length along x PAR(2) = chipthk/2 ! half length along y PAR(3) = chiplen/2 ! half length along z CALL GSVOLU( 'CHP2', 'BOX ', 1, PAR, 3, IVOL1) C (S1) This is for one small mother panel at -z axis PAR(1) = plen5/2 ! half length along x at -z PAR(2) = plen6/2 ! half length along x at +z PAR(3) = sithk+chipthk+strip2+panthk/2 ! half length along y PAR(4) = plength2/2 ! half length along z CALL GSVOLU( 'SI05', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is for one small carbon panel at -z axis (inside SI05) PAR(1) = plen5/2 PAR(2) = plen6/2 PAR(3) = panthk/2 PAR(4) = plength2/2 CALL GSVOLU( 'TRPC', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is the mother volume for the inner silicon & chips (in SI05) PAR(1) = silen3/2 PAR(2) = silen2/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPG', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is for one inner silicon panel at -z (inside TRPG) PAR(1) = silen3/2 PAR(2) = silen2/2 PAR(3) = sithk/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPK', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is the mother volume for the outer silicon & chips (in SI05) PAR(1) = silen9/2 PAR(2) = silen8/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen7/2 CALL GSVOLU( 'TRPO', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is for one outer silicon panel at -z (inside TRPO) PAR(1) = silen9/2 PAR(2) = silen8/2 PAR(3) = sithk/2 PAR(4) = silen7/2 CALL GSVOLU( 'TRPS', 'TRD1 ', 1, PAR, 4, IVOL1) C (S1) This is for one computer chip inside TRPG & TRPO PAR(1) = chipwid/2 ! half length along x PAR(2) = chipthk/2 ! half length along y PAR(3) = chiplen/2 ! half length along z CALL GSVOLU( 'CHP3', 'BOX ', 1, PAR, 3, IVOL1) C (S2) This is for one small mother panel at +z PAR(1) = plen6/2 PAR(2) = plen5/2 PAR(3) = sithk+chipthk+strip2+panthk/2 PAR(4) = plength2/2 CALL GSVOLU( 'SI09', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is for one small carbon panel at +z (inside SI09) PAR(1) = plen6/2 PAR(2) = plen5/2 PAR(3) = panthk/2 PAR(4) = plength2/2 CALL GSVOLU( 'TRPD', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is the mother volume for the inner silicon & chips (in SI09) PAR(1) = silen2/2 PAR(2) = silen3/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPH', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is for one inner silicon panel at +z (inside TRPH) PAR(1) = silen2/2 PAR(2) = silen3/2 PAR(3) = sithk/2 PAR(4) = silen/2 CALL GSVOLU( 'TRPL', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is the mother volume for the outer silicon & chips (in SI09) PAR(1) = silen8/2 PAR(2) = silen9/2 PAR(3) = (chipthk+sithk)/2 PAR(4) = silen7/2 CALL GSVOLU( 'TRPP', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is for one outer silicon panel at +z (inside TRPP) PAR(1) = silen8/2 PAR(2) = silen9/2 PAR(3) = sithk/2 PAR(4) = silen7/2 CALL GSVOLU( 'TRPT', 'TRD1 ', 1, PAR, 4, IVOL1) C (S2) This is for one computer chip inside TRPH & TRPP PAR(1) = chipwid/2 ! half length along x PAR(2) = chipthk/2 ! half length along y PAR(3) = chiplen/2 ! half length along z CALL GSVOLU( 'CHP4', 'BOX ', 1, PAR, 3, IVOL1) C This is for the inner(radius)thin carbon strip on the carbon panels PAR(1) = strip3/2 ! half length along x PAR(2) = strip2/2 ! half length along y PAR(3) = strip/2 ! half length along z CALL GSVOLU( 'BOX1', 'BOX ', 1, PAR, 3, IVOL1) C This is for the outer(radius)thin carbon strip on the carbon panels PAR(1) = strip3/2 ! half length along x PAR(2) = strip5/2 ! half length along y PAR(3) = strip4/2 ! half length along z CALL GSVOLU( 'BOX2', 'BOX ', 1, PAR, 3, IVOL1) c------------------------------------------------------------------------------- c------------------------------------------------------------------------------- C Hide any of the volumes C -2 = only that volume seen, no descendants C -1 = none visible C 0 = volume is not visible but descendants are C 1 = both volume and descendants are visible c CALL GSATT( 'TRP1 ', 'SEEN ', 0) ! Mother volumes for DO loops c CALL GSATT( 'TRP2 ', 'SEEN ', 0) ! These are L1,L2,S1,S2 CALL GSATT( 'SI05 ', 'SEEN ', 0) CALL GSATT( 'SI06 ', 'SEEN ', 0) CALL GSATT( 'SI07 ', 'SEEN ', 0) CALL GSATT( 'SI08 ', 'SEEN ', 0) CALL GSATT( 'SI09 ', 'SEEN ', 0) CALL GSATT( 'SI10 ', 'SEEN ', 0) CALL GSATT( 'SI11 ', 'SEEN ', 0) CALL GSATT( 'SI12 ', 'SEEN ', 0) CALL GSATT( 'TRPA ', 'SEEN ', 1) ! Carbon panels CALL GSATT( 'TRPB ', 'SEEN ', 1) ! A in L1, B in L2, CALL GSATT( 'TRPC ', 'SEEN ', 1) ! C in S1, D in S2 CALL GSATT( 'TRPD ', 'SEEN ', 1) CALL GSATT( 'TRPE ', 'SEEN ', 0) ! Mother Volumes for Si and chips CALL GSATT( 'TRPF ', 'SEEN ', 0) ! E in L1, F in L2, CALL GSATT( 'TRPG ', 'SEEN ', 0) ! G in S1, H in S2 CALL GSATT( 'TRPH ', 'SEEN ', 0) CALL GSATT( 'TRPM ', 'SEEN ', 0) CALL GSATT( 'TRPN ', 'SEEN ', 0) CALL GSATT( 'TRPO ', 'SEEN ', 0) CALL GSATT( 'TRPP ', 'SEEN ', 0) CALL GSATT( 'TRPI ', 'SEEN ', 1) ! Silicon panels CALL GSATT( 'TRPJ ', 'SEEN ', 1) ! I in L1, J in L2, CALL GSATT( 'TRPK ', 'SEEN ', 1) ! K in S1, L in S2 CALL GSATT( 'TRPL ', 'SEEN ', 1) CALL GSATT( 'TRPQ ', 'SEEN ', 1) CALL GSATT( 'TRPR ', 'SEEN ', 1) CALL GSATT( 'TRPS ', 'SEEN ', 1) CALL GSATT( 'TRPT ', 'SEEN ', 1) CALL GSATT( 'CHP1 ', 'SEEN ', 1) ! Chips CALL GSATT( 'CHP2 ', 'SEEN ', 1) ! 1 in L1, 2 in L2, CALL GSATT( 'CHP3 ', 'SEEN ', 1) ! 3 in S1, 4 in S2 CALL GSATT( 'CHP4 ', 'SEEN ', 1) CALL GSATT( 'BOX1 ', 'SEEN ', 1) ! Carbon strips (in SI05-12) CALL GSATT( 'BOX2 ', 'SEEN ', 1) C Add color to individual pieces C CALL GDOPT( 'SHAD ', 'ON') C CALL GSATT( 'TRPA ', 'COLO', 2) !Carbon C CALL GSATT( 'TRPB ', 'COLO', 2) C CALL GSATT( 'TRPC ', 'COLO', 2) C CALL GSATT( 'TRPD ', 'COLO', 2) CALL GSATT( 'BOX1 ', 'COLO', 2) CALL GSATT( 'BOX2 ', 'COLO', 2) CALL GSATT( 'TRPI ', 'COLO', 3) !Silicon CALL GSATT( 'TRPJ ', 'COLO', 3) CALL GSATT( 'TRPK ', 'COLO', 3) CALL GSATT( 'TRPL ', 'COLO', 3) CALL GSATT( 'TRPQ ', 'COLO', 6) CALL GSATT( 'TRPR ', 'COLO', 6) CALL GSATT( 'TRPS ', 'COLO', 6) CALL GSATT( 'TRPT ', 'COLO', 6) CALL GSATT( 'CHP1 ', 'COLO', 7) !Chips CALL GSATT( 'CHP2 ', 'COLO', 7) CALL GSATT( 'CHP3 ', 'COLO', 7) CALL GSATT( 'CHP4 ', 'COLO', 7) CALL GSATT('TRPI','WORK',1) ! Make volumes sensitive CALL GSATT('TRPQ','WORK',1) CALL GSATT('TRPJ','WORK',1) CALL GSATT('TRPR','WORK',1) CALL GSATT('TRPK','WORK',1) CALL GSATT('TRPS','WORK',1) CALL GSATT('TRPL','WORK',1) CALL GSATT('TRPT','WORK',1) C================= Position the detectors ======================c C C This is for rotating and positioning the large mother panels C on the -z axis. We are rotating 360 degrees around the x and y C directions (x' angle w.r.t. x), with each wedge having an angle C of 360/panels. 2*PI must be used since SIN expects radians. The C x-position is d*SIN(angle), and y=d*COS(angle). C (L1) Place the inner(radius) carbon strips on the carbon panels (outer) C inside SI06,7,8 irot = irot+1 ir3 = irot CALL GSROTM( ir3, 90-sangle, 0. , 90. , 90. , sangle, 180.) c CALL GSPOS( 'BOX1' , 1, 'SI06' , -stripx , c + (panthk/2)+strip2/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 1, 'SI06' , -stripx , + (panthk/2)+strip2/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 1, 'SI07' , -stripx , + (panthk/2)+strip2/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 1, 'SI08' , -stripx , + (panthk/2)+strip2/2 , -stripz ,ir3,'ONLY') C (L1) Place the inner(radius) carbon strips on the carbon panels (inner) C inside SI06,7,8 irot = irot+1 ir4 = irot CALL GSROTM( ir4, 90+sangle, 0. , 90. , 90. , -sangle, 180.) c CALL GSPOS( 'BOX1' , 2, 'TRP1' , stripx , c + -(panthk/2)-strip2/2 , -stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 2, 'SI06' , stripx , + -(panthk/2)-strip2/2 , -stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 2, 'SI07' , stripx , + -(panthk/2)-strip2/2 , -stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 2, 'SI08' , stripx , + -(panthk/2)-strip2/2 , -stripz ,ir4,'ONLY') C----------------------------------------------------------------------- C (L1) Place the outer(radius) carbon strips on the outer carbon surface C inside SI06,7,8 C c CALL GSPOS( 'BOX2' , 1, 'TRP1' , stripx3 , stripy3 , c + -stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 1, 'SI06' , stripx3 , stripy3 , + -stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 1, 'SI07' , stripx3 , stripy3 , + -stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 1, 'SI08' , stripx3 , stripy3 , + -stripz3 ,ir4,'ONLY') C (L1) Place the outer(radius) carbon strips on the inner carbon surface C inside SI06,7,8 c CALL GSPOS( 'BOX2' , 2, 'TRP1' , -stripx3 , -stripy3 , c + -stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 2, 'SI06' , -stripx3 , -stripy3 , + -stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 2, 'SI07' , -stripx3 , -stripy3 , + -stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 2, 'SI08' , -stripx3 , -stripy3 , + -stripz3 ,ir3,'ONLY') C----------------------------------------------------------------------- C (L1) Place the inner(radius) silicon/chips on outer carbon strips C inside SI06,7,8 C c CALL GSPOS( 'TRPE' , 1, 'TRP1' , -stripx , c + (panthk/2)+strip2+(chipthk+sithk)/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'TRPE' , 1, 'SI06' , -stripx , + (panthk/2)+strip2+(chipthk+sithk)/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'TRPE' , 1, 'SI07' , -stripx , + (panthk/2)+strip2+(chipthk+sithk)/2 , -stripz ,ir3,'ONLY') CALL GSPOS( 'TRPE' , 1, 'SI08' , -stripx , + (panthk/2)+strip2+(chipthk+sithk)/2 , -stripz ,ir3,'ONLY') C (L1) Place the inner(radius) silicon/chips on inner carbon strips C inside SI06,7,8. New rotation matrix here so chips are against carbon (bug fix). irot = irot+1 ir5 = irot CALL GSROTM( ir5, 90+sangle, 0. , 90. , -90. , -sangle, 180.) c CALL GSPOS( 'TRPE' , 2, 'TRP1' , stripx , c + -(panthk/2)-strip2-(chipthk+sithk)/2, -stripz ,ir5,'ONLY') CALL GSPOS( 'TRPE' , 2, 'SI06' , stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, -stripz ,ir5,'ONLY') CALL GSPOS( 'TRPE' , 2, 'SI07' , stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, -stripz ,ir5,'ONLY') CALL GSPOS( 'TRPE' , 2, 'SI08' , stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, -stripz ,ir5,'ONLY') C----------------------------------------------------------------------- C (L1) Place the outer(radius) silicon/chips on outer carbon surface C inside SI06,7,8 irot = irot+1 ir6 = irot CALL GSROTM( ir6, 90+sangle, 0. , 90. , 90. , -sangle, 180.) c CALL GSPOS( 'TRPM' , 1, 'TRP1' , stripx3 , (panthk/2)+ c + (chipthk+sithk)/2+strip5, -stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPM' , 1, 'SI06' , stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5, -stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPM' , 1, 'SI07' , stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5, -stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPM' , 1, 'SI08' , stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5, -stripz3 ,ir6,'ONLY') C (L1) Place the outer(radius) silicon/chips on inner carbon surface C inside SI06,7,8 irot = irot+1 ir7 = irot CALL GSROTM( ir7, 90-sangle, 0. , 90. , -90. , sangle, 180.) c CALL GSPOS( 'TRPM' , 2, 'TRP1' , -stripx3, -panthk/2- c + (chipthk+sithk)/2-strip5, -stripz3,ir7,'ONLY') CALL GSPOS( 'TRPM' , 2, 'SI06' , -stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, -stripz3,ir7,'ONLY') CALL GSPOS( 'TRPM' , 2, 'SI07' , -stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, -stripz3,ir7,'ONLY') CALL GSPOS( 'TRPM' , 2, 'SI08' , -stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, -stripz3,ir7,'ONLY') C----------------------------------------------------------------------- C (L1) Place the inner(radius) silicon inside TRPE C inside TRPE CALL GSPOS( 'TRPI', 1, 'TRPE' , 0. , chipthk+sithk/2-(chipthk+ + sithk)/2 , 0. , 0,'ONLY') C (L1) Place the outer(radius) silicon inside TRPM C inside TRPM CALL GSPOS( 'TRPQ', 1, 'TRPM' , 0. , chipthk/2, 0. , 0,'ONLY') C----------------------------------------------------------------------- C (L1) Place the chips on the inner(radius) silicon (inside TRPE) C inside TRPE CALL GSPOS( 'CHP1', 1, 'TRPE' , 0. , chipthk/2-(chipthk+sithk)/2 , + 0. , 0,'ONLY') CALL GSPOS( 'CHP1', 2, 'TRPE' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP1', 3, 'TRPE' , 0. , chipthk/2-(chipthk+sithk)/2 , + 2*chiplen , 0,'ONLY') CALL GSPOS( 'CHP1', 4, 'TRPE' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen , 0,'ONLY') CALL GSPOS( 'CHP1', 5, 'TRPE' , 0. , chipthk/2-(chipthk+sithk)/2 , + -2*chiplen , 0,'ONLY') C (L1) Place the chips on the outer(radius) silicon (inside TRPM) C inside TRPM CALL GSPOS( 'CHP1', 6, 'TRPM' , 0. , -sithk/2 , + chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP1', 7, 'TRPM' , 0. , -sithk/2 , + 3*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP1', 8, 'TRPM' , 0. , -sithk/2 , + 5*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP1', 9, 'TRPM' , 0. , -sithk/2 , + -chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP1', 10, 'TRPM' , 0. , -sithk/2 , + -3*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP1', 11, 'TRPM' , 0. , -sithk/2 , + -5*chiplen/2 , 0,'ONLY') C------------------------------------------------------------------------ C (L1) Place the Large carbon panels in the mother panel volume C inside SI06,7,8 c CALL GSPOS( 'TRPA' , 1, 'TRP1' , 0. , 0. , 0. ,0, 'ONLY') CALL GSPOS( 'TRPA' , 1, 'SI06' , 0. , 0. , 0. ,0, 'ONLY') CALL GSPOS( 'TRPA' , 1, 'SI07' , 0. , 0. , 0. ,0, 'ONLY') CALL GSPOS( 'TRPA' , 1, 'SI08' , 0. , 0. , 0. ,0, 'ONLY') C (L1) Position and rotate each mother panel volume to create "cone" C inside MOTH DO ii=0, 2 write (si_name,'(''SI'',I2.2)') ii+6 write (6,'('' si06,7,8: '',a5)') si_name DO I=0, panels-1 irot = irot+1 irx1 = irot CALL GSROTM( irx1, 90. , (-360*I/panels) , 90+zangle , (90. + -360*I/panels) , zangle , (90-360*I/panels)) c CALL GSPOS( 'TRP1' ,I+1+ii*100, 'SICG' , c + d*SIN(2*PI*I/panels), c + d*COS(2*PI*I/panels) , -zdist+ii*zsep+halfz, c + irx1,'ONLY') CALL GSPOS( si_name ,I+1+ii*100, 'SICG' , + d*SIN(2*PI*I/panels), + d*COS(2*PI*I/panels) , -zdist+ii*zsep+halfz, + irx1,'ONLY') END DO END DO C------------------------------------------------------------------------ C------------------------------------------------------------------------ C This is for rotating and positioning the large mother panels C on the +z axis. We are rotating 360 degrees around the x and y C directions, with each wedge having an angle of 360/panels. C 2*PI must be used since SIN expects radians. The C x-position is d*SIN(angle), and y=d*COS(angle). C (L2) Place the inner(radius) carbon strips on the carbon panels (outer) C inside SI10,11,12 c CALL GSPOS( 'BOX1' , 3, 'TRP2' , stripx , c + (panthk/2)+(strip2/2) , stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 3, 'SI10' , stripx , + (panthk/2)+(strip2/2) , stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 3, 'SI11' , stripx , + (panthk/2)+(strip2/2) , stripz ,ir3,'ONLY') CALL GSPOS( 'BOX1' , 3, 'SI12' , stripx , + (panthk/2)+(strip2/2) , stripz ,ir3,'ONLY') C (L2) Place the inner(radius) carbon strips on the carbon panels (inner) C inside SI10,11,12 c CALL GSPOS( 'BOX1' , 4, 'TRP2' , -stripx , c + -(panthk/2)-(strip2/2) , stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 4, 'SI10' , -stripx , + -(panthk/2)-(strip2/2) , stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 4, 'SI11' , -stripx , + -(panthk/2)-(strip2/2) , stripz ,ir4,'ONLY') CALL GSPOS( 'BOX1' , 4, 'SI12' , -stripx , + -(panthk/2)-(strip2/2) , stripz ,ir4,'ONLY') C------------------------------------------------------------------------ C (L2) Place the outer(radius) carbon strips on the carbon panels (outer) C inside SI10,11,12 c CALL GSPOS( 'BOX2' , 3, 'TRP2' , -stripx3 , c + stripy3 , stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 3, 'SI10' , -stripx3 , + stripy3 , stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 3, 'SI11' , -stripx3 , + stripy3 , stripz3 ,ir4,'ONLY') CALL GSPOS( 'BOX2' , 3, 'SI12' , -stripx3 , + stripy3 , stripz3 ,ir4,'ONLY') C (L2) Place the outer(radius) carbon strips on the carbon panles (inner) C inside SI10,11,12 c CALL GSPOS( 'BOX2' , 4, 'TRP2' , stripx3 , c + -stripy3 , stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 4, 'SI10' , stripx3 , + -stripy3 , stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 4, 'SI11' , stripx3 , + -stripy3 , stripz3 ,ir3,'ONLY') CALL GSPOS( 'BOX2' , 4, 'SI12' , stripx3 , + -stripy3 , stripz3 ,ir3,'ONLY') C------------------------------------------------------------------------ C (L2) Place the inner(radius) silicon/chips on outer carbon strips C inside SI10,11,12 c CALL GSPOS( 'TRPF' , 1, 'TRP2' , stripx , c + (panthk/2)+strip2+(chipthk+sithk)/2, stripz ,ir3,'ONLY') CALL GSPOS( 'TRPF' , 1, 'SI10' , stripx , + (panthk/2)+strip2+(chipthk+sithk)/2, stripz ,ir3,'ONLY') CALL GSPOS( 'TRPF' , 1, 'SI11' , stripx , + (panthk/2)+strip2+(chipthk+sithk)/2, stripz ,ir3,'ONLY') CALL GSPOS( 'TRPF' , 1, 'SI12' , stripx , + (panthk/2)+strip2+(chipthk+sithk)/2, stripz ,ir3,'ONLY') C (L2) Place the inner(radius) silicon/chips on inner carbon strips C inside SI10,11,12 c CALL GSPOS( 'TRPF' , 2, 'TRP2' , -stripx , c + -(panthk/2)-strip2-(chipthk+sithk)/2, stripz ,ir5,'ONLY') CALL GSPOS( 'TRPF' , 2, 'SI10' , -stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, stripz ,ir5,'ONLY') CALL GSPOS( 'TRPF' , 2, 'SI11' , -stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, stripz ,ir5,'ONLY') CALL GSPOS( 'TRPF' , 2, 'SI12' , -stripx , + -(panthk/2)-strip2-(chipthk+sithk)/2, stripz ,ir5,'ONLY') C------------------------------------------------------------------------ C (L2) Place the outer(radius) silicon/chips on outer carbon surface C inside SI10,11,12 c CALL GSPOS( 'TRPN' , 1, 'TRP2' , -stripx3 , (panthk/2)+ c + (chipthk+sithk)/2+strip5 , stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPN' , 1, 'SI10' , -stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5 , stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPN' , 1, 'SI11' , -stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5 , stripz3 ,ir6,'ONLY') CALL GSPOS( 'TRPN' , 1, 'SI12' , -stripx3 , (panthk/2)+ + (chipthk+sithk)/2+strip5 , stripz3 ,ir6,'ONLY') C (L2) Place the outer(radius) silicon/chips on inner carbon surface C inside SI10,11,12 c CALL GSPOS( 'TRPN' , 2, 'TRP2' , stripx3, -panthk/2- c + (chipthk+sithk)/2-strip5, stripz3, ir7,'ONLY') CALL GSPOS( 'TRPN' , 2, 'SI10' , stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, stripz3, ir7,'ONLY') CALL GSPOS( 'TRPN' , 2, 'SI11' , stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, stripz3, ir7,'ONLY') CALL GSPOS( 'TRPN' , 2, 'SI12' , stripx3, -panthk/2- + (chipthk+sithk)/2-strip5, stripz3, ir7,'ONLY') C------------------------------------------------------------------------ C (L2) Place the inner(radius) silicon inside TRPF C inside TRPF CALL GSPOS( 'TRPJ', 1, 'TRPF' , 0. , chipthk+sithk/2- + (chipthk+sithk)/2 , 0. , 0,'ONLY') C (L2) Place the outer(radius) silicon inside TRPN C inside TRPN CALL GSPOS( 'TRPR', 1, 'TRPN' , 0. , chipthk/2 , 0. , 0,'ONLY') C------------------------------------------------------------------------- C (L2) Place the chips on the inner(radius) silicon (inside TRPF) C inside TRPF CALL GSPOS( 'CHP2', 1, 'TRPF' , 0. , chipthk/2-(chipthk+sithk)/2 , + 0. , 0,'ONLY') CALL GSPOS( 'CHP2', 2, 'TRPF' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP2', 3, 'TRPF' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen*2 , 0,'ONLY') CALL GSPOS( 'CHP2', 4, 'TRPF' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen , 0,'ONLY') CALL GSPOS( 'CHP2', 5, 'TRPF' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen*2 , 0,'ONLY') C (L2) Place the chips on the outer(radius) silicon (inside TRPN) C inside TRPN CALL GSPOS( 'CHP2', 6, 'TRPN' , 0. , -sithk/2 , + chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP2', 7, 'TRPN' , 0. , -sithk/2 , + 3*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP2', 8, 'TRPN' , 0. , -sithk/2 , + 5*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP2', 9, 'TRPN' , 0. , -sithk/2 , + -chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP2', 10, 'TRPN' , 0. , -sithk/2 , + -3*chiplen/2 , 0,'ONLY') CALL GSPOS( 'CHP2', 11, 'TRPN' , 0. , -sithk/2 , + -5*chiplen/2 , 0,'ONLY') C (L2) Place the Large carbon panels in the mother panel volume C inside SI10,11,12 c CALL GSPOS( 'TRPB' , 1, 'TRP2', 0. , 0. , 0. ,0,'ONLY') CALL GSPOS( 'TRPB' , 1, 'SI10', 0. , 0. , 0. ,0,'ONLY') CALL GSPOS( 'TRPB' , 1, 'SI11', 0. , 0. , 0. ,0,'ONLY') CALL GSPOS( 'TRPB' , 1, 'SI12', 0. , 0. , 0. ,0,'ONLY') C (L2) Position and rotate each mother panel volume to create "cone" C inside MOTH DO jj=0,2 write (si_name,'(''SI'',I2.2)') jj+10 write (6,'('' si10,11,12: '',a5)') si_name DO J=0, panels-1 irot = irot+1 irx2 = irot CALL GSROTM( irx2, 90. , (-360*J/panels) , 90-zangle , (90. + -360*J/panels) , -zangle , (90-360*J/panels)) CALL GSPOS( si_name ,J+1+jj*1000, 'SICG' , + d*SIN(2*PI*J/panels), + d*COS(2*PI*J/panels) , zdist-jj*zsep-halfz + ,irx2,'ONLY') END DO END DO C (S1) This is for rotating and positioning the small mother panels (-z) C inside MOTH DO K=0, panels-1 irot = irot+1 irx3 = irot CALL GSROTM( irx3, 90. , (-360*K/panels) , 90+zangle , + (90-360*K/panels) , zangle , (90-360*K/panels)) CALL GSPOS( 'SI05' , K+1+K*10000, 'SICG' , + d2*SIN(2*PI*K/panels), + d2*COS(2*PI*K/panels) , -zdist2+halfz2 ,irx3,'ONLY') CALL GSPOS( 'TRPC' , K+1, 'SI05', 0. , 0. , 0. ,0,'ONLY') END DO C (S1) Place the small carbon mount strips on the carbon panels (inner) C inside SI05 CALL GSPOS( 'BOX1' , 5, 'SI05' , -stripx2 , + panthk/2+strip2/2 , -stripz2 ,ir3,'ONLY') C (S1) Place the small carbon strips on the carbon panels (outer) C inside SI05 CALL GSPOS( 'BOX1' , 6, 'SI05' , stripx2 , + -panthk/2-strip2/2 , -stripz2 ,ir4,'ONLY') C (S1) Place the inner(radius) silicon/chips on outer carbon strips C inside SI05 CALL GSPOS( 'TRPG' , 1, 'SI05' , -stripx2 , + panthk/2+strip2+(chipthk+sithk)/2 , -stripz2 ,ir3,'ONLY') C (S1) Place the inner(radius) silicon/chips on the inner carbon strips C inside SI05 CALL GSPOS( 'TRPG' , 2, 'SI05' , stripx2 , + -panthk/2-strip2-(chipthk+sithk)/2 , -stripz2 ,ir5,'ONLY') cxxx-------------------------------------------------------------------------- C (S1) Place the outer(radius) silicon/chips on the outer carbon surface C inside SI05 * CALL GSPOS( 'TRPO' , 1, 'SI05' , 0. , panthk/2+(chipthk+sithk)/2 * + , plength2/2-silen7/2,ir6,'ONLY') CALL GSPOS( 'TRPO' , 1, 'SI05' , stripx2 , & panthk/2+(chipthk+sithk)/2, & plength2/2-silen7/2,ir6,'ONLY') C (S1) Place the outer(radius) silicon/chips on the inner carbon surface C inside SI05 CALL GSPOS( 'TRPO' , 2, 'SI05' , -chipwid*COS(sangle*deg) + , -panthk/2-(chipthk+sithk)/2 + , plength2/2-silen7/2,ir7,'ONLY') C (S1) Place the inner(radius) silicon inside TRPG C inside TRPG CALL GSPOS( 'TRPK', 1, 'TRPG' , 0. , chipthk+sithk/2- + (chipthk+sithk)/2 , 0. , 0,'ONLY') C (S1) Place the outer(radius) silicon inside TRPO C inside TRPO CALL GSPOS( 'TRPS', 1, 'TRPO' , 0. , chipthk/2 , 0. , 0,'ONLY') C (S1) Place the chips on the inner(radius) silicon (inside TRPG) C inside TRPG CALL GSPOS( 'CHP3', 1, 'TRPG' , 0. , chipthk/2-(chipthk+sithk)/2 , + 0. , 0,'ONLY') CALL GSPOS( 'CHP3', 2, 'TRPG' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP3', 3, 'TRPG' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen*2 , 0,'ONLY') CALL GSPOS( 'CHP3', 4, 'TRPG' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen , 0,'ONLY') CALL GSPOS( 'CHP3', 5, 'TRPG' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen*2 , 0,'ONLY') C (S1) Place the chips on the outer(radius) silicon (inside TRPO) C inside TRPO CALL GSPOS( 'CHP3', 6, 'TRPO' , 0. , -sithk/2 , 0. , 0,'ONLY') CALL GSPOS( 'CHP3', 7, 'TRPO' , 0. , -sithk/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP3', 8, 'TRPO' , 0. , -sithk/2 , + -chiplen , 0,'ONLY') C (S2) This is for rotating and positioning the small mother panels (+z) C inside MOTH DO L=0, panels-1 irot = irot+1 irx4 = irot CALL GSROTM( irx4, 90. , -360*L/panels , 90-zangle , + 90-360*L/panels , -zangle , 90-360*L/panels) CALL GSPOS( 'SI09' , L+1+L*10100, 'SICG' , + d2*SIN(2*PI*L/panels), + d2*COS(2*PI*L/panels), zdist2-halfz2 , irx4, 'ONLY') c CALL GSPOS( 'TRPD' , 1, 'SI09', 0. , 0. , 0. ,0,'ONLY') CALL GSPOS( 'TRPD' , L+1, 'SI09', 0. , 0. , 0. ,0,'ONLY') END DO C (S2) Place the small carbon strips on the carbon panels (inner) C inside SI09 CALL GSPOS( 'BOX1' , 7, 'SI09' , -stripx2 , + -panthk/2-strip2/2 , stripz2 ,ir4,'ONLY') C (S2) Place the small carbon mount strips on the carbon panels (outer) C inside SI09 CALL GSPOS( 'BOX1' , 3, 'SI09' , stripx2 , + panthk/2+strip2/2 , stripz2 ,ir3,'ONLY') C (S2) Place the inner(radius) silicon/chips on inner carbon strips C inside SI09 CALL GSPOS( 'TRPH' , 1, 'SI09' , -stripx2 , + -panthk/2-strip2-(chipthk+sithk)/2 + , stripz2 ,ir5,'ONLY') C (S2) Place the inner(radius) silicon/chips on outer carbon strips C inside SI09 CALL GSPOS( 'TRPH' , 2, 'SI09' , stripx2 , + panthk/2+strip2+(chipthk+sithk)/2 + , stripz2 ,ir3,'ONLY') C (S2) Place the outer(radius) silicon/chips on outer carbon surface C inside SI09 CALL GSPOS( 'TRPP' , 1, 'SI09' , 0. , panthk/2+ + (chipthk+sithk)/2 , -plength2/2+silen7/2,ir6,'ONLY') C (S2) Place the outer(radius) silicon/chips on inner carbon surface C inside SI09 CALL GSPOS( 'TRPP' , 2, 'SI09' , chipwid*COS(sangle*deg) + , -panthk/2-(chipthk+sithk)/2 + , -plength2/2+silen7/2,ir7,'ONLY') C (S2) Place the inner(radius) silicon inside TRPH C inside TRPH C CALL GSPOS( 'TRPL', 1, 'TRPH' , 0. , chipthk+sithk/2- + (chipthk+sithk)/2 , 0. , 0,'ONLY') C (S2) Place the outer(radius) silicon inside TRPP C inside TRPP CALL GSPOS( 'TRPT', 1, 'TRPP' , 0. , chipthk/2 , 0. ,0,'ONLY') C (S2) Place the chips on the inner(radius) silicon (inside TRPH) C inside TRPH CALL GSPOS( 'CHP4', 1, 'TRPH' , 0. , chipthk/2-(chipthk+sithk)/2 , + 0. , 0,'ONLY') CALL GSPOS( 'CHP4', 2, 'TRPH' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP4', 3, 'TRPH' , 0. , chipthk/2-(chipthk+sithk)/2 , + chiplen*2 , 0,'ONLY') CALL GSPOS( 'CHP4', 4, 'TRPH' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen , 0,'ONLY') CALL GSPOS( 'CHP4', 5, 'TRPH' , 0. , chipthk/2-(chipthk+sithk)/2 , + -chiplen*2 , 0,'ONLY') C (S2) Place the chips on the outer(radius) silicon (inside TRPP) C inside TRPP CALL GSPOS( 'CHP4', 6, 'TRPP' , 0. , -sithk/2 , + 0. , 0,'ONLY') CALL GSPOS( 'CHP4', 7, 'TRPP' , 0. , -sithk/2 , + chiplen , 0,'ONLY') CALL GSPOS( 'CHP4', 8, 'TRPP' , 0. , -sithk/2 , + -chiplen , 0,'ONLY') c====================== declare the sensitive volumes ==========================c c from the old code: c call gsdet(set_id,v_i_name,nv,namesv,nbitsv,idtype,nwpa c & ,nwsa,iset,idet) c call gsdeth(set_id,v_i_name,nhh,inrNMSH,inrNBITSH c & ,inrORIG,inrFACT) cc&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& namesv(4) = 'SI05' namesv(5) = 'TRPx' namesv(6) = 'TRPK' call gsdet( set_id,namesv(4), 6, namesv, nbitsv, idtype, nwpa, & nwsa, iset, idet) call gsdeth(set_id,namesv(4),nhh,inrNMSH,inrNBITSH & ,inrORIG,inrFACT) cxxx end endcap code ENDIF ! check on volume character from line 367 CVOLU_OPT... c--- Write parameters into the svxPISA.par file (temporary solution) c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" open(unit=15,file=svxpar_file,status='UNKNOWN',err=995) c SVX cage parameters write(15,*,err=994) 'SVX cage parameters:' write(15,*,err=994) sili_cg_rmn write(15,*,err=994) sili_cg_thck, sili_cg_inthck write(15,*,err=994) sili_cg_tempc write(15,*,err=994) sili_cg_npcon write(15,*,err=994) (sili_cg_z(iLayer), iLayer=1,sili_cg_npcon) write(15,*,err=994) (sili_cg_rmx(iLayer), iLayer=1,sili_cg_npcon) write(15,*,err=994) sili_cg_xdisp, sili_cg_ydisp, sili_cg_zdisp c SVX barrel parameters write(15,*,err=994) 'SVX barrel parameters:' write(15,*,err=994) sili_br_nlayers write(15,*,err=994) * (sili_br_r(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_z(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_nsn(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_snhalfx(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_snhalfy(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_snhalfz(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_x0add(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_snzgap(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_dphi(iLayer), iLayer=1,sili_br_nlayers) write(15,*,err=994) * (sili_br_tilt(iLayer), iLayer=1,sili_br_nlayers) do iLayer = 1, sili_br_nlayers write(15,*,err=994) sili_br_nsec(iLayer) write(15,*,err=994) * (sili_br_nlad(isec,iLayer),isec=1,sili_br_nsec(iLayer)) write(15,*,err=994) * (sili_br_phic(isec,iLayer),isec=1,sili_br_nsec(iLayer)) enddo c Number of endcap layers write(15,*,err=994) 'SVX endcap parameters:' cxxx write(15,*,err=994) sili_sideLayers c BARREL: Write sensor rotation matrices and translation vectors write(15,*,err=994) * 'SVX Barrel sensor rotation matrices and translation vectors' call uctoh(namesv(1), LNAM(1), 4, 4) LNUM(1) = 1 call uctoh(namesv(2), LNAM(2), 4, 4) LNUM(2) = 1 call uctoh(namesv(3), LNAM(3), 4, 4) LNUM(3) = 1 do iLayer = 1, sili_br_nlayers call uctoh(siliNames(iLayer), LNAM(4), 4, 4) nladd = 0 do isec = 1, sili_br_nsec(iLayer) nladd = nladd + sili_br_nlad(isec,iLayer) enddo do iladd = 1, nladd LNUM(4) = iladd call uctoh(namesv(5), LNAM(5), 4, 4) do isen = 1, sili_br_nsn(iLayer) LNUM(5) = isen write(15,*,err=994) 0, iLayer, iladd, isen NLEVEL = 0 call glvolu(5, LNAM, LNUM, isec) write(15,*,err=994) (gtran(isec,NLEVEL), isec=1,3) write(15,*,err=994) (grmat(isec,NLEVEL), isec=1,3) write(15,*,err=994) (grmat(isec,NLEVEL), isec=4,6) write(15,*,err=994) (grmat(isec,NLEVEL), isec=7,9) enddo enddo enddo NLEVEL = 0 close(unit=15) c--- c--- Fill 'PARA' zebra-bank c--- CHFORM = '5I -F' ! 4 integer counts, then use all float call mzform('PARA',CHFORM,iod) ! book characteristic c c write the parameters to a zebra bank. later they will go to output file c--- Counting number of parameters npar = 1 ! Number of hit components c Contribution from SIEN/SICG/SIIC npar = npar + 8 + 2*sili_cg_npcon c Contribution from Barrel npar = npar + 2 + 11*sili_br_nlayers Do iLayer = 1, sili_br_nlayers npar = npar + 2*sili_br_nsec(iLayer) Enddo c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&& To take care for the Endcap programer &&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c Contribution from Endcap cxxx npar = npar + 2 + 11*sili_sideLayers c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& call mzbook(ixdiv_fr, lFD_PARA, lFD_PARA, 1, & 'PARA', 0, 0, npar, iod, 0) c C fill the bank c c Two first integers: numbers of layers in Barrel & Endcap iPoint = 1 iqf(lfd_para + iPoint) = sili_br_nlayers iPoint = iPoint + 1 cxxx iqf(lfd_para + iPoint) = sili_sideLayers c Number of hit components iPoint = iPoint + 1 iqf(lfd_para + iPoint) = nhh c Number of barrel & endcap volume descriptors iPoint = iPoint + 1 iqf(lfd_para + iPoint) = nbrv iPoint = iPoint + 1 iqf(lfd_para + iPoint) = necv c c Envelope/Cage parameters c iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_rmn iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_thck iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_inthck iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_tempc iPoint = iPoint + 1 qf(lfd_para + iPoint) = FLOAT(sili_cg_npcon) Do icnt = 1, sili_cg_npcon iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_z(icnt) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_rmx(icnt) Enddo iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_xdisp iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_ydisp iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_cg_zdisp C C Barrel parameters C Do iLayer = 1, sili_br_nlayers iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_snhalfx(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_snhalfy(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_snhalfz(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_x0add(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_snzgap(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_tilt(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = FLOAT(sili_br_nsn(iLayer)) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_r(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_z(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_dphi(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = FLOAT(sili_br_nsec(iLayer)) Do isec = 1, sili_br_nsec(iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = sili_br_phic(isec,iLayer) iPoint = iPoint + 1 qf(lfd_para + iPoint) = FLOAT(sili_br_nlad(isec,iLayer)) Enddo Enddo c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&& To take care for the Endcap programer &&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& C C Endcap parameters C cxxx do iLayer = 1,sili_sideLayers cxx iPoint = iPoint + 1 cx qf(lfd_para + iPoint) = sili_phi1_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_dph_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_z1_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_rmin1_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_rmax1_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_z2_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_rmin2_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_rmax2_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_npdv_side(iLayer) c iPoint = iPoint + 1 c qf(lfd_para + iPoint) = sili_nz_side(iLayer) cx iPoint = iPoint + 1 cxx qf(lfd_para + iPoint) = sili_zCenter_side(iLayer) cxxx enddo c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& c&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& return ! from subroutine svx 994 stop ' svxPISA.par write error' 995 stop ' Unable to open svxPISA.par' 996 stop ' Read error in siliside_par segment of phnx.par' 997 stop ' Read error in sili_br_par segment of phnx.par' 998 stop ' Read error in sili_cg_par segment of phnx.par' 999 stop ' Unable to open phnx.par' end ! end of subroutine svx c=============================================================================c