* nohup ./garfield-9exe2 -metafile type PostScript name parallelplate_1.ps parallelplate_1.txt& < /afs/cern.ch/user/r/rjd/Garfield/Files/garftrans !add meta type PostScript file-name "parallelplatePS_1.ps" !open meta !act meta Global field True Global drift True Global trans True Global gain True Global esurf = 0 Global etran = 0 Global ekap = 0 Global random True Global mc False *Iteration for the Monte-Carlo calculation *----------------------------------------------------------------------* Global nstat=10 *----------------------------------------------------------------------* *Monte-Carlo parameters * *----------------------------------------------------------------------* Global btime=true Global binterval=false Global bstep=false Global itime=0.00015 Global iinterval=0.0015 Global istep=40 *----------------------------------------------------------------------* *Primary electron-ion pair creation * *----------------------------------------------------------------------* Global x0=0.0 Global y0=0.0 Global z0=0.0 *Call drift_mc_electron(0.00,0.00,0.08) &CELL Global wiredia = 0.004 Global holedia = 0.006 Global wirepitch = {wiredia+holedia} Global andplx = 0.0 Global andply = 0.0 Global andplz = 0.0 Global andplLZ = 0.0010 *Global actampgap = 0.0128 Global actampgap = 0.0050 Global thickZ = 0.0045 Global thickZ1 = 0.0005 Global thickZ2 = 0.0005 *Global thickZ = 0.0007 Global ampgap = {actampgap-wiredia/2} *Global wirez = {andplz+andplLZ/2+ampgap+wiredia/2}-thickZ/2 *Global wirez2 = {andplz+andplLZ/2+ampgap+0.05+wiredia/2} *Global wirez3 = {andplz+andplLZ/2+ampgap-0.05+wiredia/2} Global wirez = 0.00275 *Global wirez = actampgap *Global wirez2 = {wirez+0.0015-0.00025} * 0.00525 Global wirez2 = 0.00525 Global wirez3 = {wirez-0.0015+0.00025} Global drftgap = 1.0 Global drftplx = 0.0 Global drftply = 0.0 Global drftplLZ = 0.0010 Global drftplz = {wirez+wiredia/2+drftgap+drftplLZ/2} Global nx = 1 Global ny = 1 Global nyx = 1 Global lenLX = {nx*wirepitch} Global lenLY = {ny*wirepitch} Global drftplV = -250.0 Global wirex = 0.0 Global wireyup = {drftply-wirepitch/2-(ny-2)/2*wirepitch} Global wirexstart = {drftplx-wirepitch/2-(nx-2)/2*wirepitch} Global wireystart = {wireyup+wirepitch/2} Global wireV1 = 0.0 Global wireV2 = 0.0 Global andplV = 345.0 Global wirey = {wireyup-wiredia/2-holedia/4} nebem min-elem 1 ... max-elem 50 ... target-elem-size 0.004 nebem x-periodic-copies 1 ... y-periodic-copies 1 * target-elem-size 0.004 solids box ... center {drftplx} {drftply} {wirez2} ... half-lengths {lenLX/2} {lenLY/2} {thickZ1/2} ... conductor-2 ... voltage {wireV1} ... label P *hole centre 0 0 0.00525 ... * half-lengths {lenLX/2} {lenLY/2} {thickZ1/2} ... * radius {holedia/2} ... * n = 4 ... * conductor-2 ... * voltage {wireV1} * label M **hole centre 0 0 {wirez} ... ** half-lengths {lenLX/2} {lenLY/2} {thickZ/2} ... ** radius {holedia/2} ... ** n = 4 ... ** conductor-2 ... ** voltage {wireV1} ** label M *hole centre 0 0 0.00275 ... * half-lengths {lenLX/2.} {lenLY/2.} {thickZ/2} ... * radius {holedia/2} ... * n = 4 ... * dielectric epsilon 4 * label N box ... center {andplx} {andply} {andplz} ... half-lengths {lenLX/2} {lenLY/2} {andplLZ/2} ... conductor-2 ... voltage {andplV} ... label Q period x = {lenLX} period y = {lenLY} nebem new-model keep-inverted-matrix opt nodebug &FIELD area -0.0040 -0.0280 0.0000 0.0040 0.0280 0.0100 view x=0 3d pl cont v n=5 * nooutline ... * light -20 -40 ... *view 2.5*x+2*y+1*z=0 rotate -103.4 3d *Call plot_field_area *Call plot_end &FIELD area -0.0120 -0.0280 0.0000 0.0120 0.0280 0.0100 view y=0 3d pl cont v n=5 &FIELD area -0.0120 -0.0120 0.0000 0.0120 0.0120 0.0100 view z=0 3d pl cont v n=5 &FIELD area -0.0120 -0.0120 0.0000 0.0120 0.0120 0.0240 view view -3*x-2*y+z=0 rot 180 3d Call plot_field_area Call plot_end area -0.0100 -0.0100 0.0000 0.0100 0.0100 0.0200 view y=0 rot 180 3d call plot_drift_area Call plot_end area -0.0100 -0.0100 0.0000 0.0100 0.0100 0.0200 view y=0 rot 180 3d call plot_drift_area Call plot_end &gas *get {`CF4100-Iso0`} *Call inquire_file(gas_file3,exist) *If exist Then * get {gas_file3} *Else *get {`ArIso5new.gas`} *get {`ArIso5pc2`} get {`ArIso5pc24`} * magboltz argon 80. co2 20 * write "ArCO220" * magboltz argon 95. isobutane 5 * e-range 100 300000 n-e 25 ... * coll 5 * write "ArIso5pc24" * heed argon 95. isobutane 5 * add ion-mob 1.5e-6 opt gas-pr opt gas-plot **************************** &drift * lines 50 area -0.0100 -0.0100 0.0000 0.0100 0.0100 0.0200 view y=0 rot 180 3d call plot_drift_area int-par int-acc 1e-11 * track -0.006 0 0.011 0.006 0 0.011 track -0.006 0 0.015 0.006 0 0.008 track electron lines 100 drift track *************************************** &drift area -0.050 -0.050 0.000 0.050 0.050 0.02 view view -3*x-2*y+z=0 rot 180 3d track -0.006 0 0.015 0.006 0 0.015 lines 50 int-par max-step 0.0010 drift track l-pr &FIELD // Contour plot area -0.1 -0.1 -0.1 0.1 0.1 1.1 ... view y=0 cut rot 180 grid 50 pl cont **************************************** // Contour plot area -0.04 -0.04 -0.005 0.04 0.04 0.02 ... view y=0 cut rot 180 grid 50 pl cont **************************************** // Vector plot area -0.1 -0.1 -0.1 0.1 0.1 1.1 ... view y=0 cut rot 180 grid 25 pl vect **************************************** &FIELD // Contour plot 2 area -0.010 -0.010 -0.0020 +0.010 +0.010 0.008 view y=0 rot 180 grid 20 pl cont **************************************** &drift area -0.010 -0.010 -0.0020 +0.010 +0.010 0.008 view y=0 rot 180 track -0.01 0 0.0048 0.01 0 0.0048 lines 50 int-par max-step 0.0010 drift track l-pr *grid 10 *pl cont *&SIGNAL *sel p q (s) *window 0 0.000005 * area -0.020 -0.020 0.000 0.020 0.020 0.01 view view -3*x-2*y+z=0 rot 180 3d * area -0.050 -0.050 0.000 0.050 0.050 0.05 view view -3*x-2*y+z=0 rot 180 3d *int-par mc-coll 10 *Call plot_drift_area *Global delay = 0 *Call microscopic_avalanche(0, 0, 0.0080, ... `plot-electron, signal, abort-100, mark-excitation, mark-ionisation, mark-attachment`, ... 100, 1, ... 0, 0, 0, edist, rates, n_e, n_i, delay) *Call plot_drift_line *Call plot_end **************************************** &DRIFT area -0.010 -0.010 -0.0020 +0.010 +0.010 0.008 view y=0 rot 180 int-par m-c-dist-int 0.0002 Global plotdrift True If plotdrift Then *Global opt `plot-electron,plot-ion` Global opt `plot-electron` Else Global opt `noplot-electron,noplot-ion` Endif Call book_histogram(elec,50,0,2500) *Call book_histogram(ion,50,0,2500) Call book_histogram(created,100,0.0,+0.01) Call book_histogram(lost,100,0.0,+0.01) Call book_histogram(end_e,100,0.0,+0.01) Call book_histogram(bottom,100) *Call book_histogram(end_ion,50,-0.02,+0.02) For i From 1 To 1 Do Call plot_drift_area Call avalanche(0,0,0.0048,`plot-electron`,ne,ni,... `t_e, z_e<0.0006`,bottom, ... `z_created`,created,`z_lost`,lost,`z_e`,end_e) Say "Electrons: {ne}, ions: {ni} (avalanche {i})" Call fill_histogram(elec,ne) * Call fill_histogram(ion,ni) Call plot_end Enddo *Call fit_exponential(elec,a,b,ea,eb,`plot`) *Say "Slope: {-1/b}" *!opt log-y Call hplot(elec,`Electrons`,`Number of electrons after avalanche`) Call plot_end Call hplot(created,`z [cm]`,`Production point of electrons`) Call plot_end Call hplot(lost,`z [cm]`,`Absorption point of electrons`) Call plot_end Call hplot(end_e,`z [cm]`,`End point of electrons`) Call plot_end Call plot_histogram(bottom,`Time [microsec]`,`electrons to bottom`) Call plot_end *Call inquire_histogram(bottom, exists, set, channels, ... *minimum, maximum, entries, average, sigma) *Say "To bottom: {entries}/{tot}" **************************************** **************************************** !deact meta !close meta !del meta $gv parallelplatePS_1.ps &