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.4 2000/10/03 21:48:07 morsch
19 Adopt to const declaration of some of the methods in AliSegmentation.
21 Revision 1.3 2000/06/29 12:34:09 morsch
22 AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
23 it usable with any other geometry class. The link to the object to which it belongs is
24 established via an index. This assumes that there exists a global geometry manager
25 from which the pointer to the parent object can be obtained (in our case gAlice).
27 Revision 1.2 2000/06/15 07:58:48 morsch
28 Code from MUON-dev joined
30 Revision 1.1.2.1 2000/06/09 21:38:15 morsch
31 AliMUONSegmentationV04 code from AliMUONSegResV04.cxx
35 /////////////////////////////////////////////////////
36 // Segmentation and Response classes version 04 //
37 /////////////////////////////////////////////////////
40 #include "AliMUONSegmentationV04.h"
43 //___________________________________________
44 ClassImp(AliMUONSegmentationV04)
47 void AliMUONSegmentationV04::Init(Int_t chamber)
49 printf("\n Initialise segmentation v04 \n");
51 // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
52 // These arrays help in converting from real to pad co-ordinates and
55 // Segmentation is defined by rectangular modules approximating
56 // concentric circles as shown below
58 // PCB module size in cm
59 const Float_t kDxPCB=40, kDyPCB=40;
60 // PCB distribution (7 rows with 1+3 segmentation regions)
61 const Int_t kpcb[7][4] = {{1, 2, 2, 2},
73 // 3 3 3 2 2 | 2 2 3 3 3
74 // 3 3 3 2 2 2 | 2 2 2 3 3 3
75 // 3 3 2 2 1 1 | 1 1 2 2 3 3
76 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
77 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
78 // ------------------------------
79 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
80 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
81 // 3 3 2 2 1 1 | 1 1 2 2 3 3
82 // 3 3 3 2 2 2 | 2 2 2 3 3 3
83 // 3 3 3 2 2 | 2 2 3 3 3
87 // number of pad rows per PCB
89 Int_t nPyPCB=Int_t(kDyPCB/fDpy);
91 // maximum number of pad rows
94 // Calculate padsize along x
95 (*fDpxD)[fNsec-1]=fDpx;
97 for (Int_t i=fNsec-2; i>=0; i--){
98 (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
99 printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]);
103 // fill the arrays defining the pad segmentation boundaries
105 // loop over pcb module rows
107 for (Int_t irow=0; irow<7; irow++) {
109 // loop over pads along the anode wires
110 for (Int_t i=0; i<=nPyPCB; i++) {
111 // iy counts the padrow
113 // Loop over sectors (isec=0 is the dead space surounding the beam pipe)
114 for (Int_t isec=0; isec<4; isec++) {
116 fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]);
117 fCx[0][iy]=kpcb[irow][0]*kDxPCB;
119 fNpxS[isec][iy]=fNpxS[isec-1][iy]
120 +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]);
122 fCx[isec][iy]=fCx[isec-1][iy]
123 +kpcb[irow][isec]*kDxPCB;
126 } // pad raws in module
130 void AliMUONSegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
132 // Returns test point on the pad plane.
133 // Used during determination of the segmoid correction of the COG-method
135 x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.);
137 x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.);
139 x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.);