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