#include "AliAlignObj.h"
#include "AliTrackPointArray.h"
#include "TRandom.h"
-//#include "AliTPCTransform.h"
+#include "AliTPCcalibDB.h"
+#include "AliTPCTransform.h"
//
//
//
//
-// AliTPCTransform trafo;
-
-// Double_t x[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()};
-// Int_t i[1]={cluster->GetDetector()};
-
-// trafo.Transform(x,i,0,1);
-
-// cluster->SetX(x[0]);
-// cluster->SetY(x[1]);
-// cluster->SetZ(x[2]);
-
-// return;
+ AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
+ if (!transform) {
+ AliFatal("Tranformations not in calibDB");
+ }
+ Double_t x[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()};
+ Int_t i[1]={cluster->GetDetector()};
+ transform->Transform(x,i,0,1);
+ if (!AliTPCReconstructor::GetRecoParam()->GetBYMirror()){
+ if (cluster->GetDetector()%36>17){
+ x[1]*=-1;
+ }
+ }
+ //
+ // in debug mode check the transformation
+ //
+ if (AliTPCReconstructor::StreamLevel()>1) {
+ TTreeSRedirector &cstream = *fDebugStreamer;
+ cstream<<"Transform"<<
+ "x0="<<x[0]<<
+ "x1="<<x[1]<<
+ "x2="<<x[2]<<
+ "Cl.="<<cluster<<
+ "\n";
+ }
+ cluster->SetX(x[0]);
+ cluster->SetY(x[1]);
+ cluster->SetZ(x[2]);
// The old stuff:
//
else{
// chack Loading of Geo matrices from GeoManager - TEMPORARY FIX
}
- //cluster->SetX(posC[0]);
- //cluster->SetY(posC[1]);
- //cluster->SetZ(posC[2]);
+ cluster->SetX(posC[0]);
+ cluster->SetY(posC[1]);
+ cluster->SetZ(posC[2]);
}
//_____________________________________________________________________________
-void AliTPCtrackerMI::FindCurling(TObjArray * array, AliESDEvent *esd, Int_t iter)
+void AliTPCtrackerMI::FindCurling(TObjArray * array, AliESDEvent */*esd*/, Int_t iter)
{
//
// find Curling tracks
if (fN==kMaxClusterPerRow) {
cerr<<"AliTPCRow::InsertCluster(): Too many clusters !\n"; return;
}
+ if (fN>=fN1+fN2) {
+ cout<<"AliTPCRow::InsertCluster(): Too many clusters !\n";
+ }
+
if (fN==0) {fIndex[0]=index; fClusters[fN++]=c; return;}
Int_t i=Find(c->GetZ());
memmove(fClusters+i+1 ,fClusters+i,(fN-i)*sizeof(AliTPCclusterMI*));
}
+void AliTPCtrackerMI::AliTPCRow::SetFastCluster(Int_t i, Short_t cl){
+ //
+ // Set cluster info for fast navigation
+ //
+ if (i>510|| i<0){
+ }else{
+ fFastCluster[i]=cl;
+ }
+}
+