Introducing event specie in QA (Yves)
[u/mrichter/AliRoot.git] / STEER / AliTracker.cxx
index 12115cb..3681118 100644 (file)
@@ -37,7 +37,8 @@ Bool_t AliTracker::fgUniformField=kTRUE;
 Double_t AliTracker::fgBz=kAlmost0Field;
 const AliMagF *AliTracker::fgkFieldMap=0;
 Bool_t AliTracker::fFillResiduals=kFALSE;
-TObjArray *AliTracker::fResiduals=0;
+TObjArray **AliTracker::fResiduals=NULL;
+AliRecoParam::EventSpecie_t AliTracker::fEventSpecie=AliRecoParam::kDefault;
 
 ClassImp(AliTracker)
 
@@ -48,7 +49,7 @@ AliTracker::AliTracker():
   fZ(0),
   fSigmaX(0.005),
   fSigmaY(0.005),
-  fSigmaZ(0.010)
+  fSigmaZ(0.010) 
 {
   //--------------------------------------------------------------------
   // The default constructor.
@@ -96,11 +97,23 @@ void AliTracker::SetFieldMap(const AliMagF* map, Bool_t uni) {
 }
 
 //__________________________________________________________________________
+void AliTracker::FillClusterArray(TObjArray* /*array*/) const
+{
+  // Publishes all pointers to clusters known to the tracker into the
+  // passed object array.
+  // The ownership is not transfered - the caller is not expected to delete
+  // the clusters.
+
+  AliWarning("should be overriden by a sub-class.");
+}
+
+//__________________________________________________________________________
 void AliTracker::CookLabel(AliKalmanTrack *t, Float_t wrong) const {
   //--------------------------------------------------------------------
   //This function "cooks" a track label. If label<0, this track is fake.
   //--------------------------------------------------------------------
   Int_t noc=t->GetNumberOfClusters();
+  if (noc<1) return;
   Int_t *lb=new Int_t[noc];
   Int_t *mx=new Int_t[noc];
   AliCluster **clusters=new AliCluster*[noc];
@@ -156,7 +169,7 @@ void AliTracker::UseClusters(const AliKalmanTrack *t, Int_t from) const {
   }
 }
 
-Double_t AliTracker::GetBz(Float_t *r) {
+Double_t AliTracker::GetBz(const Float_t *r) {
   //------------------------------------------------------------------
   // Returns Bz (kG) at the point "r" .
   //------------------------------------------------------------------
@@ -166,7 +179,7 @@ Double_t AliTracker::GetBz(Float_t *r) {
 }
 
 Double_t 
-AliTracker::MeanMaterialBudget(Double_t *start,Double_t *end,Double_t *mparam)
+AliTracker::MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam)
 {
   // 
   // Calculate mean material budget and material properties between 
@@ -387,9 +400,29 @@ void AliTracker::FillResiduals(const AliExternalTrackParam *t,
 
   TH1F *h=0;
   AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
-  h=(TH1F*)fResiduals->At(2*layer-2);
+  h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-2);
   h->Fill(residuals[0]);
-  h=(TH1F*)fResiduals->At(2*layer-1);
+  h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-1);
   h->Fill(residuals[1]);
+
+  if (layer==5) {
+    if (p[1]<0) {  // SSD1 absolute residuals
+       ((TH1F*)fResiduals[fEventSpecie]->At(40))->Fill(t->GetY()-p[0]); //C side
+       ((TH1F*)fResiduals[fEventSpecie]->At(41))->Fill(t->GetZ()-p[1]);
+    } else {             
+       ((TH1F*)fResiduals[fEventSpecie]->At(42))->Fill(t->GetY()-p[0]); //A side
+       ((TH1F*)fResiduals[fEventSpecie]->At(43))->Fill(t->GetZ()-p[1]);
+    }           
+  }
+  if (layer==6) {  // SSD2 absolute residuals
+    if (p[1]<0) {
+       ((TH1F*)fResiduals[fEventSpecie]->At(44))->Fill(t->GetY()-p[0]); //C side
+       ((TH1F*)fResiduals[fEventSpecie]->At(45))->Fill(t->GetZ()-p[1]);
+    } else {
+       ((TH1F*)fResiduals[fEventSpecie]->At(46))->Fill(t->GetY()-p[0]); //A side
+       ((TH1F*)fResiduals[fEventSpecie]->At(47))->Fill(t->GetZ()-p[1]);
+    }
+  }
+
 }