]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDTracker.cxx
Cluster array for all chambers needed by Yuri Belikov
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDTracker.cxx
index 3ce6008763872b4cab67d33ab9281fb66592831f..8b7af80bd5908317020c86bf2c12f2065f8bba2d 100644 (file)
@@ -137,3 +137,22 @@ Int_t AliHMPIDTracker::ReconHiddenTrk(Int_t iCh,Int_t iHVsec,AliESDtrack *pTrk,T
   else return 1;                                                                                // error code: 0=no error,1=fit not performed;
 }//Recon()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDTracker::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
+  for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){    
+    TClonesArray *pCluArr=(TClonesArray*)(*fClu)[iCh];
+    for (Int_t iClu=0; iClu<pCluArr->GetEntriesFast();iClu++){
+      AliHMPIDCluster *pClu=(AliHMPIDCluster*)pCluArr->UncheckedAt(iClu);    
+      array->AddLast(pClu);
+    }//cluster loop in iCh
+    pCluArr->Delete();
+  }//Ch loop
+    
+  return;
+}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++