]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentationV05.cxx
New files for folders and Stack
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV05.cxx
index 387d078296c2262320a410514052543d97c13a4a..44fb90a76772f73e9d127a7ae65f1d1639dfc3db 100644 (file)
 
 /*
 $Log$
+Revision 1.6  2000/12/21 22:12:41  morsch
+Clean-up of coding rule violations,
+
+Revision 1.5  2000/10/18 11:42:06  morsch
+- AliMUONRawCluster contains z-position.
+- Some clean-up of useless print statements during initialisations.
+
+Revision 1.4  2000/10/03 21:48:07  morsch
+Adopt to const declaration of some of the methods in AliSegmentation.
+
+Revision 1.3  2000/06/29 12:34:09  morsch
+AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
+it usable with any other geometry class. The link to the object to which it belongs is
+established via an index. This assumes that there exists a global geometry manager
+from which the pointer to the parent object can be obtained (in our case gAlice).
+
 Revision 1.2  2000/06/15 07:58:48  morsch
 Code from MUON-dev joined
 
@@ -29,6 +45,10 @@ AliMUONSegmentationV05 code  from  AliMUONSegResV05.cxx
 
 
 #include "AliMUONSegmentationV05.h"
+#include "AliMUON.h"
+#include "AliMUONChamber.h"
+#include "AliRun.h"
+
 #include <TMath.h>
 //___________________________________________
 ClassImp(AliMUONSegmentationV05)
@@ -36,7 +56,6 @@ ClassImp(AliMUONSegmentationV05)
 
 void AliMUONSegmentationV05::Init(Int_t chamber)
 {
-    printf("\n Initialise segmentation v05 \n");
 //
 //  Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
 //  These arrays help in converting from real to pad co-ordinates and
@@ -45,6 +64,10 @@ void AliMUONSegmentationV05::Init(Int_t chamber)
 //  Segmentation is defined by rectangular modules approximating
 //  concentric circles as shown below
 //
+
+  //printf("\n Initialise Segmentation V05 \n");
+
+
 //  PCB module size in cm
     const Float_t kDxPCB=40, kDyPCB=40;
 //  PCB distribution (7 rows with 1+3 segmentation regions)
@@ -82,11 +105,10 @@ void AliMUONSegmentationV05::Init(Int_t chamber)
     fNpy=7*nPyPCB;
 //
 //  Calculate padsize along x
-    fDpxD[fNsec-1]=fDpx;
+    (*fDpxD)[fNsec-1]=fDpx;
     if (fNsec > 1) {
        for (Int_t i=fNsec-2; i>=0; i--){
-           fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
-           printf("\n test ---dx %d %f \n",i,fDpxD[i]);
+           (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
        }
     }
 //
@@ -103,11 +125,11 @@ void AliMUONSegmentationV05::Init(Int_t chamber)
 //  Loop over sectors (isec=0 is the dead space surounding the beam pipe)
            for (Int_t isec=0; isec<4; isec++) {
                if (isec==0) {
-                   fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/fDpxD[0]);
+                   fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]);
                    fCx[0][iy]=kpcb[irow][0]*kDxPCB;
                } else {
                    fNpxS[isec][iy]=fNpxS[isec-1][iy]
-                       +kpcb[irow][isec]*Int_t(kDxPCB/fDpxD[isec]);
+                       +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]);
 
                    fCx[isec][iy]=fCx[isec-1][iy]
                    +kpcb[irow][isec]*kDxPCB;
@@ -115,19 +137,13 @@ void AliMUONSegmentationV05::Init(Int_t chamber)
            } // sectors
        } // pad raws in module
     } // PCB rows
-/*
-    for (Int_t iy=1; iy< fNpy; iy++) {
-           printf("\nBoundary %d %f %d %f %d %f %d %f",
-                  fNpxS[0][iy], fCx[0][iy],
-                  fNpxS[1][iy], fCx[1][iy],
-                  fNpxS[2][iy], fCx[2][iy],
-                  fNpxS[3][iy], fCx[3][iy]);
-           
-    }
-*/
+
+    AliMUON *pMUON  = (AliMUON *) gAlice->GetModule("MUON");
+    fChamber=&(pMUON->Chamber(chamber));
+    fZ = fChamber->Z();
 }
 
-void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
+void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
 {
 // Returns test point on the pad plane.
 // Used during determination of the segmoid correction of the COG-method