GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-0 > tkrtrgformtest / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

TFC_triggerSortedForm.h File Reference

Defines the interface needed to form a tracking trigger from a bit list of sorted hit tracker layers. More...

#include <EFC/../src/TFC_trigger.h>
#include <PBI/FFS.ih>

Functions

static __inline int TFC__triggerSorted7of8Form (int x, int y, int xy00, int xy01)
 Forms the 7 / 8 coincidence pattern.
static __inline int TFC__triggerSortedForm (int x, int y)
 Looks for a 7/8 or 6/6 coincidence. If one is found returns the starting layer and number of layers in the coincidence.


Detailed Description

Defines the interface needed to form a tracking trigger from a bit list of sorted hit tracker layers.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: TFC_triggerSortedForm.h,v 1.4 2011/03/31 22:16:45 russell Exp $
  

Function Documentation

static int TFC__triggerSorted7of8Form ( int  x,
int  y,
int  xy00,
int  xy01 
) [static]

Forms the 7 / 8 coincidence pattern.

Parameters:
x The bit mask of X layers with hits
y The bit mask of Y layers with hits
xy00 The bit-wise and of the above two masks
xy01 The bit-wise and of the xy00 and itselt shifted down by 1
Returns:
The coincidence pattern, aligned such that a coincidence pattern beginning in layer 17 has bit 15 set.
This forms the 7 of 8 pattern for the input masks. The calling convention is a little weird, but it is assumed that these two quantities have already been formed. The mask comes back aligned so that a coincidence in layer 17 begins in bit 15. This makes it consistent with the forming the 6 of 6 coincidence.
If the coincidence pattern is over only 4 layers, the minimum, then only one bit will be set. If the pattern is over 5 layers, then 2 consecutive bits will be set. The MSB bit of the coincidence indicates the layer the coincidence started in. For example, if the coincidence started in the layer closest to the the ACD, layer 17 would be returned. Because there must be 4 layers in the coincidence, it can never start below layer 3.
The 7 of 8 coincidence is formed by and'd all the possible 3-fold coincidence between the x and y with the OR of the 'left-out' layer.
    = xy012 & (x_or_y_3)
    | xy013 & (x_or_y_2)
    | xy023 & (x_or_y_1)
    | xy123 & (x_or_y_0)
  

The notation xy012, for example, means the 6/6 coincidence of the X and Y of layers 0,1,2. Simarily, x_or_y_3, means the OR of the X and Y layer 3.
Warning:
This is intended to be for internal usage only.

Referenced by TFC__triggerSortedForm().

static int TFC__triggerSortedForm ( int  x,
int  y 
) [static]

Looks for a 7/8 or 6/6 coincidence. If one is found returns the starting layer and number of layers in the coincidence.

Parameters:
x A bit mask of the X layers that have a hit strip.
y A bit mask of the Y layers that have a hit strip.
Return values:
-1,No possibiity of a trigger
-2,A possibility of a trigger, but no 7/8 or 6/6
>0,The starting layer and length of the coincidence packed together as two 16 bit words, with the starting layer number in the MSB 16 bits.
This routine attempts to look first for a coincidence of 4/4 layers, 2 X and 2 Y. If this is not found, it is deemed that there is no possibility of finding a trigger in this tower. If a coincidence of 4/4 layers is found, then one looks first for a string of 7/8. If that fails, 6/6. If both fail, a -2 is returned, indicating only a possibility of a trigger.
If a 7/8 or 6/6 is found, the starting layer number (with 0 being closest to the set ACD top tiles) is returned. The length of the coincidence beyond a 6/6 (ie 0 indicates at least 3 X,Y pairs of layers have been crossed) is computed and returned. (Each X,Y pair counts as 2 in the coincidence length.)

References _TFC_trigger::bf, _TFC_trigger_bf::layers, _TFC_trigger_bf::length, _TFC_trigger::si, _TFC_trigger_bf::start, TFC__triggerSorted7of8Form(), TFC_K_TRIGGER_TYPE_4_OF_4, TFC_K_TRIGGER_TYPE_6_OF_6, TFC_K_TRIGGER_TYPE_7_OF_8, and _TFC_trigger_bf::type.


Generated on Wed Jan 4 14:40:26 2012 by  doxygen 1.5.8