fdhwlib  2.0.25
SltPattern Class Reference

#include <SltPattern.h>

Inheritance diagram for SltPattern:
CursesSltPattern

List of all members.

Public Member Functions

Static Private Attributes


Detailed Description

The class sltpattern contains methods to decode the pattern generated by the second level trigger system.

Todo:
Determine the number of triggered pixel from the trigger memory! If the number is small it is more likely to skip a whole event with a muon pattern in.

Definition at line 29 of file SltPattern.h.


Constructor & Destructor Documentation

SltPattern::SltPattern ( )
SltPattern::~SltPattern ( )

Member Function Documentation

int SltPattern::checkPixelList ( unsigned long *  mem,
int  n,
int *  colList,
int *  rowList,
int  nList = 4 
)

Check if all pixel in the list show a valid first level trigger in this image.

Returns:
The first pixel in the list that has no trigger flag (0..len-1).
void SltPattern::display ( unsigned long *  mem,
int  n,
int  iFirst = 0,
FILE *  fout = stdout,
int  fLen = 150 
)

Display the trigger information.

Parameters:
memPointer to the trigger memory. The memory is asumed to start always with data for the first column
nNumber of lines to be analysed. Every 20 lines a new image starts.
iFirstIndex of the first trigger line
foutOutput stream
fLenNumber of characters in one line
int SltPattern::findPixelList ( unsigned long *  mem,
int  n,
int  iPattern,
int  patternId,
int  firstRow,
int *  colList,
int *  rowList,
int  nList = 4 
)

Find the pixel of that are not given by the pattern number of the second level trigger.

double SltPattern::getAlpha ( int  y)

Calculate the spherical coordinates.

(GAP 2000-023 Angular direction of pixel in FD camera)

double SltPattern::getAlphaFromSkyCoordinates ( double  phi,
double  delta,
double  beta 
)

Calculate the coresponding coordinate for a given sky coordinate.

(GAP 2000-023 Angular direction of pixel in FD camera)

double SltPattern::getAzimuth ( double  alpha,
double  beta,
double  delta 
)

Calculate the pointing of a pixel in the sky (GAP 2000-023 Angular direction of pixel in FD camera)

Parameters:
alphaSpherical coordinate of the camera
betaSpherical coordinate of the camera
deltaElevation
double SltPattern::getBeta ( int  x)

Calculate the spherical coordinates (GAP 2000-023 Angular direction of pixel in FD camera)

double SltPattern::getBetaFromSkyCoordinates ( double  phi,
double  delta 
)

Calculate the coresponding coordinate for a given sky coordinate.

(GAP 2000-023 Angular direction of pixel in FD camera)

int SltPattern::getCircle ( int  colRef,
int  rowRef,
int  col,
int  row 
)

This is a simple algorithm to calculate the length of a vector without multiplication and square root.

Here the pixel are considered as "circles" around the reference pixel. The result is also given in means of the coordinates given by getX and getY.

double SltPattern::getElevation ( double  alpha,
double  beta 
)

Calculate the pointing of a pixel in the sky (GAP 2000-023 Angular direction of pixel in FD camera)

Parameters:
alphaSpherical coordinate of the camera
betaSpherical coordinate of the camera
int SltPattern::getFirstTrigger ( unsigned long *  mem,
int  n 
)

Get the position of the first second level trigger that occured in this event.

Parameters:
memTrigger memory
nLenght of the trigger memory
void SltPattern::getFltIntervall ( unsigned long *  mem,
int  n,
int  t0[][22],
int  t1[][22] 
)

Return a list of the time intervalls for every pixel with the first level trigger.

Parameters:
memTrigger memory
nLength of the trigger memory
t0Matrix of the first triggered bin
t1Matrix of the last triggered bin
int SltPattern::getPatternId ( unsigned long  mem)

Return the id of the pattern stored with this column.

Parameters:
memOne column / word of the trigger memory
void SltPattern::getPixelList ( int  patternId,
int  col,
int  row,
int *  colList,
int *  rowList,
int  nList = 4 
)

Return the relative address of the pixel belonging to the pattern.

