1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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).
24 Revision 1.2 2000/06/15 07:58:48 morsch
25 Code from MUON-dev joined
27 Revision 1.1.2.1 2000/06/09 21:38:46 morsch
28 AliMUONSegmentationV05 code from AliMUONSegResV05.cxx
32 /////////////////////////////////////////////////////
33 // Segmentation and Response classes version 05 //
34 /////////////////////////////////////////////////////
37 #include "AliMUONSegmentationV05.h"
39 //___________________________________________
40 ClassImp(AliMUONSegmentationV05)
43 void AliMUONSegmentationV05::Init(Int_t chamber)
45 printf("\n Initialise segmentation v05 \n");
47 // Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
48 // These arrays help in converting from real to pad co-ordinates and
51 // Segmentation is defined by rectangular modules approximating
52 // concentric circles as shown below
54 // PCB module size in cm
55 const Float_t kDxPCB=40, kDyPCB=40;
56 // PCB distribution (7 rows with 1+3 segmentation regions)
57 const Int_t kpcb[7][4] = {{1, 2, 2, 2},
69 // 3 3 3 2 2 | 2 2 3 3 3
70 // 3 3 3 2 2 2 | 2 2 2 3 3 3
71 // 3 3 2 2 1 1 | 1 1 2 2 3 3
72 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
73 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
74 // ------------------------------
75 // 3 3 2 2 1 1 0 | 0 1 1 2 2 3 3
76 // 3 3 2 2 1 1 1 | 1 1 1 2 2 3 3
77 // 3 3 2 2 1 1 | 1 1 2 2 3 3
78 // 3 3 3 2 2 2 | 2 2 2 3 3 3
79 // 3 3 3 2 2 | 2 2 3 3 3
83 // number of pad rows per PCB
85 Int_t nPyPCB=Int_t(kDyPCB/fDpy);
87 // maximum number of pad rows
90 // Calculate padsize along x
91 (*fDpxD)[fNsec-1]=fDpx;
93 for (Int_t i=fNsec-2; i>=0; i--){
94 (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
95 printf("\n test ---dx %d %f \n",i,(*fDpxD)[i]);
99 // fill the arrays defining the pad segmentation boundaries
101 // loop over pcb module rows
103 for (Int_t irow=0; irow<7; irow++) {
105 // loop over pads along the anode wires
106 for (Int_t i=0; i<=nPyPCB; i++) {
107 // iy counts the padrow
109 // Loop over sectors (isec=0 is the dead space surounding the beam pipe)
110 for (Int_t isec=0; isec<4; isec++) {
112 fNpxS[0][iy]=kpcb[irow][0]*Int_t(kDxPCB/(*fDpxD)[0]);
113 fCx[0][iy]=kpcb[irow][0]*kDxPCB;
115 fNpxS[isec][iy]=fNpxS[isec-1][iy]
116 +kpcb[irow][isec]*Int_t(kDxPCB/(*fDpxD)[isec]);
118 fCx[isec][iy]=fCx[isec-1][iy]
119 +kpcb[irow][isec]*kDxPCB;
122 } // pad raws in module
125 for (Int_t iy=1; iy< fNpy; iy++) {
126 printf("\nBoundary %d %f %d %f %d %f %d %f",
127 fNpxS[0][iy], fCx[0][iy],
128 fNpxS[1][iy], fCx[1][iy],
129 fNpxS[2][iy], fCx[2][iy],
130 fNpxS[3][iy], fCx[3][iy]);
136 void AliMUONSegmentationV05::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
138 // Returns test point on the pad plane.
139 // Used during determination of the segmoid correction of the COG-method
141 x[0]=(fCx[1][1]+fCx[0][1])/2/TMath::Sqrt(2.);