48 #include <Riostream.h>
59 fkTransformer(transformer),
62 fCurrentLocalBoard(0x0)
83 AliError(Form(
"Did not get localboard %d",i));
131 fkTransformer(circuit.fkTransformer),
132 fkCurrentSeg(circuit.fkCurrentSeg),
133 fCurrentDetElem(circuit.fCurrentDetElem),
134 fCurrentLocalBoard(circuit.fCurrentLocalBoard)
155 if (
this == &circuit)
return *
this;
191 if ( iline == 5 ) --icol;
201 Int_t iLastStrip = iFirstStrip + 16;
202 Int_t iStripCircuit = 0;
205 iStripCircuit, kTRUE);
215 Int_t iFirstStripMiddle =
FirstStrip(localBoard);
216 Int_t iLastStripMiddle = iFirstStrip + 16;
219 FillXstrips(icol, iFirstStripMiddle, iLastStripMiddle,
220 iStripCircuit, kFALSE);
232 iFirstStripUp = iLastStripMiddle;
233 iLastStripUp = iFirstStripUp + 8;
243 iLastStripUp = iFirstStripUp + 8;
244 if (iline == 4) icolUp = icol - 1;
245 if (iline == 5) icolUp = icol + 1;
250 iStripCircuit, kFALSE);
275 iFirstStripDo = iFirstStripMiddle - 8;
276 iLastStripDo = iFirstStripDo + 8;
289 if (iline == 5) icolDo = icol + 1;
290 if (iline == 6) icolDo = icol - 1;
293 iFirstStripDo = (pcb->
Iymax() + 1) - 8;
294 iLastStripDo = iFirstStripDo + 8;
299 iStripCircuit, kFALSE);
314 const Int_t iFirstStrip,
const Int_t iLastStrip,
315 Int_t liStripCircuit,
const Bool_t is11)
322 Double_t xyGlobal[3] = {0.};
323 for (Int_t istrip = iFirstStrip; istrip < iLastStrip; ++istrip) {
327 StdoutToAliError(cout <<
"Pad not found in seg " << endl;
329 cout <<
" ix,iy=" << icol-1 <<
"," << istrip << endl;
336 ypos[2*liStripCircuit] = xyGlobal[1];
337 zpos[2*liStripCircuit] = xyGlobal[2];
338 ywidth[2*liStripCircuit] = 2. * yDim;
339 if (istrip != (iLastStrip - 1)) {
340 ypos[2*liStripCircuit+1] = xyGlobal[1] + yDim;
341 zpos[2*liStripCircuit+1] = xyGlobal[2];
342 ywidth[2*liStripCircuit+1] = 2. * yDim;
367 Int_t iStripCircuit = 0;
368 Int_t iFirstStrip = 0;
369 Int_t iLastStrip = 0;
370 Bool_t doubling = kFALSE;
374 if ( iline == 5 ) --icol;
382 if ( (x2u || x2m || x2d ) && x2m ) doubling = kTRUE;
386 if (zeroAllYLSB) iStripCircuit = 8;
393 iFirstStrip = pcb->
Ixmin();
396 if (doubling || zeroAllYLSB == 1) iLastStrip = iFirstStrip + 8;
397 else iLastStrip = iFirstStrip + 16;
399 FillYstrips(iFirstStrip, iLastStrip, iStripCircuit, doubling);
404 Int_t liStripCircuit,
405 const Bool_t doubling)
408 Double_t xyGlobal[3] = {0.};
410 for (Int_t istrip = iFirstStrip; istrip < iLastStrip; ++istrip) {
416 StdoutToAliError(cout <<
"Pad not found in seg " << endl;
418 cout <<
" ix,iy=" << istrip <<
"," << 0 << endl;
428 }
else if (doubling) {
431 (TMath::Abs(xyGlobal[0]) - xDim/2.), 2*liStripCircuit);
436 2*liStripCircuit + 1);
457 xyGlobal[0], xyGlobal[1], xyGlobal[2]);
468 return fXpos11[localBoardId][istrip];
473 return fYpos11[localBoardId][istrip];
479 return fYpos21[localBoardId][istrip];
485 return fZpos11[localBoardId][istrip];
491 return fZpos21[localBoardId][istrip];
515 Int_t iFirstStrip = -1;
516 Int_t boardNumber = atoi(localBoard->GetName()+6);
520 if ( iline == 5 ) --icol;
537 if (icol == 1 && iline == 6) iFirstStrip += 16;
546 Int_t istripX2=istripX+idev+1;
548 Float_t yPosX1=
fYpos11[localBoardId][istripX];
549 Float_t yPosX2=
fYpos21[localBoardId][istripX2];
550 Float_t xPosY1=
fXpos11[localBoardId][istripY];
554 Float_t z1=
fZpos11[localBoardId][istripX];
555 Float_t z2=
fZpos21[localBoardId][istripX2];
556 Float_t thetaDev=(1./TMath::Abs(zf))*(yPosX1*z2-yPosX2*z1)/(z2-z1);
557 Float_t xf=xPosY1*zf/z1;
558 Float_t yf=yPosX2-((yPosX2-yPosX1)*(z2-zf))/(z2-z1);
559 return (3.*0.3/TMath::Abs(thetaDev)) * TMath::Sqrt(xf*xf+yf*yf)/TMath::Abs(zf);
Int_t fCurrentDetElem
! current detection elt id
const AliMpVSegmentation * GetMpSegmentation(Int_t detElemId, AliMp::CathodType cath, Bool_t warn=true) const
AliMUONTriggerCircuit(const AliMUONGeometryTransformer *transformer)
Float_t GetY21Pos(Int_t localBoardId, Int_t istrip) const
static Double_t CoilZ()
Return coil z-position.
AliMpLocalBoard * GetLocalBoard(Int_t localBoardId, Bool_t warn=true) const
Int_t fCurrentLocalBoard
! current local board id
const AliMpVSegmentation * fkCurrentSeg
! current segmentation
Int_t GetDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const
Int_t GetId() const
Return the identifier (unique)
static AliMpSegmentation * Instance(Bool_t warn=true)
const AliMUONGeometryTransformer * fkTransformer
! pointer to transformation
virtual ~AliMUONTriggerCircuit()
void LoadXPos(AliMpLocalBoard *const localBoard)
void XYGlobal(const AliMpPad &pad, Double_t *xyGlobal)
A PCB for station 3,4 or 5.
AliMpSlat * GetLayer(int layer) const
static Double_t YokeZ()
Return yoke z-position.
TArrayF fZpos21[235]
Z position of X strips in MC21.
TArrayF fYpos11[235]
Y position of X strips in MC11.
Int_t GetPreviousDEfromLocalBoard(Int_t localBoardId, Int_t chamberId) const
Int_t GetSwitch(Int_t index) const
Get switch bit wise (return a inteter for backware compatibility)
Float_t GetZ11Pos(Int_t localBoardId, Int_t istrip) const
void LoadYPos(AliMpLocalBoard *const localBoard)
Class that manages the properties of the local board.
A slat (building block of stations 3, 4 and 5)
(1) indicate a change of strip pitch in Y circuit
static Int_t NofLocalBoards()
Return number of trigger local boards.
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=true) const =0
Find pad by indices.
Float_t GetZ21Pos(Int_t localBoardId, Int_t istrip) const
TArrayF fYwidth11[235]
width of X strips in MC11
AliMUONTriggerCircuit & operator=(const AliMUONTriggerCircuit &AliMUONTriggerCircuit)
Float_t PtCal(Int_t localBoardId, Int_t istripX, Int_t idev, Int_t istripY) const
static AliMpDDLStore * Instance(Bool_t warn=true)
TArrayF fZpos11[235]
Z position of X strips in MC11.
(1) reset the LSB for special configuration of board RC2L5B4 & RC2L6B1
Float_t GetY11Pos(Int_t localBoardId, Int_t istrip) const
AliMpPCB * GetPCB(Int_t i) const
Returns the i-th PCB of this slat.
MpPair_t GetPosition() const
given position (line, col)
Double_t GetPositionY() const
Return the pad x position (in cm)
AliMp::CathodType GetCathodType(Int_t cathodNumber)
Convert integer number in enum;.
TArrayF fXpos11[235]
X position of Y strips in MC11.
TArrayF fXwidth11[235]
width of Y strips in MC11
Int_t FirstStrip(AliMpLocalBoard *localBoard)
(0) information is expected from n-1 board for X input, (1) not
Bool_t IsValid() const
Return validity.
Double_t GetDimensionY() const
Return the y pad dimension - half length (in cm)
Int_t PairFirst(MpPair_t pair)
Decode the first integer from encoded pair.
void FillXstrips(const Int_t icol, const Int_t iFirstStrip, const Int_t iLastStrip, Int_t liStripCircuit, const Bool_t is11)
Class which encapsuate all information about a pad.
Float_t GetY11Width(Int_t localBoardId, Int_t istrip) const
void FillYstrips(const Int_t iFirstStrip, const Int_t iLastStrip, Int_t liStripCircuit, const Bool_t doubling)
Double_t GetPositionX() const
Return the pad x position (in cm)
TArrayF fYwidth21[235]
width of X strips in MC21
Int_t PairSecond(MpPair_t pair)
Decode the second integer from encoded pair.
TArrayF fYpos21[235]
Y position of X strips in MC21.
Float_t GetY21Width(Int_t localBoardId, Int_t istrip) const
const AliMpTrigger * GetTrigger(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
Double_t GetDimensionX() const
Return the x pad dimension - half length (in cm)
Float_t GetX11Pos(Int_t localBoardId, Int_t istrip) const
Float_t GetX11Width(Int_t localBoardId, Int_t istrip) const