Using the right AliITSRecPoint constructor for the correct initialization of the...
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SDD.cxx
index d2379b277c7970a621f83383980db4272f9b6c89..ab24d77a70cd2803fa0d8dd719033761ac466b2b 100644 (file)
@@ -31,7 +31,6 @@
 #include "AliITSsegmentationSDD.h"
 #include <TClonesArray.h>
 #include "AliITSdigitSDD.h"
-#include "AliAlignObj.h"
 
 ClassImp(AliITSClusterFinderV2SDD)
 
@@ -205,10 +204,6 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
            }
         */
 
-         c.SetSigmaY2(0.0030*0.0030);
-         c.SetSigmaZ2(0.0020*0.0020);
-         c.SetDetectorIndex(fNdet[fModule]);
-
          Float_t y=c.GetY(),z=c.GetZ(), q=c.GetQ();
          y/=q; z/=q;
         //
@@ -240,13 +235,10 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
         y=-(-xdet+fYshift[fModule]);
         z=  -zdet+fZshift[fModule];
         
-        c.SetY(y);
-        c.SetZ(z);
-        c.SetNy(maxj-minj+1);
-        c.SetNz(maxi-mini+1);
-        c.SetType(npeaks);
-         c.SetQ(q/12.7);  //this WAS consistent with SSD. To be reassessed 
-                          // 23-MAR-2007
+         q/=12.7;  //this WAS consistent with SSD. To be reassessed 
+                   // 23-MAR-2007
+         Float_t hit[5] = {y, z, 0.0030*0.0030, 0.0020*0.0020, q};
+         Int_t  info[3] = {maxj-minj+1, maxi-mini+1, fNlayer[fModule]};
 
          //if (c.GetQ() < 20.) continue; //noise cluster
         
@@ -260,17 +252,16 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
             //lab[2]=(d->GetTracks())[2];
             //CheckLabels(lab);
             CheckLabels2(milab); 
-            c.SetLabel(milab[0],0);
-            c.SetLabel(milab[1],1);
-            c.SetLabel(milab[2],2);
-            c.SetLayer(fNlayer[fModule]);
-            UShort_t id=AliAlignObj::LayerToVolUID(fNlayer[fModule]+AliAlignObj::kSPD1,fNdet[fModule]);
-            c.SetVolumeId(id);
           }
         }
-        if(clusters) new (cl[ncl]) AliITSRecPoint(c); 
+         milab[3]=fNdet[fModule];
+
+         AliITSRecPoint cc(milab,hit,info);
+        cc.SetType(npeaks);
+
+        if(clusters) new (cl[ncl]) AliITSRecPoint(cc); 
         else {
-          fDetTypeRec->AddRecPoint(c);
+          fDetTypeRec->AddRecPoint(cc);
         }
         ncl++;
       }