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