Home
Garfield++ User Guide
Contents
1. alphatof alternative estimate of the effective Townsend coefficient 7 based on the Time Of Flight method The max energy of the cross section table is chosen automatically by Magboltz For inelastic gases setting nColl 2 5 should give an accuracy of about 1 An accuracy better than 0 5 can be achieved by nCo11 gt 10 For pure elastic gases such as Ar nCo11 should be at least 10 In order to calculate the electron transport parameters for all values of E B and included in the current field grid the function void GenerateGasTable const int numCollisions 19 Chapter 3 Media can be used Electron transport parameter tables can be saved to file and read from file by means of bool WriteGasFile const std string filename bool LoadGasFile const std string filename The format of the gas file used in Garfield is compatible with the one used in Garfield 9 Scattering Rates As a prerequisite for microscopic tracking a table of the electron scattering rates based on the electron atom molecule cross sections included in the Magboltz database for the current gas mixture and density needs to be prepared This can be done using the function bool Initialise const bool verbose If the flag verbose is set to true some information such as gas properties and collision rates at selected energies is printed during the initialisation If void EnableCrossSectionOutput
2. is called prior to Initialise a table of the cross sections as retrieved from Magboltz is written to a file cs txt in the current working directory By default the scattering rates table extends from O to 40 eV The max energy to be included in the scattering rates table can be set using SetMaxElectronEnergy const double e e max electron energy in eV The parameters of the cross section terms in the present gas mixture can be retrieved via int GetNumberOfLevels bool GetLevel const int i int amp ngas int type std stringk descr double amp e i index of the cross section term ngas index of the gas in the mixture type classification of the cross section term see Table 3 2 descr description of the cross section term from Magboltz e energy loss It is sometimes useful to know the frequency with which individual levels are excited in an avalanche or along a drift line For this purpose MediumMagboltz keeps track of the number of times the individual levels are sampled in GetElectronCollision These counters are accessible through the functions Chapter 3 Media 20 int GetNumberOfFlectronCollisions int GetNumberO0fElectronCollisions int amp nElastic int amp nlonising int amp nAttachment int amp nInelastic int nExcitation int amp nSuperelastic int GetNumberOfFlectronsCollisions const int level The first function returns total number of electron collisions i e c
3. Make a two dimensional plot of the cell layout view gt Plot2d Similarly the function ViewCe11 Plot3d paints a three dimensional view of the cell layout 4 2 Field Maps 4 2 1 Ansys The interpolation of FEM field maps created with the program Ansys 1 is dealt with by the classes ComponentAnsys121 and ComponentAnsys123 The class names refer to the type of mesh element used by Ansys e ComponentAnys121 reads two dimensional field maps with 8 node curved quadrilaterals known as plane121 in Anys e ComponentAnsys123 reads three dimensional field maps with quadric curved tetrahedra known as solid123 in Ansys The field map is imported with the function bool Initialise std string elist std string nlist std string mplist std string prnsol std string unit elist name of the file containing the list of elements default ELIST lis Chapter 4 Components 26 nlist name of the file containing the list of nodes default NLIST lis mplist name of the file containing the list of materials default MPLIST 1is prnsol name of the file containing the nodal solutions default PRNSOL 1lis unit length unit used in the calculation default cm other recognized units are mum micron micrometer mm millimeter and m meter The return value is true if the map was successfully read In order to enable charge transport and ionization the materials in the map need t
4. const double scaleP 1 filename name of the ASCII file format description of the file format see below withPotential flag whether the file contains an additional column with the electrostatic potential withRegion flag whether the file contains an additional column with an integer value corresponding to the region index each region can be associated with a different medium scaleX scalE scaleP scaling factors to be applied to the coordinates electric field values and potentials The available formats are XY IJ XYZ and IJK the first two for two dimensional maps and the last two for three dimensional maps In case of XY XYZ the first two three columns contain the x y and z coordinates of a given point in the grid followed by the electric field values and potential if available at this point The class then looks up the grid cell corresponding to this point and assigns the electric field and potential accordingly In case of IJ IJK the indices of the grid cell along x y and z are specified directly 4 2 6 Visualizing the Mesh For visualizing the mesh imported from a FEM field map the class ViewFEMesh written by J Renner is available Using void ViewFEMesh SetViewDrift ViewDrift driftView a ViewDrift object can be attached to the mesh viewer The function bool ViewFEMesh Plot then allows draws a two dimensional projection of the drift lines stored in the ViewDrift class toget
5. 0 i lt nMaterials i const double eps fm gt GetPermmittivity i if fabs eps 1 lt 1 e 3 fm gt SetMedium i gas Print a list of the field map materials for information fm gt PrintMaterials Avalanche Microscopic tracking is handled by the class AvalancheMicroscopic AvalancheMicroscopic aval new AvalancheMicroscopic aval gt SetSensor aval We are now ready to track an electron through the GEM Initial position cm and starting time ns double x0 0 yO 0 z0 0 02 double tO 0 Initial energy eV double e0 0 1 Initial direction In case of a null vector the initial direction is randomized double dx0 0 dyO 0 dz0 0 Calculate an electron avalanche aval gt AvalancheElectron x0 y0 0 tO e0 dx0 dy0 dz0 3 Media Media are derived from the abstract base class Medium The name identifier of a medium can be read by the function std string GetName For compound media e g gas mixtures the identifiers and fractions of the constituents are available via int GetNumber0fComponents void GetComponent const int std string label double amp f 3 1 Transport Parameters Medium classes provide functions for calculating the macroscopic transport parameters of electrons holes and ions as a function of the electric and magnetic field bool ElectronVelocity const double ex const dou
6. 5 1 Heed The program Heed 17 is an implementation of the photo absorption ionization PAI model It was written by Smirnov An interface to Heed is available through the class TrackHeed After calling GetCluster one can retrieve details about the electrons in the present cluster us ing bool GetElectron const int i double amp x double amp y double amp z double amp t double amp e double amp dx double amp dy double amp dz Chapter 5 Tracks 38 5 1 1 Delta Electron Transport Heed simulates the energy degradation of 6 electrons and the production of secondary conduc tion electrons using a phenomenological algorithm described in 17 The asymptotic W value eV and the Fano factor of a Medium can be specified by the user by means of the functions void Medium SetW const double w void Medium SetFanoFactor const double f If these parameters are not set Heed uses internal default values The default value for the Fano factor is F 0 19 The transport of 6 electrons can be activated or deactivated using void EnableDeltaElectronTransport void DisableDeltaElectronTransport If 6 electron transport is disabled the number of electrons returned by GetCluster is the number of primary ionisation electrons i e the photo electrons and Auger electrons Their kinetic energies and locations are accessible through the function GetElectron If 6 electron transport
7. Meth A 554 2005 474 493 18 Synopsys Sentaurus Device http www synopsys com products tcad tcad html 19 R van Overstraeten and H de Man Measurement of the lonization Rates in Diffused Silicon p n Junctions Solid State Electronics 13 1970 583 608 20 R Veenhof Garfield simulation of gaseous detectors http cern ch garfield 21 L Viehland and E A Mason Transport properties of gaseous ions over a wide energy range IV At Data Nucl Data Tables 60 1995 37 95
8. e Define an environment variable GARFIELD_HOME pointing to the directory where the Garfield classes are to be located In the following we assume that we want to install Garfield in a directory home mydir garfield If you are using bash type export GARFIELD_HOME home mydir garfield replace home mydir garfield by the path of your choice For t csh type shells type setenv GARFIELD_HOME home mydir garfield Include the above lines also in the bashrc or cshrc file in your home directory If unsure which shell you are using type echo SHELL e Download check out the code from the repository This can be done via SSH access or via HTTP access For SSH access give the command svn co svn ssh username0svn cern ch reps garfield trunk GARFIELD_HOME where username is your CERN afs login For HT TPS access give the command svn co https username svn cern ch reps garfield trunk GARFIELD_HOME or if you do not have a CERN account 1 For more information about Subversion have a look at http svn web cern ch svn docs php and the docu ments listed there Chapter 2 Getting Started 8 svn co http svn cern ch guest garfield trunk GARFIELD_HOME Alternatively you can download the tarballs from the web interface see the above address and extract them in the GARFIELD_HOME directory e Change to the GARFIELD_HOME directory cd GARFIELD_HOME e f necessary adapt the
9. Component which calculates the weighting field and label in our example readout is the name you have assigned to the weighting field in the previous step 3 Setup the binning for the signal calculation void Sensor SetTimeWindow const double tmin const double tstep const int nbins The first parameter in this function is the lower time limit in ns the second one is the bin width in ns and the last one is the number of time bins 4 Switch on signal calculation in the transport classes using void AvalancheMicroscopic EnableSignalCalculation void AvalancheMC EnableSignalCalculation The Sensor then records and accumulates the signals of all avalanches and drift lines which are simulated 5 The calculated signal can be retrieved using double Sensor GetSignal const std string label const int bin double Sensor GetElectronSignal const std string label const int bin double Sensor GetIonSignal const std string label const int bin The functions GetElectronSignal and GetIonSignal return the signal induced by negative and positive charges respectively GetSignal returns the sum of both electron and hole signals 46 47 Chapter 7 Signals 6 After the signal of a given track is finished call void Sensor ClearSignal to reset the signal to zero For plotting the signal the class ViewSignal can be used As an illustration of the above recipe consider the
10. cm t0 starting time dx0 dy0 dz0 initial direction vector 36 37 Chapter 5 Tracks particle mass MeV c charge e electron e 0 510998910 1 et positron e 0 510998910 1 po muon mu 105 658367 ut mu 105 658367 1 Tm pion pi pi 139 57018 1 a pi 139 57018 1 KT kaon K K 493 677 1 Kt K 493 677 1 p proton p 938 272013 1 p anti proton antiproton p bar 938 272013 1 d deuteron d 1875 612793 2 Table 5 1 Available charged particles The starting point of the track has to be inside an ionizable medium Depending on the type of Track class there can be further restrictions on the type of Medium If the specified direction vector has zero norm an isotropic random vector will be generated After successful initialization the clusters produced along the track can be retrieved by bool GetCluster double amp xcls double amp ycls double amp zcls double amp tlcs int amp n double amp e double amp extra xcls ycls zcls tcls position and time of the ionizing collision n number of electrons produced in the collision e transferred energy in eV The function returns false if the list of clusters is exhausted or if there is no valid track The concept of a cluster deserves some explanation In the present context it refers to the energy loss in a single ionizing collision of the primary charged particle and the secondary electrons produced in this process
11. is enabled default setting the function GetElectron returns the locations of the conduction electrons as calculated by the internal 6 transport algorithm of Heed Since this method does not provide the energy and direction of the secondary electrons the corresponding parameters in GetElectron are not meaningful in this case 5 1 2 Photon Transport Heed can also be used for the simulation of x ray photoabsorption void TransportPhoton const double x0 const double y0 const double zO const double t0 const double e0 const double dx0 const double dy0 const double dz0 int amp nel x0 yO z0 tO initial position and time of the photon e0 photon energy in eV dx0 dy0 dz0 direction of the photon nel number of photoelectrons and Auger electrons produced in the photon conversion 6 Charge Transport On a phenomenological level the drift of charge carriers under the influence of an electric field E and a magnetic field B is described by the first order equation of motion i va E r B r 6 1 where vq is the drift velocity For the solution of 6 1 two methods are available in Garfield e Runge Kutta Fehlberg integration and e Monte Carlo integration AvalancheMC For accurate simulations of electron trajectories in small scale structures with characteristic dimen sions comparable to the electron mean free path and also for detailed calculations of ionisation and excitation processes transporting e
12. is implemented in the class AvalancheMicroscopic A calculation is started by means of void AvalancheElectron const double x0 const double y0 const double zO const double t0 const double e0 const double dx0 0 const double dy0 0 const double dz0 0 x0 yO z0 tO initial position and time e0 initial energy eV dx0 dy0 dz0 initial direction If the norm of the direction vector is zero the initial direction is randomized After the calculation is finished the number of electrons ne and ions ni produced in the avalanche can be retrieved using void GetAvalancheSize int amp ne int amp ni Chapter 6 Charge Transport 42 status code meaning 1 particle left the drift area 3 calculation abandoned error should not happen 5 particle not inside a drift medium 7 attachment 16 energy below transport cut 17 outside the time window Table 6 1 Status codes for the termination of drift lines Information about the history of each avalanche electron can be retrieved by int GetNumber0fElectronEndpoints void GetElectronEndpoint const int i double amp x0 double amp y0 double amp z0 double amp tO double amp e0 double amp x1 double amp y1 double amp z1 double amp t1 double amp el int amp status i index of the electron x0 yO z0 t0 e0 initial position time and energy of the electron x1 yl z1 tl el final position time and energy of the elect
13. map for the electric field calculate the weighting field using analytic methods and use a parameterized B field Superpositions of several electric magnetic and weighting fields are also possible Components are added using void AddComponent ComponentBase comp void AddElectrode ComponentBase comp std string label While AddComponent tells the Sensor that the respective Component should be included in the calculation of the electric and magnetic field AddElectrode requests the weighting field named label to be used for computing the corresponding signal To reset the sensor thereby removing all components and electrodes use void Clear The total electric and magnetic fields sum over all components at a given position are accessible through the functions ElectricField and MagneticField The syntax is the same as for the corresponding functions of the Component classes Unlike the fields materials cannot overlap The function Sensor GetMedium therefore returns the first valid drift medium found The Sensor acts as an interface to the transport classes For reasons of efficiency it is sometimes useful to restrict charge transport ionization and similar calculations to a certain region of the detector This user area can be set by void SetArea double xmin double ymin double zmin double xmax double ymax double zmax xmin zmax corners of the bounding box within which transport is e
14. same label is activated by the function void AddReadout const std string label In addition to the weighting fields of the elements used for the calculation of the actual electric field the weighting field for a strip segment of a plane can also be calculated Strips can be defined using void AddStripOnPlaneX const char direction const double x const double smin const double smax const char std string const double gap 1 void AddStripOnPlaneY const char direction const double y const double smin const double smax const std string label const double gap 1 direction orientation of the strip y or z in case of x planes x or z in case of y planes x y coordinate of the plane on which the strip is located smin smax min and max coordinate of the strip The strip weighting field is calculated using an analytic expression for the field between two infinite parallel plates which are kept at ground potential except for the strip segment which is raised to 1 V The anode cathode distance d to be used for the evaluation of this expression can be set by the user variable gap in AddStripOnPlaneX AddStripOnPlaneY If this variable is not specified or set to a negative value the following default values are used e if two planes are present in the cell d is assumed to be the distance between those planes e if only one plane is present d is taken to be the distance to the near
15. u To and B used in the different models are shown in Table 3 3 By default the Sentaurus model is activated The parameterization to be used for modelling the impact of doping on the mobility is specified using void SetDopingMobilityModelMinimos void SetDopingMobilityModelMasetti The first function activates the model used in Minimos 6 1 see Ref 16 Using the second function the model described in Ref 13 is activated default setting For modelling the velocity as function of the electric field the following options are available e The method for calculating the high field saturation velocities can be set using void SetSaturationVelocity const double vsate const double vsath void SetSaturationVelocityModelMinimos void SetSaturationVelocityModelCanali void SetSaturationVelocityModelReggiani Chapter 3 Media 22 The first function sets user defined saturation velocities in cm ns for electrons and holes The other functions activate different parameterizations for the saturation velocity as function of temperature In the Canali model 5 which is activated by default Ty 0 87 Ver 0 0107 cm ns Ty 0 vii 0 00837 2 cm ns where To 300 K The expressions for the other two implemented models can be found in Refs 14 15 e The parameterization of the mobility as function of the electric field to be used can be selected using void SetHighFieldMob
16. 0 const std string gas6 const double f6 0 gasl gas6 identifier of the molecule atom fl f6 fraction of the respective molecule atom A valid gas mixture comprises at least one and at most six different species A list of the presently available gases and their identifiers can be found in the appendix The fractions have to be strictly positive and may add up to any non zero value internally they will be normalized to 1 The gas density is specified in terms of pressure Torr and temperature K void SetPressure const double p void SetTemperature const double t Note that the density is calculated using the ideal gas law In the following example the gas mixture is set to Ar CHa 80 20 at atmospheric pressure and 20 C MediumMagboltz gas new MediumMagboltz Set the composition gas gt SetComposition ar 80 ch4 20 gas gt SetTemperature 293 15 gas gt SetPressure 760 The function void PrintGas prints information about the present transport parameter tables and cross section terms if avail able 3 3 1 lon Transport The GARFIELD_HOME Data directory includes a few files e g IonMobility_Ar _Ar txt for Ar ions in argon which contain ion mobility data in form of a table of reduced electric fields E N in Td vs mobilities in cm Vt s These mobility files can be imported using 11 Td 107 V cm Chapter 3 Media 18 bool Mediu
17. 0 double amp tO double amp x1 double amp yi double amp z1 double amp ti int amp status const i index of the electron x0 yO z0 tO initial position and time of the electron x1 yl z1 t1 final position and time of the electron status status code indicating why the tracking of the electron was stopped 41 Chapter 6 Charge Transport Analogous functions are available for holes and ions The functions void EnableMagneticField instructs the class to consider not only the electric but also the magnetic field in the evaluation of the transport parameters By default magnetic fields are not taken into account For debugging purposes attachment and diffusion can be switched off using void DisableAttachment void DisableDiffusion A time interval can be set using void SetTimeWindow const double t0 const double t1 t0 lower limit of the time window tl upper limit of the time window Only charge carriers with a time coordinate t to t are tracked If the time coordinate of a particle crosses the upper limit it is stopped and assigned the status code 17 Slicing the calculation into time steps can be useful for instance for making a movie of the avalanche evolution or for calculations involving space charge The time window can be removed using void UnsetTimeWindow 6 3 Microscopic Tracking Microscopic tracking is at present only possible for electrons It
18. Garfield User Guide Version 2015 1 H Schindler September 2015 Contents 1 Introduction Tide Class Structur 0 eb ee Se ee ee ee eee ee A E Getting Started Ql Installation 2 4 2a Bench God A hee id ee g DD EXAIMDICS 2 Le e E ae ad Re NE ade NE dt A ee ee 220s SOFT MDC amp ol dask 2606 woos A eae ees 2222 GEMI Ate hee ieee Le BE EEL Be Pee hee Ss ee Media 3 1 Transport Parameters ea e a a a a a a a a a a a E A 3 113 Transport Tables vo vs MI ue e ie E TIA UE cue e EE be tee ee 3 2 Electron Scattering Rates ea pa dap e ade E E A wher ov ures are et oe at Sek ot ee et Say de A a 33d don Vransport bl boss te ta ta ts em Be eee 3 3 22 Y El AR ew oe ee OM ek IC BOBS 314 SemICONductOrs ms Soe o RAE ese Sie Wee Sb ee Se Hick art a hs eA ee 3 4 1 Transport Parameters unue uira u uia ahe aaran u Gia a a aat Geau g a Components 4 1 Defining the Geometry 4 1 1 Visualizing the Geometry 2 a a AD gt Fed Maps e Ac a Bes A O ADN AMS a 2 ar A A 2 A SI NI o Se o 4920 SYNOPSYS CAD aaa a E E 4 2 3 cEMMGM 205 a 2h oot oe BAR ROAR Ro AA chek eked AD Ae SCS Asx o cla so ot AS E IS oe et lt ee eae elie ee ee Ao Regular Qnds gt 2n002 324 2 2406 wl diet ate wl bast at Gee aed 4 2 6 Visualizing the Mesh o 4 3 Analytic Fields 82 2 ssw 2s te E oth GS ah Be eee Bt 4 3 1 Describing the Cell 2 sipa atao a Ea AOA Av322 JREMOG
19. ICITIES As oaks th Hae oan BA ths E BAG WAG im ee as OR BAG cae Av3 3 iCellsIypese ik e ee he oe hehe A bee ee 43 42 Weighting BleldS 10m a Bac cm aoe BAe Se oy eee ee 4 4 Other Components 4 5 Visualizing the Field a a E a a E A ES 3 ott E A AN AA Tracks A AA A E E EE hte tt 5 1 1 Delta Electron Transport eo gs poget a o Bile Photon Tranpak era e e a A dina al Fo CO NN E 13 14 16 16 17 18 20 20 23 23 25 25 25 27 28 28 28 29 30 30 31 31 32 32 34 35 36 37 38 38 7 Signals B Gases Contents 4 6 Charge Transport 39 6 1 Runge Kutta Fehlberg Integration 0 0 0 0 0 20000200048 39 6 2 Monte Carlo Integration 0 a 39 6 3 Microscopic Tracking o s sss bos wab a ale kae Wada Ghe koe Wgd gre ging y 41 GA Misualizing Drie MES La Lo ds be Bete bata beeen a a a 44 46 T Readout Electronics aras ia a aos a a a we do 47 A Units and Constants 49 51 53 Bibliography 1 Introduction Garfield is an object oriented toolkit for the detailed simulation of particle detectors which use a gas mixture or a semiconductor material as sensitive medium For calculating electric fields three techniques are currently being offered e solutions in the thin wire limit for devices made of wires and planes e interfaces with finite element programs which can compute approximate fields in nearly arbitrary two and three dimensional configurations with diele
20. TimeWindow const double t0 const double t1 void UnsetTimeWindow An energy threshold for transporting electrons can be applied using void SetElectronTransportCut const double cut cut energy threshold in eV The tracking of an electron is aborted if its energy falls below the transport cut This option can be useful for 6 electron studies in order to stop the calculation once the energy of an electron is below the ionization potential of the gas The transport cut can be removed by setting the threshold to a negative value By default no cut is applied In order to extract information from the avalanche on a collision by collision basis so called user handles are available void SetUserHandleStep void f double x double y double z double t double e double dx double dy double dz bool hole void UnsetUserHandleStep void SetUserHandleAttachment void f double x double y double z double t int type int level Medium m void UnsetUserHandleAttachment void SetUserHandleInelastic void f double x double y double z double t int type int level Medium m void UnsetUserHandleInelastic void SetUserHandlelonisation void f double x double y double z double t int type int level Medium m void UnsetUserHandlelIonisation The function specified in SetUserHandleStep is called prior to each free flight step The param eters passed to this function are X
21. a Nucl Data Tables 31 1984 113 151 W N Grant Electron and Hole lonization Rates in Epitaxial Silicon at High Fields Solid State Electronics 16 1973 1189 1203 C Lombardi S Manzini A Saporito and M Vanzi A Physically Based Mobility Model for Numerical Simulation of Nonplanar Devices IEEE Trans CAD 7 1988 1164 1171 N Majumdar and S Mukhopadhyay Simulation of three dimensional electrostatic field con figuration in wire chambers a novel approach Nucl Instr Meth A 566 2006 Simulation of 3D electrostatic configuration in gaseous detectors JINST 2 2007 no 9 G Masetti M Severi and S Solmi Modeling of Carrier Mobility Against Carrier Concen tration in Arsenic Phosphorus and Boron Doped Silicon IEEE Trans Electron Devices 30 1983 764 769 M A Omar and L Reggiani Drift and diffusion of charge carriers in silicon and their empirical relation to the electric field Solid State Electronics 30 1987 693 697 R Quay C Moglestue V Palankovski and S Selberherr A temperature dependent model for the saturation velocity in semiconductor materials Materials Science in Semiconductor Processing 3 2000 149 155 S Selberherr W Hansch M Seavey and J Slotboom The Evolution of the MINIMOS Mobility Model Solid State Electronics 33 1990 1425 1436 53 Bibliography 54 17 B Smirnov Modeling of ionization produced by fast charged particles in gases Nucl Instr
22. adius of the tube cm const double rTube 1 46 Half length of the tube cm const double lTube 10 GeometrySimple geo new GeometrySimple Make a tube centered at the origin inner radius rWire outer radius rTube SolidTube tube new SolidTube 0 0 O rWire rTube l1Tube Add the solid to the geometry together with the medium inside geo gt AddSolid tube gas Pass a pointer to the geometry class to the component cmp gt SetGeometry geo Next we setup the electric field Chapter 2 Getting Started 10 Voltages const double vWire 327033 0 3 Add the wire in the center cmp gt AddWire 0 0 2 rWire vWire s Add the tube cmp gt AddTube rTube vTube 0 t const double vTube We want to calculate the signal induced on the wire Using cmp gt AddReadout s we tell the Component to prepare the solution for the weighting field of the wire which we have given the label s before Finally we assemble a Sensor object which acts as an interface to the transport classes discussed below Sensor sensor new Sensor Calculate the electric field using the Component object cmp sensor gt AddComponent cmp Request signal calculation for the electrode named s using the weighting field provided by the Component object cmp sensor gt AddElectrode cmp s In this not very realistic example we want
23. alls to GetElectronCollisions since the last reset The second function additionally provides the number of collisions of each cross section category elastic ionising etc The third function returns the number of collisions for a specific cross section term The counters can be reset using void ResetCollisionCounters Excitation Transfer Penning transfer can be taken into account in terms of a transfer efficiency r i e the probability for an excited level with an excitation energy e exceeding the ionisation potential jyn of the mixture to be converted to an ionisation The simulation of Penning transfer can be switched on off using void EnablePenningTransfer const double r const double lambda void EnablePenningTransfer const double r const double lambda std string gasname void DisablePenningTransfer void DisablePenningTransfer std string gasname r value of the transfer efficiency lambda distance characterizing the spatial extent of Penning transfers except for special studies this number should be set to zero gasname name of the gas the excitation levels of which are to be assigned the specified transfer efficiency The functions without the gasname parameter switch on off Penning transfer globally for all gases in the mixture Note that r is an average transfer efficiency it is assumed to be the same for all energetically eligible levels gt jon 3 4 Semiconductor
24. ble ey const double ez const double bx const double by const double bz double amp vx double amp vy double amp vz bool ElectronDiffusion const double ex const double ey const double ez const double bx const double by const double bz double amp dl double amp dt bool ElectronTownsend const double ex const double ey const double ez const double bx const double by const double bz double amp alpha bool ElectronAttachment const double ex const double ey const double ez const double bx const double by const double bz double amp eta ex ey ez electric field in V cm bx by bz magnetic field in T vx vy vz drift velocity in cm ns dl dt longitudinal and transverse diffusion coefficients in cm alpha Townsend coefficient in cm eta attachment coefficient in cm 13 Chapter 3 Media 14 transport parameter scaling drift velocity v vs E p diffusion oyp vs E p Townsend coefficient a pvs E p attachment coefficient n p vs E p Table 3 1 Pressure scaling relations for gases The above functions return true if the respective parameter is available at the requested field Analogous functions are available for holes although of course not meaningful for gases and also for ions except for the Townsend and attachment coefficients A function specific to ions is bool IonDissociation const double ex const double ey const double ez const double bx const double by co
25. ctrics and conductors e an interface with the Synopsys Sentaurus device simulation program 18 In the future an interface to the neBEM field solver 11 12 which already exists for Garfield 20 should be made available For calculating the transport properties of electrons in gas mixtures an interface to the Magboltz program 2 3 is available The ionization pattern produced along the track of relativistic charged particles can be simulated using the program Heed 17 The present document aims to provide an overview of the Garfield classes and their key func tionalities but does not provide an exhaustive description of all classes and functions A number of examples and code snippets are included which may serve as a basis for the user s own programs Further examples and information can be found on the webpage http cern ch garfieldpp If you have questions doubts comments etc about the code or this manual please don t hesitate to contact the authors Any kind feedback is highly welcome 1 1 Class Structure An overview of the different types of classes is given in Fig 1 1 Two main categories can be distin guished classes for describing the detector material properties geometry fields and transport classes which deal with tracing particles through the device The two class types are linked by the class Sensor The individual classes are explained in detail in the following chapters Readers
26. d AvalancheMC EnablePlotting ViewDrift view void Track EnablePlotting ViewDrift view ViewDrift stores the trajectories which are calculated by the transport class The drawing of the trajectories is triggered by the function void ViewDrift Plot 45 Chapter 6 Charge Transport In case of AvalancheMicroscopic it is usually not advisable to plot every single collision The number of collisions to be skipped for plotting can be set using void AvalancheMicroscopic SetCollisionSteps const int n n number of collisions to be skipped Note that this setting does not affect the transport of the electron as such the electron is always tracked rigorously through single collisions 7 Signals Signals are calculated using the Shockley Ramo theorem The current t induced by a particle with charge q at a position r moving at a velocity v is given by i t qv Ew r where Ey is the so called weighting field for the electrode to be read out The basic steps for calculating the current induced by the drift of electrons and ions holes are 1 Prepare the weighting field for the electrode to be read out This step depends on the field calculation technique i e the type of Component which is used see Chapter 4 2 Tell the Sensor that you want to use this weighting field for the signal calculation void Sensor AddElectrode ComponentBase cmp std string label where cmp is a pointer to the
27. d whether the provided geometry matches the requirements If necessary the planes and wires are reordered Wires outside the tube or the planes as well as overlapping wires are removed 4 3 2 Periodicities The class supports simple periodicity in x and y direction The periodic lengths are set by means of void SetPeriodicityX const double s void SetPeriodicityY const double s 4 3 3 Cell Types Internally cells are classified as belonging to one of these types A non periodic cells with a most one x and one y plane B1X x periodic cells without x planes and at most one y plane B1Y y periodic cells without y planes and at most one x plane B2X cells with two x planes and at most one y plane B2Y cells with two y planes and at most one x plane C1 doubly periodic cells without planes C2X doubly periodic cells with x planes C2Y doubly periodic cells with y planes C3 doubly periodic cells with x and y planes For non circular tubes this parameter is the distance between the origin and any of the edges Chapter 4 Components 32 D1 round tubes without axial periodicity D2 round tubes with axial periodicity D3 polygonal tubes without axial periodicity After the cell has been assembled and initialized the cell type can be retrieved by the function std string GetCellType 4 3 4 Weighting Fields The weighting field calculation for a readout group i e all elements wires planes etc with the
28. de are defined in the file FundamentalConstants hh 49 Appendix A Units and Constants 50 physical quantity unit length cm mass g time ns temperature K electric potential V electric charge fC energy eV pressure Torr electric field V cm magnetic field Tesla electric current fC ns angle rad Table A 1 Physical units B Gases Table B 1 shows a list of the gases available in the current version of Magboltz The star rating represents an estimate of the reliability of the cross section data for the respective gas A rating of 5 indicates a detailed well validated description of the cross sections while 2 indicates a low quality that is a coarse modelling of the cross sections associated with large uncertainties chem symbol name rating 4He helium 5 3He helium 3 5 Ne neon 5 Ar argon 5 Kr krypton 4 Xe xenon 4 Cs cesium 2 Hg mercury 2 Ha hydrogen 5 Do deuterium 5E No nitrogen 5 O2 oxygen 4 Fo fluorine 2 CO carbon monoxide 5 NO nitric oxide 4 H20 water 4 CO carbon dioxide 5 N20 nitrous oxide DF O3 ozone 3 H2S hydrogen sulfide 25 COS carbonyl sulfide 2 CS2 carbon disulfide 2 CHa methane 5 CDa deuterated methane 4 C2H6 ethane 5 C3Hg propane 4 nC4H10 n butane 4 iC4H10 isobutane 4 nCsH12 n pentane 4 neo C5H1 gt neopentane 4 C2H4 ethene 4 C2H2 acetylene 4 C3H6 propene 4 51 Appendix B Gases 52 cC3H6 cyclopropane 4 CH30H met
29. e amp v Medium GetMedium const double amp x const double amp y const double amp z x y Z position where the electric field medium is to be determined ex ey ez v electric field and potential at the given position m pointer to the medium at the given position if there is no medium at this location a null pointer is returned status status flag indicating where the point is located see Table 4 1 4 1 Defining the Geometry As mentioned above the purpose of Component classes is to provide for a given location the electric and magnetic field and a pointer to the Medium if available For the latter task it is obviously necessary to specify the geometry of the device In case of field maps the geometry is already defined in the field solver It is therefore sufficient to associate the materials of the field map with the corresponding Medium classes For other components e g analytic or user parameterized fields the geometry has to be defined separately Simple structures can be described by the native geometry GeometrySimple which has only a very restricted repertoire of shapes solids At present the available solids are value meaning 0 inside a drift medium gt 0 inside a wire 1 4 on the side of a plane where no wires are 5 inside the mesh but not in a drift medium 6 outside the mesh Table 4 1 Status flags for electric fields 23 Chapter 4 Components 24 e SolidBox e So
30. est wire 4 4 Other Components For simple calculations the class ComponentConstant can be used As the name implies it provides a uniform electric field The electric field and potential can be specified using 33 Chapter 4 Components void SetElectricField const double ex const double ey const double ez void SetPotential const double x const double p const double z const double v ex ey ez components of the electric field X y Z coordinates where the potential is specified v voltage at the given position The weighting field can be set using void SetWeightingField const double wx const double wy const double wz const std string label The class ComponentUser takes the electric field and potential from a user defined function void SetElectricField void f const double const double const double double amp double amp double amp void SetPotential void f const double const double const double double amp f pointer to the user function As an example let us consider the field in the bulk of an overdepleted planar silicon sensor given by v Vdep Vdep 2 d ga where V is the applied bias voltage Vdep is the depletion voltage and d is the thickness of the diode E x void efield const double x const double y const double z double amp ex double amp ey double amp ez Depletion voltage const double vdep 160 Applied voltage const doub
31. familiar with the structure of Fortran Garfield 20 will recognize a rough correspondence between the above classes and the sections of Garfield Medium classes for instance can be regarded as the counterpart of the amp GAS section Component classes are similar in scope to the amp CELL section Garfield also includes a number of classes for visualization purposes e g for plotting drift lines making a contour plot of the electrostatic potential or inspecting the layout of the detector These classes rely extensively on the graphics classes of the ROOT framework 4 Chapter 1 Introduction Detector Description material properties e gas gt Magboltz e silicon field calculation e analytic e field maps e neBEM y e E EN charge transport primary ionization e microscopic e Transport e RKF Figure 1 1 Overview of the main classes in Garfield and their interplay 2 Getting Started 2 1 Installation The source code is hosted on a Subversion svn repository managed by the CERN Central SVN service Web interfaces for browsing the code are available at e http svnweb cern ch world wsvn e http svnweb cern ch trac garfield The following instructions describe how to download and build Garfield from source e Make sure that ROOT is installed For installation instructions see http root cern ch drupal content installing root source or http root cern ch drupal content downloading root
32. following example Electrode label const std string label readout Setup the weighting field In this example we use a FEM field map ComponentAnsys123 fm new ComponentAnsys123 fm gt SetWeightingField WPOT lis label Sensor sensor new Sensor sensor gt AddComponent fm sensor gt AddElectrode fm label Setup the binning 0 to 100 ns in 100 steps const double tStart 0 const double tStop 100 const int nSteps 100 const double tStep tStop tStart nSteps AvalancheMicroscopic aval new AvalancheMicroscopic aval gt SetSensor sensor aval gt EnableSignalCalculation Calculate some drift lines Plot the induced current ViewSignal signalView new ViewSignal tStart tStep nSteps signalView gt SetSensor sensor signalView gt Plot label 7 1 Readout Electronics In order to model the signal processing by the front end electronics the raw signal i e the induced current can be convoluted with a so called transfer function The transfer function to be applied can be set using void Sensor SetTransferFunction double f double t where double f double t is a function provided by the user or using void Sensor SetTransferFunction std vector lt double gt times std vector lt double gt values Chapter 7 Signals 48 in which case the transfer function will be calculated by inte
33. hanol 3 C2H5OH ethanol 3 C3H70H isopropanol 3 C3H30 methylal 2 C4H1002 DME 4 CF tetrafluoromethane 5 CHF3 fluoroform 3 C2F6 hexafluoroethane 4 CoHoF4 tetrafluoroethane 2 C3Fg octafluoropropane 3 SF6 sulfur hexafluoride 3 BF3 boron trifluoride 4 CF3Br bromotrifluoromethane 3 NH3 ammonia 4 N CH3 3 TMA 3 SiHa silane 4 GeH germane 3 Table B 1 Gases available in Magboltz 8 Bibliography 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Ansys http www ansys com S F Biagi Magboltz 8 http magboltz web cern ch magboltz Monte Carlo simulation of electron drift and diffusion in counting gases under the influence of electric and magnetic fields Nucl Instr Meth A 421 1999 234 240 R Brun F Rademakers et al ROOT An Object Oriented Data Analysis Framework http root cern ch C Canali G Majni R Minder and G Ottaviani Electron and Hole Drift VelocityMeasure ments in Silicon and Their Empirical Relation to Electric Field and Temperature IEEE Trans Electron Devices 22 1975 1045 1047 H W Ellis et al Transport properties of gaseous ions over a wide energy range At Data Nucl Data Tables 17 1976 177 210 Transport properties of gaseous ions over a wide energy range Part II At Data Nucl Data Tables 22 1978 179 217 Transport properties of gaseous ions over a wide energy range Part Ill At Dat
34. he device simulation active flag indicating whether charge transport is enabled in this region Simple periodicities and mirror periodicities along x y and in case of ComponentTcad3d z are supported void EnablePeriodicityX void EnableMirrorPeriodicityX 4 2 3 Elmer The class ComponentElmer contributed by J Renner allows one to import field maps created with the open source field solver Elmer and the mesh tool Gmsh A detailed tutorial can be found on the webpage 4 2 4 CST The class ComponentCST contributed by K Zenker reads field maps extracted from CST Studio More details can be found at http www desy de zenker garfieldpp html 4 2 5 Regular grids Electric field values on a regular two dimensional or three dimensional grid can be imported using the class ComponentVoxel As a first step the grid needs to be defined using the function 29 Chapter 4 Components void SetMesh const unsigned int nx const unsigned int ny const unsigned int nz const double xmin const double xmax const double ymin const double ymax const double zmin const double zmax nx ny nz number of cells along x y Z xmin xmax boundaries of the grid in x y z The electric field values and potential for each grid cell are read in using bool LoadData const std string filename std string format const bool withPotential const bool withRegion const double scaleX 1 const double scaleE 1
35. her with the mesh The plot can be customized using void SetColor int matid int colorid void SetFillColor int matid int colorid Chapter 4 Components 30 void SetFillMesh bool fill matid material index in the field map colorid index of the ROOT color with which all elements of material matid are to be drawn fill flag indicating whether to draw a wireframe mesh false or filled elements As an illustration consider the following example suppose that fm is a pointer to a field map component and driftView is a pointer to a ViewDrift class TCanvas c1 new TCanvas ViewFEMesh meshView new ViewFEMesh meshView gt SetCanvas c1 Set the component meshView gt SetComponent fm Set the viewing plane meshView gt SetPlane 0 1 0 0 0 0 meshView gt SetFillMesh false meshView gt SetViewDrift driftView meshView gt SetArea 0 01 0 01 0 03 0 01 0 01 0 01 meshView gt Plot 4 3 Analytic Fields For two dimensional geometries consisting of wires planes and tubes semi analytic calculation techniques based essentially on the capacitance matrix method are implemented 4 3 1 Describing the Cell Wires tubes and planes can be added to the cell layout by means of the following functions Add a wire void AddWire const double x const double y const double d const double v const std string label const double length 100 const double tension 50 c
36. ilityModelMinimos void SetHighFieldMobilityModelCanali void SetHighFieldMobilityModelReggiani void SetHighFieldMobilityModelConstant The last function requests a constant mobility i e linear dependence of the velocity on the electric field The models activated by the other functions used the following expressions pane u o u E D u E fs Minimos 2u E vl 1 1 Z sat uer pe E Canali 5 e ger pen ug e ij HS u h uS a u E p E 8 Reggiani 14 en 3 2 2 3 ay 1 2 2 1 39 By default the Canali model is used For the impact ionization coefficient the user has currently the choice between the model of Grant 9 and the model of van Overstraeten and de Man 19 void SetImpactIonisationModelGrant void SetImpactIonisationModelVanOverstraetenDeMan The latter model is used by default On an experimental basis electron collision rates for use with microscopic tracking are also in cluded 4 Components The calculation of electric fields is done by classes derived from the abstract base class ComponentBase The key functions are void ElectricField const double x const double y const double z double amp ex double amp ey double amp ez Medium amp m int amp status void ElectricField const double x const double y const double z double amp ex double amp ey double amp ez doubl
37. le v 200 Detector thickness const double d 0 1 ey ez 0 ex v vdep d 2 x vdep d d ComponentUser component new ComponentUser component gt SetElectricField efield A user defined weighting field can be set using Chapter 4 Components 34 void SetWeightingField void f const double const double const double double amp double amp double amp const std string 4 5 Visualizing the Field The class ViewField provides a number of functions for plotting the potential and field of a component void PlotContour const std string option v void PlotSurface const std string option v void PlotProfile const double x0 const double y0 const double z0 const double x1 const double y1 const double zi const std string option v x0 zI coordinates of the start and end points of the line along which the potential is to be evaluated option quantity to be plotted potential v p phi magnitude of the electric field e field or individual components of the field ex ey ez The first two functions create a contour and surface plot respectively in the selected viewing plane The latter function plots the potential field along the line xo Yo Zo gt 1 Y1 21 The component or sensor of which the field is to be plotted is set by means of void SetComponent ComponentBase c void SetSensor Sensor s The viewi
38. lectrons on a microscopic level i e based on the second order equation of motion is the method of choice Microscopic tracking of electrons is dealt with by the class AvalancheMicroscopic 6 1 Runge Kutta Fehlberg Integration This method is implemented in the class DriftLineRKF 6 2 Monte Carlo Integration In the class AvalancheMC Eq 6 1 is integrated in a stochastic manner e a step of length As vgAt in the direction of the drift velocity vg at the local field is calculated with either the time step At or the distance As being specified by the user e a random diffusion step is sampled from three uncorrelated Gaussian distributions with stan dard deviation av D v As for the component parallel to the drift velocity and standard deviation oy Drv As for the two transverse components e the two steps are added vectorially and the location is updated The functions for setting the step size are 02 0 001 void SetCollisionSteps const int n 100 void SetTimeSteps const double d a o void SetDistanceSteps const double In the first case the integration is done using fixed time steps default 20 ps in the second case using fixed distance steps default 10 um Calling the third function instructs the class to do the 39 Chapter 6 Charge Transport 40 integration with exponentially distributed time steps with a mean equal to the specified multiple of the collision time MV
39. lidTube and e SolidSphere As an example we consider a gas filled tube with a diameter of 1 cm and a length of 20 cm along the z axis centred at the origin Create the medium MediumMagboltz gas new MediumMagboltz Create the geometry GeometrySimple geo new GeometrySimple Dimensions of the tube double rMin 0 rMax 0 5 halfLength 10 SolidTube tube new SolidTube 0 0 0 rMin rMax halfLength Add the solid to the geometry together with the gas inside geo gt AddSolid tube gas Solids may overlap When the geometry is scanned triggered for instance by calling GetMedium the first medium found is returned The sequence of the scan is reversed with respect to the assembly fo the geometry Hence the last medium added to the geometry is considered the innermost For more complex structures the class GeometryRoot can be used which provides an interface to the ROOT geometry TGeo Using GeometryRoot the above example would look like this Create the ROOT geometry TGeoManager geoman new TGeoManager world geometry Create the ROOT material and medium For simplicity we use the predefined material Vacuum TGeoMaterial matVacuum new TGeoMaterial Vacuum 0 0 0 TGeoMedium medVacuum new TGeoMedium Vacuum 1 matVacuum Dimensions of the tube double rMin 0 rMax 0 5 halfLength 10 In this simple case the tube is also the
40. mGas LoadlonMobility const std string filename filename path and filename of the mobility file Extensive compilations of ion mobilities and diffusion coefficients can be found in Refs 6 8 21 3 3 2 Magboltz Magboltz written by Steve Biagi is a program 3 for the calculation of electron transport properties in gas mixtures using semi classical Monte Carlo simulation lt includes a database of electron atom molecule cross sections for a large number of detection gases MediumMagboltz allows running Magboltz for a given electric field magnetic field and field an gle void RunMagboltz const double e const double b const double btheta const int ncoll bool verbose double amp vx double amp vy double amp vz double amp dl double amp dt double amp alpha double amp eta double amp vxerr double amp vyerr double amp vzerr double amp dlerr double amp dterr double amp alphaerr double amp etaerr double amp alphatof e b btheta E field B field and angle ncoll number of collisions in multiples of 10 over which the electron is tracked verbose flag switching on off full output from Magboltz vx vy vz drift velocity along E vz along B vy and along E x B vy dl dt diffusion coefficients alpha eta Townsend and attachment coefficient calculated using the SST technique or at low fields the ionization loss rate vxerr vyerr etaerr statistical error of the calculation in
41. makefile according to your configuration By default gfortran is used as Fortran compiler In order to use a different compiler e g g77 you can modify the definition of the variable FC in the makefile accordingly e Compile the classes by giving the command make e Heed requires an environment variable HEED_DATABASE to be defined export HEED_DATABASE GARF IELD_HOME Heed heed database Add this line also to your bashrc cshrc as well After the initial check out the command svn update followed by make in case of trouble try make clean make can be used for downloading the latest version of the code from the repository 2 2 Examples Section 2 2 1 discusses the calculation of transport parameters with Magboltz the use of ana lytic field calculation techniques macroscopic simulation of electron and ion drift lines and the calculation of induced signals Microscopic transport of electrons and the use of finite element field maps are dealt with in Sec 2 2 2 Sample macros and further examples can be found on the webpage cern ch garfieldpp 2 2 1 Drift Tube Gas Table First we prepare a table of transport parameters drift velocity diffusion coefficients Townsend coefficient and attachment coefficient as a function of the electric field E and in general also the magnetic field B as well as the angle between E and B In this example we use a gas mixture of 93 argon and 7 carb
42. nabled Calling SetArea without arguments sets the user area to the envelope of all components if available In addition the Sensor class takes care of signal calculations Chapter 7 5 Tracks The purpose of classes of the type Track is to simulate ionization patterns produced by fast charged particles traversing the detector The type of the primary particle is set by the function void SetParticle std string particle particle name of the particle Only particles which are sufficiently long lived to leave a track in a detector are considered A list of the available particles is given in Table 5 1 The kinematics of the charged particle can be defined by means of a number of equivalent meth ods e the total energy in eV of the particle e the kinetic energy in eV of the particle e the momentum in eV c of the particle e the dimension less velocity 6 v c the Lorentz factor y 1 1 B or the product By of these two variables The corresponding functions are void SetEnergy const double e void SetKineticEnergy const double ekin void SetMomentum const double p void SetBeta const double beta void SetGamma const double gamma void SetBetaGamma const double bg A track is initialized by means of void NewTrack const double x0 const double y0 const double 20 const double tO const double dx0 const double dy0 const double dz0 x0 y0 z0 initial position in
43. ng plane and the region to be drawn can be specified using void SetArea double xmin double ymin double xmax double ymax void SetPlane double fx double fy double fz double x0 double y0 double z0 void Rotate double angle By default the area is set to the bounding box of the component sensor The density of the plotting grid can be set using void SetNumberOfSamplesid const int n void SetNumber0fSamples2d const int nx const int ny n nx ny number of points in x and y direction default for one dimensional plots n 1000 default for two dimensional plots nx ny 200 The number of contour levels can be set using void SetNumberOfContours const int n 35 Chapter 4 Components The range of the function to be plotted is set using void SetVoltageRange const double minval const double maxval void SetElectricFieldRange const double minval const double maxval void SetWeightingFieldRange const double minval const double maxval For the voltage range the estimated minimum and maximum values of the potential in the component sensor are used as defaults The range of the electric and weighting fields should always be set by the user 4 6 Sensor The Sensor class can be viewed as a composite of components In order to obtain a complete description of a detector it is sometimes useful to combine fields from different Component classes For instance one might wish to use a field
44. nst double bz double amp diss It returns the dissociation coefficient in cm The components of the drift velocity are stored in a coordinate system which is aligned with the electric and magnetic field vectors More precisely the axes are along e the electric field E e the component of the magnetic field B transverse to E e ExB The longitudinal diffusion is measured along E The transverse diffusion is the average of the diffusion coefficients along the two remaining axes 3 1 1 Transport Tables The transport parameters can either be stored in a one dimensional table as a function of the electric field only or in a three dimensional table as a function of E B and the angle between E and B If only a one dimensional table is present and the drift velocity at B 0 is requested the Laue Langevin equation is used In the present version of the code all transport parameters share the same grid of electric fields magnetic fields and angles By default the field and angular ranges are e 20 electric field points between 100 V cm and 100 kV cm with logarithmic spacing e B 0 0 0 For specifying the field grid two functions are available void SetFieldGrid double emin double emax int ne bool logE double bmin double bmax int nb double amin double amax int na void SetFieldGrid const std vector lt double gt amp efields const std vector lt double gt amp bfields 15 Chapter 3 Media co
45. nst std vector lt double gt amp angles emin emax min and max value of the electric field range to be covered by the tables ne number of electric field grid points logE flag specifying whether the E field grid points should be evenly spaced false or logarith mically spaced true bmin bmax ne magnetic field range and number of values amin amax na angular range and number of angles efields bfields angles lists of E B and 8 in ascending order Electric fields have to be supplied in V cm magnetic fields in Tesla and angles in rad The gas tables are interpolated using Newton polynomials The order of the interpolation polyno mials can be set by means of void SetInterpolationMethodVelocity const int intrp void SetInterpolationMethodDiffusion const int intrp void SetInterpolationMethodTownsend const int intrp void SetInterpolationMethodAttachment const int intrp void SetInterpolationMethodIonMobility const int intrp void SetInterpolationMethodIonDissociation const int intrp intrp order of the interpolation polynomial The interpolation order must be between 1 and the smallest of the two numbers 10 and number of table entries 1 Orders larger than 2 are not recommended The method for extrapolating to E values smaller and larger than those present in the table can be set using void SetExtrapolationMethodVelocity const std string extrLow const std string extrHigh extrLow e
46. ntaurus 18 can be imported with the classes ComponentTcad2d and ComponentTcad3d The function to import the field map is bool Initialise const std string gridfilename const std string datafilename gridfilename name of the mesh file the extension is typically grd Chapter 4 Components 28 datafilename name of the file containing the nodal solution the filename typically typically ends with _des dat Both files have to be exported in DF ISE format files in the default TDR format cannot be read The classes have been tested with meshes created with the application Mesh which can pro duce axis aligned two and three dimensional meshes The only three dimensional mesh elements ComponentTcad3d can deal with are tetrahedra A mesh which consists only of simplex elements triangles in 2D tetrahedra in 3D can be generated by invoking Mesh with the option t After importing the files the regions of the device where charge transport is to be enabled need to be associated with Medium classes Get the number of regions in the device int GetNumberOfRegions Associate a region with a Medium class void SetMedium const int ireg Medium m ireg index in the list of device regions medium pointer to the Medium class to be associated with this region The name of a region can be retrieved with void GetRegion const int i std string amp name bool amp active name label of the region as defined in t
47. o be associated with Medium classes Get the number of materials in the map int GetNumberOfMaterials Associate a material with a Medium class void SetMedium const int imat Medium medium imat index in the list of field map materials medium pointer to the Medium class to be associated with this material The materials in the field map are characterized by the relative dielectric constant and the conductivity These parameters are accessible through the functions double GetPermittivity const int imat double GetConductivity const int imat A weighting field map can be imported using bool SetWeightingField std string prnsol std string label prnsol name of the file containing the nodal solution for the weighting field configuration label arbitrary name used for identification of the electrode signal The weighting field map has to use the same mesh as the previously read actual field map For periodic structures e g GEMs one usually models only the basic cell of the geometry and applies appropriate symmetry conditions to cover the whole problem domain The available symmetry operations are e simple periodicities e mirror periodicities e axial periodicities and e rotation symmetries Mirror periodicity and simple periodicity as well as axial periodicity and rotation symmetry are obviously mutually exclusive In case of axial periodicity the field map has to cover an in
48. on dioxide at a pressure of 3 atm and room temperature MediumMagboltz gas new MediumMagboltz gas gt SetComposition ar 93 co2 7 Set temperature K and pressure Torr gas gt SetPressure 3 760 9 Chapter 2 Getting Started gas gt SetTemperature 293 15 We also have to specify the number of electric fields to be included in the table and the electric field range to be covered Here we use 20 field points between 100 V cm and 100 kV cm with logarithmic spacing gas gt SetFieldGrid 100 100 e3 20 true Now we run Magboltz to generate the gas table for this grid As input parameter we have to specify the number of collisions in multiples of 10 over which the electron is traced by Magboltz const int ncoll 10 const bool verbose true gas gt GenerateGasTable ncoll verbose This calculation will take a while don t panic After the calculation is finished we save the gas table to a file for later use gas gt WriteGasFile ar_93_co2_7 gas Electric Field For calculating the electric field inside the tube we use the class ComponentAnalyticField which can handle two dimensional arrangements of wires planes and tubes ComponentAnalyticField cmp new ComponentAnalyticField The Component requires a description of the geometry that is a list of volumes and associated media Wire radius cm const double rWire 25 e 4 Outer r
49. onst double rho 19 3 Add a tube void AddTube const double r const double v const int nEdges const std string label Add a plane at constant x void AddPlaneX const double x const double v const std string label Add a plane at constant y void AddPlaneY const double y const double v const std string label In all of these functions the potential v in V and a label used for signal calculation have to be supplied as parameters For wires the center of the wire x y and its diameter d need to be specified Optional parameters are the wire length the tension more precisely the mass in g of the weight used to 31 Chapter 4 Components stretch the wire during the assembly and the density in g cm of the wire material These parameters have no influence on the electric field The number of wires which can be added is not limited Tube specific parameters are the radius r and the number of edges which determines the shape of the tube e n 0 cylindrical pipe e 3 lt n lt 8 regular polygon There can be only one tube in a cell The tube is always centered at the origin 0 0 Planes are described by their coordinates A cell can have at most two x and two y planes Planes and tubes cannot be used together in the same cell The geometry can be reset thereby deleting all wires planes and tubes by void Clear Before assembling and inverting the capacitance matrix a check is performe
50. q The third method is activated by default Drift line calculations are started using bool DriftElectron const double x0 const double yO const double zO const double tO bool DriftHole const double x0 const double yO const double zO const double t0 bool DriftIon const double x0 const double y0 const double z0 const double t0 x0 yO z0 tO initial position and time The trajectory can be retrieved using int GetNumberOfDriftLinePoints const void GetDriftLinePoint const int i double amp x double amp y double amp z double amp t The calculation of an avalanche initiated by an electron a hole or an electron hole pair is done using bool AvalancheElectron const double x0 const double y0 const double zO const double t0 const bool hole false bool AvalancheHole const double x0 const double y0 const double zO const double t0 const bool electron false bool AvalancheElectronHole const double x0 const double y0 const double zO const double t0 The flags hole and electron specify whether multiplication of holes and electrons respec tively should be taken into account in the simulation In case of gas based detectors only AvalancheElectron with hole false is meaningful The starting and endpoints of electrons in the avalanche can be retrieved using int GetNumberO0fElectronEndpoints void GetElectronEndpoint const int i double amp x0 double amp yO double amp z
51. ron status status code indicating why the tracking of the electron was stopped A list of status codes is given in Table 6 1 The function bool DriftElectron const double x0 const double y0 const double zO const double t0 const double e0 const double dx0 const double dy0 const double dz0 traces only the initial electron but not the secondaries produced along its drift path the input parameters are the same as for AvalancheElectron The electron energy distribution can be extracted in the following way AvalancheMicroscopic aval new AvalancheMicroscopic Make a histogram 100 bins between O and 100 eV TH1F hEnergy new TH1F hEnergy Electron energy 100 0 100 Pass the histogram to the avalanche class aval gt EnableElectronEnergyHistogramming hEnergy After each collision the histogram is filled with the current electron energy The effect of magnetic fields can be included in the stepping algorithm using the function void EnableMagneticField 43 Chapter 6 Charge Transport By default magnetic fields are not taken into account in the calculation Using void EnableAvalancheSizeLimit const int size the size of an electron avalanche can be limited After the avalanche has reached the specified max size no further secondaries are added to the stack of electrons to be transported Like in AvalancheMC a time window can be set unset using void Set
52. rpolation of the values provided in the table In order to convolute the presently stored signal with the transfer function specified using the above function the function bool Sensor ConvoluteSignal can be called As an example consider the following transfer function t f t ee 7 25 ns double transfer double t const double tau 25 return t tau exp 1 t tau int main int argc char argv Setup component media etc Sensor sensor new Sensor sensor gt SetTransferFunction transfer Calculate the induced current Apply the transfer function sensor gt ConvoluteSignal A Units and Constants The basic units are cm for distances g for macroscopic masses and ns for times Particle energies momenta and masses are expressed in eV eV c and eV c respectively For example the electron mass is given in eV c whereas the mass density of a material is given in g cm The mass of an atom is specified in terms of the atomic mass number A There are a few exceptions from this system of units though e The unit for the magnetic field B corresponding to the above system of units 107 Tesla is impractical Instead magnetic fields are expressed in Tesla e Pressures are specified in Torr e Electric charge is expressed in fC A summary of commonly used quantities and their units is given in Table A 1 The values of the physical constants used in the co
53. s MediumSilicon is the only semiconductor type Medium class implemented so far 3 4 1 Transport Parameters Like for all Medium classes the user has the possibility to specify the transport parameters in tabulated form as function of electric field magnetic field and angle If no such tables have been entered the transport parameters are calculated based on empirical parameterizations as used for instance in device simulation programs Several mobility models are implemented For the 21 Chapter 3 Media electrons holes pur 107 cm V t ms 6 pe 1076 cm VA ns B Sentaurus 10 1 417 2 5 0 4705 2 5 Minimos 16 1 43 2 0 0 46 2 18 Reggiani 14 1 32 2 0 0 46 2 2 Table 3 3 Lattice mobility parameter values mobility uo at low electric fields the following options are available e Using void SetLowFieldMobility const double mue const double mh mue electron mobility in cm V ns muh hole mobility in cm V ns the values of low field electron and hole mobilities can be specified explicitly by the user e The following functions select the model to be used for the mobility due to phonon scattering void SetLatticeMobilityModelMinimos void SetLatticeMobilityModelSentaurus void SetLatticeMobilityModelReggiani In all cases the dependence of the lattice mobility u on the temperature T is described by TNS uL T u To 5 To 300 K The values of the parameters
54. st of nodal solutions PRNSOL lis and the material properties MPLIST lis e specifying the length unit of the values given in the LIS files e setting the appropriate periodicities symmetries ComponentAnsys123 fm new ComponentAnsys123 Load the field map fm gt Initialise ELIST lis NLIST lis MPLIST lis PRNSOL lis mm Set the periodicities fm gt EnableMirrorPeriodicityX fm gt EnableMirorPeriodicityY Print some information about the cell dimensions fm gt PrintRange O Next we create a Sensor and add the field map component to it Sensor sensor new Sensor sensor gt AddComponent fm Gas We use a gas mixture of 80 argon and 20 CO MediumMagboltz gas new MediumMagboltz gas gt SetComposition ar 80 co2 20 Set temperature K and pressure Torr gas gt SetTemperature 293 15 gas gt SetPressure 760 Chapter 2 Getting Started 12 In this example we calculate electron avalanches using microscopic Monte Carlo simulation based directly on the electron atom molecule cross sections in the Magboltz database gas gt SetMaxElectronEnergy 200 const bool verbose true gas gt Initialise verbose In order to track a particle through the detector we have to tell ComponentAnsys123 which field map material corresponds to which Medium const int nMaterials fm gt GetNumberOfMaterials for int i
55. tegral fraction of 27 Periodicities can be set and unset using 27 Chapter 4 Components void EnablePeriodicityX void DisablePeriodicityX void EnableMirrorPeriodicityX void DisableMirrorPeriodicityX void EnableAxialPeriodicityX void DisableAxialPeriodicityX void EnableRotationSymmetryX void DisableRotationSymmetryX Analogous functions are available for y and z In order to assess the quality of the mesh one can retrieve the dimensions of each mesh element using GetElement const int i double amp vol double amp dmin double amp dmax i index of the element vol volume area of the element dmin dmax min max distance between two node points In the following example we make histograms of the aspect ratio and element size ComponentAnsys123 fm new ComponentAnsys123 TH1F hAspectRatio new TH1F hAspectRatio Aspect Ratio 100 0 50 TH1Fx hSize new TH1F hSize Element Size 100 0 30 const int nel fm gt GetNumberOfElements Loop over the elements double volume dmin dmax for int i nel i f fm gt GetElement i volume dmin dmax if dmin gt 0 hAspectRatio gt Fill dmax dmin hSize gt Fill volume TCanvas c1 new TCanvas hAspectRatio gt Draw TCanvas c2 new TCanvas c2 gt SetLogyO hSize gt Draw 4 2 2 Synopsys TCAD Electric fields calculated using the device simulation program Synopsys Se
56. to calculate only the electron signal We set the time interval within which the signal is recorded by the sensor to 2 ns with a binning of 0 02 ns const double tMin 0 const double tMax 2 const double tStep 0 02 const int nTimeBins int tMax tMin tStep sensor gt SetTimeWindow 0 tStep nTimeBins Avalanche For simulating the electron avalanche we use the class AvalancheMC which uses the previously computed tables of transport parameters to calculate drift lines and multiplication AvalancheMC aval new AvalancheMC aval gt SetSensor sensor Switch on signal calculation aval gt EnableSignalCalculation Do the drift line calculation in time steps of 50 ps aval gt SetTimeSteps 0 05 Starting position cm and time ns of the initial electron The electron is started at 100 micron above the wire const double x0 0 const double yO rWire 100 e 4 11 Chapter 2 Getting Started const double z0 0 const double t0 0 Simulate an avalanche aval gt AvalancheElectron x0 y0 z0 tO Using the class ViewSignal we plot the current induced on the wire by the avalanche simulated in the previous step ViewSignal signalView new ViewSignal signalView gt SetSensor sensor signalView gt PlotSignal s 2 2 2 GEM Field Map The initialisation of ComponentAnsys123 consists of e loading the mesh ELIST lis NLIST lis the li
57. top volume TGeoVolume top geoman gt MakeTube TOP medVacuum rMin rMax halfLength geoman gt SetTopVolume top geoman gt CloseGeometry Create the Garfield mediun MediumMagboltz gas new MediumMagboltz Create the Garfield geometry GeometryRoot geo new GeometryRoot Pass the pointer to the TGeoManager geo gt SetGeometry geoman Associate the ROOT medium with the Garfield medium geo gt SetMedium Vacuum gas In either case GeometrySimple and GeometryRoot after assembly the geometry is passed to the Component as a pointer void SetGeometry GeometryBase geo 25 Chapter 4 Components 4 1 1 Visualizing the Geometry Geometries described by GeometrySimple can be viewed using the class ViewGeometry Create and setup the geometry GeometrySimple geo new GeometrySimple Create a viewer ViewGeometry view new ViewGeometry Set the pointer to the geometry view gt SetGeometry geo view gt Plot ROOT geometries can be viewed by calling the Draw function of TGeoManager The layout of an arrangement of wires planes and tubes defined in ComponentAnalyticField can be inspected using the class ViewCel1 Create and setup the component ComponentAnalyticField cmp new ComponentAnalyticField Create a viewer ViewCell view new ViewCell Set the pointer to the component view gt SetComponent cmp
58. uble e int amp type int amp level double amp e1 doubleg dx double amp dy doubleg dz int amp nion int amp ndx int amp band e electron energy prior to the collision type category of the collision process see Tab 3 2 level index of the collision process el electron energy after the collision dx dy dz incoming and outgoing direction nion number of ionisation products i e electrons and ions created in the collision ndxc number of deexcitation products created in the collision band band index irrelevant for gases 3 3 Gases There are currently two classes implemented which can be used for the description of gaseous media MediumGas and its daughter class MediumMagboltz While MediumGas deals only with the interpolation of gas tables and the import of gas files MediumMagboltz owing to an interface to the Magboltz program 3 allows the calculation of transport parameters In addition the latter 17 Chapter 3 Media class provides access to the electron molecule scattering cross sections used in Magboltz and is thus suitable for microscopic tracking chapter 6 The composition of the gas mixture is specified using bool SetComposition const std string gasl const double f1 1 const std string gas2 const double f2 0 const std string gas3 const double f3 0 const std string gas4 const double f4 0 const std string gas5 const double f5
59. xtrHigh extrapolation method to be used constant exponential or linear Similar functions are available for the other transport parameters The extrapolation method set using this function has no effect on extrapolation in 3 dimensional tables In such tables polynomial extrapolation is performed with the same order as for the interpolation The default settings are e quadratic interpolation e constant extrapolation towards low values e linear extrapolation towards high values For plotting the transport parameters the class ViewMedium can be used Chapter 3 Media 16 collision type index elastic collision ionisation attachment excitation 0 1 2 inelastic collision 3 4 superelastic collision 5 Table 3 2 Classification of electron collision processes 3 2 Electron Scattering Rates For calculating electron drift lines using microscopic tracking see Sec 6 3 the preparation of an electron transport table is not necessary since this method is based directly on the electron atom molecule scattering rates The following functions which are meant to be called from within the class AvalancheMicroscopic are available in Medium e double GetElectronCollisionRate const double e const int band 0 returns the total scattering rate of an electron with energy e in eV in the Medium The band index is relevant only for semiconducting media bool GetElectronCollision const do
60. y Z t position and time e energy before the step dx dy dz direction Chapter 6 Charge Transport 44 hole flag indicating whether the particle is an electron or a hole The user handle functions for attachment ionisation and inelastic collisions are called each time a collision of the respective type occurs In this context inelastic collisions also include excitations The parameters passed to these functions are xX y Z t the location and time of the collision type the type of collision see Table 3 2 level the index of the cross section term as obtained from the Medium m a pointer to the current Medium In the following example we want all excitations which occur to undergo a special treatment void userHandle double x double y double z double t int type int level Medium m Check if the collision is an excitation if type 4 return Do something e g fill a histogram simulate the emission of a VUV photon int main int argc char argv Setup gas geometry and field ies aval new AvalancheMicroscopic ramas double x0 0 y0 0 z0 0 t0 0 double e0 1 aval gt AvalancheElectron x0 yO z0 t0 e0 0 0 0 6 4 Visualizing Drift Lines For plotting drift lines and tracks the class ViewDrift can be used After attaching a ViewDrift object to a transport class e g using void AvalancheMicroscopic EnablePlotting ViewDrift view voi
Download Pdf Manuals
Related Search
Related Contents
Edição 209 - Agosto / 2003 Bedienungsanleitung Kolbenmembranpumpe Verderbar G35 V7 Cleaning Gel for Screens 20G215-00 E2 User Manual U5194_Cyclonic upr.qxd MANUAL DEL USUARIO Copyright © All rights reserved.
Failed to retrieve file