Main Page | Class List | File List | Class Members | File Members | Related Pages

CSCChamber Class Reference

The CSCChamber class holds the event data for one chamber. More...

#include <CSCChamber.h>

List of all members.

Public Member Functions

 CSCChamber ()
 Constructor for intialization: this produces an empty chamber.
 ~CSCChamber ()
 Destructor.
int Read (unsigned int *source, int numSample)
 Reads a cluster from a buffer.
int GetGhostWord (int index)
 Provides access to the ghost words.
CSCClusterGetCluster (int layer, int i)
 Provides access to the X clusters if layer is between 0 and 3.
CSCClusterGetYCluster (int layer, int i)
 Provides access to the Y clusters.
int GetNumCluster (int layer)
 Provides the number of X clusters if layer is between 0 and 3.
int GetNumYCluster (int layer)
 Provides the number of Y clusters.
int GetSCAAddress (int sam)
 The SCA address is the row number in the SCA, ranging from 0 to 143.
int GetPhase ()
 The sampling phase is 0 or 1, depending on the trigger occuring either on the 20 MHz sampling time, or between 2 samplings.
int GetNumGhostWords ()
BOOL GetIsROS ()
void SetIsROS (BOOL b)
 set to TRUE if the ROD fragment is simulated by the ROS
void SetSector (unsigned int sourceID, int input)
 sets the sector based on the sourceID and CTM input
int GetSector ()
 get the sector number this is negative for side C: eta=-1.
void Print ()
 Prints some information about the event.


Detailed Description

The CSCChamber class holds the event data for one chamber.

The ADC data is stored in CSCCluster objects and the Chamber holds arrays of Clusters for each SPU. SPU 0-3 have data for X layers 0-3, respectively. SPU 4 holds data for all Y layers.

To access the data of a specific layer, 1. Find out how many clusters exist with GetNumCluster() for X layers or GetNumYCluster() for Y layers. 2. Get a pointer to a specific cluster with GetCluster() for X layers or GetYCluster() for Y layers.

Status:
95% complete and well tested.
See also:
CSCCluster().


Member Function Documentation

CSCCluster * CSCChamber::GetCluster int  layer,
int  i
 

Provides access to the X clusters if layer is between 0 and 3.

If layer is 4, than the Y clusters are accessed, but this should now be done with GetYCluster().

Parameters:
layer the layer: 0-3, where 0 is closest to the IP.
i the cluster number: 0 to GetNumCluster().
Returns:
The cluster pointer, or NULL if i is out of range.
See also:
GetNumCluster(), GetYCluster().

int CSCChamber::GetGhostWord int  index  )  [inline]
 

Provides access to the ghost words.

This is debugging information of variable length, that follows the event data. Typically, it contains 8 words per time slice for each DPU on the ROD. Currently, only the last 3 of these 8 words are used.

Parameters:
index the 0-based index of the ghost word array
Returns:
the ghostword at that index
See also:
GetNumGhostwords()

BOOL CSCChamber::GetIsROS  )  [inline]
 

Returns:
TRUE if the ROD fragment is simulated by the ROS

int CSCChamber::GetNumCluster int  layer  )  [inline]
 

Provides the number of X clusters if layer is between 0 and 3.

If layer is 4, than the number of Y clusters in all layers is returned, but this should now be done with GetNumYCluster(), which provides the number per layer and not just the total over all layers.

Parameters:
layer the layer number 0-3.
Returns:
the number of clusters in this layer.

int CSCChamber::GetNumGhostWords  )  [inline]
 

Returns:
the number of ghost words.
See also:
GetGhostWord().

int CSCChamber::GetNumYCluster int  layer  )  [inline]
 

Provides the number of Y clusters.

Parameters:
layer the layer number 0-3.
Returns:
the number of clusters in this layer.

int CSCChamber::GetPhase  )  [inline]
 

The sampling phase is 0 or 1, depending on the trigger occuring either on the 20 MHz sampling time, or between 2 samplings.

This phase is commaon to both chambers of a ROD, but can vary from ROD to ROD.

To get the corrected time, use

      50ns * peakingTime - 25ns * samplingPhase
      
Returns:
the phase.

int CSCChamber::GetSCAAddress int  sam  )  [inline]
 

The SCA address is the row number in the SCA, ranging from 0 to 143.

Parameters:
sam is the sample number. It is limited to 0-3, regardless of how many samples were taken.
Returns:
the SCA address for this sample.

int CSCChamber::GetSector  ) 
 

get the sector number this is negative for side C: eta=-1.

Returns:
the sector number, or 0 if the source ID was invalid

CSCCluster * CSCChamber::GetYCluster int  layer,
int  i
 

Provides access to the Y clusters.

Parameters:
layer the layer: 0-3, where 0 is closest to the IP.
i the cluster number: 0 to GetNumYCluster()-1.
Returns:
The cluster pointer, or NULL if i is out of range.
See also:
GetNumYCluster(), GetCluster().

void CSCChamber::Print  ) 
 

Prints some information about the event.

Used for debugging.

int CSCChamber::Read unsigned int *  source,
int  numSample
 

Reads a cluster from a buffer.

This is only used in the CSCEvent class.

Parameters:
source is a buffer filled with event raw data.
numSample is the number of samples.
Returns:
number of words read if reading went ok, -1 otherwise.

void CSCChamber::SetSector unsigned int  sourceID,
int  input
 

sets the sector based on the sourceID and CTM input

Parameters:
sourceID the source ID in the ROD ATLAS header
input = 1 for CTM_A (Large CSC), 2 for CTM_B (Small CSC)


The documentation for this class was generated from the following files:
Generated on Wed Oct 29 10:35:18 2008 for CSCRead by  doxygen 1.3.9.1