#ifndef TrackAlignment_HH #define TrackAlignment_HH // Constants needed for conversion of TDC values // to space coordinates (and vice versa for MC) #include class TrackAlignment { public: TrackAlignment(bool desy=true); // d is dimension; 0 = x, 1 = y // l is layer; 0-3 for DESY, 0-2 for CERN // z position of layer double zLayer(unsigned d, unsigned l) const; void zLayer(unsigned d, unsigned l, double z); // Coordinate when TDC value = 0 double cTzero(unsigned d, unsigned l) const; void cTzero(unsigned d, unsigned l, double c); // Drift velocity double vDrift(unsigned d, unsigned l) const; void vDrift(unsigned d, unsigned l, double v); // Intrinsic coordinate error double cError(unsigned d, unsigned l) const; void cError(unsigned d, unsigned l, double e); // Intrinsic chamber efficiency double cEffic(unsigned d, unsigned l) const; void cEffic(unsigned d, unsigned l, double e); // Conversion from TDC value to coordinate double coordinate(unsigned d, unsigned l, int t) const; // Conversion from coordinate to TDC value (for MC) int tdcValue(unsigned d, unsigned l, double c) const; std::ostream& print(std::ostream &o) const; private: // Interface for LCGenericT class friend class LCTrackPayload enum {numberOfInts=0}; const int* intData() const; int* intData(); enum {numberOfFloats=0}; const int* floatData() const; int* floatData(); enum {numberOfDoubles=5*2*4}; const double* doubleData() const; double* doubleData(); // Tracking chamber constants double _zLayer[2][4]; double _cTzero[2][4]; double _vDrift[2][4]; double _cError[2][4]; double _cEffic[2][4]; }; #endif