Using the right AliITSRecPoint constructor for the correct initialization of the...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2007 16:40:13 +0000 (16:40 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2007 16:40:13 +0000 (16:40 +0000)
ITS/AliITSClusterFinderV2SDD.cxx
ITS/AliITSclustererV2.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++;
       }
index 72260b489ef3bb836dc93978d0a911494595955e..de5519101e73ec13032e71d78d59853d7c4058d5 100644 (file)
@@ -846,10 +846,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[fI]);
-
          Float_t y=c.GetY(),z=c.GetZ(), q=c.GetQ();
          y/=q; z/=q;
         //
@@ -868,12 +864,11 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
 
          y=-(-y+fYshift[fI]);
          z=  -z+fZshift[fI];
-         c.SetY(y);
-         c.SetZ(z);
-        c.SetNy(maxj-minj+1);
-        c.SetNz(maxi-mini+1);
-        c.SetType(npeaks);
-         c.SetQ(q/12.7);  //to be consistent with the SSD charges
+
+         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[fI]};
 
          if (c.GetQ() < 20.) continue; //noise cluster
         
@@ -887,13 +882,13 @@ 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[fI]);
           }
         }
-         new (cl[ncl]) AliITSclusterV2(c); ncl++;
+         milab[3]=fNdet[fI];
+
+         AliITSclusterV2 *cc = new (cl[ncl]) AliITSclusterV2(milab,hit,info);
+         cc->SetType(npeaks); 
+         ncl++;
       }
     }
 }