And the last friend leaves ...
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Oct 2006 10:25:39 +0000 (10:25 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Oct 2006 10:25:39 +0000 (10:25 +0000)
TRD/AliTRDtrack.h
TRD/AliTRDtracker.cxx

index e42ba7bf15bd25fb7334b3ff40a40c55423bf1bb..dd5aaf3888f33217860f0f8383faab795b0ecc42 100644 (file)
@@ -22,6 +22,8 @@ class AliTrackReference;
 const unsigned kMAXCLUSTERSPERTRACK = 210; 
 
 class AliTRDtrack : public AliKalmanTrack {
+
+ public:
    
   enum { kNdet      = 540
        , kNstacks   =  90
@@ -31,10 +33,6 @@ class AliTRDtrack : public AliKalmanTrack {
        , kNslice    =   3
        , kNtimeBins =  22 };
 
-  friend class AliTRDtracker;
-
- public:
-
    AliTRDtrack();
    AliTRDtrack(const AliTRDcluster *c, Int_t index, const Double_t xx[5]
               ,const Double_t cc[15], Double_t xr, Double_t alpha);  
@@ -66,9 +64,15 @@ class AliTRDtrack : public AliKalmanTrack {
            Int_t   *GetIndexes()                                            { return fIndex;                       }
            Int_t    GetProlongation(Double_t xk, Double_t &y, Double_t &z);
            Bool_t   GetStop() const                                         { return fStopped;                     }
-           Int_t    GetNWrong() const                                       { return fNWrong;                      }
            Int_t    GetNRotate() const                                      { return fNRotate;                     }
+           Int_t    GetNWrong() const                                       { return fNWrong;                      }
            Int_t    GetNCross() const                                       { return fNCross;                      }
+           Int_t    GetNExpected() const                                    { return fNExpected;                   }
+           Int_t    GetNLast() const                                        { return fNLast;                       }
+           Int_t    GetNExpectedLast() const                                { return fNExpectedLast;               }
+  AliTRDtracklet    GetTracklets(Int_t i) const                             { return fTracklets[i];                }
+           Float_t  GetBudget(Int_t i) const                                { return fBudget[i];                   }
+           Float_t  GetChi2Last() const                                     { return fChi2Last;                    }
   AliTRDtrack      *GetBackupTrack()                                        { return fBackupTrack;                 }
 
            void     SetdEdx(Double_t dedx)                                  { fdEdx                      = dedx;   }
@@ -79,6 +83,14 @@ class AliTRDtrack : public AliKalmanTrack {
            void     SetSampledEdx(Float_t q, Int_t i);
            void     SetSampledEdx(Float_t q);
            void     SetSeedLabel(Int_t lab)                                 { fSeedLab                   = lab;    }
+           void     SetNWrong(Int_t nwrong)                                 { fNWrong                    = nwrong; }
+           void     SetNCross(Int_t ncross)                                 { fNCross                    = ncross; }
+           void     SetNExpected(Int_t nexp)                                { fNExpected                 = nexp;   }
+           void     SetNLast(Int_t nlast)                                   { fNLast                     = nlast;  }
+           void     SetNExpectedLast(Int_t nexp)                            { fNExpectedLast             = nexp;   }
+           void     SetChi2Last(Float_t chi2)                               { fChi2Last                  = chi2;   }
+           void     SetTracklets(Int_t i, AliTRDtracklet t)                 { fTracklets[i]              = t;      }
+           void     SetBudget(Int_t i, Float_t budget)                      { fBudget[i]                 = budget; }
 
            Int_t    PropagateToX(Double_t xr, Double_t step);
            Int_t    PropagateToR(Double_t xr, Double_t step);
index ead10769bee3a9b63954424da074b46806970e0b..519635323a2a08fdcec7535a36062387809226d8 100644 (file)
@@ -702,9 +702,9 @@ Int_t AliTRDtracker::PropagateBack(AliESD *event)
          }
        }
 
-       if ((track->StatusForTOF()                          >   0) &&
-            (track->fNCross                                ==   0) && 
-            (Float_t(track->fN)/Float_t(track->fNExpected)  > 0.4)) {
+       if ((track->StatusForTOF()                                                   >   0) &&
+            (track->GetNCross()                                                     ==   0) && 
+            (Float_t(track->GetNumberOfClusters()) / Float_t(track->GetNExpected())  > 0.4)) {
          //seed->UpdateTrackParams(track->GetBackupTrack(), AliESDtrack::kTRDbackup);
        }
 
@@ -803,7 +803,7 @@ Int_t AliTRDtracker::PropagateBack(AliESD *event)
     }
 
     seed->SetTRDQuality(track->StatusForTOF());    
-    seed->SetTRDBudget(track->fBudget[0]);    
+    seed->SetTRDBudget(track->GetBudget(0));    
   
     delete track;
 
@@ -1005,9 +1005,9 @@ Int_t AliTRDtracker::FollowProlongation(AliTRDtrack &t)
 
       Int_t ilayer = GetGlobalTimeBin(0,iplane,itime);
       expectedNumberOfClusters++;       
-      t.fNExpected++;
+      t.SetNExpected(t.GetNExpected() + 1);
       if (t.GetX() > 345.0) {
-        t.fNExpectedLast++;
+        t.SetNExpectedLast(t.GetNExpectedLast() + 1);
       }
       AliTRDpropagationLayer &timeBin = *(fTrSec[sector]->GetLayer(ilayer));
       AliTRDcluster          *cl      = 0;
@@ -1047,8 +1047,8 @@ Int_t AliTRDtracker::FollowProlongation(AliTRDtrack &t)
          Int_t    det      = cl->GetDetector();    
          Int_t    plane    = fGeom->GetPlane(det);
          if (t.GetX() > 345.0) {
-           t.fNLast++;
-           t.fChi2Last += maxChi2;
+           t.SetNLast(t.GetNLast() + 1);
+           t.SetChi2Last(t.GetChi2Last() + maxChi2);
          }
 
          Double_t xcluster = cl->GetX();
@@ -1170,9 +1170,9 @@ Int_t AliTRDtracker::FollowBackProlongation(AliTRDtrack &t)
 
       Int_t ilayer = GetGlobalTimeBin(0, iplane,itime);
       expectedNumberOfClusters++;       
-      t.fNExpected++;
+      t.SetNExpected(t.GetNExpected() + 1);
       if (t.GetX() > 345.0) {
-        t.fNExpectedLast++;
+        t.SetNExpectedLast(t.GetNExpectedLast() + 1);
       }
       AliTRDpropagationLayer &timeBin = *(fTrSec[sector]->GetLayer(ilayer));
       AliTRDcluster          *cl      = 0;
@@ -1198,8 +1198,8 @@ Int_t AliTRDtracker::FollowBackProlongation(AliTRDtrack &t)
          Int_t    det      = cl->GetDetector();    
          Int_t    plane    = fGeom->GetPlane(det);
          if (t.GetX() > 345.0) {
-           t.fNLast++;
-           t.fChi2Last += maxChi2;
+           t.SetNLast(t.GetNLast() + 1);
+           t.SetChi2Last(t.GetChi2Last() + maxChi2);
          }
          Double_t xcluster = cl->GetX();
          t.PropagateTo(xcluster,radLength,rho);
@@ -1217,8 +1217,8 @@ Int_t AliTRDtracker::FollowBackProlongation(AliTRDtrack &t)
 
          // Reset material budget if 2 consecutive gold
          if (plane > 0) { 
-           if (t.fTracklets[plane].GetN() + t.fTracklets[plane-1].GetN() > 20) {
-             t.fBudget[2] = 0;
+           if ((t.GetTracklets(plane).GetN() + t.GetTracklets(plane-1).GetN()) > 20) {
+             t.SetBudget(2,0.0);
            }
          }
 
@@ -1229,14 +1229,14 @@ Int_t AliTRDtracker::FollowBackProlongation(AliTRDtrack &t)
     }
 
     ratio0 = ncl / Float_t(fTimeBinsPerPlane);
-    Float_t ratio1 = Float_t(t.fN+1) / Float_t(t.fNExpected+1.0);      
-    if ((tracklet.GetChi2()     <  18.0) && 
-        (ratio0                 >   0.8) && 
-        (ratio1                 >   0.6) && 
-        (ratio0+ratio1          >   1.5) && 
-        (t.GetNCross()          ==    0) && 
-        (TMath::Abs(t.GetSnp()) <  0.85) &&
-        (t.fN                   >    20)){
+    Float_t ratio1 = Float_t(t.GetNumberOfClusters()+1) / Float_t(t.GetNExpected()+1); 
+    if ((tracklet.GetChi2()      <  18.0) && 
+        (ratio0                  >   0.8) && 
+        (ratio1                  >   0.6) && 
+        (ratio0+ratio1           >   1.5) && 
+        (t.GetNCross()           ==    0) && 
+        (TMath::Abs(t.GetSnp())  <  0.85) &&
+        (t.GetNumberOfClusters() >    20)){
       t.MakeBackupTrack(); // Make backup of the track until is gold
     }
     
@@ -2749,10 +2749,10 @@ void AliTRDtracker::UseClusters(const AliKalmanTrack *t, Int_t from) const
     Int_t index  = t->GetClusterIndex(i);
     AliTRDcluster *c = (AliTRDcluster *) fClusters->UncheckedAt(index);
     Int_t iplane = fGeom->GetPlane(c->GetDetector());
-    if (track->fTracklets[iplane].GetChi2() > kmaxchi2) {
+    if (track->GetTracklets(iplane).GetChi2() > kmaxchi2) {
       continue; 
     }
-    if (track->fTracklets[iplane].GetN()    <   kmincl) {
+    if (track->GetTracklets(iplane).GetN()    <   kmincl) {
       continue; 
     }
     if (!(c->IsUsed())) {
@@ -3944,8 +3944,8 @@ Int_t AliTRDtracker::FindClusters(Int_t sector, Int_t t0, Int_t t1
   tracklet.SetSigma2(expectederr);
   tracklet.SetChi2(tchi2s[bestiter]);
   tracklet.SetMaxPos(maxpos,maxpos4,maxpos5);
-  track->fTracklets[plane] = tracklet;
-  track->fNWrong += nbad[0];
+  track->SetTracklets(plane,tracklet);
+  track->SetNWrong(track->GetNWrong() + nbad[0]);
 
   //
   // Debuging part