]>
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$ | |
2eb55fab | 18 | Revision 1.16 2001/01/27 08:50:50 morsch |
19 | Call non default constructors of segmentation classes. | |
20 | ||
c687f06a | 21 | Revision 1.15 2001/01/17 20:57:45 hristov |
22 | Unused variable removed | |
23 | ||
a7e8b51a | 24 | Revision 1.14 2000/12/21 22:42:55 morsch |
25 | Constructor contains default set-up for segmentation. | |
26 | Record charged particles only. | |
27 | ||
9fde056a | 28 | Revision 1.13 2000/10/06 10:03:38 morsch |
29 | Call to gMC->VolId() moved to Init() | |
30 | ||
b9046b8f | 31 | Revision 1.12 2000/10/02 21:28:09 fca |
32 | Removal of useless dependecies via forward declarations | |
33 | ||
94de3818 | 34 | Revision 1.11 2000/06/27 07:31:07 morsch |
35 | fChambers = 0; deleted from constructor. | |
36 | ||
c20a5a2a | 37 | Revision 1.10 2000/06/26 14:02:38 morsch |
38 | Add class AliMUONConstants with MUON specific constants using static memeber data and access methods. | |
39 | ||
f665c1ea | 40 | Revision 1.9 2000/06/15 07:58:49 morsch |
41 | Code from MUON-dev joined | |
42 | ||
a9e2aefa | 43 | Revision 1.8.4.9 2000/06/12 19:20:49 morsch |
44 | Constructor sets default geometry, segmentation and response parameters. | |
45 | ||
46 | Revision 1.8.4.8 2000/06/09 21:55:28 morsch | |
47 | Most coding rule violations corrected. | |
48 | ||
49 | Revision 1.8.4.7 2000/05/02 13:15:18 morsch | |
50 | Coding rule violations RS3, RN13 corected | |
51 | ||
52 | Revision 1.8.4.6 2000/05/02 10:24:26 morsch | |
53 | Public access to fdGas and fdAlu of AliMUONChamber replaced by getters. | |
54 | ||
55 | Revision 1.8.4.5 2000/04/26 19:58:47 morsch | |
56 | Obsolete reference to trig_ removed. | |
57 | ||
58 | Revision 1.8.4.4 2000/04/19 19:42:47 morsch | |
59 | change NCH to kNCH | |
60 | ||
61 | Revision 1.8.4.3 2000/02/17 08:17:43 morsch | |
62 | Gammas and neutrons are also scored in the stepmanager | |
4c039060 | 63 | */ |
64 | ||
fe4da5cc | 65 | ///////////////////////////////////////////////////////// |
66 | // Manager and hits classes for set:MUON version 0 // | |
67 | ///////////////////////////////////////////////////////// | |
68 | ||
69 | #include <TTUBE.h> | |
70 | #include <TNode.h> | |
71 | #include <TRandom.h> | |
a897a37a | 72 | #include <TLorentzVector.h> |
a9e2aefa | 73 | #include <iostream.h> |
fe4da5cc | 74 | |
75 | #include "AliMUONv0.h" | |
a9e2aefa | 76 | #include "AliMUONChamber.h" |
fe4da5cc | 77 | #include "AliRun.h" |
78 | #include "AliMC.h" | |
94de3818 | 79 | #include "AliMagF.h" |
a9e2aefa | 80 | #include "AliMUONHit.h" |
81 | #include "AliMUONPadHit.h" | |
fe4da5cc | 82 | #include "AliCallf77.h" |
83 | #include "AliConst.h" | |
a9e2aefa | 84 | #include "AliMUONResponseV0.h" |
85 | #include "AliMUONResponseTrigger.h" | |
86 | #include "AliMUONSegmentationV0.h" | |
87 | #include "AliMUONSegmentationV01.h" | |
88 | #include "AliMUONSegmentationV02.h" | |
89 | #include "AliMUONSegmentationV04.h" | |
90 | #include "AliMUONSegmentationV05.h" | |
9fde056a | 91 | #include "AliMUONSegmentationSlat.h" |
92 | #include "AliMUONSegmentationSlatN.h" | |
a9e2aefa | 93 | #include "AliMUONSegmentationTrigger.h" |
94 | #include "AliMUONSegmentationTriggerX.h" | |
95 | #include "AliMUONSegmentationTriggerY.h" | |
f665c1ea | 96 | #include "AliMUONConstants.h" |
fe4da5cc | 97 | |
98 | ClassImp(AliMUONv0) | |
99 | ||
100 | //___________________________________________ | |
101 | AliMUONv0::AliMUONv0() : AliMUON() | |
102 | { | |
a9e2aefa | 103 | // Constructor |
fe4da5cc | 104 | fChambers = 0; |
105 | } | |
106 | ||
107 | //___________________________________________ | |
108 | AliMUONv0::AliMUONv0(const char *name, const char *title) | |
109 | : AliMUON(name,title) | |
110 | { | |
a9e2aefa | 111 | // Constructor |
a9e2aefa | 112 | SetIshunt(0); |
113 | SetMaxStepGas(0.1); | |
114 | SetMaxStepAlu(0.1); | |
9fde056a | 115 | |
a9e2aefa | 116 | // |
117 | // First define the number of planes that are segmented (1 or 2) by a call | |
118 | // to SetNsec. | |
119 | // Then chose for each chamber (chamber plane) the segmentation | |
120 | // and response model. | |
121 | // They should be equal for the two chambers of each station. In a future | |
122 | // version this will be enforced. | |
123 | // | |
124 | // | |
125 | Int_t chamber; | |
9fde056a | 126 | // Default response: 5 mm of gas |
a9e2aefa | 127 | AliMUONResponseV0* response0 = new AliMUONResponseV0; |
9fde056a | 128 | response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085) |
129 | response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) | |
130 | response0->SetPitch(0.25); // anode-cathode distance | |
a9e2aefa | 131 | response0->SetSigmaIntegration(10.); |
132 | response0->SetChargeSlope(50); | |
133 | response0->SetChargeSpread(0.18, 0.18); | |
134 | response0->SetMaxAdc(4096); | |
135 | response0->SetZeroSuppression(6); | |
9fde056a | 136 | |
137 | // Response for 4 mm of gas (station 1) | |
138 | // automatic consistency with width of sensitive medium in CreateGeometry ???? | |
139 | AliMUONResponseV0* responseSt1 = new AliMUONResponseV0; | |
140 | // Mathieson parameters from L.Kharmandarian's thesis, page 190 | |
141 | responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900) | |
142 | responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700) | |
143 | responseSt1->SetPitch(0.20); // anode-cathode distance | |
144 | responseSt1->SetSigmaIntegration(10.); | |
145 | // ChargeSlope larger to compensate for the smaller anode-cathode distance | |
146 | // and keep the same most probable ADC channel for mip's | |
147 | responseSt1->SetChargeSlope(62.5); | |
148 | // assumed proportionality to anode-cathode distance for ChargeSpread | |
149 | responseSt1->SetChargeSpread(0.144, 0.144); | |
150 | responseSt1->SetMaxAdc(4096); | |
151 | responseSt1->SetZeroSuppression(6); | |
152 | ||
a9e2aefa | 153 | //-------------------------------------------------------- |
154 | // Configuration for Chamber TC1/2 (Station 1) ---------- | |
155 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
156 | Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5}; | |
157 | Int_t nseg1[4]={4, 4, 2, 1}; | |
158 | // | |
159 | chamber=1; | |
160 | //^^^^^^^^^ | |
161 | SetNsec(chamber-1,2); | |
162 | // | |
c687f06a | 163 | AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4); |
fe4da5cc | 164 | |
a9e2aefa | 165 | seg11->SetSegRadii(rseg1); |
9fde056a | 166 | // seg11->SetPadSize(3, 0.5); |
167 | seg11->SetPadSize(2.4, 0.4); // smaller pad size | |
168 | // seg11->SetDAnod(3.0/3./4); | |
169 | seg11->SetDAnod(0.20); // smaller distance between anode wires | |
a9e2aefa | 170 | seg11->SetPadDivision(nseg1); |
171 | ||
172 | SetSegmentationModel(chamber-1, 1, seg11); | |
fe4da5cc | 173 | // |
c687f06a | 174 | AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4); |
a9e2aefa | 175 | seg12->SetSegRadii(rseg1); |
9fde056a | 176 | // seg12->SetPadSize(0.75, 2.0); |
177 | seg12->SetPadSize(0.6, 1.6); // smaller pad size | |
178 | // seg12->SetDAnod(3.0/3./4); | |
179 | seg12->SetDAnod(0.20); // smaller distance between anode wires | |
a9e2aefa | 180 | seg12->SetPadDivision(nseg1); |
181 | ||
182 | SetSegmentationModel(chamber-1, 2, seg12); | |
183 | ||
9fde056a | 184 | // SetResponseModel(chamber-1, response0); |
185 | SetResponseModel(chamber-1, responseSt1); // special response | |
186 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread | |
a9e2aefa | 187 | |
188 | chamber=2; | |
189 | //^^^^^^^^^ | |
190 | // | |
191 | SetNsec(chamber-1,2); | |
192 | // | |
c687f06a | 193 | AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4); |
a9e2aefa | 194 | seg21->SetSegRadii(rseg1); |
9fde056a | 195 | // seg21->SetPadSize(3, 0.5); |
196 | seg21->SetPadSize(2.4, 0.4); // smaller pad size | |
197 | // seg21->SetDAnod(3.0/3./4); | |
198 | seg21->SetDAnod(0.20); // smaller distance between anode wires | |
a9e2aefa | 199 | seg21->SetPadDivision(nseg1); |
200 | SetSegmentationModel(chamber-1, 1, seg21); | |
201 | // | |
c687f06a | 202 | AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4); |
a9e2aefa | 203 | seg22->SetSegRadii(rseg1); |
9fde056a | 204 | // seg22->SetPadSize(0.75, 2.); |
205 | seg22->SetPadSize(0.6, 1.6); // smaller pad size | |
206 | // seg22->SetDAnod(3.0/3./4); | |
207 | seg22->SetDAnod(0.20); // smaller distance between anode wires | |
a9e2aefa | 208 | seg22->SetPadDivision(nseg1); |
209 | SetSegmentationModel(chamber-1, 2, seg22); | |
210 | ||
9fde056a | 211 | // SetResponseModel(chamber-1, response0); |
212 | SetResponseModel(chamber-1, responseSt1); // special response | |
213 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread | |
214 | ||
a9e2aefa | 215 | // |
216 | //-------------------------------------------------------- | |
9fde056a | 217 | // Configuration for Chamber TC3/4 (Station 2) ----------- |
218 | ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
219 | // Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5}; | |
a9e2aefa | 220 | Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5}; |
221 | Int_t nseg2[4]={4, 4, 2, 1}; | |
222 | // | |
223 | chamber=3; | |
224 | //^^^^^^^^^ | |
225 | SetNsec(chamber-1,2); | |
226 | // | |
c687f06a | 227 | AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4); |
a9e2aefa | 228 | seg31->SetSegRadii(rseg2); |
9fde056a | 229 | seg31->SetPadSize(3.0, 0.5); |
a9e2aefa | 230 | seg31->SetDAnod(3.0/3./4); |
231 | seg31->SetPadDivision(nseg2); | |
232 | SetSegmentationModel(chamber-1, 1, seg31); | |
233 | // | |
c687f06a | 234 | AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4); |
a9e2aefa | 235 | seg32->SetSegRadii(rseg2); |
9fde056a | 236 | seg32->SetPadSize(0.75, 2.0); |
a9e2aefa | 237 | seg32->SetPadDivision(nseg2); |
238 | seg32->SetDAnod(3.0/3./4); | |
239 | ||
240 | SetSegmentationModel(chamber-1, 2, seg32); | |
241 | ||
242 | SetResponseModel(chamber-1, response0); | |
9fde056a | 243 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
a9e2aefa | 244 | |
245 | chamber=4; | |
246 | //^^^^^^^^^ | |
247 | // | |
248 | SetNsec(chamber-1,2); | |
249 | // | |
c687f06a | 250 | AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4); |
a9e2aefa | 251 | seg41->SetSegRadii(rseg2); |
9fde056a | 252 | seg41->SetPadSize(3.0, 0.5); |
a9e2aefa | 253 | seg41->SetDAnod(3.0/3./4); |
254 | seg41->SetPadDivision(nseg2); | |
255 | SetSegmentationModel(chamber-1, 1, seg41); | |
256 | // | |
c687f06a | 257 | AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4); |
a9e2aefa | 258 | seg42->SetSegRadii(rseg2); |
9fde056a | 259 | seg42->SetPadSize(0.75, 2.0); |
a9e2aefa | 260 | seg42->SetPadDivision(nseg2); |
261 | seg42->SetDAnod(3.0/3./4); | |
262 | ||
263 | SetSegmentationModel(chamber-1, 2, seg42); | |
264 | ||
265 | SetResponseModel(chamber-1, response0); | |
9fde056a | 266 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
267 | ||
268 | ||
a9e2aefa | 269 | //-------------------------------------------------------- |
9fde056a | 270 | // Configuration for Chamber TC5/6 (Station 3) ---------- |
a9e2aefa | 271 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
9fde056a | 272 | Int_t nseg3[4]={4, 4, 2, 1}; |
273 | Int_t npcb5[36] = {0,0,2,0, | |
274 | 0,0,3,0, | |
275 | 0,1,3,0, | |
276 | 0,2,2,0, | |
277 | 0,1,2,0, | |
278 | 0,2,2,0, | |
279 | 0,1,3,0, | |
280 | 0,0,3,0, | |
281 | 0,0,2,0}; | |
282 | ||
283 | Float_t shift = 1.5/2.; | |
284 | // Float_t xpos5[8] = {2., 2., 2., 42., 42., 2., 2., 2.}; | |
285 | Float_t xpos5[9] = {2., 2., 2., 2.,32., 2., 2., 2., 2.}; | |
286 | Float_t ypos5 = -(20.+4.*(40.-2.*shift)); | |
287 | ||
a9e2aefa | 288 | chamber=5; |
a9e2aefa | 289 | SetNsec(chamber-1,2); |
c687f06a | 290 | AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4); |
9fde056a | 291 | seg51->SetNSlats(9); |
292 | seg51->SetShift(shift); | |
293 | seg51->SetNPCBperSector(npcb5); | |
294 | seg51->SetSlatXPositions(xpos5); | |
295 | seg51->SetSlatYPosition(ypos5); | |
296 | seg51->SetPadSize(10.,0.5); | |
297 | seg51->SetDAnod(0.25); | |
298 | seg51->SetPadDivision(nseg3); | |
a9e2aefa | 299 | SetSegmentationModel(chamber-1, 1, seg51); |
a9e2aefa | 300 | |
c687f06a | 301 | AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4); |
9fde056a | 302 | seg52->SetNSlats(9); |
303 | seg52->SetShift(shift); | |
304 | seg52->SetNPCBperSector(npcb5); | |
305 | seg52->SetSlatXPositions(xpos5); | |
306 | seg52->SetSlatYPosition(ypos5); | |
307 | seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
308 | seg52->SetDAnod(0.25); | |
309 | seg52->SetPadDivision(nseg3); | |
a9e2aefa | 310 | SetSegmentationModel(chamber-1, 2, seg52); |
311 | SetResponseModel(chamber-1, response0); | |
9fde056a | 312 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
a9e2aefa | 313 | |
314 | chamber=6; | |
a9e2aefa | 315 | SetNsec(chamber-1,2); |
c687f06a | 316 | AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4); |
9fde056a | 317 | seg61->SetNSlats(9); |
318 | seg61->SetShift(shift); | |
319 | seg61->SetNPCBperSector(npcb5); | |
320 | seg61->SetSlatXPositions(xpos5); | |
321 | seg61->SetSlatYPosition(ypos5); | |
322 | seg61->SetPadSize(10.,0.5); | |
323 | seg61->SetDAnod(0.25); | |
324 | seg61->SetPadDivision(nseg3); | |
a9e2aefa | 325 | SetSegmentationModel(chamber-1, 1, seg61); |
a9e2aefa | 326 | |
c687f06a | 327 | AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4); |
9fde056a | 328 | seg62->SetNSlats(9); |
329 | seg62->SetShift(shift); | |
330 | seg62->SetNPCBperSector(npcb5); | |
331 | seg62->SetSlatXPositions(xpos5); | |
332 | seg62->SetSlatYPosition(ypos5); | |
333 | seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
334 | seg62->SetDAnod(0.25); | |
335 | seg62->SetPadDivision(nseg3); | |
a9e2aefa | 336 | SetSegmentationModel(chamber-1, 2, seg62); |
a9e2aefa | 337 | SetResponseModel(chamber-1, response0); |
9fde056a | 338 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
339 | ||
a9e2aefa | 340 | //-------------------------------------------------------- |
341 | // Configuration for Chamber TC7/8 (Station 4) ---------- | |
342 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
a897a37a | 343 | |
a9e2aefa | 344 | Int_t nseg4[4]={4, 4, 2, 1}; |
a897a37a | 345 | |
a9e2aefa | 346 | chamber=7; |
347 | //^^^^^^^^^ | |
9fde056a | 348 | |
a9e2aefa | 349 | SetNsec(chamber-1,2); |
a897a37a | 350 | // |
c687f06a | 351 | AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4); |
9fde056a | 352 | Int_t npcb7[44] = {0,0,0,3, |
353 | 0,0,2,2, | |
354 | 0,0,3,2, | |
355 | 0,2,2,1, | |
356 | 0,2,2,1, | |
357 | 0,1,2,1, | |
358 | 0,2,2,1, | |
359 | 0,2,2,1, | |
360 | 0,0,3,2, | |
361 | 0,0,2,2, | |
362 | 0,0,0,3}; | |
363 | Float_t xpos7[11] = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.}; | |
364 | Float_t ypos7 = -(20.+5.*(40.-2.*shift)); | |
365 | ||
366 | seg71->SetNSlats(11); | |
367 | seg71->SetShift(shift); | |
368 | seg71->SetNPCBperSector(npcb7); | |
369 | seg71->SetSlatXPositions(xpos7); | |
370 | seg71->SetSlatYPosition(ypos7); | |
371 | ||
a9e2aefa | 372 | seg71->SetPadSize(10.,0.5); |
373 | seg71->SetDAnod(0.25); | |
374 | seg71->SetPadDivision(nseg4); | |
375 | SetSegmentationModel(chamber-1, 1, seg71); | |
9fde056a | 376 | |
c687f06a | 377 | AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4); |
9fde056a | 378 | |
379 | SetSegmentationModel(chamber-1, 2, seg72); | |
380 | seg72->SetNSlats(11); | |
381 | seg72->SetShift(shift); | |
382 | seg72->SetNPCBperSector(npcb7); | |
383 | seg72->SetSlatXPositions(xpos7); | |
384 | seg72->SetSlatYPosition(ypos7); | |
385 | seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
a9e2aefa | 386 | seg72->SetDAnod(0.25); |
387 | seg72->SetPadDivision(nseg4); | |
a9e2aefa | 388 | |
389 | SetResponseModel(chamber-1, response0); | |
9fde056a | 390 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
391 | ||
a9e2aefa | 392 | chamber=8; |
393 | //^^^^^^^^^ | |
394 | SetNsec(chamber-1,2); | |
9fde056a | 395 | // |
c687f06a | 396 | AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4); |
9fde056a | 397 | |
398 | seg81->SetNSlats(11); | |
399 | seg81->SetShift(shift); | |
400 | seg81->SetNPCBperSector(npcb7); | |
401 | seg81->SetSlatXPositions(xpos7); | |
402 | seg81->SetSlatYPosition(ypos7); | |
403 | seg81->SetPadSize(10.,0.5); | |
a9e2aefa | 404 | seg81->SetDAnod(0.25); |
9fde056a | 405 | seg81->SetPadDivision(nseg4); |
a9e2aefa | 406 | SetSegmentationModel(chamber-1, 1, seg81); |
407 | ||
c687f06a | 408 | AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4); |
9fde056a | 409 | |
a9e2aefa | 410 | SetSegmentationModel(chamber-1, 2, seg82); |
9fde056a | 411 | seg82->SetNSlats(11); |
412 | seg82->SetShift(shift); | |
413 | seg82->SetNPCBperSector(npcb7); | |
414 | seg82->SetSlatXPositions(xpos7); | |
415 | seg82->SetSlatYPosition(ypos7); | |
416 | seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
417 | seg82->SetDAnod(0.25); | |
418 | seg82->SetPadDivision(nseg4); | |
a9e2aefa | 419 | |
420 | SetResponseModel(chamber-1, response0); | |
9fde056a | 421 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
422 | ||
423 | ||
a9e2aefa | 424 | //-------------------------------------------------------- |
425 | // Configuration for Chamber TC9/10 (Station 5) --------- | |
426 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
427 | chamber=9; | |
428 | //^^^^^^^^^ | |
9fde056a | 429 | |
a9e2aefa | 430 | SetNsec(chamber-1,2); |
431 | // | |
c687f06a | 432 | AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4); |
9fde056a | 433 | Int_t npcb9[52] = {0,0,0,3, |
434 | 0,0,0,4, | |
435 | 0,0,2,3, | |
436 | 0,0,3,3, | |
437 | 0,2,2,2, | |
438 | 0,2,2,2, | |
439 | 0,1,2,2, | |
440 | 0,2,2,2, | |
441 | 0,2,2,2, | |
442 | 0,0,3,3, | |
443 | 0,0,2,3, | |
444 | 0,0,0,4, | |
445 | 0,0,0,3}; | |
446 | ||
447 | // Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 39.5 , 2., 2., 2., 2., 2., 2.}; | |
448 | Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2., 2.}; | |
449 | Float_t ypos9 = -(20.+6.*(40.-2.*shift)); | |
450 | ||
451 | seg91->SetNSlats(13); | |
452 | seg91->SetShift(shift); | |
453 | seg91->SetNPCBperSector(npcb9); | |
454 | seg91->SetSlatXPositions(xpos9); | |
455 | seg91->SetSlatYPosition(ypos9); | |
a9e2aefa | 456 | seg91->SetPadSize(10.,0.5); |
457 | seg91->SetDAnod(0.25); | |
458 | seg91->SetPadDivision(nseg4); | |
459 | SetSegmentationModel(chamber-1, 1, seg91); | |
460 | ||
c687f06a | 461 | AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4); |
a9e2aefa | 462 | |
463 | SetSegmentationModel(chamber-1, 2, seg92); | |
9fde056a | 464 | seg92->SetNSlats(13); |
465 | seg92->SetShift(shift); | |
466 | seg92->SetNPCBperSector(npcb9); | |
467 | seg92->SetSlatXPositions(xpos9); | |
468 | seg92->SetSlatYPosition(ypos9); | |
469 | seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
470 | seg92->SetDAnod(0.25); | |
471 | seg92->SetPadDivision(nseg4); | |
a9e2aefa | 472 | |
473 | SetResponseModel(chamber-1, response0); | |
9fde056a | 474 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
a9e2aefa | 475 | |
476 | chamber=10; | |
477 | //^^^^^^^^^ | |
478 | SetNsec(chamber-1,2); | |
9fde056a | 479 | // |
c687f06a | 480 | AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4); |
9fde056a | 481 | |
482 | seg101->SetNSlats(13); | |
483 | seg101->SetShift(shift); | |
484 | seg101->SetNPCBperSector(npcb9); | |
485 | seg101->SetSlatXPositions(xpos9); | |
486 | seg101->SetSlatYPosition(ypos9); | |
487 | seg101->SetPadSize(10.,0.5); | |
a9e2aefa | 488 | seg101->SetDAnod(0.25); |
9fde056a | 489 | seg101->SetPadDivision(nseg4); |
a9e2aefa | 490 | SetSegmentationModel(chamber-1, 1, seg101); |
491 | ||
c687f06a | 492 | AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4); |
9fde056a | 493 | |
a9e2aefa | 494 | SetSegmentationModel(chamber-1, 2, seg102); |
9fde056a | 495 | seg102->SetNSlats(13); |
496 | seg102->SetShift(shift); | |
497 | seg102->SetNPCBperSector(npcb9); | |
498 | seg102->SetSlatXPositions(xpos9); | |
499 | seg102->SetSlatYPosition(ypos9); | |
500 | seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) | |
501 | seg102->SetDAnod(0.25); | |
502 | seg102->SetPadDivision(nseg4); | |
a9e2aefa | 503 | |
504 | SetResponseModel(chamber-1, response0); | |
9fde056a | 505 | Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread |
506 | ||
a9e2aefa | 507 | //-------------------------------------------------------- |
9fde056a | 508 | // Configuration for Trigger Stations -------------------- |
a9e2aefa | 509 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
9fde056a | 510 | // Cluster-size off |
a9e2aefa | 511 | AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger; |
9fde056a | 512 | // Cluster-size on |
513 | // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1; | |
514 | ||
a9e2aefa | 515 | chamber=11; |
516 | SetNsec(chamber-1,2); | |
517 | AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX; | |
518 | SetSegmentationModel(chamber-1, 1, seg111); | |
519 | AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY; | |
520 | SetSegmentationModel(chamber-1, 2, seg112); | |
521 | ||
522 | SetResponseModel(chamber-1, responseTrigger0); | |
9fde056a | 523 | Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes |
a9e2aefa | 524 | |
9fde056a | 525 | |
a9e2aefa | 526 | chamber=12; |
527 | SetNsec(chamber-1,2); | |
528 | AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX; | |
529 | SetSegmentationModel(chamber-1, 1, seg121); | |
530 | AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY; | |
531 | SetSegmentationModel(chamber-1, 2, seg122); | |
532 | ||
9fde056a | 533 | SetResponseModel(chamber-1, responseTrigger0); |
534 | Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes | |
a9e2aefa | 535 | |
536 | chamber=13; | |
537 | SetNsec(chamber-1,2); | |
538 | AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX; | |
539 | SetSegmentationModel(chamber-1, 1, seg131); | |
540 | AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY; | |
541 | SetSegmentationModel(chamber-1, 2, seg132); | |
542 | SetResponseModel(chamber-1, responseTrigger0); | |
9fde056a | 543 | Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes |
a9e2aefa | 544 | |
545 | chamber=14; | |
546 | SetNsec(chamber-1,2); | |
547 | AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX; | |
548 | SetSegmentationModel(chamber-1, 1, seg141); | |
549 | AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY; | |
550 | SetSegmentationModel(chamber-1, 2, seg142); | |
551 | ||
552 | SetResponseModel(chamber-1, responseTrigger0); | |
9fde056a | 553 | Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes |
a897a37a | 554 | } |
555 | ||
a9e2aefa | 556 | void AliMUONv0::CreateGeometry() |
557 | { | |
558 | // Creates coarse geometry for hit density simulations | |
559 | Int_t *idtmed = fIdtmed->GetArray()-1099; | |
fe4da5cc | 560 | // |
a9e2aefa | 561 | Float_t zpos, dAlu, tpar[3]; |
562 | Int_t idAir=idtmed[1100]; | |
563 | Int_t idAlu=idtmed[1103]; | |
564 | ||
565 | AliMUONChamber *iChamber; | |
566 | // Loop over all chambers (tracking and trigger) | |
f665c1ea | 567 | for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++) { |
a9e2aefa | 568 | char alu[8]; |
569 | char gas[8]; | |
570 | ||
571 | iChamber=(AliMUONChamber*) (*fChambers)[ch]; | |
572 | // Z of the chamber | |
573 | zpos=iChamber->Z(); | |
574 | dAlu=iChamber->DAlu(); | |
f665c1ea | 575 | if (ch < AliMUONConstants::NTrackingCh()) { |
a9e2aefa | 576 | // tracking chambers |
577 | sprintf(alu,"CA0%1d",ch); | |
578 | sprintf(gas,"CG0%1d",ch); | |
579 | } else { | |
580 | // trigger chambers | |
581 | sprintf(alu,"CA%2d",ch); | |
582 | sprintf(gas,"CG%2d",ch); | |
583 | } | |
584 | // | |
a9e2aefa | 585 | tpar[0] = iChamber->RInner(); |
586 | tpar[1] = iChamber->ROuter(); | |
587 | tpar[2] = (dAlu+0.2)/2.; | |
588 | if (ch !=4 && ch !=5) { | |
589 | gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3); | |
590 | tpar[2] = 0.1; | |
591 | gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3); | |
592 | } else { | |
593 | gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3); | |
594 | tpar[2] = 0.1; | |
595 | gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3); | |
596 | } | |
597 | gMC->Gspos(gas, 1, alu, 0., 0., 0., 0, "ONLY"); | |
598 | gMC->Gspos(alu, 1, "ALIC", 0., 0., zpos, 0, "ONLY"); | |
a897a37a | 599 | } |
fe4da5cc | 600 | } |
601 | ||
fe4da5cc | 602 | //___________________________________________ |
603 | void AliMUONv0::CreateMaterials() | |
604 | { | |
a9e2aefa | 605 | // Creates materials for coarse geometry |
fe4da5cc | 606 | AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500); |
a9e2aefa | 607 | AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); |
fe4da5cc | 608 | |
a9e2aefa | 609 | Float_t epsil = .001; // Tracking precision, |
610 | Float_t stemax = -1.; // Maximum displacement for multiple scat | |
611 | Float_t tmaxfd = -20.; // Maximum angle due to field deflection | |
612 | Float_t deemax = -.3; // Maximum fractional energy loss, DLS | |
613 | Float_t stmin = -.8; | |
614 | Int_t isxfld = gAlice->Field()->Integ(); | |
615 | Float_t sxmgmx = gAlice->Field()->Max(); | |
fe4da5cc | 616 | |
fe4da5cc | 617 | // |
a9e2aefa | 618 | // Air |
619 | AliMedium(1, "AIR_CH_US ", 15, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
620 | AliMedium(4, "ALU_CH_US ", 9, 0, isxfld, sxmgmx, tmaxfd, fMaxStepAlu, | |
a897a37a | 621 | fMaxDestepAlu, epsil, stmin); |
622 | ||
fe4da5cc | 623 | } |
624 | ||
fe4da5cc | 625 | void AliMUONv0::Init() |
626 | { | |
fe4da5cc | 627 | // |
628 | // Initialize Tracking Chambers | |
629 | // | |
b9046b8f | 630 | char vName[8]; |
631 | printf("\n\n\n Start Init for version 0 - CPC chamber type\n\n\n"); | |
632 | for (Int_t i=0; i<AliMUONConstants::NCh(); i++) { | |
633 | // Initialise chamber | |
634 | ((AliMUONChamber*) (*fChambers)[i])->Init(); | |
635 | // Set sensitive volume Id | |
636 | if (i < AliMUONConstants::NTrackingCh()) { | |
637 | // tracking chambers | |
638 | sprintf(vName,"CG0%1d",i); | |
639 | } else { | |
640 | // trigger chambers | |
641 | sprintf(vName,"CG%2d",i); | |
642 | } | |
643 | ((AliMUONChamber*) (*fChambers)[i])->SetGid(gMC->VolId(vName)); | |
644 | } | |
fe4da5cc | 645 | } |
646 | ||
fe4da5cc | 647 | void AliMUONv0::StepManager() |
648 | { | |
a9e2aefa | 649 | // |
650 | // Step manager for hit density simulations | |
fe4da5cc | 651 | Int_t copy, id; |
652 | static Int_t idvol; | |
653 | static Int_t vol[2]; | |
654 | Int_t ipart; | |
a897a37a | 655 | TLorentzVector pos; |
656 | TLorentzVector mom; | |
657 | Float_t theta,phi; | |
fe4da5cc | 658 | |
a897a37a | 659 | // modifs perso |
a9e2aefa | 660 | static Float_t hits[15]; |
a897a37a | 661 | |
fe4da5cc | 662 | TClonesArray &lhits = *fHits; |
fe4da5cc | 663 | // |
664 | // Only gas gap inside chamber | |
665 | // Tag chambers and record hits when track enters | |
666 | idvol=-1; | |
0a6d8768 | 667 | id=gMC->CurrentVolID(copy); |
fe4da5cc | 668 | |
f665c1ea | 669 | for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) { |
a9e2aefa | 670 | if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ |
fe4da5cc | 671 | vol[0]=i; |
672 | idvol=i-1; | |
673 | } | |
674 | } | |
675 | if (idvol == -1) return; | |
676 | // | |
677 | // Get current particle id (ipart), track position (pos) and momentum (mom) | |
cfce8870 | 678 | gMC->TrackPosition(pos); |
679 | gMC->TrackMomentum(mom); | |
fe4da5cc | 680 | |
cfce8870 | 681 | ipart = gMC->TrackPid(); |
fe4da5cc | 682 | // |
683 | // record hits when track enters ... | |
9fde056a | 684 | if( !(gMC->TrackCharge()) ) return; |
0a6d8768 | 685 | if( gMC->IsTrackEntering()) { |
a897a37a | 686 | Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; |
687 | Double_t rt = TMath::Sqrt(tc); | |
a897a37a | 688 | theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; |
689 | phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; | |
a9e2aefa | 690 | hits[0] = Float_t(ipart); // Geant3 particle type |
691 | hits[1] = pos[0]; // X-position for hit | |
692 | hits[2] = pos[1]; // Y-position for hit | |
693 | hits[3] = pos[2]; // Z-position for hit | |
694 | hits[4] = theta; // theta angle of incidence | |
695 | hits[5] = phi; // phi angle of incidence | |
696 | hits[8] = -1; // first padhit | |
697 | hits[9] = -1; // last pad hit | |
2eb55fab | 698 | hits[10] = mom[3]; // hit Energy |
699 | hits[11] = mom[0]; // Px | |
700 | hits[12] = mom[1]; // Py | |
701 | hits[13] = mom[2]; // Pz | |
702 | hits[14] = gMC->TrackTime(); // time of flight | |
fe4da5cc | 703 | new(lhits[fNhits++]) |
a9e2aefa | 704 | AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
705 | ||
fe4da5cc | 706 | } |
707 | } | |
a9e2aefa | 708 | |
709 | ||
710 | ||
711 | ||
712 | ||
713 | ||
714 | ||
715 | ||
716 |