Setting parameters:
Command | Short description |
---|---|
AREA |
Sets the size of the plotting area |
AVALANCHE |
Sets the avalanche model |
FOURIER |
Number of Fourier terms (periodic cells) |
GRID |
Grid density for PLOT-FIELD |
INTEGRATION-PARAMETERS |
Drift-line integration parameters |
OPTIONS |
Various printing and plotting options |
RESET |
Resets one or more aspects of the signals |
SELECT |
Establishes the list of sense wires |
SIGNAL-PARAMETERS |
Signal calculation parameters |
TRACK |
Sets the track for which a signal is generated |
WINDOW |
Sets the time window of the signals |
Computing and processing a signal:
Command | Short description |
---|---|
ADD-NOISE |
Adds noise to the signals |
CONVOLUTE-SIGNALS |
Convolutes signals with a transfer function |
PLOT-SIGNALS |
Plots the signals |
SIGNAL |
Simulates a signal |
WRITE-SIGNALS |
Stores a signal in a dataset |
Service instructions:
Command | Short description |
---|---|
PREPARE-TRACK |
Prepare a track for interpolation |
GET-TRACK |
Retrieve a a prepared track from a dataset |
WRITE-TRACK |
Save a prepared track in a dataset |
Debugging instructions:
Command | Short description |
---|---|
CHECK |
Verify proper functioning |
PLOT-FIELD |
Plots the signal induction field |
Procedure calls:
Procedure | Short description |
---|---|
Call ADD_SIGNALS |
Computes signals for current drift-line |
Call GET_RAW_SIGNAL |
Retrieves raw signals for an electrode |
Call GET_SIGNAL |
Retrieves the signals for an electrode |
Call INDUCED_CHARGE |
Computes integrated induced charge |
Call LIST_RAW_SIGNALS |
Lists raw signals currently in memory |
Call STORE_SIGNAL |
Stores a signal |
Call THRESHOLD_CROSSING |
Computes threshold crossing times |
Call WEIGHTING_FIELD |
Returns the weighting field |
Call WEIGHTING_FIELD_3 |
Returns the weighting field |
The noise function is evaluated separately for each wire, but the same noise is added on demand both to the direct and cross-induced parts of the signals.
It is permissible to use the ADD-NOISE command before any signal has been computed, but the time WINDOW must have been set beforehand.
Format:
ADD-NOISE NOISE-FUNCTION function ... [NOCROSS-INDUCED | CROSS-INDUCED]
Example:
add-noise noise-function -0.01*rnd_poisson(30)
In this example, the RND_POISSON generator is used to add to each of the sampling points a Poisson distributed number with mean 30, multiplied by -0.01.
Additional information on:
Formats:
See the AREA command of the field section.
No default type of avalanche is set - you must issue an AVALANCHE command prior to any signal calculation, each time you enter the &SIGNAL section.
Only avalanches generated by electrons that hit an electrode (a wire, a plane, the tube, a solid) are affected by this statement. In particular, this command has no influence on avalanches in a field map for which no solids have been defined.
This statement takes effect on SIGNAL commands that follow. Issuing the AVALANCHE command does reset the signals that may have computed earlier.
Format:
AVALANCHE {EXPONENTIAL mean | ... FIXED factor | ... FIXED-TOWNSEND | ... GAUSSIAN mean relative_sigma | ... NONE | ... POLYA-FIXED [mean [theta]] | ... POLYA-TOWNSEND [theta] | ... TOWNSEND}
Examples:
aval exp 1e4 aval townsend
Additional information on:
Format:
CHECK [AVALANCHE] ... [DIFFUSION] ... [CLUSTER] ... [RANGE min max] ... [FROM x y] ... [N n] ... [BINS nbin]
Example:
ch avalanche from 5 6 bins 50
Signal processing in Garfield is limited to convoluting the induced currents with transfer functions and to addition of certain types of noise with ADD-NOISE.
The CONVOLUTE-SIGNALS command convolutes all signals that are available at the moment the command is issued, with the transfer function that is specified. You may issue several of these commands in succession.
The transfer function is only evaluated once for all signals. The transfer function should therefore not depend on random number generators.
It is permissible to use the CONVOLUTE-SIGNALS command before any signal has been computed, e.g. in order to process noise, but the time WINDOW must have been set beforehand.
Format:
CONVOLUTE-SIGNALS ... TRANSFER-FUNCTION { function | transfer VS time } ... [ADD-ON-FUNCTION add] ... RANGE tmin tmax
Example:
convolute-signals ... transfer-function 250*(6*t/0.025)^6*exp(-6*t/0.025) ... range 0 2000
(This example, taken from an Atlas muon tube study, simulates the response of a pre-amplifier.)
Additional information on:
Garfield will, by default, compute the weighting fields by considering only the basic cell - suppressing all periodicities. This is a good approximation if the wires that are read-out are surrounded by many other wires in the basic cell.
If this is not the case, then the FOURIER command can be used to request inclusion of a number of copies of the basic cell. For technical reasons related to the Fourier transforms needed for such calculations, the number of copies to be considered must be an integral power of 2.
Signal calculations with a large number of copies of the basic cell requires considerable memory - temporary files on disk will be used for the purpose.
Requesting a large number of copies is meaningful only in chambers which contain equipotential planes - convergence is poor otherwise.
In addition to numeric arguments, the value NONE can be specified. This is to be used in the exceptional case where all copies of the read-out wires are interconnected. The weighting field will then be computed using the same potential functions that are used for the electric field. In addition, avalanches will be started from the copy in the basic cell, of the wire where an electron ends. As a result, the plot produced in response to the CLUSTER-PLOT option, may be surprising.
This statement takes effect on SIGNAL commands that follow. Issuing the FOURIER command does reset the signals that may have computed earlier.
Format:
FOURIER [ copies | NONE ]
Example:
fourier 16
(Note that this setting may require a fantastic amount of disk I/O !)
Format:
See the GET-TRACK command in the drift section.
The grid is common to all sections.
Format:
GRID number_of_steps_in_x [number_of_steps_in_y]
Example:
grid 25 15
Additional information on:
Format:
OPTIONS [ CLUSTER-PRINT | NOCLUSTER-PRINT ] ... [ CLUSTER-PLOT | NOCLUSTER-PLOT ] ... [ CONTOUR-ALL-MEDIA | CONTOUR-DRIFT-MEDIUM ] ... [ NOWIRE-MARKERS | WIRE-MARKERS ] ... [ NOCHECK-MAP-INDICES | CHECK-MAP-INDICES ]
Example:
opt nocluster-print
Additional information on:
The main quantities of interest in this context are the so-called weighting_field and the charges induced in an electrode by electrons and ions drifting from a given point.
The weighting field and the induced charge are plotted separately for each electrode that is read out. You can however limit the set of plots to a subset of electrodes.
There are related instructions in the field and drift sections.
Format:
PLOT-FIELD [CONTOUR [f1] [RANGE {cmin cmax | AUTOMATIC}] ... [N n] ... [LABELS | NOLABELS]] ... [GRAPH [f2] [ON f_curve] ... [N n]] ... [SCALE min max] ... [NOPRINT | PRINT] ... [HISTOGRAM [f3] [RANGE {hmin hmax | AUTOMATIC}] ... [BINS nbin]] ... [SURFACE [f4] [ANGLES \φ \θ]] ... [VECTOR [f5 f6]] ... [GROUP {ALL | sense }] ... [TIME-WINDOW tmin tmax] ... [RUNGE-KUTTA-DRIFT-LINES | MONTE-CARLO-DRIFT-LINES]
If you don't manage to fit all this on a single line, remember that lines that end on an ellipsis are continued on the next.
Examples:
plot-field hist status_e vector surf cont plot-field contour time_ion range 1000 3000
(The first example makes most of the plots using default functions and ranges\ - useful as a first call. The result will be an histogram that shows where electrons end up, a vector plot of the weighting field and a contour plot of the currents induced by single electrons released from the various locations. The second example makes a contour plot of the ion drift time.)
Additional information on:
The graphs contain either one or two curves, distinguished by their representations, depending on whether cross induced currents have been computed or not.
Use the SELECT statement without arguments to find out which electrodes are concerned by each of the signals.
Format:
PLOT-SIGNALS [TIME-WINDOW {AUTOMATIC | tmin tmax}] ... [RANGE {AUTOMATIC | smin smax}] ... [WIRES {ALL | ACTIVE | numbers, labels}] ... [CROSS-INDUCED-SIGNALS | NOCROSS-INDUCED-SIGNALS] ... [DIRECT-SIGNALS | NODIRECT-SIGNALS]
Example:
pl-sig time 2.7 3.1 wire 1
Plots the signal on wire 1 in the time window [2.7,3.1]\ \μsec.
Additional information on:
Format:
See PREPARE-TRACK in the drift section.
The REPEAT statement used to tell the SIGNAL command that you wish to repeat the calculation several times.
Old format: New format:REPEAT 100 For i From 1 To 100 Do SIGNAL SIGNAL Enddo
If the statement is issued without arguments, then all elements are reset.
Format:
RESET [AVALANCHE-MODEL] ... [MATRICES] ... [SIGNALS] ... [WINDOW]
Additional information on:
This command, and the resulting selection of electrodes, is common throughout Garfield, but the interpretation of the selection is left to the individual instructions. In this section, the grouping is relevant: the signals for electrodes in a single group are summed.
This command takes effect at the next signal calculation. Issuing a SELECT causes all previously computed signals to be deleted. Similarly, the ADD option of the SIGNAL command can not be used on the first signal that is computed after a SELECT command.
A SELECT command without arguments will display the contents of the electrode groups. This is helpful when figuring out what the signals produced by PLOT-SIGNALS correspond to. It is also useful in conjunction with the GET_SIGNAL procedure.
The cell section establishes an initial selection of all electrodes which have a label S, without grouping.
Format:
See SELECT
Example:
sel (1 s) 2 f
(Put wire 1 together with all S wires in one group, make wire 2 a group of its own and do the same for each of the F wires.)
Before issuing a SIGNAL instruction, one has to
Further, it is advisable to use the CLUSTER-PLOT option for the first few signals to inspect the electron and ion trajectories. This will tell you whether the AREA is sufficiently large and whether the INTEGRATION-PARAMETERS are properly set.
Signals can be further processed externally with electronics simulation programs (WRITE-SIGNALS). Inside Garfield, one can do basic signal manipulations such as convolution with transfer functions (CONVOLUTE-SIGNALS), adding noise (ADD-NOISE) and determining threshold crossings (THRESHOLD_CROSSING).
Garfield distinguishes two kinds of signals: the "direct" and the "cross induced" signals. Direct signals arise from an avalanche on a read-out electrode. These signals are always computed. Cross induced (or indirect) signals are all other currents induced by moving charges anywhere in the chamber. These signals are only computed on request.
Procedure calls should be used if greater flexible is required. ADD_SIGNALS is the key procedure: it computes the currents induced by a single charged particle.
Use INDUCED_CHARGE to compute the charge (as opposed to current) induced by a single charged particle.
Format:
SIGNAL [ANGULAR-INTEGRATION-POINTS n_angle] ... [ANGULAR-SPREAD {f_angle | FLAT} | NOANGULAR-SPREAD] ... [ATTACHMENT | NOATTACHMENT] ... [AVALANCHE | NOAVALANCHE] ... [AVERAGE-SIGNAL n_average | SAMPLE-SIGNAL | SUM-SIGNAL] ... [DIFFUSION | NODIFFUSION] ... [ELECTRON-PULSE | NOELECTRON-PULSE] ... [ION-PULSE | NOION-PULSE] ... [INTERPOLATION-ORDER n_order] ... [ION-ANGLES {n_ion | NOSAMPLING}] ... [ION-TAIL | DETAILED-ION-TAIL | ... NONSAMPLED-ION-TAIL | NOION-TAIL] ... [ION-THRESHOLD thr] ... [RUNGE-KUTTA-DRIFT-LINES | MONTE-CARLO-DRIFT-LINES] ... [NEW | ADD] ... [NOCROSS-INDUCED | CROSS-INDUCED] ... [NOINTERPOLATE-TRACK | INTERPOLATE-TRACK]
Example:
signal cross-induced
Additional information on:
Format:
SIGNAL-PARAMETERS [AVERAGE-SIGNAL n_average | SAMPLE-SIGNAL | SUM-SIGNAL] ... [INTERPOLATION-ORDER n_order] ... [INTEGRATE-WEIGHTING-FIELD | SAMPLE-WEIGHTING-FIELD]
Additional information on:
The track is shared between commands from nearly all sections.
Please verify both the location and the clustering model before starting a signal calculation. Some clustering models used elsewhere, e.g. a fixed number of single-electron deposits on each track, are not meaningful in the signal section.
Format:
See TRACK
Examples:
track 0 1 2 0 2 4 exp track 0 1 2 0 2 4 muon energy 10 GeV
The track in both examples runs from (0,1,2) to (0,2,4). In the first example, the cluster spacing will be exponential and the cluster size will be derived from the data entered in the gas section. In the second example, Heed takes care of generating the clusters. Enters the size and granularity of time window in which you want to study the signals.
The WINDOW command resets the signals to zero. The ADD option of the SIGNAL command can not be used on the first signal that is computed after a WINDOW command.
The time window is reset when entering the &SIGNAL section. Each signal section must therefore contain, at its start, a WINDOWS statement.
Format:
WINDOW t_start t_step [n_step]
Example:
window 0.5 0.01 200
(This is a proper setting if your signals never start before 0.5\ \μsec and decay almost fully before 0.5+200\×0.01=2.5\ \μsec.)
Writing is done when the command is executed, not while the SIGNAL command runs as in versions of Garfield prior to 5.20.
Format:
WRITE-SIGNALS [FILE-NAME file [member]] [REMARK remark] ... [FORMAT {SPICE | SCEPTRE | SORIN}] ... [WRITE-IF condition] ... [UNITS units]
If you don't manage to fit all this on a single line, remember that lines that end on an ellipsis are continued on the next.
Example:
wr-sig file-name "/home/garfield/signal.dat"
Additional information on:
Format:
See the WRITE-TRACK command in the drift section.
Formatted on 21/01/18 at 16:55.