]>
Commit | Line | Data |
---|---|---|
4c039060 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
a9e2aefa | 18 | Revision 1.1.2.1 2000/06/09 21:38:46 morsch |
19 | AliMUONSegmentationV05 code from AliMUONSegResV05.cxx | |
20 | ||
4c039060 | 21 | */ |
22 | ||
a897a37a | 23 | ///////////////////////////////////////////////////// |
a9e2aefa | 24 | // Segmentation and Response classes version 05 // |
a897a37a | 25 | ///////////////////////////////////////////////////// |
26 | ||
a897a37a | 27 | |
a9e2aefa | 28 | #include "AliMUONSegmentationV05.h" |
29 | #include <TMath.h> | |
a897a37a | 30 | //___________________________________________ |
a9e2aefa | 31 | ClassImp(AliMUONSegmentationV05) |
a897a37a | 32 | |
33 | ||
a9e2aefa | 34 | void AliMUONSegmentationV05::Init(AliMUONChamber* Chamber) |
a897a37a | 35 | { |
a9e2aefa | 36 | printf("\n Initialise segmentation v05 \n"); |
a897a37a | 37 | // |
38 | // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector | |
39 | // These arrays help in converting from real to pad co-ordinates and | |
40 | // vice versa | |
41 | // | |
a9e2aefa | 42 | // Segmentation is defined by rectangular modules approximating |
43 | // concentric circles as shown below | |
a897a37a | 44 | // |
45 | // PCB module size in cm | |
a9e2aefa | 46 | const Float_t kDxPCB=40, kDyPCB=40; |
a897a37a | 47 | // PCB distribution (7 rows with 1+3 segmentation regions) |
48 | const Int_t kpcb[7][4] = {{1, 2, 2, 2}, | |
49 | {0, 3, 2, 2}, | |
50 | {0, 2, 2, 2}, | |
51 | {0, 0, 3, 3}, | |
52 | {0, 0, 2, 3}, | |
53 | {0, 0, 0, 4}, | |
54 | {0, 0, 0, 3}}; | |
55 | ||
56 | ||
57 | // | |
58 | // 3 3 3 | 3 3 3 | |
59 | // 3 3 3 3 | 3 3 3 3 | |
60 | // 3 3 3 2 2 | 2 2 3 3 3 | |
61 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
62 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
63 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
64 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
65 | // ------------------------------ | |
66 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
67 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
68 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
69 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
70 | // 3 3 3 2 2 | 2 2 3 3 3 | |
71 | // 3 3 3 3 | 3 3 3 3 | |
72 | // 3 3 3 | 3 3 3 | |
73 | // | |
74 | // number of pad rows per PCB | |
75 | // | |
a9e2aefa | 76 | Int_t nPyPCB=Int_t(kDyPCB/fDpy); |
a897a37a | 77 | // |
78 | // maximum number of pad rows | |
a9e2aefa | 79 | fNpy=7*nPyPCB; |
a897a37a | 80 | // |
81 | // Calculate padsize along x | |
82 | fDpxD[fNsec-1]=fDpx; | |
83 | if (fNsec > 1) { | |
84 | for (Int_t i=fNsec-2; i>=0; i--){ | |
85 | fDpxD[i]=fDpxD[fNsec-1]/fNDiv[i]; | |
a9e2aefa | 86 | printf("\n test ---dx %d %f \n",i,fDpxD[i]); |
a897a37a | 87 | } |
88 | } | |
89 | // | |
90 | // fill the arrays defining the pad segmentation boundaries | |
91 | // | |
92 | // loop over pcb module rows | |
93 | Int_t iy=0; | |
94 | for (Int_t irow=0; irow<7; irow++) { | |
95 | // | |
96 | // loop over pads along the anode wires | |
a9e2aefa | 97 | for (Int_t i=0; i<=nPyPCB; i++) { |
a897a37a | 98 | // iy counts the padrow |
99 | iy++; | |
100 | // Loop over sectors (isec=0 is the dead space surounding the beam pipe) | |
101 | for (Int_t isec=0; isec<4; isec++) { | |
102 | if (isec==0) { | |
a9e2aefa | 103 | fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/fDpxD[0]); |
104 | fCx[0][iy]=kpcb[irow][0]*kDxPCB; | |
a897a37a | 105 | } else { |
106 | fNpxS[isec][iy]=fNpxS[isec-1][iy] | |
a9e2aefa | 107 | +kpcb[irow][isec]*Int_t(kDxPCB/fDpxD[isec]); |
a897a37a | 108 | |
109 | fCx[isec][iy]=fCx[isec-1][iy] | |
a9e2aefa | 110 | +kpcb[irow][isec]*kDxPCB; |
a897a37a | 111 | } |
112 | } // sectors | |
113 | } // pad raws in module | |
114 | } // PCB rows | |
115 | /* | |
116 | for (Int_t iy=1; iy< fNpy; iy++) { | |
117 | printf("\nBoundary %d %f %d %f %d %f %d %f", | |
118 | fNpxS[0][iy], fCx[0][iy], | |
119 | fNpxS[1][iy], fCx[1][iy], | |
120 | fNpxS[2][iy], fCx[2][iy], | |
121 | fNpxS[3][iy], fCx[3][iy]); | |
122 | ||
123 | } | |
124 | */ | |
125 | } | |
126 | ||
a9e2aefa | 127 | void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) |
a897a37a | 128 | { |
a9e2aefa | 129 | // Returns test point on the pad plane. |
130 | // Used during determination of the segmoid correction of the COG-method | |
a897a37a | 131 | n=1; |
132 | x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.); | |
133 | y[0]=x[0]; | |
a897a37a | 134 | } |
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | ||
151 |