]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDClusteringV2.cxx
New function to get the list of keyWords of a given rubric (Philippe P.)
[u/mrichter/AliRoot.git] / PMD / AliPMDClusteringV2.cxx
index fb0835123665847b368a95445ff501f40634b212..9a7622ecd7c4e57a443db04c78240bab8d1eed9c 100644 (file)
@@ -54,7 +54,8 @@ const Double_t AliPMDClusteringV2::fgkSqroot3by2=0.8660254;  // sqrt(3.)/2.
 
 AliPMDClusteringV2::AliPMDClusteringV2():
   fPMDclucont(new TObjArray()),
-  fCutoff(0.0)
+  fCutoff(0.0),
+  fClusParam(0)
 {
   for(int i = 0; i < kNDIMX; i++)
     {
@@ -71,7 +72,8 @@ AliPMDClusteringV2::AliPMDClusteringV2():
 AliPMDClusteringV2::AliPMDClusteringV2(const AliPMDClusteringV2& pmdclv2):
   AliPMDClustering(pmdclv2),
   fPMDclucont(0),
-  fCutoff(0)
+  fCutoff(0),
+  fClusParam(0)
 {
   // copy constructor
   AliError("Copy constructor not allowed ");
@@ -92,7 +94,10 @@ AliPMDClusteringV2::~AliPMDClusteringV2()
 // ------------------------------------------------------------------------ //
 
 void AliPMDClusteringV2::DoClust(Int_t idet, Int_t ismn, 
-                                Double_t celladc[48][96], TObjArray *pmdcont)
+                                Int_t celltrack[48][96],
+                                Int_t cellpid[48][96],
+                                Double_t celladc[48][96],
+                                TObjArray *pmdcont)
 {
   // main function to call other necessary functions to do clustering
   //
@@ -104,6 +109,8 @@ void AliPMDClusteringV2::DoClust(Int_t idet, Int_t ismn,
   Int_t    ndimXr = 0;
   Int_t    ndimYr = 0;
   Int_t    celldataX[kNmaxCell], celldataY[kNmaxCell];
+  Int_t    celldataTr[kNmaxCell], celldataPid[kNmaxCell];
+  Float_t  celldataAdc[kNmaxCell];
   Float_t  clusdata[6];  
   Double_t cutoff, ave;
   Double_t edepcell[kNMX];
@@ -233,10 +240,28 @@ void AliPMDClusteringV2::DoClust(Int_t idet, Int_t ismn,
            {
              celldataX[ihit] = (Int_t) ((cellX - (48-1) + cellY/2.) + 0.5 );
            }     
-         celldataY[ihit] = (Int_t) (cellY + 0.5);
+         celldataY[ihit]   = (Int_t) (cellY + 0.5);
+
+         Int_t irow = celldataX[ihit];
+         Int_t icol = celldataY[ihit];
+
+         if ((irow >= 0 && irow < 48) && (icol >= 0 && icol < 96))
+           {
+             celldataTr[ihit]  = celltrack[irow][icol];
+             celldataPid[ihit] = cellpid[irow][icol];
+             celldataAdc[ihit] = (Float_t) celladc[irow][icol];
+           }
+         else
+           {
+             celldataTr[ihit]  = -1;
+             celldataPid[ihit] = -1;
+             celldataAdc[ihit] = -1;
+           }
+
        }
 
-      pmdcl = new AliPMDcluster(idet, ismn, clusdata, celldataX, celldataY);
+      pmdcl = new AliPMDcluster(idet, ismn, clusdata, celldataX, celldataY,
+                               celldataTr, celldataPid, celldataAdc);
       pmdcont->Add(pmdcl);
     }
   fPMDclucont->Delete();
@@ -1044,3 +1069,8 @@ void AliPMDClusteringV2::SetEdepCut(Float_t decut)
   fCutoff = decut;
 }
 // ------------------------------------------------------------------------ //
+void AliPMDClusteringV2::SetClusteringParam(Int_t cluspar)
+{
+  fClusParam = cluspar;
+}
+// ------------------------------------------------------------------------ //