]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Using full matrices for the transformation between local and tracking coordinate...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 May 2007 22:31:52 +0000 (22:31 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 May 2007 22:31:52 +0000 (22:31 +0000)
ITS/AliITSClusterFinder.cxx
ITS/AliITSClusterFinder.h
ITS/AliITSClusterFinderV2SDD.cxx
ITS/AliITSClusterFinderV2SPD.cxx
ITS/AliITSClusterFinderV2SSD.cxx

index 3ec86d3d2f75bc8a533f26b7022b239193ee158a..8895cb9beb6a0d55e207bb389e03fd9548eb6137 100644 (file)
@@ -159,9 +159,6 @@ void AliITSClusterFinder::InitGeometry(){
   Int_t mmax=AliITSgeomTGeo::GetNModules();
   for (Int_t m=0; m<mmax; m++) {
     Int_t lay,lad,det; AliITSgeomTGeo::GetModuleId(m,lay,lad,det);
-    const TGeoHMatrix *tm=AliITSgeomTGeo::GetTracking2LocalMatrix(m);
-    fYshift[m] = (tm->Inverse()).GetTranslation()[1];
-    fZshift[m] = (tm->Inverse()).GetTranslation()[2];
     fNdet[m] = (lad-1)*AliITSgeomTGeo::GetNDetectors(lay) + (det-1);
     fNlayer[m] = lay-1;
   }
index 76cd75aa4e60c61ad0ee8c50a9efd868973807d6..71b8d8e012e2b9aa6e504879dd688371d924f498 100644 (file)
@@ -129,8 +129,6 @@ class AliITSClusterFinder :public TObject{
     Int_t              fClusterSize;   //! ClusterSize
     Int_t              fNPeaks;        //! NPeaks  
     // Data members needed to fill AliCluster objects
-    Float_t fYshift[2200];       // y-shifts of detector local coor. systems 
-    Float_t fZshift[2200];       // z-shifts of detector local coor. systems 
     Int_t fNdet[2200];           // detector index  
     Int_t fNlayer[2200];         // detector layer
 
@@ -140,7 +138,7 @@ class AliITSClusterFinder :public TObject{
     AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
     
 
-    ClassDef(AliITSClusterFinder,6) //Class for clustering and reconstruction of space points
+    ClassDef(AliITSClusterFinder,7) //Class for clustering and reconstruction of space points
 };
 // Input and output functions for standard C++ input/output.
 ostream &operator<<(ostream &os,AliITSClusterFinder &source);
index 6e96cdb6bfb7bfc9b29b9c7d408dc8045b9d62e9..0ee8f7301e54776837521e483ff545d200e77f89 100644 (file)
@@ -31,6 +31,7 @@
 #include "AliITSsegmentationSDD.h"
 #include <TClonesArray.h>
 #include "AliITSdigitSDD.h"
+#include "AliITSgeomTGeo.h"
 
 ClassImp(AliITSClusterFinderV2SDD)
 
@@ -111,6 +112,9 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
   //------------------------------------------------------------
   // Actual SDD cluster finder
   //------------------------------------------------------------
+
+  const TGeoHMatrix *mT2L=AliITSgeomTGeo::GetTracking2LocalMatrix(fModule);
+
   AliITSCalibrationSDD* cal = (AliITSCalibrationSDD*)GetResp(fModule);
   Int_t ncl=0; 
   TClonesArray &cl=*clusters;
@@ -234,9 +238,12 @@ FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nzBins,
         
         CorrectPosition(zdet,xdet);
 
-        y=-(-xdet+fYshift[fModule]);
-        z=  -zdet+fZshift[fModule];
-         
+         {
+         Double_t loc[3]={xdet,0.,zdet},trk[3]={0.,0.,0.};
+         mT2L->MasterToLocal(loc,trk);
+         y=trk[1];
+         z=trk[2]; 
+         }
          q/=5.243;  //to have MPV 1 MIP = 86.4 KeV --> this must go to calibr.
          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]};
index 06d4f018475ea55eb5ed4e486f7983f055c0cbd0..f73d843d2fca9f17d0ec4144337cb9aded8b8d4a 100644 (file)
@@ -84,6 +84,8 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
   
   //Cluster finder for SPD (from digits and from rawdata)
 
+  const TGeoHMatrix *mT2L=AliITSgeomTGeo::GetTracking2LocalMatrix(iModule);
+  
   Int_t nclu=0;
   for(Int_t iBin =0; iBin < maxBins;iBin++){
     if(bins[iBin].IsUsed()) continue;
@@ -187,15 +189,18 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
        z /= q;
        y -= fHwSPD;
        z -= fHlSPD;
-       Float_t hit[5]; //y,z,sigma(y)^2, sigma(z)^2, charge
-
-       if (iModule <= fLastSPD1) hit[0] = -y+fYshift[iModule];
-        else hit[0] = y+fYshift[iModule];
 
-       hit[1] = -z+fZshift[iModule];
+       Float_t hit[5]; //y,z,sigma(y)^2, sigma(z)^2, charge
+        {
+        Double_t loc[3]={y,0.,z},trk[3]={0.,0.,0.};
+        mT2L->MasterToLocal(loc,trk);
+        hit[0]=trk[1];
+        hit[1]=trk[2];
+       }
        hit[2] = fYpitchSPD*fYpitchSPD/12.;
        hit[3] = fZ1pitchSPD*fZ1pitchSPD/12.;
        hit[4] = 1.;
+
        if(!rawdata) milab[3]=fNdet[iModule];
        Int_t info[3] = {ymax-ymin+1,zmax-zmin+1,fNlayer[iModule]};
        if(!rawdata){
index c77835b1f766136ba6826183a2fce0a5a807f3dd..5b7f3ccf14beb1c0782e2adbfe0a08d0d0046d1a 100644 (file)
@@ -236,7 +236,7 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStreamSSD* input,
   Int_t prevFlag = -1;
   Int_t prevModule = -1;
   Float_t gain=0;
-  AliITSCalibrationSSD* cal;
+  AliITSCalibrationSSD* cal=NULL;
   
 
   // read raw data input stream
@@ -323,6 +323,9 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
   //------------------------------------------------------------
   // Actual SSD cluster finder
   //------------------------------------------------------------
+
+  const TGeoHMatrix *mT2L=AliITSgeomTGeo::GetTracking2LocalMatrix(fModule);
+
   TClonesArray &cl=*clusters;
   //
   Float_t tanp=fTanP, tann=fTanN;
@@ -414,8 +417,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       zt-=fHlSSD; yt-=fHwSSD;
       ybest=yt; zbest=zt; 
       qbest=0.5*(pos[ip].GetQ()+neg[j].GetQ());
-      lp[0]=-(-ybest+fYshift[fModule]);
-      lp[1]=  -zbest+fZshift[fModule];
+      {
+      Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+      mT2L->MasterToLocal(loc,trk);
+      lp[0]=trk[1];
+      lp[1]=trk[2];
+      }
       lp[2]=0.0025*0.0025;  //SigmaY2
       lp[3]=0.110*0.110;  //SigmaZ2
       
@@ -481,8 +488,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          zt-=fHlSSD; yt-=fHwSSD;
          ybest =yt;  zbest=zt; 
          qbest =pos[ip].GetQ();
-         lp[0]=-(-ybest+fYshift[fModule]);
-         lp[1]=  -zbest+fZshift[fModule];
+          {
+          Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+          mT2L->MasterToLocal(loc,trk);
+          lp[0]=trk[1];
+          lp[1]=trk[2];
+          }
          lp[2]=0.0025*0.0025;  //SigmaY2
          lp[3]=0.110*0.110;  //SigmaZ2
          
@@ -536,8 +547,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          zt-=fHlSSD; yt-=fHwSSD;
          ybest =yt;  zbest=zt; 
          qbest =pos[ip2].GetQ();
-         lp[0]=-(-ybest+fYshift[fModule]);
-         lp[1]=  -zbest+fZshift[fModule];
+          {
+          Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+          mT2L->MasterToLocal(loc,trk);
+          lp[0]=trk[1];
+          lp[1]=trk[2];
+          }
          lp[2]=0.0025*0.0025;  //SigmaY2
          lp[3]=0.110*0.110;  //SigmaZ2
          
@@ -608,8 +623,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          zt-=fHlSSD; yt-=fHwSSD;
          ybest =yt;  zbest=zt; 
          qbest =neg[jn].GetQ();
-         lp[0]=-(-ybest+fYshift[fModule]);
-         lp[1]=  -zbest+fZshift[fModule];
+          {
+          Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+          mT2L->MasterToLocal(loc,trk);
+          lp[0]=trk[1];
+          lp[1]=trk[2];
+          }
          lp[2]=0.0025*0.0025;  //SigmaY2
          lp[3]=0.110*0.110;  //SigmaZ2
          
@@ -662,8 +681,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          zt-=fHlSSD; yt-=fHwSSD;
          ybest =yt;  zbest=zt; 
          qbest =neg[jn2].GetQ();
-         lp[0]=-(-ybest+fYshift[fModule]);
-         lp[1]=  -zbest+fZshift[fModule];
+          {
+          Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+          mT2L->MasterToLocal(loc,trk);
+          lp[0]=trk[1];
+          lp[1]=trk[2];
+          }
          lp[2]=0.0025*0.0025;  //SigmaY2
          lp[3]=0.110*0.110;  //SigmaZ2
          
@@ -764,8 +787,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       zt-=fHlSSD; yt-=fHwSSD;
       ybest=yt; zbest=zt; 
       qbest=0.5*(pos[ip].GetQ()+neg[j].GetQ());
-      lp[0]=-(-ybest+fYshift[fModule]);
-      lp[1]=  -zbest+fZshift[fModule];
+      {
+      Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+      mT2L->MasterToLocal(loc,trk);
+      lp[0]=trk[1];
+      lp[1]=trk[2];
+      }
       lp[2]=0.0025*0.0025;  //SigmaY2
       lp[3]=0.110*0.110;  //SigmaZ2    
       lp[4]=qbest;        //Q
@@ -831,8 +858,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       if (TMath::Abs(zt)<fHlSSD+0.01*(neg[j].GetNd()+pos[i].GetNd())) {
         ybest=yt; zbest=zt; 
         qbest=0.5*(pos[i].GetQ()+neg[j].GetQ());
-        lp[0]=-(-ybest+fYshift[fModule]);
-        lp[1]=  -zbest+fZshift[fModule];
+        {
+        Double_t loc[3]={ybest,0.,zbest},trk[3]={0.,0.,0.};
+        mT2L->MasterToLocal(loc,trk);
+        lp[0]=trk[1];
+        lp[1]=trk[2];
+        }
         lp[2]=0.0025*0.0025;  //SigmaY2
         lp[3]=0.110*0.110;  //SigmaZ2