Line data Source code
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 : /* $Id$ */
17 :
18 : //-----------------------------------------------------------------------------
19 : /// \class AliMUONTriggerCircuit
20 : /// Contains as data members the Y positions of the X declusturized strips and
21 : /// the X positions of the (doubled or not) Y strips.
22 : /// This is used to associate the global positions to the fired strips of the
23 : /// local trigger output (see AliMUONTrackReconstructor::MakeTriggerTrack)
24 : ///
25 : /// \author Philippe Crochet (LPCCFd)
26 : //-----------------------------------------------------------------------------
27 :
28 : #include "AliMUONTriggerCircuit.h"
29 : #include "AliMUONConstants.h"
30 : #include "AliMUONGeometryTransformer.h"
31 :
32 : #include "AliMpTrigger.h"
33 : #include "AliMpSlat.h"
34 : #include "AliMpPCB.h"
35 : #include "AliMpSegmentation.h"
36 : #include "AliMpVSegmentation.h"
37 : #include "AliMpCathodType.h"
38 : #include "AliMpDDLStore.h"
39 : #include "AliMpLocalBoard.h"
40 : #include "AliMpConstants.h"
41 : #include "AliMpPad.h"
42 : #include "AliMpEncodePair.h"
43 :
44 : #include "AliRun.h"
45 : #include "AliLog.h"
46 :
47 : #include <TMath.h>
48 : #include <Riostream.h>
49 :
50 : using std::cout;
51 : using std::endl;
52 : /// \cond CLASSIMP
53 18 : ClassImp(AliMUONTriggerCircuit)
54 : /// \endcond
55 :
56 : //----------------------------------------------------------------------
57 7536 : AliMUONTriggerCircuit::AliMUONTriggerCircuit(const AliMUONGeometryTransformer* transformer)
58 2 : : TObject(),
59 2 : fkTransformer(transformer),
60 2 : fkCurrentSeg(0x0),
61 2 : fCurrentDetElem(0x0),
62 2 : fCurrentLocalBoard(0x0)
63 10 : {
64 : /// Constructor
65 :
66 940 : for (Int_t i = 1; i < AliMpConstants::NofLocalBoards()+1; ++i) {
67 468 : fXpos11[i].Set(16);
68 468 : fYpos11[i].Set(32);
69 468 : fYpos21[i].Set(64);
70 468 : fZpos11[i].Set(32);
71 468 : fZpos21[i].Set(64);
72 468 : fXwidth11[i].Set(16);
73 468 : fYwidth11[i].Set(32);
74 468 : fYwidth21[i].Set(64);
75 : }
76 :
77 940 : for (Int_t i = 1; i < AliMpConstants::NofLocalBoards()+1; ++i) { // board begins at 1
78 :
79 936 : AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(i);
80 :
81 468 : if (!localBoard)
82 : {
83 0 : AliError(Form("Did not get localboard %d",i));
84 0 : continue;
85 : }
86 :
87 468 : LoadXPos(localBoard);
88 468 : LoadYPos(localBoard);
89 : /*
90 : printf("LocalBoard %03d \n",i);
91 : printf("fXpos11 \n");
92 : for (Int_t i1 = 0; i1 < 16; i1++)
93 : printf("%02d %7.2f \n",i1,fXpos11[i][i1]);
94 : printf("fYpos11 \n");
95 : for (Int_t i2 = 0; i2 < 32; i2++)
96 : printf("%02d %7.2f \n",i2,fYpos11[i][i2]);
97 : printf("fYpos21 \n");
98 : for (Int_t i3 = 0; i3 < 64; i3++)
99 : printf("%02d %7.2f \n",i3,fYpos21[i][i3]);
100 : printf("fZpos11 \n");
101 : for (Int_t i4 = 0; i4 < 32; i4++)
102 : printf("%02d %8.2f \n",i4,fZpos11[i][i4]);
103 : printf("fZpos21 \n");
104 : for (Int_t i5 = 0; i5 < 64; i5++)
105 : printf("%02d %8.2f \n",i5,fZpos21[i][i5]);
106 : */
107 468 : }
108 :
109 4 : }
110 :
111 : //----------------------------------------------------------------------
112 : AliMUONTriggerCircuit::~AliMUONTriggerCircuit()
113 12 : {
114 : /// Destructor
115 940 : for (Int_t i = 1; i < AliMpConstants::NofLocalBoards()+1; ++i) {
116 468 : fXpos11[i].Reset();
117 468 : fYpos11[i].Reset();
118 468 : fYpos21[i].Reset();
119 468 : fZpos11[i].Reset();
120 468 : fZpos21[i].Reset();
121 468 : fXwidth11[i].Reset();
122 468 : fYwidth11[i].Reset();
123 468 : fYwidth21[i].Reset();
124 : }
125 :
126 3782 : }
127 :
128 : //----------------------------------------------------------------------
129 0 : AliMUONTriggerCircuit::AliMUONTriggerCircuit(const AliMUONTriggerCircuit& circuit)
130 0 : : TObject(circuit),
131 0 : fkTransformer(circuit.fkTransformer), // do not copy, just pointed to
132 0 : fkCurrentSeg(circuit.fkCurrentSeg),
133 0 : fCurrentDetElem(circuit.fCurrentDetElem),
134 0 : fCurrentLocalBoard(circuit.fCurrentLocalBoard)
135 0 : {
136 : /// Copy constructor
137 :
138 0 : for (Int_t i = 1; i < AliMpConstants::NofLocalBoards()+1; ++i) {
139 0 : fXpos11[i] = circuit.fXpos11[i];
140 0 : fYpos11[i] = circuit.fYpos11[i];
141 0 : fYpos21[i] = circuit.fYpos21[i];
142 0 : fZpos11[i] = circuit.fZpos11[i];
143 0 : fZpos21[i] = circuit.fZpos21[i];
144 0 : fXwidth11[i] = circuit.fXwidth11[i];
145 0 : fYwidth11[i] = circuit.fYwidth11[i];
146 0 : fYwidth21[i] = circuit.fYwidth21[i];
147 : }
148 :
149 0 : }
150 : //----------------------------------------------------------------------
151 : AliMUONTriggerCircuit& AliMUONTriggerCircuit::operator=(const AliMUONTriggerCircuit& circuit)
152 : {
153 : /// Assignment operator
154 :
155 0 : if (this == &circuit) return *this;
156 :
157 0 : fkTransformer = circuit.fkTransformer;
158 0 : fkCurrentSeg = circuit.fkCurrentSeg;
159 0 : fCurrentDetElem = circuit.fCurrentDetElem;
160 0 : fCurrentLocalBoard = circuit.fCurrentLocalBoard;
161 :
162 0 : for (Int_t i = 1; i < AliMpConstants::NofLocalBoards()+1; ++i) {
163 0 : fXpos11[i] = circuit.fXpos11[i];
164 0 : fYpos11[i] = circuit.fYpos11[i];
165 0 : fYpos21[i] = circuit.fYpos21[i];
166 0 : fZpos11[i] = circuit.fZpos11[i];
167 0 : fZpos21[i] = circuit.fZpos21[i];
168 0 : fXwidth11[i] = circuit.fXwidth11[i];
169 0 : fYwidth11[i] = circuit.fYwidth11[i];
170 0 : fYwidth21[i] = circuit.fYwidth21[i];
171 : }
172 :
173 0 : return *this;
174 :
175 0 : }
176 :
177 : //---------------------------------------------------------------------
178 : void AliMUONTriggerCircuit::LoadYPos(AliMpLocalBoard* const localBoard)
179 : {
180 : /// fill fYpos11 and fYpos21 -> y position of X declusterized strips
181 :
182 936 : fCurrentLocalBoard = localBoard->GetId();
183 : Int_t ichamber = 0;
184 : Int_t icathode = 0;
185 :
186 468 : Int_t zeroDown = localBoard->GetSwitch(AliMpLocalBoard::kZeroDown);
187 468 : Int_t zeroUp = localBoard->GetSwitch(AliMpLocalBoard::kZeroUp);
188 :
189 468 : Int_t iline = AliMp::PairFirst(localBoard->GetPosition());
190 468 : Int_t icol = AliMp::PairSecond(localBoard->GetPosition());
191 528 : if ( iline == 5 ) --icol;
192 :
193 : //--- first plane
194 : ichamber = 10;
195 468 : fCurrentDetElem = AliMpDDLStore::Instance()->GetDEfromLocalBoard(fCurrentLocalBoard, ichamber);
196 :
197 936 : fkCurrentSeg = AliMpSegmentation::Instance()
198 468 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
199 :
200 468 : Int_t iFirstStrip = FirstStrip(localBoard);
201 468 : Int_t iLastStrip = iFirstStrip + 16;
202 : Int_t iStripCircuit = 0;
203 :
204 468 : FillXstrips(icol, iFirstStrip, iLastStrip,
205 : iStripCircuit, kTRUE);
206 :
207 : //--- second plane
208 : ichamber = 12;
209 468 : fCurrentDetElem = AliMpDDLStore::Instance()->GetDEfromLocalBoard(fCurrentLocalBoard, ichamber);
210 :
211 936 : fkCurrentSeg = AliMpSegmentation::Instance()
212 468 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
213 :
214 : // second plane middle part
215 468 : Int_t iFirstStripMiddle = FirstStrip(localBoard);
216 : Int_t iLastStripMiddle = iFirstStrip + 16;
217 : iStripCircuit = 8;
218 :
219 468 : FillXstrips(icol, iFirstStripMiddle, iLastStripMiddle,
220 : iStripCircuit, kFALSE);
221 :
222 : // second plane upper part
223 468 : if (zeroUp == 0) { // something up
224 : Int_t iFirstStripUp;
225 : Int_t iLastStripUp;
226 : Int_t icolUp = icol;
227 :
228 : // check if we need to move to another detElemId
229 436 : AliMpPad pad = fkCurrentSeg->PadByIndices(icol-1,iLastStripMiddle+1,kFALSE);
230 :
231 436 : if (pad.IsValid()) { // upper strips within same detElemId
232 : iFirstStripUp = iLastStripMiddle;
233 220 : iLastStripUp = iFirstStripUp + 8;
234 :
235 220 : } else { // upper strips in another detElemId
236 648 : fCurrentDetElem = AliMpDDLStore::Instance()->
237 216 : GetNextDEfromLocalBoard(fCurrentLocalBoard, ichamber);
238 :
239 648 : fkCurrentSeg = AliMpSegmentation::Instance()
240 216 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
241 :
242 : iFirstStripUp = 0;
243 : iLastStripUp = iFirstStripUp + 8;
244 240 : if (iline == 4) icolUp = icol - 1; // special case
245 240 : if (iline == 5) icolUp = icol + 1; // special case
246 : }
247 :
248 : iStripCircuit = 24;
249 436 : FillXstrips(icolUp, iFirstStripUp, iLastStripUp,
250 : iStripCircuit, kFALSE);
251 :
252 : // fill strip between middle and upper part
253 2180 : fYpos21[fCurrentLocalBoard][47] = (fYpos21[fCurrentLocalBoard][46] +
254 1308 : fYpos21[fCurrentLocalBoard][48])/2.;
255 2180 : fZpos21[fCurrentLocalBoard][47] = (fZpos21[fCurrentLocalBoard][46] +
256 1308 : fZpos21[fCurrentLocalBoard][48])/2.;
257 2180 : fYwidth21[fCurrentLocalBoard][47] = (fYwidth21[fCurrentLocalBoard][46] +
258 1308 : fYwidth21[fCurrentLocalBoard][48])/2.;
259 436 : } // end of something up
260 :
261 : // restore current detElemId & segmentation
262 468 : fCurrentDetElem = AliMpDDLStore::Instance()->GetDEfromLocalBoard(fCurrentLocalBoard, ichamber);
263 936 : fkCurrentSeg = AliMpSegmentation::Instance()
264 468 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
265 :
266 : // second plane lower part
267 468 : if (zeroDown == 0) { // something down
268 : Int_t iFirstStripDo;
269 : Int_t iLastStripDo;
270 : Int_t icolDo = icol;
271 :
272 : // check if we need to move to another detElemId
273 436 : AliMpPad pad = fkCurrentSeg->PadByIndices(icol-1,iFirstStripMiddle-1,kFALSE);
274 436 : if (pad.IsValid()) { // lower strips within same detElemId
275 220 : iFirstStripDo = iFirstStripMiddle - 8;
276 : iLastStripDo = iFirstStripDo + 8;
277 :
278 220 : } else { // lower strips in another detElemId
279 648 : fCurrentDetElem = AliMpDDLStore::Instance()
280 216 : ->GetPreviousDEfromLocalBoard(fCurrentLocalBoard, ichamber);
281 :
282 648 : fkCurrentSeg = AliMpSegmentation::Instance()
283 216 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
284 :
285 : // get iFirstStrip in this module
286 432 : const AliMpTrigger* t = AliMpSegmentation::Instance()->GetTrigger(fkCurrentSeg);
287 216 : const AliMpSlat* slat = t->GetLayer(0);
288 :
289 240 : if (iline == 5) icolDo = icol + 1; // special case
290 240 : if (iline == 6) icolDo = icol - 1; // special case
291 :
292 216 : const AliMpPCB* pcb = slat->GetPCB(icolDo-1);
293 432 : iFirstStripDo = (pcb->Iymax() + 1) - 8;
294 : iLastStripDo = iFirstStripDo + 8;
295 : }
296 :
297 : iStripCircuit = 0;
298 436 : FillXstrips(icolDo, iFirstStripDo, iLastStripDo,
299 : iStripCircuit, kFALSE);
300 :
301 : // fill strip between middle and upper part
302 2180 : fYpos21[fCurrentLocalBoard][15] = (fYpos21[fCurrentLocalBoard][14] +
303 1308 : fYpos21[fCurrentLocalBoard][16])/2.;
304 2180 : fZpos21[fCurrentLocalBoard][15] = (fZpos21[fCurrentLocalBoard][14] +
305 1308 : fZpos21[fCurrentLocalBoard][16])/2.;
306 2180 : fYwidth21[fCurrentLocalBoard][15] = (fYwidth21[fCurrentLocalBoard][14] +
307 1308 : fYwidth21[fCurrentLocalBoard][16])/2.;
308 436 : } // end of something down
309 :
310 468 : }
311 :
312 : //----------------------------------------------------------------------
313 : void AliMUONTriggerCircuit::FillXstrips(const Int_t icol,
314 : const Int_t iFirstStrip, const Int_t iLastStrip,
315 : Int_t liStripCircuit, const Bool_t is11)
316 : {
317 : /// fill
318 1808 : TArrayF& ypos = (is11) ? fYpos11[fCurrentLocalBoard] : fYpos21[fCurrentLocalBoard];
319 1808 : TArrayF& zpos = (is11) ? fZpos11[fCurrentLocalBoard] : fZpos21[fCurrentLocalBoard];
320 1808 : TArrayF& ywidth = (is11) ? fYwidth11[fCurrentLocalBoard] : fYwidth21[fCurrentLocalBoard];
321 :
322 1808 : Double_t xyGlobal[3] = {0.};
323 47520 : for (Int_t istrip = iFirstStrip; istrip < iLastStrip; ++istrip) {
324 :
325 21952 : AliMpPad pad = fkCurrentSeg->PadByIndices(icol-1,istrip,kTRUE);
326 21952 : if ( !pad.IsValid() ) {
327 0 : StdoutToAliError(cout << "Pad not found in seg " << endl;
328 : fkCurrentSeg->Print();
329 : cout << " ix,iy=" << icol-1 << "," << istrip << endl;
330 : );
331 0 : }
332 21952 : Float_t yDim = pad.GetDimensionY(); // half size!
333 :
334 21952 : XYGlobal(pad,xyGlobal);
335 :
336 43904 : ypos[2*liStripCircuit] = xyGlobal[1];
337 43904 : zpos[2*liStripCircuit] = xyGlobal[2];
338 43904 : ywidth[2*liStripCircuit] = 2. * yDim;
339 21952 : if (istrip != (iLastStrip - 1)) {
340 40288 : ypos[2*liStripCircuit+1] = xyGlobal[1] + yDim;
341 40288 : zpos[2*liStripCircuit+1] = xyGlobal[2];
342 40288 : ywidth[2*liStripCircuit+1] = 2. * yDim;
343 20144 : }
344 21952 : liStripCircuit++;
345 21952 : }
346 1808 : }
347 :
348 :
349 : //----------------------------------------------------------------------
350 : void AliMUONTriggerCircuit::LoadXPos(AliMpLocalBoard* const localBoard)
351 : {
352 : /// fill fXpos11 -> x position of Y strips for the first plane only
353 : /// fXpos11 contains the x position of Y strip for the current circuit
354 : /// taking into account whether or nor not part(s) of the circuit
355 : /// (middle, up or down) has(have) 16 strips (handdled by means of switchs)
356 :
357 936 : fCurrentLocalBoard = localBoard->GetId();
358 :
359 : Int_t ichamber = 10;
360 : Int_t icathode = 1;
361 :
362 468 : Int_t x2u = localBoard->GetSwitch(AliMpLocalBoard::kX2u);
363 468 : Int_t x2m = localBoard->GetSwitch(AliMpLocalBoard::kX2m);
364 468 : Int_t x2d = localBoard->GetSwitch(AliMpLocalBoard::kX2d);
365 468 : Int_t zeroAllYLSB = localBoard->GetSwitch(AliMpLocalBoard::kZeroAllYLSB);
366 :
367 : Int_t iStripCircuit = 0;
368 : Int_t iFirstStrip = 0;
369 : Int_t iLastStrip = 0;
370 : Bool_t doubling = kFALSE;
371 :
372 468 : Int_t iline = AliMp::PairFirst(localBoard->GetPosition());
373 468 : Int_t icol = AliMp::PairSecond(localBoard->GetPosition());
374 528 : if ( iline == 5 ) --icol;
375 :
376 468 : fCurrentDetElem = AliMpDDLStore::Instance()->GetDEfromLocalBoard(fCurrentLocalBoard, ichamber);
377 :
378 936 : fkCurrentSeg = AliMpSegmentation::Instance()
379 468 : ->GetMpSegmentation(fCurrentDetElem, AliMp::GetCathodType(icathode));
380 :
381 : // check if one needs a strip doubling or not
382 652 : if ( (x2u || x2m || x2d ) && x2m ) doubling = kTRUE;
383 :
384 :
385 : // check if one starts at strip = 0 or 8 (boards 26-29 and 143-146)
386 484 : if (zeroAllYLSB) iStripCircuit = 8;
387 :
388 : // get iFirstStrip in this module
389 468 : const AliMpTrigger* t = AliMpSegmentation::Instance()->GetTrigger(fkCurrentSeg);
390 468 : const AliMpSlat* slat = t->GetLayer(0);
391 :
392 468 : const AliMpPCB* pcb = slat->GetPCB(icol-1);
393 468 : iFirstStrip = pcb->Ixmin();
394 :
395 :
396 668 : if (doubling || zeroAllYLSB == 1) iLastStrip = iFirstStrip + 8;
397 268 : else iLastStrip = iFirstStrip + 16;
398 :
399 468 : FillYstrips(iFirstStrip, iLastStrip, iStripCircuit, doubling);
400 468 : }
401 :
402 : //----------------------------------------------------------------------
403 : void AliMUONTriggerCircuit::FillYstrips(const Int_t iFirstStrip, const Int_t iLastStrip,
404 : Int_t liStripCircuit,
405 : const Bool_t doubling)
406 : {
407 : /// fill
408 468 : Double_t xyGlobal[3] = {0.};
409 :
410 12712 : for (Int_t istrip = iFirstStrip; istrip < iLastStrip; ++istrip) {
411 :
412 5888 : AliMpPad pad = fkCurrentSeg->PadByIndices(istrip,0,kTRUE);
413 :
414 5888 : if ( !pad.IsValid() )
415 : {
416 0 : StdoutToAliError(cout << "Pad not found in seg " << endl;
417 : fkCurrentSeg->Print();
418 : cout << " ix,iy=" << istrip << "," << 0 << endl;
419 : );
420 0 : }
421 5888 : Float_t xDim = pad.GetDimensionX(); // half size!
422 :
423 5888 : XYGlobal(pad,xyGlobal);
424 :
425 5888 : if (!doubling) {
426 4416 : fXpos11[fCurrentLocalBoard].AddAt(xyGlobal[0], liStripCircuit);
427 4416 : fXwidth11[fCurrentLocalBoard].AddAt(2. * xDim, liStripCircuit);
428 1472 : } else if (doubling) {
429 :
430 4416 : fXpos11[fCurrentLocalBoard].AddAt(TMath::Sign(1.,xyGlobal[0]) *
431 2944 : (TMath::Abs(xyGlobal[0]) - xDim/2.), 2*liStripCircuit);
432 1472 : fXwidth11[fCurrentLocalBoard].AddAt(2. * xDim, 2*liStripCircuit);
433 :
434 4416 : fXpos11[fCurrentLocalBoard].AddAt(TMath::Sign(1.,xyGlobal[0]) *
435 2944 : (TMath::Abs(fXpos11[fCurrentLocalBoard][2*liStripCircuit]) + xDim),
436 1472 : 2*liStripCircuit + 1);
437 1472 : fXwidth11[fCurrentLocalBoard].AddAt(2. * xDim, 2*liStripCircuit + 1);
438 : }
439 :
440 5888 : liStripCircuit++;
441 5888 : }
442 468 : }
443 :
444 : //----------------------------------------------------------------------
445 : void AliMUONTriggerCircuit::XYGlobal(const AliMpPad& pad,
446 : Double_t* xyGlobal)
447 : {
448 : /// returns pad x & y positions and x & y pad dimensions in global coordinates
449 : /// note: no need for transformation for pad dimensions
450 :
451 : // get the pad position and dimensions
452 55680 : Double_t xl1 = pad.GetPositionX();
453 27840 : Double_t yl1 = pad.GetPositionY();
454 :
455 : // positions from local to global
456 55680 : fkTransformer->Local2Global(fCurrentDetElem, xl1, yl1, 0,
457 27840 : xyGlobal[0], xyGlobal[1], xyGlobal[2]);
458 27840 : }
459 :
460 :
461 : //----------------------------------------------------------------------
462 : //--- methods which return member data related info
463 : //----------------------------------------------------------------------
464 : //----------------------------------------------------------------------
465 : Float_t AliMUONTriggerCircuit::GetX11Pos(Int_t localBoardId, Int_t istrip) const
466 : {
467 : /// returns X position of Y strip istrip in MC11
468 28 : return fXpos11[localBoardId][istrip];
469 : }
470 : Float_t AliMUONTriggerCircuit::GetY11Pos(Int_t localBoardId, Int_t istrip) const
471 : {
472 : /// returns Y position of X strip istrip in MC11
473 28 : return fYpos11[localBoardId][istrip];
474 : }
475 : //----------------------------------------------------------------------
476 : Float_t AliMUONTriggerCircuit::GetY21Pos(Int_t localBoardId, Int_t istrip) const
477 : {
478 : /// returns Y position of X strip istrip in MC21
479 28 : return fYpos21[localBoardId][istrip];
480 : }
481 : //----------------------------------------------------------------------
482 : Float_t AliMUONTriggerCircuit::GetZ11Pos(Int_t localBoardId, Int_t istrip) const
483 : {
484 : /// returns Z position of X strip istrip in MC11
485 28 : return fZpos11[localBoardId][istrip];
486 : }
487 : //----------------------------------------------------------------------
488 : Float_t AliMUONTriggerCircuit::GetZ21Pos(Int_t localBoardId, Int_t istrip) const
489 : {
490 : /// returns Z position of X strip istrip in MC21
491 28 : return fZpos21[localBoardId][istrip];
492 : }
493 : Float_t AliMUONTriggerCircuit::GetX11Width(Int_t localBoardId, Int_t istrip) const
494 : {
495 : /// returns width of Y strip istrip in MC11
496 28 : return fXwidth11[localBoardId][istrip];
497 : }
498 : Float_t AliMUONTriggerCircuit::GetY11Width(Int_t localBoardId, Int_t istrip) const
499 : {
500 : /// returns width of X strip istrip in MC11
501 28 : return fYwidth11[localBoardId][istrip];
502 : }
503 : //----------------------------------------------------------------------
504 : Float_t AliMUONTriggerCircuit::GetY21Width(Int_t localBoardId, Int_t istrip) const
505 : {
506 : /// returns width of X strip istrip in MC21
507 28 : return fYwidth21[localBoardId][istrip];
508 : }
509 :
510 : //----------------------------------------------------------------------
511 : Int_t AliMUONTriggerCircuit::FirstStrip(AliMpLocalBoard* localBoard)
512 : {
513 : /// returns the first strip from mapping for board boardName
514 : /// take care of special case for boards RC1L6B12 & LC1L6B12
515 : Int_t iFirstStrip = -1;
516 1872 : Int_t boardNumber = atoi(localBoard->GetName()+6);
517 :
518 936 : Int_t iline = AliMp::PairFirst(localBoard->GetPosition());
519 936 : Int_t icol = AliMp::PairSecond(localBoard->GetPosition());
520 1056 : if ( iline == 5 ) --icol;
521 :
522 1872 : switch (boardNumber)
523 : {
524 : case 12:
525 : iFirstStrip = 0;
526 496 : break;
527 : case 34:
528 : iFirstStrip = 16;
529 328 : break;
530 : case 56:
531 : iFirstStrip = 32;
532 64 : break;
533 : case 78:
534 : iFirstStrip = 48;
535 48 : break;
536 : }
537 960 : if (icol == 1 && iline == 6) iFirstStrip += 16; // special case
538 936 : return iFirstStrip;
539 : }
540 :
541 : //----------------------------------------------------------------------
542 : Float_t AliMUONTriggerCircuit::PtCal(Int_t localBoardId, Int_t istripX, Int_t idev, Int_t istripY) const{
543 : /// returns calculated pt for circuit/istripX/idev/istripY according
544 : /// to the formula of the TRD. Note : idev (input) is in [0+30]
545 :
546 0 : Int_t istripX2=istripX+idev+1; // find istripX2 using istripX and idev
547 :
548 0 : Float_t yPosX1=fYpos11[localBoardId][istripX];
549 0 : Float_t yPosX2=fYpos21[localBoardId][istripX2];
550 0 : Float_t xPosY1=fXpos11[localBoardId][istripY];
551 :
552 : // Z distance between IP and center of dipole
553 0 : Float_t zf= 0.5 *(AliMUONConstants::CoilZ() + AliMUONConstants::YokeZ());
554 0 : Float_t z1=fZpos11[localBoardId][istripX];
555 0 : Float_t z2=fZpos21[localBoardId][istripX2];
556 0 : Float_t thetaDev=(1./TMath::Abs(zf))*(yPosX1*z2-yPosX2*z1)/(z2-z1);
557 0 : Float_t xf=xPosY1*zf/z1;
558 0 : Float_t yf=yPosX2-((yPosX2-yPosX1)*(z2-zf))/(z2-z1);
559 0 : return (3.*0.3/TMath::Abs(thetaDev)) * TMath::Sqrt(xf*xf+yf*yf)/TMath::Abs(zf);
560 : }
|