Since we are mostly concerned with the new hitfinder, I do not describe here switches that apply only to the old hitfinder, but just list them.
Because TAS3 is not yet stable, no new switches have been added to HIT_SW, and all switches for the new hitfinder are being kept in HIT_SW.UNDERSHOOT (which controls switches special to new hitfinder) and HIT_SW.LPRT. (which controls the mode of running the new hitfinder) for now.
Switch | Setting | Comment |
---|---|---|
amplt | 2 | old |
camac_trig | 0 | camac filtering switch (off) |
degug | 0 | old |
decon | 1 | old |
deconx | 1 | old |
distn | 1 | apply (1) or don't apply (0) distortion correction. Not yet implemented in new algorithm! |
error | 0 | old |
fmthd | 1 | historical format switch. If >0, "new"(current) format assumed |
gapmax | 10 | old |
globl | 0 | old (used for graphical debugging) |
init | 1 | initialization flag for hitfinder - just keep it 1 |
lprt | 0 | **** see below **** |
phase | 0 | apply (.ne.0) or do not (.eq.0) TPC phase from CAMAC table |
printf | -5 | sets amount of to-screen diagnostic output |
pshdc | 1 | old |
simul | 0 | running with real data (0) or fsim (.ne.0) |
t0_corr | 1 | apply (1) or not (0) t0 correction |
time_buckets | 160 | # time buckets |
track | 0 | used in fsim mode only |
trff | 2 | old |
attn | 0.9000000 | old |
bfield | 1.000000 | magnetic field (T) |
discr | 20.00000 | old |
driftv | 5.500000 | drift velocity (cm/us) |
hv | 10000.00 | TPC high voltage (V) |
laser | 0. | just keep it 0 |
merge | 1.000000 | old |
noise | 4.000000 | ADC noise |
phoff | 756.0000 | phase offset of TPC |
pkvl | 3.000000 | old *** but will soon be implemented in new |
press | 760.0000 | atmospheric pressure |
satur | 0. | old |
sig1 | 1.600000 | old |
sig1_hi | 3.000000 | old |
sig1_lo | 1.000000 | old |
sig2 | 2.400000 | old |
sig2_hi | 5.000000 | old |
sig2_lo | 1.200000 | old |
softw | 1.000000 | basically obsolete.. keep it 1 |
temp | 293.0000 | temperature (K) |
undershoot | -50.00000 | old *** and new -- see below |
ydel | 1425.000 | trigger delay (ns) |
yoff | -34.60000 | distance from anode plane to magnet center (cm) |
value of lprt | imode | Description |
---|---|---|
-99 | 0 | Cluster/peakfinding and LOCAL peakfitting for hit x,y,z. Area=amplitude |
-100 | 1 | Cluster/peakfinding and LOCAL peakfitting for hit x,y,z. Area of hit (i.e. dE/dx) derived from GLOBAL fit of cluster pattern varying amplitude. |
-104 | 5 | Cluster/peakfinding and GLOBAL fitting of cluster patterns done, using crossing angles (from tracker) as initial guesses for crossing angles. |
-105 | 6 | Cluster/peakfinding and GLOBAL fitting of cluster patterns done, using crossing angles (from tracker) kept fixed in fit. |
-109 | 10 | Cluster/peakfinding and GLOBAL fitting of cluster patterns done, assuming NO information from tracker. |
-119 | 20 | NO cluster/peakfinding done (no hits found). Just outputs 2d pixel data for each row to an ASCII file. |
Notes:
Mode 10 is also a "first pass" mode, but not one that I had envisioned using as the default. Here, a GLOBAL fit to the whole cluster pattern is done, varying all parameters associated with each hit. If one wants to *fit* the full 2-dimensional pixel pattern for a cluster with N peaks (hits) in it, then one has 5*N parameters to vary in the fit; for each hit, these are: x, y, amplitude, alpha, lambda, where alpha and lambda are the crossing angles of the track as it crosses the padrow. This mode should be extremely slow.
As we have said, to globally fit the cluster pattern, we must have 5*N parameters, which is a LOT, especially for N>2. So, it would be nice to know something about alpha and lambda.
Modes 5 and 6 above are therefore "second-pass" modes. The hitfinder has gone through the data once (in a "first-pass" mode), and the tracker has come along and found tracks, filling in the crossing angle information into the hits table for each hit. This infomation is then used either as an initial guess for alpha and lambda, which are then allowed to vary in the fit (mode 5), or are kept fixed, reducing the number of degrees of freedom to only 3*N (mode 6).
All modes are implemented, but real testing has only been done with modes 0 and 1. I would like to try the other modes too.
UNDERSHOOT is REAL*4. I have a variable INTEGER*4 ISWITCHES, which is filled by ISWITCHES=INT(HIT_SW.UNDERSHOOT).
Here is the bit encoding of ISWITCHES (bit 0 is the least significant bit (LSB)).
bit | If bit is 1 |
---|---|
0 | Make (and keep in paw) some 2-d histograms of pixel patterns on a padrow. |
1 | Calculate RMS_pad and RMS_time and output them to a file for use in training the triage cut (see below). |
2 | Perform triage cut (see below) to decide whether to search for multiple peaks in a cluster pattern. |
3 | If in "second pass", keep only those hits that were used by tracker in "first pass"-- not currently implemented. |
4 | If in "first pass", do NOT store pixels/clusters for use in "second pass". (see below) |
10-20 | = Max # peaks in a cluster before we try to break up the cluster into subclusters. (see below). |
NOTES:
In order to tune the cut, one can turn on bit 1 (bit 0 = LSB) and get an ASCII file of # peaks found, and the second moment. I have done this already, and the appropriate cut values for the triage cut are hard-wired into the code now (I will make this a switch later).
In order to make use of the cut, turn on bit 2. In normal operation, you should always have bit 2 on (and bit 1 off).
So, if you do not intend to do a second pass, turn on bit 4.
The cluster-breaking mechanism discussed above is also cpu-intensive, so it is wise to skip it if you don't need it. Therefore, if you do NOT INTEND to do global fitting of the cluster (i.e. mode 5,6,10) either in this pass or the second pass, then set this maximum number high (1024). If you DO INTEND to do global fitting, then set it to something like 4.
I have more or less optimized these cuts and hardwired what I think are best, but will make them switches in case I or anyone else wants to to explore them further. I will do this when tas3 is operational.
Switch | Functionality |
---|---|
peak-to-valley ratio | this is the 2-dimensional "hit significance test" cut |
triage cut values | see discussion above |
electron rejection | we make lots of delta electrons in the TPC, which spiral down to the padplane and basically "kill" the time buckets in pads below where the delta was made. Pattern recognition exists in the code to eliminate these buckets. It is currently hardwired "on". |
step size for cluster breaking | we discussed that prior to deconvolution (global fitting), big clusters are broken into smaller ones. This switch sets the "granularity" with which the cluster-breaking is done (obviously it also affects the speed). |