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