]>
Commit | Line | Data |
---|---|---|
90e8f97c | 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 | // Factory for muon chambers, segmentations and response // | |
18 | //////////////////////////////////////////////////////////// | |
19 | ||
20 | /* $Id$ */ | |
21 | ||
22 | #include "AliMUONFactoryV3.h" | |
23 | #include "AliRun.h" | |
24 | #include "AliLog.h" | |
25 | ||
26 | #include "AliMpPlaneType.h" | |
27 | ||
28 | #include "AliMUON.h" | |
29 | #include "AliMUONConstants.h" | |
30 | #include "AliMUONTriggerConstants.h" | |
31 | #include "AliMUONChamber.h" | |
32 | #include "AliMUONResponseV0.h" | |
33 | #include "AliMUONGeometryModule.h" | |
34 | #include "AliMUONGeometryStore.h" | |
35 | #include "AliMUONGeometrySegmentation.h" | |
36 | #include "AliMUONVGeometryDEIndexing.h" | |
37 | #include "AliMUONSegmentationManager.h" | |
38 | #include "AliMUONSt12QuadrantSegmentation.h" | |
39 | #include "AliMUONSt345SlatSegmentationV2.h" | |
40 | #include "AliMUONTriggerSegmentation.h" | |
41 | #include "AliMUONResponseTrigger.h" | |
42 | ||
43 | ClassImp(AliMUONFactoryV3) | |
44 | ||
45 | //__________________________________________________________________________ | |
46 | AliMUONFactoryV3::AliMUONFactoryV3(const char* name) | |
47 | : TNamed(name, ""), | |
48 | fMUON(0), | |
49 | fResponse0(0), | |
50 | fDESegmentations(0) | |
51 | { | |
52 | AliDebug(1,Form("ctor this=%p",this)); | |
53 | fDESegmentations = new TObjArray(); | |
54 | fDESegmentations->SetOwner(kTRUE); | |
55 | } | |
56 | ||
57 | //__________________________________________________________________________ | |
58 | AliMUONFactoryV3::AliMUONFactoryV3() | |
59 | : TNamed(), | |
60 | fMUON(0), | |
61 | fResponse0(0), | |
62 | fDESegmentations(0) | |
63 | { | |
64 | AliDebug(1,Form("default (empty) ctor this=%p",this)); | |
65 | // Default constructor | |
66 | } | |
67 | ||
68 | //__________________________________________________________________________ | |
69 | AliMUONFactoryV3::AliMUONFactoryV3(const AliMUONFactoryV3& rhs) | |
70 | : TNamed(rhs) | |
71 | { | |
72 | // Protected copy constructor | |
73 | ||
74 | AliFatal("Not implemented."); | |
75 | } | |
76 | ||
77 | //__________________________________________________________________________ | |
78 | ||
79 | AliMUONFactoryV3::~AliMUONFactoryV3() | |
80 | { | |
81 | // Destructor | |
82 | AliDebug(1,Form("dtor this=%p",this)); | |
83 | delete fDESegmentations; | |
84 | } | |
85 | ||
86 | //__________________________________________________________________________ | |
87 | AliMUONFactoryV3& AliMUONFactoryV3::operator=(const AliMUONFactoryV3& rhs) | |
88 | { | |
89 | // Protected assignement operator | |
90 | ||
91 | if (this == &rhs) return *this; | |
92 | ||
93 | AliFatal("Not implemented."); | |
94 | ||
95 | return *this; | |
96 | } | |
97 | ||
98 | //__________________________________________________________________________ | |
99 | Bool_t AliMUONFactoryV3::IsGeometryDefined(Int_t ichamber) | |
100 | { | |
101 | // Return true, if det elements for the chamber with the given ichamber Id | |
102 | // are defined in geometry (the geometry builder for this chamber was activated) | |
103 | ||
104 | if ( ! fMUON || | |
105 | ! fMUON->Chamber(ichamber).GetGeometry() || | |
106 | ! fMUON->Chamber(ichamber).GetGeometry()->GetDEIndexing() || | |
107 | ! fMUON->Chamber(ichamber).GetGeometry()->GetDEIndexing()->GetNofDetElements() ) | |
108 | ||
109 | return kFALSE; | |
110 | ||
111 | return kTRUE; | |
112 | } | |
113 | ||
114 | //__________________________________________________________________________ | |
115 | void AliMUONFactoryV3::BuildCommon() | |
116 | { | |
117 | // | |
118 | // Construct the default response. | |
119 | // | |
120 | ||
121 | // Default response: 5 mm of gas | |
122 | fResponse0 = new AliMUONResponseV0; | |
123 | fResponse0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085) | |
124 | fResponse0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) | |
125 | fResponse0->SetPitch(AliMUONConstants::Pitch()); // anode-cathode distance | |
126 | fResponse0->SetSigmaIntegration(10.); | |
127 | fResponse0->SetChargeSlope(10); | |
128 | fResponse0->SetChargeSpread(0.18, 0.18); | |
129 | fResponse0->SetMaxAdc(4096); | |
130 | fResponse0->SetSaturation(3000); | |
131 | fResponse0->SetZeroSuppression(6); | |
132 | } | |
133 | ||
134 | //__________________________________________________________________________ | |
135 | void AliMUONFactoryV3::BuildStation1() | |
136 | { | |
137 | //-------------------------------------------------------- | |
138 | // Configuration for Chamber TC1/2 (Station 1) ---------- | |
139 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
140 | ||
141 | ||
142 | // Response for 4 mm of gas (station 1) | |
143 | // automatic consistency with width of sensitive medium in CreateGeometry ???? | |
144 | AliMUONResponseV0* responseSt1 = new AliMUONResponseV0; | |
145 | // Mathieson parameters from L.Kharmandarian's thesis, page 190 | |
146 | responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900) | |
147 | responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700) | |
148 | responseSt1->SetPitch(AliMUONConstants::PitchSt1()); // anode-cathode distance | |
149 | responseSt1->SetSigmaIntegration(10.); | |
150 | // ChargeSlope larger to compensate for the smaller anode-cathode distance | |
151 | // and keep the same most probable ADC channel for mip's | |
152 | responseSt1->SetChargeSlope(62.5); | |
153 | // assumed proportionality to anode-cathode distance for ChargeSpread | |
154 | responseSt1->SetChargeSpread(0.144, 0.144); | |
155 | responseSt1->SetMaxAdc(4096); | |
156 | responseSt1->SetSaturation(3000); | |
157 | responseSt1->SetZeroSuppression(6); | |
158 | ||
159 | // Quadrant segmentations: | |
160 | AliMUONSt12QuadrantSegmentation* bendSt1 | |
161 | = new AliMUONSt12QuadrantSegmentation(kStation1, kBendingPlane); | |
162 | AliMUONSt12QuadrantSegmentation* nonbendSt1 | |
163 | = new AliMUONSt12QuadrantSegmentation(kStation1, kNonBendingPlane); | |
164 | ||
165 | // Add in the array (for safe deleting) | |
166 | fDESegmentations->Add(bendSt1); | |
167 | fDESegmentations->Add(nonbendSt1); | |
168 | ||
169 | AliMUONGeometrySegmentation* segmentation[2]; | |
170 | ||
171 | for (Int_t chamber = 0; chamber < 2; chamber++) { | |
172 | ||
173 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
174 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
175 | ||
176 | // id detection elt for chamber 1 | |
177 | Int_t id0 = (chamber+1)*100; | |
178 | ||
179 | //-------------------------------------------------------- | |
180 | // Configuration for Chamber TC1/2 (Station 1) ---------- | |
181 | ||
182 | ||
183 | // cathode 0 | |
184 | segmentation[0]->Add(id0, bendSt1); | |
185 | segmentation[0]->Add(id0 + 3, nonbendSt1); | |
186 | segmentation[0]->Add(id0 + 2, bendSt1); | |
187 | segmentation[0]->Add(id0 + 1, nonbendSt1); | |
188 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
189 | ||
190 | // cathode 1 | |
191 | segmentation[1]->Add(id0, nonbendSt1); | |
192 | segmentation[1]->Add(id0 + 3, bendSt1); | |
193 | segmentation[1]->Add(id0 + 2, nonbendSt1); | |
194 | segmentation[1]->Add(id0 + 1, bendSt1); | |
195 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
196 | ||
197 | fMUON->SetResponseModel(chamber, responseSt1); // special response | |
198 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
199 | ||
200 | } | |
201 | } | |
202 | ||
203 | //__________________________________________________________________________ | |
204 | void AliMUONFactoryV3::BuildStation2() | |
205 | { | |
206 | // | |
207 | //-------------------------------------------------------- | |
208 | // Configuration for Chamber TC3/4 (Station 2) ----------- | |
209 | ///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
210 | ||
211 | ||
212 | // Quadrant segmentations: | |
213 | AliMUONSt12QuadrantSegmentation* bendSt2 | |
214 | = new AliMUONSt12QuadrantSegmentation(kStation2, kBendingPlane); | |
215 | AliMUONSt12QuadrantSegmentation* nonbendSt2 | |
216 | = new AliMUONSt12QuadrantSegmentation(kStation2, kNonBendingPlane); | |
217 | ||
218 | // Add in the array (for safe deleting) | |
219 | fDESegmentations->Add(bendSt2); | |
220 | fDESegmentations->Add(nonbendSt2); | |
221 | ||
222 | AliMUONGeometrySegmentation* segmentation[2]; | |
223 | ||
224 | for (Int_t chamber = 2; chamber < 4; chamber++) { | |
225 | ||
226 | segmentation[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
227 | segmentation[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
228 | ||
229 | // id detection elt for chamber 1 | |
230 | Int_t id0 = (chamber+1)*100; | |
231 | ||
232 | //-------------------------------------------------------- | |
233 | // Configuration for Chamber TC3/4 (Station 2) ---------- | |
234 | ||
235 | ||
236 | // cathode 0 | |
237 | segmentation[0]->Add(id0, bendSt2); | |
238 | segmentation[0]->Add(id0 + 3, nonbendSt2); | |
239 | segmentation[0]->Add(id0 + 2, bendSt2); | |
240 | segmentation[0]->Add(id0 + 1, nonbendSt2); | |
241 | fMUON->SetSegmentationModel(chamber, 1, segmentation[0]); | |
242 | ||
243 | // cathode 1 | |
244 | segmentation[1]->Add(id0, nonbendSt2); | |
245 | segmentation[1]->Add(id0 + 3, bendSt2); | |
246 | segmentation[1]->Add(id0 + 2, nonbendSt2); | |
247 | segmentation[1]->Add(id0 + 1, bendSt2); | |
248 | fMUON->SetSegmentationModel(chamber, 2, segmentation[1]); | |
249 | ||
250 | fMUON->SetResponseModel(chamber, fResponse0); // normal response | |
251 | fMUON->Chamber(chamber).SetChargeCorrel(0.11); // 11% charge spread | |
252 | ||
253 | } | |
254 | } | |
255 | ||
256 | //_____________________________________________________________________________ | |
257 | void | |
258 | AliMUONFactoryV3::BuildChamber345(Int_t firstDetElemId, Int_t lastDetElemId) | |
259 | { | |
260 | // Build a single chamber for stations 345. | |
261 | // The first and lastDetElemId must correspond to the same chamber. | |
262 | ||
263 | Int_t ichamber = firstDetElemId/100 - 1; | |
264 | Int_t test = lastDetElemId/100-1; | |
265 | ||
266 | if ( test != ichamber ) | |
267 | { | |
268 | AliFatal(Form("DetElemIds %d and %d not part of the same chamber !", | |
269 | firstDetElemId,lastDetElemId)); | |
270 | } | |
271 | ||
272 | const Int_t NPLANES = 2; | |
273 | const AliMpPlaneType ptypes[NPLANES] = { kBendingPlane, kNonBendingPlane }; | |
274 | ||
275 | AliMUONChamber& chamber = fMUON->Chamber(ichamber); | |
276 | ||
277 | for ( Int_t iplane = 0; iplane < NPLANES; ++iplane ) | |
278 | { | |
279 | AliMUONGeometrySegmentation* segmentation = | |
280 | new AliMUONGeometrySegmentation(chamber.GetGeometry()); | |
281 | ||
282 | for ( Int_t d = firstDetElemId; d <= lastDetElemId; ++d ) | |
283 | { | |
284 | if ( !AliMUONSegmentationManager::IsValidDetElemId(d) ) | |
285 | { | |
286 | AliWarning(Form("You are requesting an invalid detElemId = %d, I am skipping it",d)); | |
287 | continue; | |
288 | } | |
289 | ||
290 | AliMUONVGeometryDESegmentation* slatSeg = | |
291 | new AliMUONSt345SlatSegmentationV2(d,ptypes[iplane]); | |
292 | ||
293 | fDESegmentations->Add(slatSeg); | |
294 | ||
295 | segmentation->Add(d,slatSeg); | |
296 | } | |
297 | ||
298 | fMUON->SetSegmentationModel(ichamber,iplane+1,segmentation); | |
299 | } | |
300 | ||
301 | fMUON->SetResponseModel(ichamber,fResponse0); | |
302 | ||
303 | chamber.SetChargeCorrel(0.11); // 11% charge spread | |
304 | } | |
305 | ||
306 | //__________________________________________________________________________ | |
307 | void AliMUONFactoryV3::BuildStation3() | |
308 | { | |
309 | BuildChamber345(500,517); | |
310 | BuildChamber345(600,617); | |
311 | } | |
312 | ||
313 | //__________________________________________________________________________ | |
314 | void AliMUONFactoryV3::BuildStation4() | |
315 | { | |
316 | BuildChamber345(700,725); | |
317 | BuildChamber345(800,825); | |
318 | } | |
319 | ||
320 | //__________________________________________________________________________ | |
321 | void AliMUONFactoryV3::BuildStation5() | |
322 | { | |
323 | BuildChamber345(900,925); | |
324 | BuildChamber345(1000,1025); | |
325 | } | |
326 | ||
327 | //__________________________________________________________________________ | |
328 | void AliMUONFactoryV3::BuildStation6() | |
329 | { | |
330 | // Create Trigger geometry segmentation for given chamber and cathod | |
331 | ||
332 | ||
333 | AliMUONGeometrySegmentation *chamberSeg[2]; | |
334 | // Cluster-size off | |
335 | AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger; | |
336 | // Cluster-size on | |
337 | // AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1; | |
338 | ||
339 | for (Int_t chamber = 10; chamber < 14; chamber++) { | |
340 | ||
341 | //Trigger Segmentation | |
342 | AliMUONTriggerSegmentation *trigSegX[9]; | |
343 | AliMUONTriggerSegmentation *trigSegY[9]; | |
344 | for(Int_t i=0; i<9; i++) { | |
345 | trigSegX[i] = new AliMUONTriggerSegmentation(1); | |
346 | trigSegY[i] = new AliMUONTriggerSegmentation(0); | |
347 | fDESegmentations->Add(trigSegX[i]); | |
348 | fDESegmentations->Add(trigSegY[i]); | |
349 | trigSegX[i]->SetLineNumber(9-i); | |
350 | trigSegY[i]->SetLineNumber(9-i); | |
351 | } | |
352 | ||
353 | AliMUONChamber *iChamber, *iChamber1; | |
354 | iChamber1 = &fMUON->Chamber(10); | |
355 | iChamber = &fMUON->Chamber(chamber); | |
356 | Float_t zpos1= - iChamber1->Z(); | |
357 | Float_t zpos = - iChamber->Z(); | |
358 | Float_t zRatio = zpos / zpos1; | |
359 | ||
360 | // init | |
361 | Float_t stripWidth[3]={0.,0.,0.}; // 1.0625 2.125 4.25 | |
362 | Float_t stripLength[4]={0.,0.,0.,0.}; // 17. 34. 51. 68. | |
363 | for (Int_t i=0; i<3; i++) | |
364 | stripWidth[i]=AliMUONTriggerConstants::StripWidth(i)*zRatio; | |
365 | for (Int_t i=0; i<4; i++) | |
366 | stripLength[i]=AliMUONTriggerConstants::StripLength(i)*zRatio; | |
367 | Int_t nStrip[7]={0,0,0,0,0,0,0}; | |
368 | Float_t stripYsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
369 | Float_t stripXsize[7]={0.,0.,0.,0.,0.,0.,0.}; | |
370 | ||
371 | // chamber 8 0 cathode 0 | |
372 | for (Int_t i=0; i<7; i++) nStrip[i]=16; | |
373 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripWidth[2]; | |
374 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
375 | stripXsize[6]=stripLength[2]; | |
376 | trigSegX[8]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
377 | trigSegX[0]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
378 | ||
379 | // chamber 8 7 1 0 cathode 1 | |
380 | for (Int_t i=0; i<6; i++) nStrip[i]=8; | |
381 | nStrip[6]=16; | |
382 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripLength[3]; | |
383 | for (Int_t i=0; i<7; i++) stripXsize[i]=stripWidth[2]; | |
384 | trigSegY[8]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
385 | trigSegY[7]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
386 | trigSegY[1]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
387 | trigSegY[0]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
388 | ||
389 | // chamber 7 6 2 1 cathode 0 | |
390 | for (Int_t i=0; i<6; i++) nStrip[i]=32; | |
391 | nStrip[6]=16; | |
392 | for (Int_t i=0; i<6; i++) stripYsize[i]=stripWidth[1]; | |
393 | stripYsize[6]=stripWidth[2]; | |
394 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
395 | stripXsize[6]=stripLength[2]; | |
396 | trigSegX[7]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
397 | trigSegX[6]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
398 | trigSegX[2]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
399 | trigSegX[1]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
400 | ||
401 | // chamber 6 2 cathode 1 | |
402 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
403 | for (Int_t i=5; i<6; i++) nStrip[i]=8; | |
404 | nStrip[6]=16; | |
405 | for (Int_t i=0; i<7; i++) stripYsize[i]=stripLength[3]; | |
406 | for (Int_t i=0; i<5; i++) stripXsize[i]=stripWidth[1]; | |
407 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
408 | trigSegY[6]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
409 | trigSegY[2]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
410 | ||
411 | // chamber 5 3 cathode 0 | |
412 | nStrip[0]=48; | |
413 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
414 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
415 | nStrip[6]=16; | |
416 | for (Int_t i=0; i<3; i++) stripYsize[i]=stripWidth[0]; | |
417 | for (Int_t i=3; i<6; i++) stripYsize[i]=stripWidth[1]; | |
418 | stripYsize[6]=stripWidth[2]; | |
419 | for (Int_t i=0; i<6; i++) stripXsize[i]=stripLength[1]; | |
420 | stripXsize[6]=stripLength[2]; | |
421 | trigSegX[5]->Init(0,nStrip,stripYsize,stripXsize,stripLength[0]); | |
422 | trigSegX[3]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
423 | ||
424 | // chamber 5 3 cathode 1 | |
425 | for (Int_t i=0; i<5; i++) nStrip[i]=16; | |
426 | for (Int_t i=5; i<6; i++) nStrip[5]=8; | |
427 | nStrip[6]=16; | |
428 | stripYsize[0]=stripLength[2]; | |
429 | for (Int_t i=1; i<7; i++) stripYsize[i]=stripLength[3]; | |
430 | for (Int_t i=0; i<5; i++) stripXsize[i]=stripWidth[1]; | |
431 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
432 | trigSegY[5]->Init(0,nStrip,stripYsize,stripXsize,stripLength[0]); | |
433 | trigSegY[3]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
434 | ||
435 | // chamber 4 cathode 0 | |
436 | nStrip[0]=0; | |
437 | for (Int_t i=1; i<3; i++) nStrip[i]=64; | |
438 | for (Int_t i=3; i<6; i++) nStrip[i]=32; | |
439 | nStrip[6]=16; | |
440 | stripYsize[0]=0.; | |
441 | for (Int_t i=1; i<3; i++) stripYsize[i]=stripWidth[0]; | |
442 | for (Int_t i=3; i<6; i++) stripYsize[i]=stripWidth[1]; | |
443 | stripYsize[6]=stripWidth[2]; | |
444 | stripXsize[0]=0; | |
445 | stripXsize[1]=stripLength[0]; | |
446 | for (Int_t i=2; i<6; i++) stripXsize[i]=stripLength[1]; | |
447 | stripXsize[6]=stripLength[2]; | |
448 | trigSegX[4]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
449 | ||
450 | // chamber 4 cathode 1 | |
451 | nStrip[0]=0; | |
452 | nStrip[1]=8; | |
453 | for (Int_t i=2; i<5; i++) nStrip[i]=16; | |
454 | for (Int_t i=5; i<6; i++) nStrip[i]=8; | |
455 | nStrip[6]=16; | |
456 | stripYsize[0]=0.; | |
457 | for (Int_t i=1; i<7; i++) stripYsize[i]=stripLength[3]; | |
458 | stripXsize[0]=0.; | |
459 | for (Int_t i=1; i<5; i++) stripXsize[i]=stripWidth[1]; | |
460 | for (Int_t i=5; i<7; i++) stripXsize[i]=stripWidth[2]; | |
461 | trigSegY[4]->Init(0,nStrip,stripYsize,stripXsize,0.); | |
462 | ||
463 | chamberSeg[0] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
464 | chamberSeg[1] = new AliMUONGeometrySegmentation(fMUON->Chamber(chamber).GetGeometry()); | |
465 | ||
466 | Int_t icount=chamber-10; // chamber counter (0 1 2 3) | |
467 | Int_t id0=(10+icount+1)*100; | |
468 | ||
469 | ||
470 | // printf("in CreateTriggerSegmentation here 0 id0=%i \n",id0); | |
471 | ||
472 | for (Int_t i = 0; i < 9; i++) { | |
473 | ||
474 | // cathode 0 | |
475 | chamberSeg[0]->Add(id0+i, trigSegX[i]); | |
476 | chamberSeg[0]->Add(id0+50+i, trigSegX[i]); | |
477 | fMUON->SetSegmentationModel(chamber, 1, chamberSeg[0]); | |
478 | ||
479 | // cathode 1 | |
480 | chamberSeg[1]->Add(id0+i, trigSegY[i]); | |
481 | chamberSeg[1]->Add(id0+50+i, trigSegY[i]); | |
482 | fMUON->SetSegmentationModel(chamber, 2, chamberSeg[1]); | |
483 | ||
484 | } | |
485 | ||
486 | fMUON->SetResponseModel(chamber, responseTrigger0); | |
487 | fMUON->Chamber(chamber).SetChargeCorrel(0); // same charge on cathodes | |
488 | ||
489 | ||
490 | // printf("in CreateTriggerSegmentation here 1\n"); | |
491 | ||
492 | if (!id0) { | |
493 | AliWarning(Form("Segmentation for chamber %d is not yet defined",chamber)); | |
494 | return ; | |
495 | } | |
496 | } | |
497 | } | |
498 | //__________________________________________________________________________ | |
499 | void AliMUONFactoryV3::Build(AliMUON* where, const char* what) | |
500 | { | |
501 | // | |
502 | // Construct MUON from chambers, segmentation and responses | |
503 | // | |
504 | ||
505 | fMUON = where; | |
506 | char tmp[20]; | |
507 | strcpy(tmp, what); | |
508 | ||
509 | if (strcmp(tmp, "default")==0) { | |
510 | // Set default parameters | |
511 | fMUON->SetIshunt(0); | |
512 | fMUON->SetMaxStepGas(0.1); | |
513 | fMUON->SetMaxStepAlu(0.1); | |
514 | ||
515 | // Build stations | |
516 | BuildCommon(); | |
517 | if (IsGeometryDefined(0)) BuildStation1(); | |
518 | if (IsGeometryDefined(2)) BuildStation2(); | |
519 | if (IsGeometryDefined(4)) BuildStation3(); | |
520 | if (IsGeometryDefined(6)) BuildStation4(); | |
521 | if (IsGeometryDefined(8)) BuildStation5(); | |
522 | if (IsGeometryDefined(10)) BuildStation6(); | |
523 | } | |
524 | else | |
525 | AliDebug(0,"Non default version of MUON selected. You have to construct yourself the MUON elements !!"); | |
526 | } | |
527 | ||
528 | //__________________________________________________________________________ | |
529 | void AliMUONFactoryV3::BuildStation(AliMUON* where, Int_t stationNumber) | |
530 | { | |
531 | // | |
532 | // Construct MUON from chambers, segmentation and responses | |
533 | // | |
534 | ||
535 | fMUON = where; | |
536 | if (!fResponse0) BuildCommon(); | |
537 | ||
538 | switch (stationNumber) { | |
539 | case 1: BuildStation1(); break; | |
540 | case 2: BuildStation2(); break; | |
541 | case 3: BuildStation3(); break; | |
542 | case 4: BuildStation4(); break; | |
543 | case 5: BuildStation5(); break; | |
544 | case 6: BuildStation6(); break; | |
545 | ||
546 | default: AliFatal("Wrong station number"); | |
547 | } | |
548 | } |