next up previous
Next: Total tagged event yields Up: tagging Previous: event selection

Implementation in code

The software tools for carrying out the above analysis have been verified and imported into the Radphi cvs area. Three existing functions in the makehits package have been mostly rewritten, together with their associated data structures. The make_recoil() function now groups together neighboring pixels into clusters described by the structure recoil_t which contains suitably averaged pixel information, including the corrected recoil time described in a previous section and an average $dE/dx$ for the passing charged particle. In addition to a list of all pixel clusters found in the event, there is also an index to the pixel cluster to be used as the interaction time for the event. Most analyses will accept only events with a single unique recoil, in which case the recoil time is unambiguous.

The pair of functions make_tagger_clusters() and make_tagger_photons() together prepare the information needed by the user code to implement the tagging algorithm. In make_tagger_clusters() hits in neighboring channels are compared and, in the case where to hits occur within a coincidence window, the two hits are combined and assigned to the higher tagger channel. The higher tagger channel has a larger bend angle and is likely to be hit first in the case that a single electron passes through more than one counter in the tagger focal plane. The same coincidence window is applied between right and left phototubes on the tagger to form the hit list for a single channel as is subsequently used between neighboring channels to associate tagger clusters. Once an irreducible set of tagger hits has been formed, make_tagger_photons() may be called to count coincidences and accidentals. Coincidence and accidental repeat counts are available in the tagger_photons_t structure both for the individual tagger channels and the totals across the focal plane. The following code snippet shows how a user might use the information in the tagger_photons_t structure to obtain a neutral-tagged spectrum.

     float weight;
     tagger_photons_t *tagging;
     tagging = data_getGroup(event,GROUP_TAGGER_PHOTONS,0);
     weight = tagging->neutral_coincidences - tagging->neutral_accidentals;
     /*
      * calculate some event variable x here
      */
     hfill(id,x,0.,weight);


next up previous
Next: Total tagged event yields Up: tagging Previous: event selection
Richard T. Jones 2004-09-14