1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.1.2.1 2000/06/09 21:38:15 morsch
19 AliMUONSegmentationV04 code from AliMUONSegResV04.cxx
23 /////////////////////////////////////////////////////
24 // Segmentation and Response classes version 04 //
25 /////////////////////////////////////////////////////
28 #include "AliMUONSegmentationV04.h"
31 //___________________________________________
32 ClassImp(AliMUONSegmentationV04)
35 void AliMUONSegmentationV04::Init(AliMUONChamber* Chamber)
37 printf("\n Initialise segmentation v04 \n");
39 // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
40 // These arrays help in converting from real to pad co-ordinates and
43 // Segmentation is defined by rectangular modules approximating
44 // concentric circles as shown below
46 // PCB module size in cm
47 const Float_t kDxPCB=40, kDyPCB=40;
48 // PCB distribution (7 rows with 1+3 segmentation regions)
49 const Int_t kpcb[7][4] = {{1, 2, 2, 2},
61 // 3 3 3 2 2 | 2 2 3 3 3
62 // 3 3 3 2 2 2 | 2 2 2 3 3 3
63 // 3 3 2 2 1 1 | 1 1 2 2 3 3
64 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
65 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
66 // ------------------------------
67 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
68 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
69 // 3 3 2 2 1 1 | 1 1 2 2 3 3
70 // 3 3 3 2 2 2 | 2 2 2 3 3 3
71 // 3 3 3 2 2 | 2 2 3 3 3
75 // number of pad rows per PCB
77 Int_t nPyPCB=Int_t(kDyPCB/fDpy);
79 // maximum number of pad rows
82 // Calculate padsize along x
85 for (Int_t i=fNsec-2; i>=0; i--){
86 fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i];
87 printf("\n test ---dx %d %f \n",i,fDpxD[i]);
91 // fill the arrays defining the pad segmentation boundaries
93 // loop over pcb module rows
95 for (Int_t irow=0; irow<7; irow++) {
97 // loop over pads along the anode wires
98 for (Int_t i=0; i<=nPyPCB; i++) {
99 // iy counts the padrow
101 // Loop over sectors (isec=0 is the dead space surounding the beam pipe)
102 for (Int_t isec=0; isec<4; isec++) {
104 fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/fDpxD[0]);
105 fCx[0][iy]=kpcb[irow][0]*kDxPCB;
107 fNpxS[isec][iy]=fNpxS[isec-1][iy]
108 +kpcb[irow][isec]*Int_t(kDxPCB/fDpxD[isec]);
110 fCx[isec][iy]=fCx[isec-1][iy]
111 +kpcb[irow][isec]*kDxPCB;
114 } // pad raws in module
118 void AliMUONSegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y)
120 // Returns test point on the pad plane.
121 // Used during determination of the segmoid correction of the COG-method
123 x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.);
125 x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.);
127 x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.);