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