]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCParam.h
TPC CA Global Merger component added
[u/mrichter/AliRoot.git] / TPC / AliTPCParam.h
index ac07af7584c9279f81d6d4a317e2f7a1648faed7..50509ddd4f40ce12afcd51de876b5e537a7983bd 100644 (file)
@@ -521,7 +521,8 @@ inline void AliTPCParam::Transform1to2(Float_t *xyz, Int_t *index) const
   //rotate to given sector
   Double_t xyzmaster[3] = {xyz[0],xyz[1],xyz[2]};
   Double_t xyzlocal[3];  
-  fGlobalMatrix[index[1]]->MasterToLocal(xyzmaster,xyzlocal);
+  if (index[1]>=0 && index[1]<fNSector) 
+    fGlobalMatrix[index[1]]->MasterToLocal(xyzmaster,xyzlocal);
   xyz[0] = xyzlocal[0];
   xyz[1] = xyzlocal[1];
   xyz[2] = xyzlocal[2];
@@ -544,9 +545,9 @@ inline void AliTPCParam::Transform2to1(Float_t *xyz, Int_t *index) const
   xyz[1]=y1;
   xyz[2]=fZLength-xyz[2]; 
   if (index[1]<fNInnerSector)
-    if ( index[1]>=(fNInnerSector>>1)) xyz[2]*=-1.;
+    {if ( index[1]>=(fNInnerSector>>1))        xyz[2]*=-1.;}
   else 
-    if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) )    xyz[2]*=-1;      
+    {if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) )    xyz[2]*=-1;}
   index[0]=1;
 }
 
@@ -666,6 +667,13 @@ inline void AliTPCParam::Transform4to8(Float_t *xyz, Int_t *index) const
   //transform xyz coordinates to 'digit' coordinates
   //
 
+  if (index[1]<fNInnerSector) {
+    if ( index[1]>=(fNInnerSector>>1)) xyz[1]*=-1.;
+  }
+  else {
+    if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) ) xyz[1]*=-1;      
+  }
+
   xyz[2]/=fZWidth;  
   if  (index[1]<fNInnerSector) {    
     xyz[0]/=fInnerPadPitchLength;
@@ -685,6 +693,13 @@ inline void AliTPCParam::Transform8to4(Float_t *xyz, Int_t *index) const
   //
   //transforms 'digit' coordinates to xyz coordinates
   //
+  if (index[1]<fNInnerSector) {
+    if ( index[1]>=(fNInnerSector>>1)) xyz[1]*=-1.;
+  }
+  else {
+    if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) ) xyz[1]*=-1;      
+  }
+
   xyz[2]*=fZWidth;
   if  (index[1]<fNInnerSector) {    
     xyz[0]*=fInnerPadPitchLength;