]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Handling of missaligned geometry. Function transform added. Transform cluster positio...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Apr 2006 15:11:38 +0000 (15:11 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Apr 2006 15:11:38 +0000 (15:11 +0000)
TPC/AliTPCtrackerMI.cxx
TPC/AliTPCtrackerMI.h

index 992e1a0554fc78f2d1e8f13c9375384951078239..c565a690cb750091e4154412ab981d43495f1707 100644 (file)
@@ -1126,6 +1126,9 @@ Int_t  AliTPCtrackerMI::LoadClusters()
     //  
     Int_t sec,row;
     fParam->AdjustSectorRow(clrow->GetID(),sec,row);
+    for (Int_t icl=0; icl<clrow->GetArray()->GetEntriesFast(); icl++){
+      Transform((AliCluster*)(clrow->GetArray()->At(icl)));
+    }
     //
     AliTPCRow * tpcrow=0;
     Int_t left=0;
@@ -1188,6 +1191,19 @@ void AliTPCtrackerMI::UnloadClusters()
   return ;
 }
 
+void   AliTPCtrackerMI::Transform(AliCluster * cluster){
+  //
+  // 
+  //
+  //if (!fParam->IsGeoRead()) fParam->ReadGeoMatrices();
+  TGeoHMatrix  *mat = fParam->GetClusterMatrix(cluster->GetDetector());
+  Double_t pos[3]= {cluster->GetX(),cluster->GetY(),cluster->GetZ()};
+  Double_t posC[3];
+  mat->LocalToMaster(pos,posC);
+  cluster->SetX(posC[0]);
+  cluster->SetY(posC[1]);
+  cluster->SetZ(posC[2]);
+}
 
 //_____________________________________________________________________________
 Int_t AliTPCtrackerMI::LoadOuterSectors() {
@@ -1559,9 +1575,10 @@ Bool_t AliTPCtrackerMI::GetTrackPoint(Int_t index, AliTrackPoint &p ) const
   AliTPCclusterMI *cl = GetClusterMI(index);
   if (!cl) return kFALSE;
   Int_t sector = (index&0xff000000)>>24;
-  Int_t row = (index&0x00ff0000)>>16;
+  //  Int_t row = (index&0x00ff0000)>>16;
   Float_t xyz[3];
-  xyz[0] = fParam->GetPadRowRadii(sector,row);
+  //  xyz[0] = fParam->GetPadRowRadii(sector,row);
+  xyz[0] = cl->GetX();
   xyz[1] = cl->GetY();
   xyz[2] = cl->GetZ();
   Float_t sin,cos;
index 1758c1e259861d43c68428f821dc8d01a7bec559..8bda85a38c878b30ccbe2628ff4dc0ce5684b5a0 100644 (file)
@@ -46,7 +46,7 @@ public:
   virtual Int_t LoadClusters (TTree * tree);
   Int_t  LoadClusters();
   void   UnloadClusters();
-
+  void   Transform(AliCluster * cluster);
   //
   void SetIO();  //set default IO from folders
   void SetIO(TTree * input, TTree * output, AliESD * event);