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.
camac filtering switch (off)
apply (1) or don't apply (0) distortion correction. Not yet implemented in new algorithm!
historical format switch. If >0, "new"(current) format assumed
old (used for graphical debugging)
initialization flag for hitfinder - just keep it 1
**** see below ****
apply (.ne.0) or do not (.eq.0) TPC phase from CAMAC table
sets amount of to-screen diagnostic output
running with real data (0) or fsim (.ne.0)
apply (1) or not (0) t0 correction
# time buckets
used in fsim mode only
magnetic field (T)
drift velocity (cm/us)
TPC high voltage (V)
just keep it 0
phase offset of TPC
old *** but will soon be implemented in new
basically obsolete.. keep it 1
old *** and new -- see below
trigger delay (ns)
distance from anode plane to magnet center (cm)
|value of lprt||imode||Description|
Cluster/peakfinding and LOCAL peakfitting for hit x,y,z. Area=amplitude
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.
Cluster/peakfinding and GLOBAL fitting of cluster patterns done, using crossing angles (from tracker) as initial guesses for crossing angles.
Cluster/peakfinding and GLOBAL fitting of cluster patterns done, using crossing angles (from tracker) kept fixed in fit.
Cluster/peakfinding and GLOBAL fitting of cluster patterns done, assuming NO information from tracker.
NO cluster/peakfinding done (no hits found). Just outputs 2d pixel data for each row to an ASCII file.
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|
Make (and keep in paw) some 2-d histograms of pixel patterns on a padrow.
Calculate RMS_pad and RMS_time and output them to a file for use in training the triage cut (see below).
Perform triage cut (see below) to decide whether to search for multiple peaks in a cluster pattern.
If in "second pass", keep only those hits that were used by tracker in "first pass"-- not currently implemented.
If in "first pass", do NOT store pixels/clusters for use in "second pass". (see below)
= Max # peaks in a cluster before we try to break up the cluster into subclusters. (see below).
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.
this is the 2-dimensional "hit significance test" cut
|triage cut values|
see discussion above
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).