]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Problem with iteration over y-pads for 2nd cathode corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Oct 2000 19:32:04 +0000 (19:32 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Oct 2000 19:32:04 +0000 (19:32 +0000)
MUON/AliMUONSegmentationSlatModule.cxx
MUON/AliMUONSegmentationSlatModuleN.cxx

index ef63343ddd21cad86893a3d52819900c65b4cb41..b26f9b65e18a8cc392e3994bac1fae81eecc1792 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/10/25 19:56:55  morsch
+Handle correctly slats with less than 3 segmentation zones.
+
 Revision 1.3  2000/10/22 16:56:32  morsch
 - Store chamber number as slat id.
 
@@ -183,7 +186,7 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy)
     if (y01 < 0) y01 = 0;
 
     if (x02 >= fCx[fNsec-1]) x02 = fCx[fNsec-1];
-    if (y02 >= fDyPCB) y02 = fDyPCB;
+
     
 
     Int_t isec=-1;
@@ -194,6 +197,8 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy)
            break;
        }
     }
+    y02 += Dpy(isec);
+    if (y02 >= fDyPCB) y02 = fDyPCB;
    
     //
     // find the pads over which the charge distributes
@@ -202,11 +207,12 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy)
     
     if (fIxmax > fNpx) fIxmax=fNpx;
     if (fIymax > fNpyS[isec]) fIymax = fNpyS[isec];    
+
     fXmin=x01;
-    fXmax=x02;
+    fXmax=x02;    
     fYmin=y01;
-    fYmax=y02;
-    
+    fYmax=y02;    
+  
     // 
     // Set current pad to lower left corner
     if (fIxmax < fIxmin) fIxmax=fIxmin;
@@ -216,10 +222,12 @@ FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy)
     
     GetPadC(fIx,fIy,fX,fY);
     fSector=Sector(fIx,fIy);
-//    printf("\n \n First Pad: %d %d %f %f %d %d %d %f" , 
-//        fIxmin, fIxmax, fXmin, fXmax, fNpx, fId, isec, Dpy(isec));    
-//    printf("\n \n First Pad: %d %d %f %f %d %d %d %f",
-//        fIymin, fIymax, fYmin, fYmax,  fNpyS[isec], fId, isec, Dpy(isec));
+/*
+    printf("\n \n First Pad: %d %d %f %f %d %d %d %f" , 
+          fIxmin, fIxmax, fXmin, fXmax, fNpx, fId, isec, Dpy(isec));    
+    printf("\n \n First Pad: %d %d %f %f %d %d %d %f",
+          fIymin, fIymax, fYmin, fYmax,  fNpyS[isec], fId, isec, Dpy(isec));
+*/
 }
 
 void AliMUONSegmentationSlatModule::NextPad()
index e9795979bd79f90ad2ff0aa95ff72daecf768d11..109b567157e262e022602b3dad721c0766de4d23 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/10/25 19:56:55  morsch
+Handle correctly slats with less than 3 segmentation zones.
+
 Revision 1.3  2000/10/22 16:56:33  morsch
 - Store chamber number as slat id.
 
@@ -130,7 +133,7 @@ void AliMUONSegmentationSlatModuleN::NextPad()
 
     if (fIy > fNpyS[fSector])  printf("\n this pad %f %f %d %d \n",fX,fY,fIx,fIy);
     GetPadC(fIx, fIy, xc, yc);
-//    printf("\n Next Pad (n)%d %d %f %f %d", fIx,fIy,fX,fY,fSector);
+//    printf("\n Next Pad (n)%d %d %f %f %d %f %d ", fIx,fIy,fX,fY,fSector, fYmax, fIxmax);
 }
 
 Int_t AliMUONSegmentationSlatModuleN::MorePads()
@@ -139,7 +142,7 @@ Int_t AliMUONSegmentationSlatModuleN::MorePads()
 //
 // Are there more pads in the integration region
 {
-    if ((fY >= fYmax  && fIx >= fIxmax) || fIy == -1) {
+    if (fIy == -1) {
        return 0;
     } else {
        return 1;