Some notes regarding pedestals. M. Lefebvre 17/07/2001 GENERAL COMMENTS The parameters in hec_par.inc should become irrelevant since STL containers know about their size. PEDESTALS Initially, we should be able to read them from a file. This could be done by the initialize() method of one of our algorithms. Eventually, we should be able to get this pedestal file from a (run number keyed) database. Later, we should develop an algorithm that produces them using an average of the first n time samples, where n should be a "property" (adjustable parameter) of the algorithm. For our current HEC beam tests, n is usually chosen to be 1 to 5, since in principle the timing is ajusted such that the signal does not start before the 6th time slice. This was introduced a couple of years ago (Dugan and I requested it) to allow running digital filtering (which uses 5 samples) on signal free samples IN PHYSICS TRIGGER EVENTS. Indeed we have shown many times in the past (see for example http://wwwhep.phys.uvic.ca/~uvatlas/atlas/hec/beamtest_analysis/ presentations/Atlas_talk_dec99.ps.gz) that pedestals computed using random triggers (during physics runs) or dedicated pedestal runs gave biased pedestals. Our conclusions was that one must use pedestals obtained from the same triggers as the events being analysed. Also, pedestals can drift with time (although they do not appreciably since 1998), so computing them for the very events one wishes to analyze seems a good idea. Perhaps we can have initialize() : reset moments execute() : compute average signal in first n time samples gather their moments finalize() : compute pedestals and their rms (noise) write out pedestal file In hec_adc, a second pass is possible during which only events within a few sigmas from the first pass pedestal estimate are kept. This is to avoid "contamination" from events with some sort of signal in the first n time slices (cosmics, previous events) or from out of time (timing bug) events where the actual signal of the hit cells appear in the first n time samples (it does occur). I think we do not really need two passes. If this becomes an issue, we could first compute a rough pedestal with the first few events and then only keep events within some fixed adc count window from that first estimate.