]>
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$ | |
c3eff6ad | 18 | Revision 1.3 2000/06/29 12:34:09 morsch |
19 | AliMUONSegmentation class has been made independent of AliMUONChamber. This makes | |
20 | it usable with any other geometry class. The link to the object to which it belongs is | |
21 | established via an index. This assumes that there exists a global geometry manager | |
22 | from which the pointer to the parent object can be obtained (in our case gAlice). | |
23 | ||
d81db581 | 24 | Revision 1.2 2000/06/15 07:58:48 morsch |
25 | Code from MUON-dev joined | |
26 | ||
a9e2aefa | 27 | Revision 1.1.2.1 2000/06/09 21:38:15 morsch |
28 | AliMUONSegmentationV04 code from AliMUONSegResV04.cxx | |
29 | ||
4c039060 | 30 | */ |
31 | ||
a897a37a | 32 | ///////////////////////////////////////////////////// |
33 | // Segmentation and Response classes version 04 // | |
34 | ///////////////////////////////////////////////////// | |
35 | ||
a897a37a | 36 | |
a9e2aefa | 37 | #include "AliMUONSegmentationV04.h" |
38 | #include <TMath.h> | |
a897a37a | 39 | |
40 | //___________________________________________ | |
a9e2aefa | 41 | ClassImp(AliMUONSegmentationV04) |
a897a37a | 42 | |
43 | ||
d81db581 | 44 | void AliMUONSegmentationV04::Init(Int_t chamber) |
a897a37a | 45 | { |
a9e2aefa | 46 | printf("\n Initialise segmentation v04 \n"); |
a897a37a | 47 | // |
48 | // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector | |
49 | // These arrays help in converting from real to pad co-ordinates and | |
50 | // vice versa | |
a9e2aefa | 51 | // |
52 | // Segmentation is defined by rectangular modules approximating | |
53 | // concentric circles as shown below | |
a897a37a | 54 | // |
55 | // PCB module size in cm | |
a9e2aefa | 56 | const Float_t kDxPCB=40, kDyPCB=40; |
a897a37a | 57 | // PCB distribution (7 rows with 1+3 segmentation regions) |
58 | const Int_t kpcb[7][4] = {{1, 2, 2, 2}, | |
59 | {0, 3, 2, 2}, | |
60 | {0, 2, 2, 2}, | |
61 | {0, 0, 3, 3}, | |
62 | {0, 0, 2, 3}, | |
63 | {0, 0, 0, 4}, | |
64 | {0, 0, 0, 3}}; | |
65 | ||
66 | ||
67 | // | |
68 | // 3 3 3 | 3 3 3 | |
69 | // 3 3 3 3 | 3 3 3 3 | |
70 | // 3 3 3 2 2 | 2 2 3 3 3 | |
71 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
72 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
73 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
74 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
75 | // ------------------------------ | |
76 | // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3 | |
77 | // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3 | |
78 | // 3 3 2 2 1 1 | 1 1 2 2 3 3 | |
79 | // 3 3 3 2 2 2 | 2 2 2 3 3 3 | |
80 | // 3 3 3 2 2 | 2 2 3 3 3 | |
81 | // 3 3 3 3 | 3 3 3 3 | |
82 | // 3 3 3 | 3 3 3 | |
83 | // | |
84 | // number of pad rows per PCB | |
85 | // | |
a9e2aefa | 86 | Int_t nPyPCB=Int_t(kDyPCB/fDpy); |
a897a37a | 87 | // |
88 | // maximum number of pad rows | |
a9e2aefa | 89 | fNpy=7*nPyPCB; |
a897a37a | 90 | // |
91 | // Calculate padsize along x | |
92 | fDpxD[fNsec-1]=fDpx; | |
93 | if (fNsec > 1) { | |
94 | for (Int_t i=fNsec-2; i>=0; i--){ | |
c3eff6ad | 95 | (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i]; |
96 | printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]); | |
a897a37a | 97 | } |
98 | } | |
99 | // | |
100 | // fill the arrays defining the pad segmentation boundaries | |
101 | // | |
102 | // loop over pcb module rows | |
103 | Int_t iy=0; | |
104 | for (Int_t irow=0; irow<7; irow++) { | |
105 | // | |
106 | // loop over pads along the anode wires | |
a9e2aefa | 107 | for (Int_t i=0; i<=nPyPCB; i++) { |
a897a37a | 108 | // iy counts the padrow |
109 | iy++; | |
110 | // Loop over sectors (isec=0 is the dead space surounding the beam pipe) | |
111 | for (Int_t isec=0; isec<4; isec++) { | |
112 | if (isec==0) { | |
c3eff6ad | 113 | fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]); |
a9e2aefa | 114 | fCx[0][iy]=kpcb[irow][0]*kDxPCB; |
a897a37a | 115 | } else { |
116 | fNpxS[isec][iy]=fNpxS[isec-1][iy] | |
c3eff6ad | 117 | +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]); |
a897a37a | 118 | |
119 | fCx[isec][iy]=fCx[isec-1][iy] | |
a9e2aefa | 120 | +kpcb[irow][isec]*kDxPCB; |
a897a37a | 121 | } |
122 | } // sectors | |
123 | } // pad raws in module | |
124 | } // PCB rows | |
a897a37a | 125 | } |
126 | ||
c3eff6ad | 127 | void AliMUONSegmentationV04::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const |
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=3; |
132 | x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.); | |
133 | y[0]=x[0]; | |
134 | x[1]=(fCx[2][1]+fCx[1][1])/2/TMath::Sqrt(2.); | |
135 | y[1]=x[1]; | |
136 | x[2]=(fCx[3][1]+fCx[2][1])/2/TMath::Sqrt(2.); | |
137 | y[2]=x[2]; | |
a897a37a | 138 | } |
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 |