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

GeoServer Class Reference

The GeoServer class reads, stores, and applies alignment constants. More...

#include <GeoServer.h>

List of all members.

Public Member Functions

 GeoServer ()
 Constructor for intialization.
 ~GeoServer ()
 Destructor.
int ReadFile (char *filename)
 Reads all constants from a text file.
void ReadArray (double *a)
 Reads all constants from an array.
void Print ()
 Prints all alignment values for debugging.
double GetPitch (CSCHit *hit)
 Provides the Pitch value of the strips in mm for X and Y hits in small and large chambers.
double GetZ (double x, double y, int phi, int layer)
 Provides the Z coordinate in mm for a chamber and layer.
double GetY (double y, double x, int phi, int layer, int isLargeChamber)
 Provides the Y coordinate in mm for a Y hit.
double GetX (double x, double y, int phi, int layer, int isLargeChamber)
 Provides the X coordinate in mm for a X hit.
double GetYStrip (double y, double x, int phi, int layer, int isLargeChamber)
 Provides the Y strip that corresponds to the given Y coordinate.
double GetXStrip (double x, double y, int phi, int layer, int isLargeChamber)
 Provides the X strip that corresponds to the given X and Y coordinate.


Detailed Description

The GeoServer class reads, stores, and applies alignment constants.

Currently, there is an X and Y offset for each chamber, and a rotation angle. There is also a layer thickness parameter and the z position of the 2nd and 3rd chamber. The first chamber has z=0 and the last one z=441*3mm. The data is read from text files written by the align.cpp program.

Lookup of constants uses the channelID of a strip, which makes it independent of the chamber number and readout order.

This is meant to work only for the fixed chambers in the cosmic stand.

Status:
just written.
Todo:
test this scheme and improve it if necessary.


Constructor & Destructor Documentation

GeoServer::GeoServer  ) 
 

Constructor for intialization.

All offsets and angles are zero, z values are set to defaults.


Member Function Documentation

double GeoServer::GetPitch CSCHit hit  ) 
 

Provides the Pitch value of the strips in mm for X and Y hits in small and large chambers.

Parameters:
hit a pointer to the hit.
Returns:
the stip Pitch in mm.

double GeoServer::GetX double  x,
double  y,
int  phi,
int  layer,
int  isLargeChamber
 

Provides the X coordinate in mm for a X hit.

The rotation is applied and a Y coordinate must be supplied. Use this form if the y coordinate comes from a line fit and not from a Y hit.

Parameters:
x the X reconstruction result in (fractional) strips.
y the Y reconstruction result in (fractional) strips.
layer the layer number between 0 and 3.
isLargeChamber is 0 for small chambers and 1 for large ones.
Returns:
the X coordinate in mm relative to the center of the chamber.

double GeoServer::GetXStrip double  x,
double  y,
int  phi,
int  layer,
int  isLargeChamber
 

Provides the X strip that corresponds to the given X and Y coordinate.

The rotation is applied, so a Y coordinate is needed.

Parameters:
x the x coordinate in mm, relative to the center of the detector.
y the y coordinate in mm, relative to the center of the detector.
phi the phi number between 0 and 3 of the chamber.
layer the layer number between 0 and 3.
isLargeChamber is 0 for small chambers and 1 for large ones.
Returns:
the fractional X strip number between 0 and 191.

double GeoServer::GetY double  y,
double  x,
int  phi,
int  layer,
int  isLargeChamber
 

Provides the Y coordinate in mm for a Y hit.

No rotation is applied.

Parameters:
y the reconstructed fractional strip number.
x the reconstructed fractional strip number.
phi the phi number between 0 and 3 of the chamber.
layer the layer number between 0 and 3.
isLargeChamber is 0 for small chambers and 1 for large ones.
Returns:
the Y coordinate in mm relative to the center of the chamber.

double GeoServer::GetYStrip double  y,
double  x,
int  phi,
int  layer,
int  isLargeChamber
 

Provides the Y strip that corresponds to the given Y coordinate.

No rotation is applied.

Parameters:
y the y coordinate in mm, relative to the center of the detector.
x the x coordinate in mm, relative to the center of the detector.
phi the phi number between 0 and 3 of the chamber.
layer the layer number between 0 and 3.
isLargeChamber is 0 for small chambers and 1 for large ones.
Returns:
the fractional Y strip number between 0 and 48.

double GeoServer::GetZ double  x,
double  y,
int  phi,
int  layer
 

Provides the Z coordinate in mm for a chamber and layer.

Parameters:
phi the phi value of a chamber from 0 to 3.
layer the layer number of a chamber from 0 to 3.
x the x coordinate in strip numbers.
y the y coordinate in strip numbers.
Returns:
the Z coordinate in mm relative to the leftmost chamber.

void GeoServer::ReadArray double *  a  ) 
 

Reads all constants from an array.

This call can be used to read constants from Minuit.

Parameters:
a the array of double prec. values to read from.

int GeoServer::ReadFile char *  filename  ) 
 

Reads all constants from a text file.

This call can be skipped for Monte Carlo data, since the constructor already initializes the values.

Parameters:
filename the name of the text file.
Returns:
1 if there was no error, otherwise 0.


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