Parameters:
patternIdThe id of the pattern
colcoordinate of the reference pixel
rowcoordinate of the reference pixel
colListarray of at least four elements to store the coordinates of the pixel belonging to the track. The reference pixel is always the first entry
rowListarray of at least four elements to store the coordinates of the pixel belonging to the track. The reference pixel is always the first entry
nListElements available in the rowList parameter
Returns:
The index of the trigger memory 0..n-1. If no trigger is found -1 is returned.
int SltPattern::getPixelList ( unsigned long *  mem,
int  n,
int *  iTrigger,
int *  colList,
int *  rowList,
int  nList = 4 
)

Return the relative address of the pixel belonging to the pattern.

Parameters:
memTrigger memory as returned by the class SltMemory. The pointer does not necessarily needs to point to the beginning of the data. Every offset coresponding to 1us is allowed.
nLength of the given memory data. The length of the memory has to be at least 20 to cover one complete image of the camera.
iTriggerNumber of the found SLT pattern. Refer to the SLT documentation for the pattern numbers.
colListarray of at least four elements to store the coordinates of the pixel belonging to the track. The reference pixel is always the first entry
rowListarray of at least four elements to store the coordinates of the pixel belonging to the track. The reference pixel is always the first entry
nListElements available in the rowList parameter
float SltPattern::getR ( int  colRef,
int  rowRef,
int  col,
int  row 
)

Calculate the difference between two pixel based of the coordinates introduced by getX and getY.

int SltPattern::getR2 ( int  colRef,
int  rowRef,
int  col,
int  row 
)

Calculate the square of difference between two pixel.

int SltPattern::getScalarProd ( int  colRef,
int  rowRef,
int  col1,
int  row1,
int  col2,
int  row2 
)

Skalar product between two vectors.

void SltPattern::getSltIntervall ( unsigned long *  mem,
int  n,
int *  t0,
int *  t1 
)

Return the time intervall with the second level trigger.

Parameters:
memTrigger memory
nLength of the trigger memory
t0First triggered bin
t1Last triggered bin
int SltPattern::getTriggered ( unsigned long *  mem,
int  n 
)

Get the number of triggered pixel from the trigger memory.

The number does not necessarily correspond with the number of pixel that show ADC data. To analyse a smaller range of the data, increase the pointer to the memory and decrease the given lenght

Parameters:
memPointer to the trigger memory. The memory is asumed to start always with data for the first column
nnumber of lines to be analysed. Every 20 lines a new image starts.
int SltPattern::getX ( int  col,
int  row 
)

Calculate the center of the pixel where the axis of the coordinate system lays in the most left pixel of the first column and the first row.

Range [0,39]

double SltPattern::getXFromSphericalCoordinates ( double  beta)

Calculate the cartesian coordinates for a given point in the spherical system.

(GAP 2000-023 Angular direction of pixel in FD camera)

int SltPattern::getY ( int  col,
int  row 
)
double SltPattern::getYFromSphericalCoordinates ( double  alpha)

Calculate the cartesian coordinates for a given point in the spherical system.

(GAP 2000-023 Angular direction of pixel in FD camera)

int SltPattern::insertByDistance ( int  col,
int  row,
int *  colList,
int *  rowList,
int  nList 
)

Insert a new pixel in a pixel list building a near to linear track.

Use only the distance from the first pixel to order the list.

int SltPattern::insertByProjection ( int  col,
int  row,
int *  colList,
int *  rowList,
int  nList 
)

Insert a new pixel in a pixel list building a near to linear track.

The new pixel has to be added to the list in order to give the best possible track afterwards. (May be more CPU time consuming than other algorithma?!)


Member Data Documentation

int SltPattern::track[128][3] [static, private]

Pattern as given in the description of the control FPGA at the Slt board.

Definition at line 296 of file SltPattern.h.

int SltPattern::vectorEvenRow[19][2] [static, private]

Vectors needed to decode the pixel coordinates for a pixel in a even row (0 .

. 18).

Definition at line 301 of file SltPattern.h.

int SltPattern::vectorOddRow[19][2] [static, private]

Vectors needed to decode the pixel coordinates for a pixel in a odd row (1 .

. 19).

Definition at line 306 of file SltPattern.h.


The documentation for this class was generated from the following file: