Privacy and Security Notice

Archived Messages for CLAS_OFFLINE@cebaf.gov: ec documentation

ec documentation

Will Brooks (brooksw@CEBAF.GOV)
Fri, 16 Jan 1998 17:04:03 -0500

This is a multi-part message in MIME format.

--------------C9A410054A8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I have added some internal documentation to the ec code named ecfsh.F.
This is one of the core routines of the ec reconstruction. If you're an
expert on this code please inspect and give me feedback.

- Will

--------------C9A410054A8
Content-Type: text/plain; charset=us-ascii; name="temp.dat"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="temp.dat"

SUBROUTINE ECFSP(axis,layer,sector,iterr,ierr)
c
c _begin_doc
c RCS ID string
c $Id: ecfsp.F,v 1.9 1997/12/23 00:07:27 stepanya Exp $
c
c Documentation for subroutine ECFSP
c
c Purpose: The name of the subroutine stands for 'EC - fit strips to peaks'.
c
c The algorithm has two sections. The first section is used for the first
c pass through the data to find the peaks from groups of strips; this
c section is executed when iterr=1. The second section is executed when
c iterr=2, and it refines the estimate of the peak locations by making
c attenuation length corrections to the data and re-calculating the mean
c and RMS. The subroutine is called twice per event, with iterr=1 and =2.
c
c For iterr = 1, the the code does the following:
c First, 'groups' are identified: a 'group' is a collection of strips in
c each view. The strips in a view have the following characteristics: 1) the
c energy deposit is above a threshold value given by the tcl variable
c EcFitEdge_strip_threshold, and 2) the strips are immediately adjacent to
c each other, or they are not separated by any more strips than is specified
c by the tcl variable touch_id. If touch_id=1, no missing strips are allowed
c in the group. If touch_id=2, one missing strip is allowed, if =3, two are
c allowed, etc. There are other limits imposed as well: the maximum number
c of groups is limited by the parameter Maxpeaks, which is defined in the
c file Ec_general.PAR at the present time (Jan 1998). Note that the
c 'threshold' has energy units, but it is actually not corrected for atten-
c uation lengths, so the threshold is actually for pulse size, not deposited
c energy.
c
c Next, the group is re-ordered from being sequential in strip number to
c being sequential in energy deposit, the first entry being the strip with
c the largest energy deposit. The centroid and RMS of each group is then
c calculated (with a prescription for calculating the RMS for groups which
c have only one strip). At this point the subroutine returns.
c
c For iterr = 2, the code does the following:
c For each strip in each peak, the energy is corrected for attenuation
c length. If layer=9 ('whole' reconstruction), the inner and outer energies
c are added together for each strip number, otherwise they are not.
c
c The time is calculated by adding up all the event times (minus transit
c time in the scintillator) for each strip in the peak, and dividing by the
c number of strips. The peak energy is obtained by adding all the corrected
c energies in the peak together. The centroid and RMS are calculated; these
c are calculated using either of two weights: either weighted by the energy
c in the strip, or by the logarithm of the energy in the strip. The two
c options are selected by the TCL variable ec_ln_weights. The second moment,
c third moment, and fourth moment of the distribution are calculated, and
c the subroutine returns.
c

--------------C9A410054A8--