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

CSCStrip Class Reference

This class represents the ADC samples for a single channel. More...

#include <CSCStrip.h>

List of all members.

Public Member Functions

 CSCStrip (unsigned int channel=0, int numSamples=0)
 Constructor of an empty strip object.
 ~CSCStrip ()
 Destructor.
int GetID ()
int GetChannel ()
int GetLayer ()
int IsTransverse ()
int GetPhi ()
int IsLargeChamber ()
void PutSample (int sample, int value)
 This function is used only by CSCCluster() during reading of the raw data.
short int GetSample (int sample)
 Provides access to the ADC samples.
double GetPeakingTime ()
double GetAmplitude ()
short int GetMinimum ()
short int GetMaximum ()
short int GetMinMax ()
double GetPedestal ()
void SetPedestal (double pedestal)
 Sets the pedestal value for this channel.
double GetNoise ()
void SetNoise (double n)
 Sets the noise value for this channel.
void CorrectEstimates ()
 correct the result of the parabolic interpolation
int FitBipolar (double width=6.5)
 Invokes Kostas bipolar fit The reulting amplitude is stored int the amp member and returned by each subsequent call to GetAmplitude().
double GetFitChi2 ()
double GetFitTime ()
void Read (unsigned int *buf)
 This method is only used by the CSCCluster() class to read in raw data.
void Print ()
 Prints the ADC values to stdout.


Detailed Description

This class represents the ADC samples for a single channel.

It consists of a ATLAS channel ID that contains the channel number, the layer and the chamber, and of an array with the ADC samples.

Pedestal and noise are stored in the class and automatically subtracted. The constructor initializes the pedestal to 0, so no subtraction takes place until SetPedestal() is called. This is typically done with the CalServer class.

Status:
95% complete and well tested.


Member Function Documentation

void CSCStrip::CorrectEstimates  ) 
 

correct the result of the parabolic interpolation

This method corrects the estimate of the peaking time and the amplitude by applying corrections derived from fitting the waveform to the shaper response function.

The corrections are a function of the uncorrected peaking time and are calculated as a polynominal of 3rd order over pieces of the peaking time range. The corrected result replaces the old estimate. Repeated calls have no further effect.

Note:
This does not work yet for peaking times and not well for amplitudes.

int CSCStrip::FitBipolar double  width = 6.5  ) 
 

Invokes Kostas bipolar fit The reulting amplitude is stored int the amp member and returned by each subsequent call to GetAmplitude().

Parameters:
width the time constant of the waveform (6.1 - 6.7)
Returns:
the return code of the fitter.

double CSCStrip::GetAmplitude  )  [inline]
 

Returns:
the peaking amplitude of this strip. This is based on parabolic interpolation and the pedestal (if set) is subtracted. The unit is ADC counts.
See also:
SetPedestal(), CorrectEstimates().

int CSCStrip::GetChannel  )  [inline]
 

Returns:
the 0-based channel number

double CSCStrip::GetFitChi2  )  [inline]
 

Returns:
the fit chi2 from the bipolar fit

double CSCStrip::GetFitTime  )  [inline]
 

Returns:
the peaking time from the bipolar fit

int CSCStrip::GetID  )  [inline]
 

Returns:
the 17 bit channel ID. See http://positron.ps.uci.edu/~schernau/ROD/2rt/CSCDataFormat.html
Use GetChannel(), GetLayer(), IsTransverse(), and GetPhi() for easier access to the ID information.

int CSCStrip::GetLayer  )  [inline]
 

Returns:
the 0-based layer number

short int CSCStrip::GetMaximum  )  [inline]
 

Returns:
the largest ADC sample of this strip. There is no pedestal subtraction.

short int CSCStrip::GetMinimum  )  [inline]
 

Returns:
the smallest ADC sample of this strip. There is no pedestal subtraction.

short int CSCStrip::GetMinMax  )  [inline]
 

Returns:
the diference of the largest and the smallest ADC sample of this strip. There is no pedestal subtraction, since this is a peak-to-peak amplitude.

double CSCStrip::GetNoise  )  [inline]
 

Returns:
the noise value in ADC counts.

double CSCStrip::GetPeakingTime  )  [inline]
 

Returns:
the peaking time of this strip. This is based on parabolic interpolation and can range from 0 to the number of samples. The unit is sampling intervals, either 25ns or 50 ns. This time should be corrected with the sampling phase of the CSCChamber.
To get the corrected time for 20 MHz sampling, use
      50ns * peakingTime - 25ns * samplingPhase
      
See also:
CSCChamber->GetPhase(), CorrectEstimates().

double CSCStrip::GetPedestal  )  [inline]
 

Returns:
the pedestal in ADC counts.
See also:
SetPedestal().

int CSCStrip::GetPhi  )  [inline]
 

Returns:
the 0-based phi number

short int CSCStrip::GetSample int  sample  )  [inline]
 

Provides access to the ADC samples.

Parameters:
sample the 0-based sample number.
Returns:
the ADC value of that sample witout pedestal subtaction. Caution: There is no range check on the sample parameter.

int CSCStrip::IsLargeChamber  )  [inline]
 

Returns:
0 if this is a small CSC chamber, or 1 if it is a large one.

int CSCStrip::IsTransverse  )  [inline]
 

Returns:
0 if it is a X channel, or 1 if it is a Y channel.

void CSCStrip::Print  ) 
 

Prints the ADC values to stdout.

Used for debugging.

void CSCStrip::PutSample int  sample,
int  value
[inline]
 

This function is used only by CSCCluster() during reading of the raw data.

Parameters:
sample is the 0-based sample number.
value is the ADC value for that sample.

void CSCStrip::SetNoise double  n  )  [inline]
 

Sets the noise value for this channel.

Parameters:
n the noise value in ADC counts. This method is used by the CalServer() class.

void CSCStrip::SetPedestal double  pedestal  )  [inline]
 

Sets the pedestal value for this channel.

Parameters:
pedestal the pedestal value in ADC counts. This value is used in the GetAmplitude() method. This method is used by the CalServer() class.


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