FTPC COORDINATES

	We need the matrix that transforms the hit's global coordinates (global coordinates are written 
in the StEvent files) to the local coordinates (for doing the tracking). That is the little tilt of 
the chamber from the "theoretical-Magnet" position which make different the global position from the
local one. 
For this task there are two steps 
1.  the rotation of the whole TPC with respect to the magnet 
2.  and addictional rotation of the FTPC EAST ==z<0  with respect to the TPC 

1.the rotation of the whole FTPC 
This rotation is the same that the one use for the TPC 
	There is a rotation to do for all the hits which can be written as: 

PositionLocal_(1,3) = TPCGlobalToLocal_(3,3) * ( PositionGlobal_(1,3)-TpcPositionInGlobal_(1,3) ) 

    So, the matrix GlobalToLocal is a 3x3 matrix with the following values : 

    Double_t phi = 0.0 ; 
    Double_t theta = -0.000381 ; 
    Double_t psi   = -0.000156 ; 

    TPCGlobalToLocal(1, 1) =  TMath::Cos(theta) * TMath::Cos(phi); 
    TPCGlobalToLocal(1, 2) =  TMath::Cos(theta) * TMath::Sin(phi); 
    TPCGlobalToLocal(1, 3) = -TMath::Sin(theta); 
    TPCGlobalToLocal(2, 1) =  TMath::Sin(psi) * TMath::Sin(theta) * TMath::Cos(phi) - TMath::Cos(psi) *
TMath::Sin(phi); 
    TPCGlobalToLocal(2, 2) =  TMath::Sin(psi) * TMath::Sin(theta) * TMath::Sin(phi) + TMath::Cos(psi) *
TMath::Cos(phi); 
    TPCGlobalToLocal(2, 3) =  TMath::Cos(theta) * TMath::Sin(psi); 
    TPCGlobalToLocal(3, 1) =  TMath::Cos(psi) * TMath::Sin(theta) * TMath::Cos(phi)+TMath::Sin(psi) *
TMath::Sin(phi); 
    TPCGlobalToLocal(3, 2) =  TMath::Cos(psi) * TMath::Sin(theta) * TMath::Sin(phi)-TMath::Sin(psi) *
TMath::Cos(phi); 
    TPCGlobalToLocal(3, 3) =  TMath::Cos(theta) * TMath::Cos(psi); 
That is 
    TPCGlobalToLocal(1, 1) =    1  ; 
    TPCGlobalToLocal(1, 2) =    0    ; 
    TPCGlobalToLocal(1, 3) =    0.000381; 
    TPCGlobalToLocal(2, 1) =    5.944e-08 ; 
    TPCGlobalToLocal(2, 2) =    1  ; 
    TPCGlobalToLocal(2, 3) =  -0.000156; 
    TPCGlobalToLocal(3, 1) =  -0.000381; 
    TPCGlobalToLocal(3, 2) =    0.000156 ; 
    TPCGlobalToLocal(3, 3) =    1 ; 

  And the vector to sustract to the Vector position in global is 

    TpcPositionInGlobal(1) = -0.256 ; 
    TpcPositionInGlobal(2) = -0.082 ; 
    TpcPositionInGlobal(3) = -0.192 ; 
  

2.  and addictional rotation of the FTPC EAST ( z<0 ). 
To do after the general TPC rotation (step 1) 
  

ONLY WHEN The Z value < 0 

  Float_t InstallationPointZ    = -235.8855  ; 

  PositionLocal_z = PositionLocal_z - InstallationPointZ 
  PositionLocal_(1,3) = FTPCLocaltoGlobal_(3,3) * PositionLocal_(1,3) 
  PositionLocal_z = PositionLocal_z + InstallationPointZ 

I can skip the calculation of the FTPCLocaltoGlobal_(3,3) matrix and I just write the values 
FTPCLocaltoGlobal(1,1) =  1 ; 
FTPCLocaltoGlobal(1,2) =  0 ; 
FTPCLocaltoGlobal(1,3) =  0; 
FTPCLocaltoGlobal(2,1) =  0 ; 
FTPCLocaltoGlobal(2,2) =  1 ; 
FTPCLocaltoGlobal(2,3) =  0.001453 ; 
FTPCLocaltoGlobal(3,1) =  0 ; 
FTPCLocaltoGlobal(3,2) =  -0.001453; 
FTPCLocaltoGlobal(3,3) =  1 ; 
  

As always the inverse operation (going from local to global) in the same prodecure but using Invert 
matrix (and changing - for + and so on). 

In any case we have the method for doing this transformation. We have the 
StFtpcPoint::TransformFtpc2Global() 
and 
StFtpcPoint::TransformGlobal2Ftpc() 

methods of the StRoot/StFtpcTrackMaker/StFtpcPoint class 
and tha differents matrix and parameters and constants are in the class 
StRoot/StFtpcTrackMaker/StFtpcTrackingParams 

StFtpcTrackingParams::InitFromFile() method. 


I hope this helps,