4 #ifndef L3_COORDINATE_TRANSFORMER_H
5 #define L3_COORDINATE_TRANSFORMER_H
7 #include "l3Coordinates.h"
14 static int numberOfPadsAtRow[45];
15 static double radialDistanceAtRow[45];
16 static double SectorSin[24];
17 static double SectorCos[24];
18 static double innerSectorPadPitch;
19 static double outerSectorPadPitch;
23 double drift_length_inner ;
24 double drift_length_outer ;
32 int transformation_errors;
39 int LoadTPCLookupTable(
char * filename =
"/L3/etc/map.bin");
56 void global_to_raw(
int sector,
int row,
62 void global_to_local(
int sector,
int row,
68 void local_to_raw(
int row ,
74 inline double GetSectorCos (
int i ) {
75 if ( i < 0 || i >= 24 )
81 inline double GetSectorSin (
int i ) {
82 if ( i < 0 || i >= 24 )
88 inline double GetRadialDistanceAtRow (
int i ) {
89 if ( i < 0 || i >= 45 )
92 return radialDistanceAtRow[i] ;
95 inline int GetNumberOfPadsAtRow (
int i )
97 if ( i < 0 || i >= 45 )
100 return numberOfPadsAtRow[i] ;
109 void Set_parameters_by_hand(
const double lengthPerTb = 0.584,
110 const double drift_length_inner = 201.,
111 const double drift_length_outer = 201.) ;
112 void Get_parameters_from_db() ;
113 void Use_transformation_provided_by_db() ;
114 void Print_parameters() ;
116 inline double Get_drift_length_inner() {
return drift_length_inner ;} ;
117 inline double Get_drift_length_outer() {
return drift_length_outer ;} ;
118 inline double Get_lengthPerTb() {
return lengthPerTb ; } ;
119 inline double Get_max_timebucket_inner() {
return max_tb_inner; } ;
120 inline double Get_max_timebucket_outter() {
return max_tb_outer; } ;
122 inline int Get_transformation_errors() {
return transformation_errors; } ;