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