- // slot zero for Regional card
- AliMUONLocalTriggerBoard* localBoard = (AliMUONLocalTriggerBoard*)boards->At(iLoc+1);
-
- if (localBoard) { // if not empty slot
-
- if ((iLocCard = localBoard->GetNumber()) != 0) {// if notified board
-
- localMask |= (0x1 << iLoc); // local mask
- if (isFired[iLocCard]) { // if card has triggered
- locTrg = (AliMUONLocalTrigger*)localTrigger->At(iEntries);
- locCard = locTrg->LoCircuit();
- locDec = locTrg->GetLoDecision();
- trigY = 0;
- posY = locTrg->LoStripY();
- posX = locTrg->LoStripX();
- devX = locTrg->LoDev();
-
- AliDebug(4,Form("loctrg %d, posX %d, posY %d, devX %d\n",
- locTrg->LoCircuit(),locTrg->LoStripX(),locTrg->LoStripY(),locTrg->LoDev()));
- } else { //no trigger (see PRR chpt 3.4)
- locDec = 0;
- trigY = 1;
- posY = 15;
- posX = 0;
- devX = 0x8;
- // set local card id to -1
- locCard = -1;
- }
- // calculate regional input High and low Pt
- UInt_t tmp1 = (locDec >> 2) & 0x3;
- UInt_t tmp2 = locDec & 0x3;
-
- regInpHpt |= tmp1 << (30 - iLoc*2);
- regInpLpt |= tmp2 << (30 - iLoc*2);
-
- //packing word
- word = 0;
- AliBitPacking::PackWord((UInt_t)iLoc,word,19,22); //card id number in crate
- AliBitPacking::PackWord((UInt_t)locDec,word,15,18);
- AliBitPacking::PackWord((UInt_t)trigY,word,14,14);
- AliBitPacking::PackWord((UInt_t)posY,word,10,13);
- AliBitPacking::PackWord((UInt_t)devX,word,5,9);
- AliBitPacking::PackWord((UInt_t)posX,word,0,4);
-
- if (locCard == iLocCard) {
- // add local cards structure
- buffer[index++] = (locTrg->GetX1Pattern() | (locTrg->GetX2Pattern() << 16));
- buffer[index++] = (locTrg->GetX3Pattern() | (locTrg->GetX4Pattern() << 16));
- buffer[index++] = (locTrg->GetY1Pattern() | (locTrg->GetY2Pattern() << 16));
- buffer[index++] = (locTrg->GetY3Pattern() | (locTrg->GetY4Pattern() << 16));
- buffer[index++] = (Int_t)word; // data word
- if (iEntries < nEntries-1)
- iEntries++;
- } else {
- buffer[index++] = 0; // 4 words for x1, x2, y1, y2
- buffer[index++] = 0;
- buffer[index++] = 0;
- buffer[index++] = 0;
- buffer[index++] = (Int_t)word; // data word
-
- }
- } else {// number!=0
- // fill with 10CDEAD word for 'non-notified' slots
- for (Int_t i = 0; i < fLocalStruct->GetLength(); i++)
- buffer[index++] = fLocalStruct->GetDisableWord();
+ if (locTrg)
+ {
+ locDec = locTrg->GetLoDecision();
+ trigY = locTrg->LoTrigY();
+ posY = locTrg->LoStripY();
+ posX = locTrg->LoStripX();
+ devX = locTrg->LoDev();
+ sdevX = locTrg->LoSdev();
+
+ AliDebug(4,Form("loctrg %d, posX %d, posY %d, devX %d\n",
+ locTrg->LoCircuit(),locTrg->LoStripX(),locTrg->LoStripY(),locTrg->LoDev()));
+ //packing word
+ word = 0;
+ LocalWordPacking(word, (UInt_t)iLoc, (UInt_t)locDec, (UInt_t)trigY, (UInt_t)posY,
+ (UInt_t)posX, (UInt_t)sdevX, (UInt_t)devX);
+
+ buffer[index++] = (locTrg->GetX1Pattern() | (locTrg->GetX2Pattern() << 16));
+ buffer[index++] = (locTrg->GetX3Pattern() | (locTrg->GetX4Pattern() << 16));
+ buffer[index++] = (locTrg->GetY1Pattern() | (locTrg->GetY2Pattern() << 16));
+ buffer[index++] = (locTrg->GetY3Pattern() | (locTrg->GetY4Pattern() << 16));
+ buffer[index++] = (Int_t)word; // data word
+ }