next up previous contents
Next: 3 Routines for the Up: 2 Routines for the Previous: 2.3.1 Handling Special Voltages

2.4 Constant Updating

  The task of the CST Constants Updating Routine is twofold:

  1. the initialization of Pedestals and Sigmas after a reset
  2. the dynamic updating of valid constants
The latter cannot happen for every event (deadtime!), but rather at an adjustable frequency (currently every fourth event).

For the CST, a Pedestal is introduced as:

PED = ( ADC - CM) PedScaleFactor

The reason for scaling the pedestal is the need for a higher precision than the ``natural'' 12-bit delivered by the FADCs. Otherwise, the dynamic updating algorithm would not be sensitive to even 1 σ - fluctuations (s. Eq. 6).

For the initialization of the Pedestals, the first 64 events (for every Pipeline Counter) are used, for which the mean value for the above defined Pedestals is calculated. After 32 64 = 2048 events (on average) one has obtained valid pedestals.

The next 1024 events are then used for initializing the Sigma quadruples (s. Sec. 2.1.2). For this purpose, one accumulates the PulseHeightSum:

PHS = ∑( ADC - PED/PedScaleFactor - CM )

as well as its square:

PHS2 = ∑( ADC - PED/PedScaleFactor - CM )2

After 1024 events the variance can be calculated from the mean values of the two sums:

  VAR = PHS2 - PHS2

The variance is to be used within the Hit Strip - and the Cluster Criterion (s. Sec. 2.3). The PulseHeightSum and the square sum are stored for being used during the dynamic updating. Internal counters guarantee that the real HitFinding starts only after valid constants have been established.

The Dynamic Updating of the Pedestals calculates a Pseudo-Pedestal from the data of the current event and adds it to the old Pedestal with a certain weight:

  PEDnew = (1 - weight) PEDold + weight PEDpseudo

Currently, a weight of {164} is being used.

For the sigmas, a likewise slow update of PHS and PHS2 has proven to be inefficient for two reasons:

  1. integer arithmetics sometimes leads to large fluctuations when subtracting quadratic terms
  2. pulse height contributions from hit strips lead to wrong sums and variances
Therefore it was chosen to accumulate PHS and PHS2 afresh over a certain integral of events (currently 1024 UpdateFrequency). For every strip, the sums are accumulated only if For the variances, Updating therefore means accumulating the sums. The number of valid ``updates'' is counted for every strip (4th element of the Sigma quadruples: Counts)

After 1024 Updates fresh variances are calculated if the number of valid updates is greater than (1024/4), otherwise the old variance is kept. This could possibly lead to strips never getting new (i.e. better) variances: the hot strips. The average occupancy of the CST has been estimated to be below the percent level. Therefore, if the number of valid updates for a strip is below (1024 - 64) which corresponds to an occupancy above 6%, the strip is marked as hot by setting bit 30 of the Counts variable. In this case, the sums will be accumulated even if the strip has a hit. This leads to some cooling.


next up previous contents
Next: 3 Routines for the Up: 2 Routines for the Previous: 2.3.1 Handling Special Voltages

Markus Kausch
Fri Oct 17 13:45:07 MST 1997