AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHi...
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderVS.cxx
index 424137f50dfefd86c7c14a71945699c34afc37dd..d0fb7f016e013c897dcbfbf954b2cf00258c0e6c 100644 (file)
  **************************************************************************/
 /*
 $Log$
+Revision 1.7  2000/06/28 15:16:35  morsch
+(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
+to allow development of slat-muon chamber simulation and reconstruction code in the MUON
+framework. The changes should have no side effects (mostly dummy arguments).
+(2) Hit disintegration uses 3-dim hit coordinates to allow simulation
+of chambers with overlapping modules (MakePadHits, Disintegration).
+
 Revision 1.6  2000/06/28 12:19:18  morsch
 More consequent seperation of global input data services (AliMUONClusterInput singleton) and the
 cluster and hit reconstruction algorithms in AliMUONClusterFinderVS.
@@ -60,9 +67,8 @@ Revised and extended SplitByLocalMaxima method (Isabelle Chevrot):
 #include "AliMUONClusterFinderVS.h"
 #include "AliMUONDigit.h"
 #include "AliMUONRawCluster.h"
-#include "AliMUONSegmentation.h"
+#include "AliSegmentation.h"
 #include "AliMUONResponse.h"
-#include "AliMUONHitMap.h"
 #include "AliMUONHitMapA1.h"
 #include "AliRun.h"
 #include "AliMUON.h"
@@ -138,7 +144,7 @@ void AliMUONClusterFinderVS::SplitByLocalMaxima(AliMUONRawCluster *c)
            fQ[i][cath] = fDig[i][cath]->fSignal;
            // pad centre coordinates
            fInput->Segmentation(cath)->
-               GetPadCxy(fIx[i][cath], fIy[i][cath], fX[i][cath], fY[i][cath], zdum);
+               GetPadC(fIx[i][cath], fIy[i][cath], fX[i][cath], fY[i][cath], zdum);
        } // loop over cluster digits
     }  // loop over cathodes
 
@@ -895,7 +901,7 @@ void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* c)
 // get neighbours for that digit and assume that it is local maximum       
            isLocal[i][cath]=kTRUE;
 // compare signal to that on the two neighbours on the left and on the right
-           fInput->Segmentation(cath)->GetPadIxy(fX[i][cath],fY[i][cath]+dpy,0,ix,iy);
+           fInput->Segmentation(cath)->GetPadI(fX[i][cath],fY[i][cath]+dpy,0,ix,iy);
 // iNN counts the number of neighbours with signal, it should be 1 or 2
            Int_t iNN=0;
            if (fHitMap[cath]->TestHit(ix, iy)!=kEmpty) {
@@ -903,7 +909,7 @@ void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* c)
                digt=(AliMUONDigit*) fHitMap[cath]->GetHit(ix,iy);
                if (digt->fSignal > fQ[i][cath]) isLocal[i][cath]=kFALSE;
            }
-           fInput->Segmentation(cath)->GetPadIxy(fX[i][cath],fY[i][cath]-dpy,0,ix,iy);
+           fInput->Segmentation(cath)->GetPadI(fX[i][cath],fY[i][cath]-dpy,0,ix,iy);
            if (fHitMap[cath]->TestHit(ix, iy)!=kEmpty) {
                iNN++;
                digt=(AliMUONDigit*) fHitMap[cath]->GetHit(ix,iy);
@@ -948,7 +954,7 @@ void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* c)
 // get neighbours for that digit and assume that it is local maximum       
            isLocal[i][cath]=kTRUE;
 // compare signal to that on the two neighbours on the left and on the right
-           fInput->Segmentation(cath)->GetPadIxy(fX[i][cath]+dpx,fY[i][cath],0,ix,iy);
+           fInput->Segmentation(cath)->GetPadI(fX[i][cath]+dpx,fY[i][cath],0,ix,iy);
 // iNN counts the number of neighbours with signal, it should be 1 or 2
            Int_t iNN=0;
            if (fHitMap[cath]->TestHit(ix, iy)!=kEmpty) {
@@ -956,7 +962,7 @@ void AliMUONClusterFinderVS::FindLocalMaxima(AliMUONRawCluster* c)
                digt=(AliMUONDigit*) fHitMap[cath]->GetHit(ix,iy);
                if (digt->fSignal > fQ[i][cath]) isLocal[i][cath]=kFALSE;
            }
-           fInput->Segmentation(cath)->GetPadIxy(fX[i][cath]-dpx,fY[i][cath],0,ix,iy);
+           fInput->Segmentation(cath)->GetPadI(fX[i][cath]-dpx,fY[i][cath],0,ix,iy);
            if (fHitMap[cath]->TestHit(ix, iy)!=kEmpty) {
                iNN++;
                digt=(AliMUONDigit*) fHitMap[cath]->GetHit(ix,iy);
@@ -1031,7 +1037,7 @@ void  AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t flag, Int_
        }
 //
        if (flag) {
-           fInput->Segmentation(cath)->GetPadCxy(ix, iy, x, y, z);
+           fInput->Segmentation(cath)->GetPadC(ix, iy, x, y, z);
            c->fX[cath] += q*x;
            c->fY[cath] += q*y;
            c->fQ[cath] += q;
@@ -1049,8 +1055,8 @@ void  AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t flag, Int_
 //
        x=c->fX[cath];   
        y=c->fY[cath];
-       fInput->Segmentation(cath)->GetPadIxy(x, y, 0, ix, iy);
-       fInput->Segmentation(cath)->GetPadCxy(ix, iy, x, y, z);
+       fInput->Segmentation(cath)->GetPadI(x, y, 0, ix, iy);
+       fInput->Segmentation(cath)->GetPadC(ix, iy, x, y, z);
        Int_t isec=fInput->Segmentation(cath)->Sector(ix,iy);
        TF1* cogCorr = fInput->Segmentation(cath)->CorrFunc(isec-1);
        
@@ -1081,7 +1087,7 @@ void  AliMUONClusterFinderVS::FillCluster(AliMUONRawCluster* c, Int_t cath)
     {
        dig = fInput->Digit(cath,c->fIndexMap[i][cath]);
        fInput->Segmentation(cath)->
-       GetPadCxy(dig->fPadX,dig->fPadY,xpad,ypad, zpad);
+       GetPadC(dig->fPadX,dig->fPadY,xpad,ypad, zpad);
        fprintf(stderr,"x %f y %f cx %f cy %f\n",xpad,ypad,c->fX[0],c->fY[0]);
        dx = xpad - c->fX[0];
        dy = ypad - c->fY[0];
@@ -1164,7 +1170,7 @@ void  AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONR
 
 // Prepare center of gravity calculation
     Float_t x, y, z;
-    fInput->Segmentation(cath)->GetPadCxy(i, j, x, y, z);
+    fInput->Segmentation(cath)->GetPadC(i, j, x, y, z);
            
     c.fX[cath] += q*x;
     c.fY[cath] += q*y;
@@ -1196,7 +1202,7 @@ void  AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONR
        xc=xmin+.001;
        while (xc < xmax) {
            xc+=fInput->Segmentation(iop)->Dpx(isec);
-           fInput->Segmentation(iop)->GetPadIxy(xc,y,0,ix,iy);
+           fInput->Segmentation(iop)->GetPadI(xc,y,0,ix,iy);
            if (ix>=(fInput->Segmentation(iop)->Npx()) || (iy>=fInput->Segmentation(iop)->Npy())) continue;
            if (fHitMap[iop]->TestHit(ix,iy)==kUnused) FindCluster(ix, iy, iop, c);
        }
@@ -1207,7 +1213,7 @@ void  AliMUONClusterFinderVS::FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONR
        yc=ymin+.001;
        while (yc < ymax) {
            yc+=fInput->Segmentation(iop)->Dpy(isec);
-           fInput->Segmentation(iop)->GetPadIxy(x,yc,0,ix,iy);
+           fInput->Segmentation(iop)->GetPadI(x,yc,0,ix,iy);
            if (ix>=(fInput->Segmentation(iop)->Npx()) || (iy>=fInput->Segmentation(iop)->Npy())) continue;
            if (fHitMap[iop]->TestHit(ix,iy)==kUnused) FindCluster(ix, iy, iop, c);
        }
@@ -1330,7 +1336,7 @@ Float_t AliMUONClusterFinderVS::SingleMathiesonFit(AliMUONRawCluster *c, Int_t c
 // lower and upper limits
     static Double_t lower[2], upper[2];
     Int_t ix,iy;
-    fInput->Segmentation(cath)->GetPadIxy(c->fX[cath], c->fY[cath], 0, ix, iy);
+    fInput->Segmentation(cath)->GetPadI(c->fX[cath], c->fY[cath], 0, ix, iy);
     Int_t isec=fInput->Segmentation(cath)->Sector(ix, iy);
     lower[0]=vstart[0]-fInput->Segmentation(cath)->Dpx(isec)/2;
     lower[1]=vstart[1]-fInput->Segmentation(cath)->Dpy(isec)/2;
@@ -1389,10 +1395,10 @@ Float_t AliMUONClusterFinderVS::CombiSingleMathiesonFit(AliMUONRawCluster *c)
 // lower and upper limits
     static Double_t lower[2], upper[2];
     Int_t ix,iy,isec;
-    fInput->Segmentation(0)->GetPadIxy(fXInit[0], fYInit[0], 0, ix, iy);
+    fInput->Segmentation(0)->GetPadI(fXInit[0], fYInit[0], 0, ix, iy);
     isec=fInput->Segmentation(0)->Sector(ix, iy);
     Float_t dpy=fInput->Segmentation(0)->Dpy(isec)/2;
-    fInput->Segmentation(1)->GetPadIxy(fXInit[0], fYInit[0], 0, ix, iy);
+    fInput->Segmentation(1)->GetPadI(fXInit[0], fYInit[0], 0, ix, iy);
     isec=fInput->Segmentation(1)->Sector(ix, iy);
     Float_t dpx=fInput->Segmentation(1)->Dpx(isec)/2;
 
@@ -1532,11 +1538,11 @@ Float_t AliMUONClusterFinderVS::CombiDoubleMathiesonFit(AliMUONRawCluster *c)
     Int_t ix,iy,isec;
     Float_t dpx, dpy;
     
-    fInput->Segmentation(1)->GetPadIxy(fXInit[0], fYInit[0], 0, ix, iy);
+    fInput->Segmentation(1)->GetPadI(fXInit[0], fYInit[0], 0, ix, iy);
     isec=fInput->Segmentation(1)->Sector(ix, iy);
     dpx=fInput->Segmentation(1)->Dpx(isec);
 
-    fInput->Segmentation(0)->GetPadIxy(fXInit[0], fYInit[0], 0, ix, iy);
+    fInput->Segmentation(0)->GetPadI(fXInit[0], fYInit[0], 0, ix, iy);
     isec=fInput->Segmentation(0)->Sector(ix, iy);
     dpy=fInput->Segmentation(0)->Dpy(isec);
 
@@ -1546,10 +1552,10 @@ Float_t AliMUONClusterFinderVS::CombiDoubleMathiesonFit(AliMUONRawCluster *c)
     upper[1]=vstart[1]+dpy;
 
 
-    fInput->Segmentation(1)->GetPadIxy(fXInit[1], fYInit[1], 0, ix, iy);
+    fInput->Segmentation(1)->GetPadI(fXInit[1], fYInit[1], 0, ix, iy);
     isec=fInput->Segmentation(1)->Sector(ix, iy);
     dpx=fInput->Segmentation(1)->Dpx(isec);
-    fInput->Segmentation(0)->GetPadIxy(fXInit[1], fYInit[1], 0, ix, iy);
+    fInput->Segmentation(0)->GetPadI(fXInit[1], fYInit[1], 0, ix, iy);
     isec=fInput->Segmentation(0)->Sector(ix, iy);
     dpy=fInput->Segmentation(0)->Dpy(isec);