Review of the ALGORITHMS used in the Lookup System Mangement Program (LSM) 14-DEC-1990 Level 0 Bin Boundaries ---------------------- Bin width constant 6.25 cm. bin 0 is symmetric across the center of the detector. the extremes for bin +/- 15 are at +/- 96.875 cm Nominal Center of Page ---------------------- calculated as geometrical center of level 0 bins using the page e.g. bins -15,-14,-13,-12,-11,-10 use page -3 whose center is in the middle of the low boundary of bin -15 and the high boundary of bin -10. that is: -78.125 cm Tower Geometry -------------- These coordinates were pulled out of the geometry data bases using routines written by Steve Kahn. EM tower coordinates are at the average of the centers of all its EM3 pads e.g. (eta,phi) = (+1,1) R = 91.65 cm Z = 9.198 cm HD tower coordinates are at the average of the centers of all its FH1 pads e.g. (eta,phi)=(+1,1) R = 119.9 cm Z = 11.92 cm TOT tower coordinates are in the geometric center of its EM and HD tower e.g. (eta,phi)=(+1,1) R = (91.65+119.9)/2 = 105.7 cm Z = (9.198+11.92)/2 = 10.56 cm Phi angle is read from geometry data base, but is uniformly distributed over 360 degrees, starting with 5.625 degrees for phi = 1. Tower Noise ----------- These figures were calculated using the theoretical formula: (0.22 + 0.33 * SQRT(t1/t2) * Cpad +Ccable ) / s where t1 and t2 are relative sampling times, s is the sampling fraction, Cpad is the pad capacitance Ccable is the cable capacitance. The ratio of the bandwidth between full readout and trigger pickoff was chosen to be 3. t1 = 3.5 microsec and t2 = 2.5/9.0 microsec We did not use the experimental formula computed from the test beam data. The experimental formula would have given figures roughly 2/3 lower than the theoretical formula. e.g: for EM(+1,1), sigma is .079 GeV e.g: for HD(+1,1), sigma is 0.300 GeV PROM slopes ----------- The prom slope is computed as the product of 3 terms projective term: (fixed across all pages) this term is 1.0 for Et lookups, sin(phi) or cos(phi) for Px or Py vertex correction term: (varies across pages) sin(theta_to_page_center)/sin(theta_to_detector_center) that is SQRT( (twr_r**2 + twr_z**2) / (twr_r**2 + (twr_z-page_center)**2) ) tweak: (may vary across pages) correction for input scale error, front-end scaling error, or anything else. (currently 0% correction) e.g: slope for EM(+1,1), page -3 1.0 * SQRT( ( 91.65**2 + 9.198**2) / ( 91.65**2 + (9.198+78.125)**2 ) ) * 1.0 = 0.72763 e.g: slope for HD(+1,1), page -3 1.0 * SQRT( ( 119.9**2 + 11.92**2) / ( 119.9**2 + (11.92+78.125)**2 ) ) * 1.0 = 0.80356 e.g: slope for PX(+1,1), page -3 COS(5.625) * SQRT( ( 105.7**2 + 10.56**2) / ( 105.7**2 + (10.56+78.125)**2 ) ) * 1.0 = 0.76618 PROM cut -------- computed as the maximum of 2 contributions: ------- electronic noise suppression: the output of the adc for the intended cut value is the nearest integer to the product: electronic noise standard deviation (from calculated noises) * noise suppression factor (2.5 everywhere) * analog input scaling factor (resistors installed on CTFE card) * input scale error ( 0% ) / adc_scale (1/4 GeV per LSB, for EM, HD Et) To compute the PROM output for this integer value, one must then multiply it by the PROM slope. note: The Px and Py channel that do not directly "see" the total energy, but the sum of the digitized EM and HD energies. The noise standard deviation factor is replaced by the sum in quadrature of the EM and HD noise standard deviation. The product of the analog scaling by the input scale error is taken as the average of this product for the EM and HD channels. physics cut: nearest integer to the product of: transverse energy cut (1/2 GeV) * projective factor (from Et to output, e.g. cos(phi) for Px) / output scale (e.g. 1/4 GeV for EM Et, 1/2 GeV for Px) / local rescaling ratio as a power of 2, for cable shift (none) e.g: for EM(+1,1), page -3 electronic noise suppression: NINT( NINT( 0.079 * 2.5 * 0.99500 * 1.0 / 0.25) * 0.72763) = 1 Physics Cut: NINT( 0.5 * 1.0 / 0.25 / 1.0 ) = 2 Cut = MAX ( 2, 1 ) = 2 e.g: for HD(+1,1), page -3 electronic noise suppression: NINT( NINT( 0.300 * 2.5 * 0.99509 * 1.0 / 0.25) * 0.80356) = 2 Physics Cut: NINT( 0.5 * 1.0 / 0.25 / 1.0 ) = 2 Cut = MAX ( 2, 2 ) = 2 e.g: for PX(+1,1), page -3, noise factor is SQRT(.079**2 + .300**2) = 0.310 attenuation factor is (0.99500*1.0 + 0.99509*1.0) / 2 = .99505 electronic noise suppression: NINT( NINT( 0.310 * 2.5 * 0.99505 * 1.0 / 0.5) * 0.76618) = 2 Physics Cut: NINT( 0.5 * COS(5.625) * 1.0 / 0.50 / 1.0 ) = 1 Cut = MAX ( 2, 1 ) = 2 PROM Response ------------- To calculate the prom response to a given ADC output, the first quantity calculated is the "true" uncorrected transverse energy deposited in energy of ADC counts. That is the ADC byte minus the ADC zero energy response (i.e 8). Then this number is multiplied by the slope and rounded to the nearest integer. This is the "true" corrected output quantity. The absolute value of this integer is compared to the cut, and forced to zero if it is strictly less than the cut (dual-side cut) The last step will be to shift this number up by the lookup zero energy response (the proms saturate, of course, at 0 and 255). Note that the lookup zero energy response was "tuned" for each prom so that the response to an adc count of zero is always greater or equal to zero for any of the lookup pages (since the proms cannot output negative numbers). For the momentum proms, the "true" uncorrected transverse energy is calculated as the sum of: the integer average of the EM and HD ADC counts (drop lowest bit) - the floating point average of the EM and HD ADC zero energy responses + 0.25 e.g: for EM(+1,1), page -3, the response to an EM ADC count of 0 is NINT( (0 - 8) * 0.72763 ) + 8 = 2 The lookup zero energy response was tuned so that the page with the highest slope gives exactly 0. For eta = 1 it is the center page, with slope 1.0, that's why the lookup zero energy response is equal to the adc zero energy response (i.e. 8). e.g: for HD(+1,1), page -3, the response to an HD ADC count of 0 is NINT( (0 - 8) * 0.80356 ) + 8 = 2 e.g: for PX(+1,1), page -3, the response to an EM and HD ADC count of 0 is NINT( ( ((0+0) DIV 2) - ((8+8)/2) + 0.25 ) * 0.76618 ) + 8 = 2