+void AliTracker::FillResiduals(const AliExternalTrackParam *t,
+ Double_t *p, Double_t *cov,
+ UShort_t id, Bool_t updated) {
+ //
+ // This function fills the histograms of residuals
+ // The array of these histos is external for this AliTracker class.
+ // Normally, this array belong to AliGlobalQADataMaker class.
+ //
+ if (!fFillResiduals) return;
+ if (!fResiduals) return;
+
+ const Double_t *residuals=t->GetResiduals(p,cov,updated);
+ if (!residuals) return;
+
+ TH1F *h=0;
+ Int_t esIndex = AliRecoParam::AConvert(fEventSpecie) ;
+ AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-2);
+ if (h) h->Fill(residuals[0]);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-1);
+ if (h) h->Fill(residuals[1]);
+
+ if (layer==5) {
+ if (p[1]<0) { // SSD1 absolute residuals
+ h = (TH1F*)fResiduals[esIndex]->At(40);
+ if (h) h->Fill(t->GetY()-p[0]); //C side
+ h = (TH1F*)fResiduals[esIndex]->At(41);
+ if (h) h->Fill(t->GetZ()-p[1]);
+ } else {
+ h = (TH1F*)fResiduals[esIndex]->At(42);
+ if (h) h->Fill(t->GetY()-p[0]); //A side
+ h = (TH1F*)fResiduals[esIndex]->At(43);
+ if (h) h->Fill(t->GetZ()-p[1]);
+ }
+ }
+ if (layer==6) { // SSD2 absolute residuals
+ if (p[1]<0) {
+ h = (TH1F*)fResiduals[esIndex]->At(44);
+ if (h) h->Fill(t->GetY()-p[0]); //C side
+ h = (TH1F*)fResiduals[esIndex]->At(45);
+ if (h) h->Fill(t->GetZ()-p[1]);
+ } else {
+ h = (TH1F*)fResiduals[esIndex]->At(46);
+ if (h) h->Fill(t->GetY()-p[0]); //A side
+ h = (TH1F*)fResiduals[esIndex]->At(47);
+ if (h) h->Fill(t->GetZ()-p[1]);
+ }
+ }
+
+}
+
+void AliTracker::FillResiduals(const AliExternalTrackParam *t,
+ const AliCluster *c, Bool_t /*updated*/) {
+ //
+ // This function fills the histograms of residuals
+ // The array of these histos is external for this AliTracker class.
+ // Normally, this array belong to AliGlobalQADataMaker class.
+ //
+ // For the moment, the residuals are absolute !
+ //
+
+ if (!fFillResiduals) return;
+ if (!fResiduals) return;
+
+ UShort_t id=c->GetVolumeId();
+ const TGeoHMatrix *matrixT2L=AliGeomManager::GetTracking2LocalMatrix(id);
+
+ // Position of the cluster in the tracking c.s.
+ Double_t clsTrk[3]={c->GetX(), c->GetY(), c->GetZ()};
+ // Position of the cluster in the local module c.s.
+ Double_t clsLoc[3]={0.,0.,0.};
+ matrixT2L->LocalToMaster(clsTrk,clsLoc);
+
+
+ // Position of the intersection point in the tracking c.s.
+ Double_t trkTrk[3]={t->GetX(),t->GetY(),t->GetZ()};
+ // Position of the intersection point in the local module c.s.
+ Double_t trkLoc[3]={0.,0.,0.};
+ matrixT2L->LocalToMaster(trkTrk,trkLoc);
+
+ Double_t residuals[2]={trkLoc[0]-clsLoc[0], trkLoc[2]-clsLoc[2]};
+
+ TH1F *h=0;
+ Int_t esIndex = AliRecoParam::AConvert(fEventSpecie) ;
+ AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-2);
+ if (h) h->Fill(residuals[0]);
+ h=(TH1F*)fResiduals[esIndex]->At(2*layer-1);
+ if (h) h->Fill(residuals[1]);
+
+}