AliInfo(Form("gGeo[%p] Closed[%c]", (void*)gGeoManager, gGeoManager->IsClosed()?'y':'n'));
}
SetUserData(trklt);
+ // init tracklet line
+ Int_t sec = AliTRDgeometry::GetSector(trklt->GetDetector());
+ Float_t alpha((0.5+sec)*AliTRDgeometry::GetAlpha()),
+ cphi(TMath::Cos(alpha)),
+ sphi(TMath::Sin(alpha));
Float_t dx;
Float_t x0 = trklt->GetX0();
Float_t y0 = trklt->GetYref(0);
// backup yc - for testing purposes
Float_t yc = c->GetY();
c->SetY(yc-tilt*(c->GetZ()-zt));
- c->GetGlobalXYZ(g);
+
+ // Ben: Temporary(?) fix -> Issue with wrongly set flag "fIsMisaligned" of AliCluster
+ // Changes can be undone ofter the issue with the flag has been solved
+ //c->GetGlobalXYZ(g);
+
+ // The following code for the trasformation local-to-global is just adapted from
+ // AliTRDgeometry::RotateBack(...)
+
+ // tracking to global coordinates transformation
+ Float_t loc[3] = { c->GetX(), c->GetY(), c->GetZ() };
+ g[0] = loc[0] * cphi - loc[1] * sphi;
+ g[1] = loc[0] * sphi + loc[1] * cphi;
+ g[2] = loc[2];
+ // Ben: End of fix
Int_t id = fClusters->SetNextPoint(g[0], g[1], g[2]);
c->SetY(yc);
fClusters->SetPointId(id, new AliTRDcluster(*c));
SetLineColor(kRed);
//SetOwnIds(kTRUE);
- // init tracklet line
- Int_t sec = AliTRDgeometry::GetSector(trklt->GetDetector());
- Double_t alpha = AliTRDgeometry::GetAlpha() * (sec<9 ? sec + .5 : sec - 17.5);
-
//trklt->Fit(kTRUE);
y0 = trklt->GetYfit(0);
dydx = trklt->GetYfit(1);
- Double_t xg = x0 * TMath::Cos(alpha) - y0 * TMath::Sin(alpha);
- Double_t yg = x0 * TMath::Sin(alpha) + y0 * TMath::Cos(alpha);
+ Double_t xg(x0 * cphi - y0 * sphi),
+ yg(x0 * sphi + y0 * cphi);
SetPoint(0, xg, yg, z0);
//SetPoint(0, x0, y0, z0);
x0 -= dx;
y0 -= dydx*dx,
z0 -= dzdx*dx;
- xg = x0 * TMath::Cos(alpha) - y0 * TMath::Sin(alpha);
- yg = x0 * TMath::Sin(alpha) + y0 * TMath::Cos(alpha);
+ xg = x0 * cphi - y0 * sphi;
+ yg = x0 * sphi + y0 * cphi;
SetPoint(1, xg, yg, z0);
//SetPoint(1, x0, y0, z0);
}
}
fRecPoints->Reset();
+ // get rotation parameters
+ Int_t sec = AliTRDgeometry::GetSector(GetID());
+ Float_t alpha((0.5+sec)*AliTRDgeometry::GetAlpha()),
+ cphi(TMath::Cos(alpha)),
+ sphi(TMath::Sin(alpha));
Float_t q;
Float_t g[3]; //global coordinates
- AliTRDcluster *c=0x0;
+ AliTRDcluster *c(NULL);
Int_t nc = clusters->GetEntriesFast();
for(int iclus=0; iclus<nc; iclus++){
- c = (AliTRDcluster*)clusters->UncheckedAt(iclus);
- c->GetGlobalXYZ(g);
+ if(!(c = (AliTRDcluster*)clusters->UncheckedAt(iclus))) continue;
q = c->GetQ();
- Int_t id = fRecPoints->SetNextPoint(g[0], g[1], g[2]);
+ // Temorary fix related to bug http://savannah.cern.ch/bugs/?89730
+ // c->GetGlobalXYZ(g);
+ g[0] = c->GetX() * cphi - c->GetY() * sphi;
+ g[1] = c->GetX() * sphi + c->GetY() * cphi;
+ g[2] = c->GetZ();
+ Int_t id = fRecPoints->SetNextPoint(g[0], g[1], g[2]);
fRecPoints->SetPointId(id, new AliTRDcluster(*c));
}
fRecPoints->StampObjProps();
}
fRecPoints->Reset();
+ // get rotation parameters
+ Int_t sec = AliTRDgeometry::GetSector(fDet);
+ Float_t alpha((0.5+sec)*AliTRDgeometry::GetAlpha()),
+ cphi(TMath::Cos(alpha)),
+ sphi(TMath::Sin(alpha));
Float_t g[3]; //global coordinates
- const AliTRDchamberTimeBin *tb = 0x0;
+ const AliTRDchamberTimeBin *tb(NULL);
for(int itb=0; itb<AliTRDseedV1::kNtb; itb++){
tb = tc->GetTB(itb);
if(!(Int_t(*tb))) continue;
- const AliTRDcluster *c= 0x0; Int_t ic = 0;
+ const AliTRDcluster *c(NULL); Int_t ic = 0;
while((c=tb->GetCluster(ic))){
- c->GetGlobalXYZ(g);
- Int_t id = fRecPoints->SetNextPoint(g[0], g[1], g[2]);
+ // Temorary fix related to bug http://savannah.cern.ch/bugs/?89730
+ // c->GetGlobalXYZ(g);
+ g[0] = c->GetX() * cphi - c->GetY() * sphi;
+ g[1] = c->GetX() * sphi + c->GetY() * cphi;
+ g[2] = c->GetZ();
+ Int_t id = fRecPoints->SetNextPoint(g[0], g[1], g[2]);
fRecPoints->SetPointId(id, new AliTRDcluster(*c));
ic++;
}