c $Id: svx.f,v 1.25 2008/05/02 18:03:08 hubert Exp $ C File name: svx.f ( was previously inr.f) C ------xxx---------- 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/Sep 2004: replaced endcap geometry with detailed lampshade c description from Gerd Kunde, Michael Malik and Jan Boissevain c Moved the material/medium numbers into the MVD range c Hubert van Hecke, Jan 2005: shrunk middle 4 endcaps, added support lampshadeshade c (SISR) with pipes and cables. Added cooling tubes to the barrel. c Hubert: added a 'dummy silicon plane' in the location of South and North Mutr c stations 1. This allows simple cuts on surviving particles. c Switched on/off with new phnx.par variable station1_dummy. Aug 2005 c Hubert: added option to install only 1/4 of the North endcaps, switched with c variable quarter_section in the phenx.par file c Hubert: Bug fix: declared SIP(S,M,B) to be 'MANY', since they are overlapping c Hubert: Added switch (sili_endcap_type) to make 'flat' endcaps. c 0=no endcaps, 1=umbrella endcaps, 1=flat endcaps. 06 Jan 2006 (w/ Sasha) c 3=titlted endcap pixel ('ldrd') pixel planes, 4=flat ldrd planes c Sasha L: Added misalignment for the barrel (07 September 2006) c Hubert: Added global in/out coordinates to the output (18 sep 2006) c Sasha L: staggered geometry for barrel strips (layers 3 and 4) c Hubert: removed 'station1' option, replaced by 'stagger' option to give stations c small, staggered rotations. (13 Dec 2006). c Hubert: Fixed S support cone orientation (sisr#2), moved cooling tubes to central c up/down sectors. c Hubert: Removed cooling tubes from SISR, 1 of 2 SJCC, SIIC, SBX1,2,3. Enlarged c SISP, thinned SICB,M,S 3->2mm. Enlarged SISP's. SICT 3->4mm. Jan 2007 c Added support posts SISQ for SISP's, and cooling manifolds SJSP and SJSQ c Removed code for sili_endcap_type = 1 c Introduced material 'honeycomb-1' for support structures. c Hubert: Enlarged the master volume SIEN to hold the readout wheels at +-Z. Added c readout wheel volume SIWH, with pc boards, connectors, cables rohacell. c Dave Lee FVTX geometry updated to reflect TDR 9-10-07 Type 1 = FVTX, type C 2 = LDRD C Hubert: Lifted out the FVTX into svx_fvtx.f, and IFVTX into svx_ifvtx.f. This file c now constructs the barrels only, plus common support structures, plus c the big readout wheels. c Maki Kurosawa constructed the no-tilt layers 3,4, plus new cooling and omega c pieces. March-April 2008 *===================================================================================== SUBROUTINE SVX(FULL,NH) Implicit none 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' ! contains PI include 'gcflag.inc' include 'gugeom.inc' ! contains irot, irotnull 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) /10*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) 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_endcap_config, sili_cg_rinner, & sili_cg_swedge_len, & sili_cg_bwedge_len, sili_cg_support_thk c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" c--- VTX Barrel parameters c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Integer sili_br_nlayers /8/ ! Number of barrel layers Real sili_br_snhalfx(20) /.696,19*1.71555/ ! Si sensor width, cm Real sili_br_snhalfy(20) /0.01,19*0.02/ ! Si sensor thickness, cm Real sili_br_snhalfz(20) /2.836,19*3.2291/ ! Si sensor length, cm Real sili_br_x0add(20) /20*0.01/ ! Passive material thickness c ! in the ladders added on top c ! of Si sensor, RadLength X0 Real sili_br_snzgap(20) /20*0./ ! Sensor z-gap (if >=0) or c ! sensor z-overlap (if <0), cm Real sili_br_tilt(20) /7.8,7.0,0.0,0.0,16*0./ ! Ladder tilts Integer sili_br_nsn(20) /4,19*5/ ! Number of Si sensors/ladder Real sili_br_r(20) /2.5,5.,10.,14.,0.3,15*0./ ! 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 c ! The fifth parameter is staggering c ! in strip layers 3 and 4. c ! Set it to 0 to get old geometry 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/ real sili_br_misalignment(8) /8*0./ ! misalignment in X-Y plane (cm), east arm first real sili_br_shiftstag logical lbarrel /.true./ ! allows the barrel to be switched on/off integer sili_wheel_yesno /1/ ! build readout wheels or not c ====================================================================== c The parameters are for support rings at the end of the ladders 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 Real sili_br_manz(20) /-17.,17.,18*0./ ! Z-positions cooling manifold Real sili_br_manr(20) /20*2.4/ ! mean radius cooling manifold Real sili_br_mandia(20) /20*10./ ! diameter cooling manifold real pixel_hdi_thk/.01/ real pixel_hdi_phimin/100./ real pixel_hdi_phimax/260./ real siwh_pcb_thick ! pcb half-thickness = 1/32" real siwh_pcb_z(10) ! pcb center positions real siwh_pcb_rmax ! pcb max radius real siwh_pcb_connz ! pcb connector half-z real siwh_pcb_suppz(10) ! pcb support/cooling half-z real siwh_roha1_thick ! inner rohacell cover half-thickness real sili_br_ct_radius ! cooling tube radius real sili_endcap_z(8) ! to place barrel cables, endcap roha cage 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 & ,sili_br_manz,sili_br_manr ,sili_br_mandia $ ,sili_br_misalignment, & sili_wheel_yesno, siwh_pcb_thick, siwh_pcb_z, siwh_pcb_rmax, & siwh_pcb_connz, siwh_pcb_suppz, siwh_roha1_thick, & sili_br_ct_radius, sili_endcap_z C ================================================================ C--- Local definitions C ================================================================ c 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 siliSupport /'SISP'/ ! Barrel support rings c VTX layer names (for barrel, names of ladders in a layer) character*4 siliNames(12) /'SI01', 'SI02', 'SI03', 'SI04', & 'SI05', 'SI06', 'SI07', 'SI08', & 'SI09', 'SI10', 'SI11', 'SI12'/ character*4 siliBrSensor /'SISN'/ ! Barrel sensor name character*4 siliBrPassive /'SIPV'/ ! Barrel passive material name character*4 siliBrOmega /'SIOM'/ ! Barrel omega shape name character*4 siliBrOmegap /'SIOP'/ ! Barrel omega peace name character*4 siliBrSVX4 /'SVX4'/ ! Barrel svx4 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 /7/ ! Num. of endcap vol. desc. Integer nv /7/ ! max(nbrv,necv) Integer nbitsv(7) /7*8/ ! Bits to pack vol. copy # Character*4 namesv(6) /'HALL','SIEN','SICG' * ,'SIxx','SISN','SDUM'/ ! Volume names, barrel Character*4 namesw(7) /'HALL','SIEN','SICG' * ,'SIxx','SIPx','SISx','SSSx'/ ! 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 /21/ ! Number of hit components integer*4 inrNBITSH(21) /21*32/ ! Bits for packing the hits 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 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./ ! 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 ================================================================ C--- Local definitions of materials/media C ================================================================ Integer sili_med_silicon /10/ ! Sensitive silicon nmed (nmat=50,Si) Integer sili_med_passive /26/ ! Ladder passive nmed (nmat=09,Al) Integer sili_med_cg /120/ ! Cage (SIEN-SICG) nmat/nmed (Rohacell) Integer sili_med_coldair /121/ ! Gas inside the SICG (cold air) Integer sili_med_gfrp /122/ ! GFRP for the fake support integer sili_med_carbon /123/ ! carbon-carbon composite integer sili_med_coolant /124/ ! C5F12 liquid coolant integer sili_med_honeycomb /125/ ! 1/4" honeycomb, .5mm c-c skin, Al core 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) integer LNUM(6) /1,1,1,1,1,1/ REAL FIELDM,TMAXFD,DMAXMS,DEEMAX,EPSIL,STMIN & ,WMAT(3),UBUF(1),ANUMB,ZNUMB,DENS,RADL,ABSL CHARACTER*80 CHFORM character*4 v_m_name,v_i_name, sil_name integer iLayer, iPoint, icnt, nr, npar, nmed, ivolu, iset, idet, & iod, wedges, nladd, iladd, isec, isen, nsensors, ivol1, ierr, & icopy, irottop, irotbot, irot1, irot2, irot3, i, & nsvx,nsvxr real dim_sili(30), 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), par(20), xcool, ycool, rcool, a_cool(2), z_cool(2), & rladd0, posx, posy, a_honey(2), z_honey(2), & siwh_rmin, siwh_rmax, bwedge_lowx, bwedge_highx, swedge_lowx, & swedge_highx, aangle, bangle, cstep, ssil_lowx, ssil_highx, & ssil_len, wedge_thk, back_planthk, hdithk, silthk, routerb, & routers, stationzthick, bsil_lowx, bsil_highx, bsil_len, & z_disk, sens_off, & phictladd(2),dphict(2),rctladd(2),xctladd(2),yctladd(2), & phiomladd(4),dphiom(4),romladd(4),xomladd(4),yomladd(4), & shiftstag(2),phitmpladd,ctdist, & xomega(2), yomega(2), romega(2), romega0(4) real rmyres,rmyrndm,rmydum integer rmyrndmi integer itf_lun ! geometry description logical unit common /interface/itf_lun C======================================================================! C*************************** EXECUTABLE CODE***************************! C======================================================================! C c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c BEGIN c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> c c Read the geometry file segments c write( *,* ) 'svx - reading parameter from common interface' rewind( unit = itf_lun ) read( itf_lun, nml = sili_cg_par, err = 998 ) read( itf_lun, nml = sili_br_par, err = 997 ) C C only book volumes if input parameters are OK C write(*,'(a16,5a5)') 'SVX CVOLU_OPT = ', & CVOLU_OPT(1,3),CVOLU_OPT(2,3),CVOLU_OPT(3,3), & CVOLU_OPT(4,3),CVOLU_OPT(5,3) IF(CVOLU_OPT(1,3).EQ.'BARR') continue write(*,*) ' sili_endcap_config = ', sili_endcap_config IF(CVOLU_OPT(1,3).EQ.'FULL'.OR. & CVOLU_OPT(1,3).EQ.'VOLS'.OR. & CVOLU_OPT(1,3).EQ.'BARR') 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 sienxxx 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 ! number of user words in GSMATE calls 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) v_m_name = 'HALL' v_i_name = siliEnvelope ! = SIEN 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, a cylinder with a hole for the beampipe. dim_sili(1) = 0.0 dim_sili(2) = 360.0 dim_sili(3) = 2 dim_sili(4) = sili_cg_z(1) + sili_cg_thck dim_sili(5) = sili_cg_rmn dim_sili(6) = sili_cg_rmx(3) - sili_cg_thck dim_sili(7) = sili_cg_z(6) - sili_cg_thck dim_sili(8) = sili_cg_rmn dim_sili(9) = sili_cg_rmx(3) - sili_cg_thck C************************************************************************** c Define material 'AIRCOLD' at 0C nmat = sili_med_coldair CALL GFMATE(nmat,sil_name,anumb,znumb, ! First check if this material & dens,radl,absl,ubuf,nwbuf) ! number has already been used: * write (6,*)' aircold:' if (anumb.ne. -1.0) goto 993 ! if so, abort. 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. ubuf(1) = sili_cg_tempc nwbuf = 1 CALL GSMATE(nmat,'AIRCOLD',anumb,znumb, 1 dens,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,9,ivolu) call gsatt(v_i_name,'SEEN',1) call gspos(v_i_name,nr,v_m_name,0.,0.,0.,irotnull,'ONLY') c ====================================================================== c Define material/media 'GFRP' (slightly modified G10 from ../itr/pc1gem.f) nmat = sili_med_gfrp ! CALL GFMATE(nmat,sil_name,anumb,znumb, ! First check if this material & dens,radl,absl,ubuf,nwbuf) ! number has already been used: if (anumb.ne. -1.0) goto 993 ! if so, abort. anumb = 18.14 ! NOTE that an unsuccessful znumb = 9.065 ! call to GFMATE can clobber dens = 1.68 ! the returned variables, so we radl = 25. ! set them all AFTER calling GFMATE absl = 56.7 ! Jan 2007 HvH ubuf(1) = 0. nwbuf = 1 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 Define material/media 'Carbon-carbon', for endcap composite panels nmat = sili_med_carbon ! = 123 CALL GFMATE(nmat,sil_name,anumb,znumb, ! First check if this material & dens,radl,absl,ubuf,nwbuf) ! number has already been used: * write (6,*)' carbon:',ubuf,nwbuf if (anumb.ne. -1.0) goto 993 ! if so, abort. anumb = 12.01 ! from call to gpmate(0) znumb = 6.00 ! dens = 1.78 ! from Hytec report (default=2.265) radl = 23.9 ! scaled up from density absl = 63.5 ! scaled up from density ubuf(1) = 0. nwbuf = 1 CALL GSMATE(nmat,'Carbon-carbon$',anumb,znumb,dens & ,radl,absl,ubuf,nwbuf) nmed = sili_med_carbon 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,'Carbon-carbon$',nmat,isvol,ifield,fieldm * ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) c Define material/media 'Freon-coolant' ! C5F12 (from Hytec report) nmat = sili_med_coolant! = 124 CALL GFMATE(nmat,sil_name,anumb,znumb, ! First check if this material & dens,radl,absl,ubuf,nwbuf) ! number has already been used: * write (6,*)' coolant:' if (anumb.ne. -1.0) goto 993 ! if so, abort. If not, define: a_cool(1) = 12.010 ! Carbon z_cool(1) = 6.000 ! wmat (1) = 5 ! a_cool(2) = 18.998 ! Fluor z_cool(2) = 9.000 ! wmat (2) = 12 ! dens = 1.597 ! from Hytec report CALL GSMIXT(nmat,'Freon-coolant$', a_cool, z_cool, dens,-2,wmat) nmed = sili_med_coolant ! use parameters from carbon-carbon CALL GSTMED(nmed,'Freon-coolant$',nmat,isvol,ifield,fieldm & ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) * write (6,*)' honeycomb:' nmat = sili_med_honeycomb ! = 125 a_honey(1) = 12.010 ! Carbon z_honey(1) = 6.000 ! wmat (1) = 0.97 ! 97% by weigh a_honey(2) = 26.98 ! Aluminum z_honey(2) = 13.000 ! wmat (2) = 0.03 ! 3% by weight dens = 0.251 ! scaled from c-c CALL GSMIXT(nmat,'Honeycomb-1$', a_honey, z_honey, dens,2,wmat) nmed = sili_med_honeycomb ! use parameters from carbon-carbon CALL GSTMED(nmed,'Honeycomb-1$',nmat,isvol,ifield,fieldm & ,tmaxfd,dmaxms,deemax,epsil,stmin,ubuf,nwbuf) cxx call gpmate(0) ! print all materials cxx cxx call gptmed(0) ! print all media nmed = sili_med_gfrp ! G-10 describing the clip blocks v_i_name = siliSupport ! SISP are support rings v_m_name = siliCage call gsvolu(v_i_name,'TUBE',nmed,dim_sili,0,ivolu) call gsatt(v_i_name,'SEEN',1) ! nmed = sili_med_honeycomb ! SISQ are posts that connect rings to outside frame call gsvolu('SISQ','TRD1',nmed,dim_sili,0,ivolu) call gsatt(v_i_name,'SEEN',1) nmed = sili_med_coolant call gsvolu('SJSP','TUBE',nmed,dim_sili,0,ivolu) ! cooling tube circle call gsatt(v_i_name,'SEEN',1) call gsvolu('SJSQ','TUBE',nmed,dim_sili,0,ivolu) ! cooling tube feeds call gsatt(v_i_name,'SEEN',1) npar = 3 irot = irot+1 ! for top SISQ posts call gsrotm(irot,90.,0.,180.,0.,90.,90.) irottop = irot irot = irot+1 ! for bottom SISQ posts call gsrotm(irot,90.,0.,0.,0.,90.,-90.) irotbot = irot Do nr = 1, sili_br_nspring ! loop over 8 rings dim_sili(1) = sili_br_sprin(nr) ! support rings dim_sili(2) = sili_br_sprout(nr) dim_sili(3) = sili_br_spthck(nr) if (lbarrel) then call gsposp(v_i_name,nr,v_m_name,0.,0., & sili_br_spz(nr), & irotnull,'ONLY',dim_sili,npar) ! endif dim_sili(1) = 0.14* sili_br_sprout(nr) ! ring support posts/wedges dim_sili(2) = 2.56 ! = sili_cg_rmx(1)*tan(8 degrees) dim_sili(3) = sili_br_spthck(nr) dim_sili(4) = (sili_cg_rmx(3) -0.5 -sili_br_sprout(nr))/2-0.12 if (nr.eq.1.or.nr.eq.5) then ! special for innermost rings dim_sili(2) = 0.14*sili_br_sprin(2) ! shared support dim_sili(4) = (sili_br_sprin(2) - sili_br_sprout(1))/2-0.05 endif posy = sili_br_sprout(nr) + dim_sili(4) if (lbarrel) then call gsposp('SISQ',nr,v_m_name,0.,posy, & sili_br_spz(nr), & irottop,'ONLY',dim_sili,4) ! call gsposp('SISQ',nr+8,v_m_name,0.,-posy, & sili_br_spz(nr), & irotbot,'ONLY',dim_sili,4) ! endif dim_sili(1) = sili_br_manr(nr) - 0.443*sili_br_mandia(nr) ! cooling manifolds - rings dim_sili(2) = sili_br_manr(nr) + 0.443*sili_br_mandia(nr) dim_sili(3) = 0.443*sili_br_mandia(nr) if (lbarrel) then call gsposp('SJSP',nr,v_m_name,0.,0., & sili_br_manz(nr), & irotnull,'ONLY',dim_sili,npar) ! endif dim_sili(1) = 0.0 ! cooling manifolds - supply pipes dim_sili(2) = 0.5*sili_br_mandia(nr) dim_sili(3) = (sili_cg_rmx(3) - sili_br_manr(nr) - & sili_cg_thck - 0.443*sili_br_mandia(nr))/2.0-0.1 posx = 1.0 posy = sili_br_manr(nr) +0.443*sili_br_mandia(nr)+ dim_sili(3) if (lbarrel) then call gsposp('SJSQ',nr ,v_m_name, posx, posy, & sili_br_manz(nr), & irottop,'ONLY',dim_sili,4) ! call gsposp('SJSQ',nr+8 ,v_m_name, posx,-posy, & sili_br_manz(nr), & irotbot,'ONLY',dim_sili,4) ! call gsposp('SJSQ',nr+16,v_m_name,-posx, posy, & sili_br_manz(nr), & irottop,'ONLY',dim_sili,4) ! call gsposp('SJSQ',nr+24,v_m_name,-posx,-posy, & sili_br_manz(nr), & irotbot,'ONLY',dim_sili,4) ! endif Enddo ! loop over 8 rings C (4b) cooling tube (copied from further down, since copies are used in the barrel) call gsvolu( 'SICT', 'TUBE', sili_med_coolant, par, 0, ivol1) 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 omega shape behind the passive material nmed = sili_med_passive ! Aluminum npar = 0 call gsvolu(siliBrOmega,'PCON',nmed,dim_sili,npar,ivolu) call GSATT (siliBrOmega,'SEEN',1) call GSATT (siliBrOmega,'COLO',4) c Create omega shape behind the passive material nmed = sili_med_passive ! Aluminum npar = 0 call gsvolu(siliBrOmegap,'BOX ',nmed,dim_sili,npar,ivolu) call GSATT (siliBrOmegap,'SEEN',1) call GSATT (siliBrOmegap,'COLO',4) c Create SVX4 behind the passive material nmed = sili_med_carbon ! G10 npar = 0 call gsvolu(siliBrSVX4,'BOX ',nmed,dim_sili,npar,ivolu) call GSATT (siliBrSVX4,'SEEN',1) call GSATT (siliBrSVX4,'COLO',4) c Create a layer of passive material behind the sensor nmed = sili_med_carbon ! changed ladder support to c-c 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 ) --------------------------------------- if(sili_br_r(5).gt.0.) then write(*,*) ' SVX BARREL uses Staggerd Geometry: ', * sili_br_r(5) endif icopy = 0 ! for cooling tube SICT 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 if(iLayer.gt.2) then ladd_halfx = ladd_halfx + 2.225 endif 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 (SI01, SI02, SI03, SI04) 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 c Cooling tube parameters: par(1) = sili_br_ct_radius - 0.05 par(2) = sili_br_ct_radius par(3) = ladd_halfz ! this depends on the layer ctdist = 0.0 Do nr = 1, sili_br_nsn(iLayer) ! loop over sensors/stave c Sensor ! = 4, 4, 5, 6 v_i_name = siliBrSensor dim_sili(1) = sen_y(mod(nr-1,2)+1) dim_sili(4) = sili_br_snhalfy(iLayer) c active area is 3.6 mm narrower than passive layer if((iLayer.eq.3).or.(iLayer.eq.4)) then dim_sili(3) = sili_br_snhalfx(iLayer)-0.18 endif 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 c active area is 3.6 mm narrower than passive layer if((iLayer.eq.3).or.(iLayer.eq.4)) then dim_sili(3) = sili_br_snhalfx(iLayer) + 2.225 endif call gsposp(v_i_name,nr,v_m_name * ,0.,dim_sili(1),dim_sili(2),irotnull,'ONLY' * ,dim_sili(3),npar) if((iLayer.eq.3).or.(iLayer.eq.4)) then Do nsvx = 1, 12 nsvxr = (nr-1)*12 + nsvx if(nsvx.lt.7) then dim_sili(6) = sili_br_snhalfx(iLayer) * + 0.1 + 0.43625 else dim_sili(6) = -(sili_br_snhalfx(iLayer) * + 0.1 + 0.43625) endif dim_sili(1) = sen_y(2) if((nsvx.eq.1).or.(nsvx.eq.7)) then dim_sili(7) = dim_sili(2) - 2.6027 else if((nsvx.eq.2).or.(nsvx.eq.8)) then dim_sili(7) = dim_sili(2) - 1.7527 else if((nsvx.eq.3).or.(nsvx.eq.9)) then dim_sili(7) = dim_sili(2) - 0.9027 else if((nsvx.eq.4).or.(nsvx.eq.10)) then dim_sili(7) = dim_sili(2) + 0.9027 else if((nsvx.eq.5).or.(nsvx.eq.11)) then dim_sili(7) = dim_sili(2) + 1.7527 else if((nsvx.eq.6).or.(nsvx.eq.12)) then dim_sili(7) = dim_sili(2) + 2.6027 endif dim_sili(8) = 0.43625 dim_sili(9) = sili_br_snhalfy(iLayer) dim_sili(10) = 0.335 call gsposp(siliBrSVX4,nsvxr,v_m_name * ,dim_sili(6),dim_sili(1),dim_sili(7),irotnull, * 'ONLY',dim_sili(8),npar) Enddo c Omega piece ctdist = 1. v_i_name = siliBrOmegap dim_sili(1) = sen_y(mod(nr-1,2)+1) * + sili_br_snhalfy(iLayer) + pasv_halfy + pasv_halfy * + 0.025 dim_sili(3) = (ctdist - 2.*sili_br_ct_radius) dim_sili(4) = 0.025 call gsposp(v_i_name,nr,v_m_name * ,0.,dim_sili(1),dim_sili(2),irotnull,'ONLY' * ,dim_sili(3),npar) endif dim_sili(2) = dim_sili(2) + 2.*sili_br_snhalfz(iLayer) * + sili_br_snzgap(iLayer) Enddo c--- Place ladders SI01 - SI04 in the cage SICG rladd = sili_br_r(iLayer) dphit = DEGRAD*sili_br_tilt(iLayer) xladd = ladd_halfthck - sili_br_snhalfy(iLayer) ! partial thickness yladd = rladd + xladd*COS(dphit) xladd = xladd*SIN(dphit) rladd = sqrt(xladd*xladd + yladd*yladd) rcool = rladd + ladd_halfthck + sili_br_ct_radius ! tube on the outside of the ladder if((iLayer.eq.1).or.(iLayer.eq.2)) then C--- iLayer = 1 and 2 c Cooling tube xctladd(1) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yctladd(1) = sili_br_r(iLayer) + xctladd(1)*COS(dphit) xctladd(1) = xctladd(1)*SIN(dphit) rctladd(1) = sqrt(xctladd(1)*xctladd(1) * + yctladd(1)*yctladd(1)) rcool = rctladd(1) c Omega shape 1 xomladd(1) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(1) = sili_br_r(iLayer) + xomladd(1)*COS(dphit) * - 2*sili_br_ct_radius*SIN(dphit) xomladd(1) = xomladd(1)*SIN(dphit) * + 2*sili_br_ct_radius*COS(dphit) romladd(1) = sqrt(xomladd(1)*xomladd(1) * + yomladd(1)*yomladd(1)) c Omega shape 2 xomladd(2) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(2) = sili_br_r(iLayer) + xomladd(2)*COS(dphit) * + 2*sili_br_ct_radius*SIN(dphit) xomladd(2) = xomladd(2)*SIN(dphit) * - 2*sili_br_ct_radius*COS(dphit) romladd(2) = sqrt(xomladd(2)*xomladd(2) * + yomladd(2)*yomladd(2)) dphit = RADDEG*ASIN(xladd/rladd) dphict(1) = RADDEG*ASIN(xctladd(1)/rctladd(1)) dphiom(1) = RADDEG*ASIN(xomladd(1)/romladd(1)) dphiom(2) = RADDEG*ASIN(xomladd(2)/romladd(2)) else C--- iLayer = 3 and 4 c Cooling tube xctladd(1) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yctladd(1) = sili_br_r(iLayer) + xctladd(1)*COS(dphit) * - ctdist*SIN(dphit) xctladd(1) = xctladd(1)*SIN(dphit) * + ctdist*COS(dphit) rctladd(1) = sqrt(xctladd(1)*xctladd(1) * + yctladd(1)*yctladd(1)) rcool = rctladd(1) xctladd(2) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yctladd(2) = sili_br_r(iLayer) + xctladd(2)*COS(dphit) * + ctdist*SIN(dphit) xctladd(2) = xctladd(2)*SIN(dphit) * - ctdist*COS(dphit) rctladd(2) = sqrt(xctladd(2)*xctladd(2) * + yctladd(2)*yctladd(2)) rcool = rctladd(2) c Omega shape 1 xomladd(1) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(1) = sili_br_r(iLayer) + xomladd(1)*COS(dphit) * - (ctdist + 2*sili_br_ct_radius)*SIN(dphit) xomladd(1) = xomladd(1)*SIN(dphit) * + (ctdist + 2*sili_br_ct_radius)*COS(dphit) romladd(1) = sqrt(xomladd(1)*xomladd(1) * + yomladd(1)*yomladd(1)) c Omega shape 2 xomladd(2) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(2) = sili_br_r(iLayer) + xomladd(2)*COS(dphit) * - (ctdist - 2*sili_br_ct_radius)*SIN(dphit) xomladd(2) = xomladd(2)*SIN(dphit) * + (ctdist - 2*sili_br_ct_radius)*COS(dphit) romladd(2) = sqrt(xomladd(2)*xomladd(2) * + yomladd(2)*yomladd(2)) c Omega shape 3 xomladd(3) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(3) = sili_br_r(iLayer) + xomladd(3)*COS(dphit) * + (ctdist - 2*sili_br_ct_radius)*SIN(dphit) xomladd(3) = xomladd(3)*SIN(dphit) * - (ctdist - 2*sili_br_ct_radius)*COS(dphit) romladd(3) = sqrt(xomladd(3)*xomladd(3) * + yomladd(3)*yomladd(3)) c Omega shape 4 xomladd(4) = 2*ladd_halfthck - sili_br_snhalfy(iLayer) * + sili_br_ct_radius yomladd(4) = sili_br_r(iLayer) + xomladd(4)*COS(dphit) * + (ctdist + 2*sili_br_ct_radius)*SIN(dphit) xomladd(4) = xomladd(4)*SIN(dphit) * - (ctdist + 2*sili_br_ct_radius)*COS(dphit) romladd(4) = sqrt(xomladd(4)*xomladd(4) * + yomladd(4)*yomladd(4)) dphit = RADDEG*ASIN(xladd/rladd) dphict(1) = RADDEG*ASIN(xctladd(1)/rctladd(1)) dphict(2) = RADDEG*ASIN(xctladd(2)/rctladd(2)) dphiom(1) = RADDEG*ASIN(xomladd(1)/romladd(1)) dphiom(2) = RADDEG*ASIN(xomladd(2)/romladd(2)) dphiom(3) = RADDEG*ASIN(xomladd(3)/romladd(3)) dphiom(4) = RADDEG*ASIN(xomladd(4)/romladd(4)) endif dphid = sili_br_dphi(iLayer) dphir = DEGRAD*dphid v_i_name = v_m_name v_m_name = siliCage nr = 1 ! Note: we are inside of a loop over 4 layers Do isec = 1, sili_br_nsec(iLayer) ! 2 sectors: East, West nladd = sili_br_nlad(isec,iLayer) ! ladders per sector phitmpladd = sili_br_phic(isec,iLayer) * - (0.5*dphid)*(nladd-1) philadd = sili_br_phic(isec,iLayer) + dphit * - (0.5*dphid)*(nladd-1) phirotladd = -90.+sili_br_tilt(iLayer) + philadd philadd = DEGRAD*philadd c Cooling tube phictladd(1) = sili_br_phic(isec,iLayer) + dphict(1) * - (0.5*dphid)*(nladd-1) phictladd(1) = DEGRAD*phictladd(1) c Omega shape phiomladd(1) = sili_br_phic(isec,iLayer) + dphiom(1) * - (0.5*dphid)*(nladd-1) phiomladd(2) = sili_br_phic(isec,iLayer) + dphiom(2) * - (0.5*dphid)*(nladd-1) phiomladd(1) = DEGRAD*phiomladd(1) phiomladd(2) = DEGRAD*phiomladd(2) if((iLayer.eq.3).or.(iLayer.eq.4)) then c Cooling tube phictladd(2) = sili_br_phic(isec,iLayer) + dphict(2) * - (0.5*dphid)*(nladd-1) phictladd(2) = DEGRAD*phictladd(2) c Omega shape phiomladd(3) = sili_br_phic(isec,iLayer) + dphiom(3) * - (0.5*dphid)*(nladd-1) phiomladd(4) = sili_br_phic(isec,iLayer) + dphiom(4) * - (0.5*dphid)*(nladd-1) phiomladd(3) = DEGRAD*phiomladd(3) phiomladd(4) = DEGRAD*phiomladd(4) endif DO iladd = 1, nladd ! loop over ladders in this sector C C------------ staggered geometry ----------------------------------------- C rladd0 = rladd + sili_br_shiftstag shiftstag(1) = 0. shiftstag(2) = 0. if((iLayer.eq.3).or.(iLayer.eq.4)) then if(iLayer.eq.3) then if((iladd.eq.2).or.(iladd.eq.5).or.(iladd.eq.8)) then sili_br_shiftstag = -sili_br_r(5) else if((iladd.eq.1).or.(iladd.eq.4).or. * (iladd.eq.7)) then sili_br_shiftstag = 0. else sili_br_shiftstag = sili_br_r(5) endif else if((iladd.eq.3).or.(iladd.eq.6).or. * (iladd.eq.9).or.(iladd.eq.12)) then sili_br_shiftstag = -(sili_br_r(5) - 0.2) else if((iladd.eq.2).or.(iladd.eq.5).or. * (iladd.eq.8).or.(iladd.eq.11)) then sili_br_shiftstag = 0. else sili_br_shiftstag = (sili_br_r(5) - 0.2) endif endif rladd0 = rladd + sili_br_shiftstag shiftstag(1) = sili_br_shiftstag*cos(philadd) shiftstag(2) = sili_br_shiftstag*sin(philadd) endif C C------------------------------------------------------------------------- C c c------------------------------------------------------------------------- c add misalignment rmyres = sili_br_misalignment((isec-1)*4+iLayer) ! resolution in cm if(rmyres.gt.0.) then rmydum = 10000. call gpoiss(rmydum,rmyrndmi,1) ! gaussian with mean 10000 and sigma 100 rmyrndm = rmyrndmi ! convert to real rmyrndm = (rmyrndm-10000.)/100. ! gaussian with mean 0 and sigma 1 write(*,*) ' SVX BARREL IS MISALLIGNED : ', * isec, iLayer, iladd, rmyrndm rmyrndm = rmyrndm * rmyres ! random shift in cm, assuming rmyres alignment accuracy rmyrndm = rmyrndm / sili_br_r(iLayer) ! random shift in radians ... philadd = philadd + rmyrndm ! shifted angle for each ladder phictladd(1) = phictladd (1)+ rmyrndm ! shifted angle for each ladder phictladd(2) = phictladd (2)+ rmyrndm ! shifted angle for each ladder phiomladd(1) = phiomladd (1)+ rmyrndm ! shifted angle for each ladder phiomladd(2) = phiomladd (2)+ rmyrndm ! shifted angle for each ladder phiomladd(3) = phiomladd (3)+ rmyrndm ! shifted angle for each ladder phiomladd(4) = phiomladd (4)+ rmyrndm ! shifted angle for each ladder endif c c------------------------------------------------------------------------- c xladd = rladd*cos(philadd) + shiftstag(1) yladd = rladd*sin(philadd) + shiftstag(2) xcool = rctladd(1) * cos(phictladd(1)) + shiftstag(1) ycool = rctladd(1) * sin(phictladd(1)) + shiftstag(2) xomega(1) = romladd(1) * cos(phiomladd(1)) + shiftstag(1) yomega(1) = romladd(1) * sin(phiomladd(1)) + shiftstag(2) xomega(2) = romladd(2) * cos(phiomladd(2)) + shiftstag(1) yomega(2) = romladd(2) * sin(phiomladd(2)) + shiftstag(2) irot = irot + 1 CALL GSROTM(irot,90.,phirotladd,90. * ,phirotladd+90.,0.,0.) if (lbarrel) then call gspos(v_i_name,nr,v_m_name ! place the ladder * ,xladd,yladd,sili_br_z(iLayer),irot,'ONLY') endif ! now place cooling tube: icopy = icopy + 1 if (lbarrel) then c Cooling tube call gsposp('SICT', icopy, v_m_name, & xcool,ycool,sili_br_z(iLayer), & irotnull, 'ONLY', par, 3) c Top omega shape dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd dim_sili(2) = 180. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius dim_sili(6) = sili_br_ct_radius + 0.05 dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius dim_sili(9) = sili_br_ct_radius + 0.05 icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xcool,ycool,sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) c Side omega shape 1 dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd + 270. dim_sili(2) = 90. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius - 0.05 dim_sili(6) = sili_br_ct_radius dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius - 0.05 dim_sili(9) = sili_br_ct_radius icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xomega(1),yomega(1),sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) c Side omega shape 2 dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd + 180. dim_sili(2) = 90. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius - 0.05 dim_sili(6) = sili_br_ct_radius dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius - 0.05 dim_sili(9) = sili_br_ct_radius icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xomega(2),yomega(2),sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) if(iLayer.gt.2) then xcool = rctladd(2) * cos(phictladd(2)) + shiftstag(1) ycool = rctladd(2) * sin(phictladd(2)) + shiftstag(2) xomega(1) = romladd(3) * cos(phiomladd(3)) * + shiftstag(1) yomega(1) = romladd(3) * sin(phiomladd(3)) * + shiftstag(2) xomega(2) = romladd(4) * cos(phiomladd(4)) * + shiftstag(1) yomega(2) = romladd(4) * sin(phiomladd(4)) * + shiftstag(2) icopy = icopy + 1 call gsposp('SICT', icopy, v_m_name, & xcool,ycool,sili_br_z(iLayer), & irotnull, 'ONLY', par, 3) c Top omega shape dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd dim_sili(2) = 180. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius dim_sili(6) = sili_br_ct_radius + 0.05 dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius dim_sili(9) = sili_br_ct_radius + 0.05 icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xcool,ycool,sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) c Side omega shape 3 dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd + 270. dim_sili(2) = 90. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius - 0.05 dim_sili(6) = sili_br_ct_radius dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius - 0.05 dim_sili(9) = sili_br_ct_radius icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xomega(1),yomega(1),sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) c Side omega shape 4 dim_sili(1) = sili_br_tilt(iLayer) - 90. * + phitmpladd + 180. dim_sili(2) = 90. dim_sili(3) = 2 ! number of z dim_sili(4) = ladd_halfz dim_sili(5) = sili_br_ct_radius - 0.05 dim_sili(6) = sili_br_ct_radius dim_sili(7) = -ladd_halfz dim_sili(8) = sili_br_ct_radius - 0.05 dim_sili(9) = sili_br_ct_radius icopy = icopy + 1 call gsposp(siliBrOmega, icopy, v_m_name, & xomega(2),yomega(2),sili_br_z(iLayer), & irotnull, 'ONLY', dim_sili, 9) endif endif phitmpladd = phitmpladd + dphir*RADDEG philadd = philadd + dphir phictladd(1) = phictladd(1) + dphir phictladd(2) = phictladd(2) + dphir phiomladd(1) = phiomladd(1) + dphir phiomladd(2) = phiomladd(2) + dphir phiomladd(3) = phiomladd(3) + dphir phiomladd(4) = phiomladd(4) + dphir phirotladd = phirotladd + dphid nr = nr + 1 Enddo Enddo c put SInn in set 'SVX' c Note for the barrel v_i_name = 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========================= Readout wheels code ===================c c See http://p25ext.lanl.gov/~hubert/phenix/silicon/simulations/jan07/wheel.html c======================================================================c if (sili_wheel_yesno.eq.1) then siwh_rmin = sili_cg_rmx(3) siwh_rmax = sili_cg_rmx(1) ! note Helium bag HEB2 starts at 53.6 cm nmed = sili_med_coldair dim_sili( 1) = 0 ! Holder volume for the readout wheels. dim_sili( 2) = 360 ! this is a hollow cylinder fitting dim_sili( 3) = 6 ! just around the Silicon Enclosure SIEN ! It consists of 2 sections, with a 0-thickness dim_sili( 4) = sili_cg_z(1)! central section (to clear the Helium bag). dim_sili( 5) = siwh_rmin dim_sili( 6) = siwh_rmax dim_sili( 7) = sili_cg_z(2) ! note in helium_bag.f, I moved HEB1 in to 26.0cm dim_sili( 8) = siwh_rmin dim_sili( 9) = siwh_rmax dim_sili(10) = sili_cg_z(3) dim_sili(11) = siwh_rmin dim_sili(12) = siwh_rmin dim_sili(13) = sili_cg_z(4) dim_sili(14) = siwh_rmin dim_sili(15) = siwh_rmin dim_sili(16) = sili_cg_z(5) dim_sili(17) = siwh_rmin dim_sili(18) = siwh_rmax dim_sili(19) = sili_cg_z(6) dim_sili(20) = siwh_rmin dim_sili(21) = siwh_rmax call gsvolu('SIWH', 'PCON', nmed, dim_sili, 21, ivolu) call gsatt ('SIWH', 'SEEN', 1) call gspos('SIWH', 1, 'SIEN', 0., 0., 0. ,irotnull,'ONLY') dim_sili( 1) = 0 ! dim_sili( 2) = 360 ! dim_sili( 3) = 2 ! ! dim_sili( 4) = -siwh_pcb_thick ! dim_sili( 5) = siwh_rmin dim_sili( 6) = siwh_pcb_rmax dim_sili( 7) = +siwh_pcb_thick ! dim_sili( 8) = siwh_rmin dim_sili( 9) = siwh_pcb_rmax nmed = sili_med_carbon call gsvolu('SWRB', 'PCON', nmed, dim_sili, 9, ivolu) call gsatt ('SWRB', 'SEEN', 1) call gsatt ('SWRB', 'COLO', 2) do i=1,10 call gspos('SWRB', i, 'SIWH', 0., 0., siwh_pcb_z(i), & irotnull,'ONLY') enddo * connectors on the boards, modeled as solid plastic rings: dim_sili( 1) = 0 ! dim_sili( 2) = 360 ! dim_sili( 3) = 2 ! ! dim_sili( 4) = -siwh_pcb_connz ! dim_sili( 5) = siwh_pcb_rmax - 1.0 dim_sili( 6) = siwh_pcb_rmax dim_sili( 7) = +siwh_pcb_connz ! dim_sili( 8) = siwh_pcb_rmax - 1.0 dim_sili( 9) = siwh_pcb_rmax nmed = 802 ! = plastic call gsvolu('SWCN', 'PCON', nmed, dim_sili, 9, ivolu) call gsatt ('SWCN', 'SEEN', 1) call gsatt ('SWCN', 'COLO', 4) do i=1,10 if (i.le.4.or.i.eq.6) then call gspos('SWCN', i, 'SIWH', 0., 0., & siwh_pcb_z(i) + siwh_pcb_thick + siwh_pcb_connz, & irotnull,'ONLY') else call gspos('SWCN', i, 'SIWH', 0., 0., & siwh_pcb_z(i) - siwh_pcb_thick - siwh_pcb_connz, & irotnull,'ONLY') endif enddo * support/cooling planes, one behind each pc board: nmed = sili_med_passive ! Aluminum call gsvolu('SWSP', 'PCON', nmed, dim_sili, 0, ivolu) call gsatt ('SWSP', 'SEEN', 1) call gsatt ('SWSP', 'COLO', 3) dim_sili( 1) = 0 ! dim_sili( 2) = 360 ! dim_sili( 3) = 2 ! ! * dim_sili( 4) = -siwh_pcb_suppz ! defined in each gposp() dim_sili( 5) = siwh_rmin dim_sili( 6) = siwh_pcb_rmax * dim_sili( 7) = +siwh_pcb_suppz ! dim_sili( 8) = siwh_rmin dim_sili( 9) = siwh_pcb_rmax do i=1,10 dim_sili( 4) = -siwh_pcb_suppz(i) ! dim_sili( 7) = +siwh_pcb_suppz(i) ! if (i.le.4.or.i.eq.6) then call gsposp('SWSP', i, 'SIWH', 0., 0., & siwh_pcb_z(i) - siwh_pcb_thick - siwh_pcb_suppz(i), & irotnull,'ONLY',dim_sili,9) else call gsposp('SWSP', i, 'SIWH', 0., 0., & siwh_pcb_z(i) + siwh_pcb_thick + siwh_pcb_suppz(i), & irotnull,'ONLY',dim_sili,9) endif enddo * one rohacell thermal disk as an inner-z cover: nmed = sili_med_cg call gsvolu('SWRH', 'PCON', nmed, dim_sili, 0, ivolu) call gsatt ('SWRH', 'SEEN', 1) call gsatt ('SWRH', 'COLO', 7) dim_sili( 1) = 0 ! dim_sili( 2) = 360 ! dim_sili( 3) = 2 ! ! dim_sili( 4) = -siwh_roha1_thick ! defined in each gposp() dim_sili( 5) = siwh_rmin dim_sili( 6) = siwh_pcb_rmax dim_sili( 7) = +siwh_roha1_thick ! dim_sili( 8) = siwh_rmin dim_sili( 9) = siwh_pcb_rmax call gsposp('SWRH', 1, 'SIWH', 0., 0., & siwh_pcb_z(5) + siwh_pcb_thick + 2.*siwh_pcb_suppz(i) + 0.2 & + siwh_roha1_thick, irotnull,'ONLY',dim_sili,9) call gsposp('SWRH', 2, 'SIWH', 0., 0., & siwh_pcb_z(6) - siwh_pcb_thick - 2.*siwh_pcb_suppz(i) - 0.2 & - siwh_roha1_thick, irotnull,'ONLY',dim_sili,9) * cables coming off the perimeter: dim_sili( 1) = 0 ! dim_sili( 2) = 360 ! dim_sili( 3) = 2 ! ! dim_sili( 4) = -5.75 dim_sili( 5) = siwh_pcb_rmax dim_sili( 6) = siwh_rmax dim_sili( 7) = +5.75 dim_sili( 8) = siwh_pcb_rmax dim_sili( 9) = siwh_pcb_rmax +0.5 nmed = 802 ! = plastic call gsvolu('SWCB', 'PCON', nmed, dim_sili, 9, ivolu) call gsatt ('SWCB', 'SEEN', 1) call gsatt ('SWCB', 'COLO', 6) call gspos('SWCB', 1, 'SIWH', 0., 0., & -34.25, irotnull,'ONLY') irot = irot+1 call gsrotm(irot,90.,180., 90.,90., 180.,0.) call gspos('SWCB', 2, 'SIWH', 0., 0., & +34.25, irot,'ONLY') nmed = sili_med_coldair ! reset to be sure endif ! readout wheels modeled or not c c barrel VTX kapton cables pixel layers - a tube section c irot=irot+1 irot1 = irot CALL GSROTM(irot1,90., 0.,90.,270.,180.,0.) ! rotate about x irot=irot+1 irot2 = irot CALL GSROTM(irot2,90.,180.,90., 90.,180.,0.) ! rotate about y irot=irot+1 irot3 = irot CALL GSROTM(irot3,90.,180.,90.,270., 0.,0.) ! rotate about z par(1) = sili_br_r(1) par(2) = sili_br_r(2) par(3) = pixel_hdi_thk par(4) = pixel_hdi_phimin par(5) = pixel_hdi_phimax nmed = sili_med_passive Call GSVOLU('SICC','TUBS',nmed,PAR,5,IVOL1) call GSPOS('SICC',1,'SICG',0.,0.,sili_br_manz(1)-.5, c irotnull,'ONLY') call GSPOS('SICC',2,'SICG',0.,0.,sili_br_manz(5)+.5, c irotnull,'ONLY') call GSPOS('SICC',3,'SICG',0.,0.,sili_br_manz(1)-.5, c irot2,'ONLY') call GSPOS('SICC',4,'SICG',0.,0.,sili_br_manz(5)+.5, c irot2,'ONLY') Call GSATT('SICC','SEEN', 1) Call GSATT('SICC','COLO', 4) c c barrel VTX kapton cables strip layers - a cone section: c par(1) = (sili_endcap_z(6)-1.0-sili_br_manz(5))/2. par(2) = sili_br_r(2)+.1 par(3) = sili_br_r(2) + pixel_hdi_thk*2. par(4) = sili_cg_rmx(4) - 1.2 par(5) = par(4) + pixel_hdi_thk*4. par(6) = pixel_hdi_phimin par(7) = pixel_hdi_phimax Call GSVOLU('SJCC','CONS',nmed,PAR,7,IVOL1) call GSPOS('SJCC',1,'SICG',0.,0.,sili_br_manz(5)+par(1)+1.0, c irotnull,'ONLY') call GSPOS('SJCC',2,'SICG',0.,0.,-sili_br_manz(5)-par(1)-1.0, c irot1,'ONLY') call GSPOS('SJCC',3,'SICG',0.,0.,sili_br_manz(5)+par(1)+1.0, c irot3,'ONLY') call GSPOS('SJCC',4,'SICG',0.,0.,-sili_br_manz(5)-par(1)-1.0, c irot2,'ONLY') Call GSATT('SJCC','SEEN',1) Call GSATT('SJCC','COLO', 4) c c VTX Barrel kapton layers after cone - a tube section: c par(1) = sili_cg_rmx(4) - 1.0 par(2) = par(1) + pixel_hdi_thk*4. par(3) = (sili_endcap_z(8)-sili_endcap_z(6))/2. par(4) = pixel_hdi_phimin par(5) = pixel_hdi_phimax nmed = sili_med_passive Call GSVOLU('SKCC','TUBS',nmed,PAR,5,IVOL1) call GSPOS('SKCC',1,'SICG',0.,0.,sili_endcap_z(8)-par(3), c irotnull,'ONLY') call GSPOS('SKCC',2,'SICG',0.,0.,-sili_endcap_z(8) +par(3), c irotnull,'ONLY') call GSPOS('SKCC',3,'SICG',0.,0.,sili_endcap_z(8) -par(3), c irot3,'ONLY') call GSPOS('SKCC',4,'SICG',0.,0.,-sili_endcap_z(8) +par(3), c irot3,'ONLY') call gsatt('SKCC','SEEN',1) Call GSATT('SKCC','COLO', 4) c c FVTX / IFVTX cage c first a cone section from station 1 to station 2: c par(1) = (sili_endcap_z(6)-sili_endcap_z(5)-0.5)/2. par(2) = sili_cg_rinner + sili_cg_swedge_len+1.0 par(3) = par(2) + sili_cg_support_thk par(4) = sili_cg_rinner + sili_cg_bwedge_len+1.6 par(5) = par(4) + sili_cg_support_thk nmed = sili_med_honeycomb Call GSVOLU('SLCC','CONE',nmed,PAR,5,IVOL1) call GSPOS('SLCC',1,'SICG',0.,0.,sili_endcap_z(5)+par(1), & irotnull,'ONLY') call GSPOS('SLCC',2,'SICG',0.,0.,-sili_endcap_z(5)-par(1), & irot1,'ONLY') call gsatt('SLCC','SEEN',1) Call GSATT('SLCC','COLO', 1) c c Now a tube section from station 2 to station 4: c par(1) = sili_cg_rinner + sili_cg_bwedge_len+1.7 par(2) = par(1) + sili_cg_support_thk par(3) = (sili_endcap_z(8) - sili_endcap_z(6)+.5)/2. nmed = sili_med_honeycomb Call GSVOLU('SMCC','TUBE',nmed,PAR,3,IVOL1) call GSPOS('SMCC',1,'SICG',0.,0.,sili_endcap_z(6)+par(3)-.5, & irotnull,'ONLY') call GSPOS('SMCC',2,'SICG',0.,0.,-sili_endcap_z(6)-par(3)+.5, & irot1,'ONLY') call gsatt('SMCC','SEEN',1) Call GSATT('SMCC','COLO', 1) if (sili_endcap_config.eq.1) then ! If 0, nothing installed in endcap region call svx_fvtx ! install FVTX wheels elseif (sili_endcap_config.eq.2) then ! call svx_ifvtx ! install ldrd pixel planes elseif (sili_endcap_config.eq.3) then ! call svx_fvtx_old ! install old fvtx disks (split in R) endif ! ENDIF ! this was a check on volume character from line ~387 above 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+1) 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 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 ! loop over barrels 1-4 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 ! loop over ALL ladders LNUM(4) = iladd call uctoh(namesv(5), LNAM(5), 4, 4) do isen = 1, sili_br_nsn(iLayer) ! 4 Si dets par ladder LNUM(5) = isen write(15,*,err=994) 0, iLayer, iladd, isen NLEVEL = 0 ! nlevel is in /GCVOLU/ call glvolu(5, LNAM, LNUM, isec) ! fills /GCVOLU/ write (66,'(''5'',5a5,7i3)') namesv(1),namesv(2), & namesv(3),siliNames(iLayer),namesv(5), LNUM, isec write(15,*,err=994) (gtran(isec,NLEVEL), isec=1,3) ! in GCVOLU: xyz pos write(15,*,err=994) (grmat(isec,NLEVEL), isec=1,3) ! in GCVOLU: rotation write(15,*,err=994) (grmat(isec,NLEVEL), isec=4,6) ! matrix write(15,*,err=994) (grmat(isec,NLEVEL), isec=7,9) ! '' enddo enddo enddo NLEVEL = 0 c------------------------! end glvolu calls --------------- close(unit=15) ! file svxPISA.par 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 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 Contribution from Endcap npar = npar + 2 + 11*8 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 iqf(lfd_para + iPoint) = 8 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 ! = 5 iPoint = iPoint + 1 iqf(lfd_para + iPoint) = necv ! = 6 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 return ! from subroutine svx 993 stop 'svx - material number already used.' 994 stop 'svx - svxPISA.par write error.' 995 stop 'svx - unable to open svxPISA.par.' 997 stop 'svx - read error in sili_br_par segment.' 998 stop 'svx - read error in sili_cg_par segment.' end ! end of subroutine svx c=============================================================================c