]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
extend user interface. New function for direct access to clusters
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Sep 2008 13:51:22 +0000 (13:51 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Sep 2008 13:51:22 +0000 (13:51 +0000)
-This line, and those below, will be ignored--

M    AliTRDtrackV1.cxx
M    AliTRDtrackV1.h

TRD/AliTRDtrackV1.cxx
TRD/AliTRDtrackV1.h

index b15fbc2e1a6fca5c5cbfc6d1c33e05ccc2cf5731..3eaed3d17c30fc2dd32d0d73e2cc1326b45a6c3c 100644 (file)
@@ -324,6 +324,27 @@ Double_t AliTRDtrackV1::GetBz() const
   return AliTracker::GetBz(r);
 }
 
+//_______________________________________________________________
+AliTRDcluster* AliTRDtrackV1::GetCluster(Int_t id)
+{
+  Int_t n = 0;
+  for(Int_t ip=0; ip<kNplane; ip++){
+    if(!fTracklet[ip]) continue;
+    if(n+fTracklet[ip]->GetN() <= id){ 
+      n+=fTracklet[ip]->GetN();
+      continue;
+    }
+    AliTRDcluster *c = 0x0;
+    for(Int_t ic=AliTRDseed::knTimebins-1; ic>=0; ic--){
+      if(!(c = fTracklet[ip]->GetClusters(ic))) continue;
+
+      if(n<id){n++; continue;}
+      return c;
+    }
+  }
+  return 0x0;
+}
+
 //_______________________________________________________________
 Int_t  AliTRDtrackV1::GetClusterIndex(Int_t id) const
 {
index e090ae4d3e6d9249858d6ff3d408d6434f6dbfb7..ccf376607cd3dac48a47611590852b17ae463bdc 100644 (file)
@@ -57,6 +57,7 @@ public:
   AliTRDtrackV1* GetBackupTrack() const {return fBackupTrack;}
   Double_t       GetBudget(Int_t i) const { return fBudget[i];}
   Double_t       GetC() const { return AliExternalTrackParam::GetC(GetBz());}
+  AliTRDcluster* GetCluster(Int_t id);
   Int_t          GetClusterIndex(Int_t id) const;
   Float_t        GetEdep() const {return fDE;}
   inline Float_t GetMomentum(Int_t plane) const;