]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTransform.cxx
Add OCDB FEE macro by Frederick
[u/mrichter/AliRoot.git] / TPC / AliTPCTransform.cxx
index edf0d2b1dc3cb1eea662c9359103db81ea38a5cd..b3de8533a3e059924b4f8561672a8ae188867191 100755 (executable)
@@ -192,7 +192,7 @@ void AliTPCTransform::Local2RotatedGlobal(Int_t sector, Double_t *x) const {
     AliFatal("Parameters missing");
   }
   Int_t row=TMath::Nint(x[0]);
-  Int_t pad=TMath::Nint(x[1]);
+  //  Int_t pad=TMath::Nint(x[1]);
   //
   const Int_t kNIS=param->GetNInnerSector(), kNOS=param->GetNOuterSector();
   Double_t sign = 1.;
@@ -219,6 +219,13 @@ void AliTPCTransform::Local2RotatedGlobal(Int_t sector, Double_t *x) const {
   // Y coordinate
   //
   x[1]=(x[1]-0.5*maxPad)*padWidth;
+  // pads are mirrorred on C-side
+  if (sector%36>17){
+    x[1]*=-1;
+  }
+  
+  //
+  
   //
   // Z coordinate
   //
@@ -228,29 +235,29 @@ void AliTPCTransform::Local2RotatedGlobal(Int_t sector, Double_t *x) const {
   x[2] = sign*( param->GetZLength(sector) - x[2]);
 }
 
-inline void AliTPCTransform::RotatedGlobal2Global(Int_t sector,Double_t *x) const {
+void AliTPCTransform::RotatedGlobal2Global(Int_t sector,Double_t *x) const {
   //
   // transform possition rotated global to the global
   //
   Double_t cos,sin;
   GetCosAndSin(sector,cos,sin);
   Double_t tmp=x[0];
-  x[0]= cos*tmp+sin*x[1];
-  x[1]=-sin*tmp+cos*x[1];
+  x[0]= cos*tmp-sin*x[1];
+  x[1]=+sin*tmp+cos*x[1];
 }
 
-inline void AliTPCTransform::Global2RotatedGlobal(Int_t sector,Double_t *x) const {
+void AliTPCTransform::Global2RotatedGlobal(Int_t sector,Double_t *x) const {
   //
   // tranform possition Global2RotatedGlobal
   //
   Double_t cos,sin;
   GetCosAndSin(sector,cos,sin);
   Double_t tmp=x[0];
-  x[0]= cos*tmp-sin*x[1];
-  x[1]= sin*tmp+cos*x[1];
+  x[0]= cos*tmp+sin*x[1];
+  x[1]= -sin*tmp+cos*x[1];
 }
 
-inline void AliTPCTransform::GetCosAndSin(Int_t sector,Double_t &cos,
+void AliTPCTransform::GetCosAndSin(Int_t sector,Double_t &cos,
                                          Double_t &sin) const {
   cos=fCoss[sector%18];
   sin=fSins[sector%18];