]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- extend the range of "numbered" boards from 234 to 242 by adding the 8
authorVULPESCU Bogdan <vulpescu@clermont.in2p3.fr>
Mon, 16 Dec 2013 14:15:24 +0000 (15:15 +0100)
committerVULPESCU Bogdan <vulpescu@clermont.in2p3.fr>
Mon, 16 Dec 2013 14:15:24 +0000 (15:15 +0100)
  interface boards (in LocalTriggerBoard, TriggerStoreV1, TriggerCrateStore)

- LocalTriggerBoard

  - eliminated functions: Setbit, Set/Get X34 and Y (where doing copies without
    considering the masks of the destination board)

  - modified functions: SetbitM (simplified), GetNumber, IsNotified (the
    interface cards receive a number different from zero so they are identified
    by the function IsNotified)

- DigitMaker::ReadTriggerDDL - add all boards to the trigger store

                   ::TriggerDigits - for the interface boards, use instead of
                   their own number (> 234) the one of the board where they
                   receive the x-strip information from, since it is used in
                   functions which do not accept values larger then 234

- TriggerElectronics - eliminate the function SetCopyInput with the
                       corresponding variable containers

                   ::Feed(AliMUONDigitStore*) - introduce the case of the
                   columns with 22 boards in x-copy and take it out from
                   FeedCopyNeighbours

                   ::FeedCopyNeighbours - here fill only the (physical) up/down
                   boards

                   ::LoadMasks - read all masks from the calibration file
                   (interface boards included)

                   :: LocalResponse - use IsNotified instead of GetNumber to
                   identify the interface boards

                   ::Digits2Trigger - use all boards

- AliMUONTriggerQADataMakerRec
  - Fill the trigger information from all local structures (including copy
    boards)

- AliMUONTriggerUtilities
  - mask strip if ALL of the local boards reading it are masked

(Diego Stocco)

MUON/AliMUONDigitMaker.cxx
MUON/AliMUONLocalTriggerBoard.cxx
MUON/AliMUONLocalTriggerBoard.h
MUON/AliMUONTriggerCrateStore.cxx
MUON/AliMUONTriggerElectronics.cxx
MUON/AliMUONTriggerElectronics.h
MUON/AliMUONTriggerQADataMakerRec.cxx
MUON/AliMUONTriggerStoreV1.cxx
MUON/AliMUONTriggerUtilities.cxx

index 3463933c7784c5c92cefefc97d0de6947f16554b..0d78f303138698642c9e227a3a536b9fbd7d134a 100644 (file)
@@ -360,21 +360,16 @@ AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader)
         // if card exist
         if (localStruct) {
           
-         loCircuit = crate->GetLocalBoardId(localStruct->GetId());
-
-         if ( !loCircuit ) continue; // empty slot
-
-         AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(loCircuit, kTRUE);
-
-         // skip copy cards
-         if( !localBoard->IsNotified()) 
-            continue;
+          loCircuit = crate->GetLocalBoardId(localStruct->GetId());
+          
+          if ( !loCircuit ) continue; // empty slot
+          
           
           if (fTriggerStore)
           {
             // fill local trigger
             AliMUONLocalTrigger localTrigger;
-           localTrigger.SetLocalStruct(loCircuit, *localStruct);
+            localTrigger.SetLocalStruct(loCircuit, *localStruct);
             fTriggerStore->Add(localTrigger);
           }
           
@@ -383,8 +378,8 @@ AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader)
             //FIXEME should find something better than a TArray
             TArrayS xyPattern[2];
             
-           localStruct->GetXPattern(xyPattern[0]);
-           localStruct->GetYPattern(xyPattern[1]);
+            localStruct->GetXPattern(xyPattern[0]);
+            localStruct->GetYPattern(xyPattern[1]);
             
             TriggerDigits(loCircuit, xyPattern, *fDigitStore);
           }
@@ -408,6 +403,13 @@ Int_t AliMUONDigitMaker::TriggerDigits(Int_t nBoard,
   Int_t detElemId;
 
   AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(nBoard);
+  
+  if ( ! localBoard->IsNotified() ) {
+    // Copy board
+    // The mapping is not correct for copy boards
+    // Use the one of corresponding phyiscal board
+    nBoard = localBoard->GetInputXfrom();
+  }
 
   Int_t n,b;
 
index 25fc4be82cf0a5e7edf09fb329eab98440ec3a17..5566d951350df9f53f03c69502e47c778545c972 100644 (file)
@@ -206,17 +206,6 @@ AliMUONLocalTriggerBoard::~AliMUONLocalTriggerBoard()
 }
 
 
-//___________________________________________
-Int_t AliMUONLocalTriggerBoard::GetNumber() const 
-{
-/// return board number for notified boards
-
-    if (fMpLocalBoard->IsNotified())
-       return fMpLocalBoard->GetId();
-    else 
-       return 0;
-}
-
 //___________________________________________
 void AliMUONLocalTriggerBoard::Reset()
 {
@@ -249,50 +238,12 @@ void AliMUONLocalTriggerBoard::ResetResponse()
 }
 
 
-//___________________________________________
-void AliMUONLocalTriggerBoard::Setbit(Int_t strip, Int_t cathode, Int_t chamber)
-{
-/// 0 .. LBS   :   N-1 .. MSB
-   TBits w, m;
-
-   UShort_t xy = fXY[cathode][chamber], mask = fMask[cathode][chamber];
-
-   w.Set(16,&xy);
-   m.Set(16,&mask);
-
-   Int_t s = strip - int(strip / 16) * 16;
-
-   w.SetBitNumber(s);
-   
-   w &= m;
-
-   UShort_t value;
-
-   w.Get(&value);
-
-   fXY[cathode][chamber] = value;
-}
-
 //___________________________________________
 void AliMUONLocalTriggerBoard::SetbitM(Int_t strip, Int_t cathode, Int_t chamber)
 {
 /// 0 .. LBS   :   N-1 .. MSB
-   TBits w, m;
-
-   UShort_t xy = fXY[cathode][chamber], mask = fMask[cathode][chamber];
-
-   w.Set(16,&xy);
-   m.Set(16,&mask);
-
-   w.SetBitNumber(strip);
-   
-   w &= m;
-
-   UShort_t value;
-
-   w.Get(&value);
-
-   fXY[cathode][chamber] = value;
+  UShort_t stripBit = ( (1<<strip) & 0xFFFF );
+  fXY[cathode][chamber] |= ( stripBit & fMask[cathode][chamber] );
 }
 
 
index eb6f9c4e1eeee7cba03c3c92c9c7ae832c21b96a..f3c4c4bbafe55ac3cad39003634c4da51dc29bce 100644 (file)
@@ -32,8 +32,7 @@ class AliMUONLocalTriggerBoard : public AliMUONTriggerBoard
       void             SetLUT(AliMUONTriggerLut* lut) { fLUT = lut; }
                        /// Set Coinc 44 (0/1 = coinc34/coinc44)
       void             SetCoinc44(Int_t coinc44=0) { fCoinc44 = coinc44; }
-      
-      virtual void     Setbit(Int_t strip, Int_t cathode, Int_t chamber);
+    
       virtual void     SetbitM(Int_t strip, Int_t cathode, Int_t chamber);
 
       virtual void     Pattern(const Option_t *option = "X Y") const; // default option displays X then Y bp
@@ -49,24 +48,14 @@ class AliMUONLocalTriggerBoard : public AliMUONTriggerBoard
       virtual Bool_t   GetTC() const {return fMpLocalBoard->GetTC();}
 
                        /// Return Board number
-      virtual Int_t    GetNumber() const;
+      virtual Int_t    GetNumber() const { return fMpLocalBoard->GetId(); }
+    
+      /// Is notified (copy boards are not)
+      virtual Bool_t    IsNotified() const { return fMpLocalBoard->IsNotified(); }
 
                        /// Return Crate name
       virtual TString  GetCrate() const {return fMpLocalBoard->GetCrate();}
 
-
-                       /// Return X34
-      virtual void     GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];}
-
-                       /// Set X34
-      virtual void     SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];}
-
-                       /// Return Y
-      virtual void     GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];}
-
-                       /// Set Y
-      virtual void     SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];}
-
                        /// Return XY
       virtual void     GetXY(UShort_t XY[2][4]) const {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) XY[i][j] = fXY[i][j];}
 
index 28ec0bc0049edc78bcc96cff37505e2ae340fa5d..39bb4208c02cfd3f6585c4fc9e13532e37c9d1e9 100644 (file)
@@ -256,9 +256,7 @@ AliMUONTriggerCrateStore::ReadFromFile(AliMUONCalibrationData* calibData)
       board->SetLUT(lut);
 
       
-       if (localBoardMapping->IsNotified()) {
-         fLocalBoards->Add(localBoardId, board);
-       }
+    fLocalBoards->Add(localBoardId, board);
       
        crate->AddBoard(board, slot);
       
index 13fc26cc12a883baa82ce9884f2b1546cd7610b3..9104af8f87ebe7d6d98132fcc22d3d137c7e2018 100644 (file)
@@ -79,12 +79,6 @@ AliMUONTriggerElectronics::AliMUONTriggerElectronics(AliMUONCalibrationData* cal
  /// CONSTRUCTOR
 ///
 
-  for (Int_t i = 0; i < 2; ++i) {
-    fCopyXInput[i] = new TList();
-    fCopyXInput[i]->SetOwner();
-    fCopyYInput[i] = new TList();
-    fCopyYInput[i]->SetOwner();
-  }
 
   // force loading of mapping if not already done
   if ( !AliMpDDLStore::Instance(kFALSE) )
@@ -92,7 +86,6 @@ AliMUONTriggerElectronics::AliMUONTriggerElectronics(AliMUONCalibrationData* cal
     AliMpCDB::LoadDDLStore();
   }
   
-  SetCopyInput();
   
   Factory(calibData);
   LoadMasks(calibData); 
@@ -105,61 +98,7 @@ AliMUONTriggerElectronics::~AliMUONTriggerElectronics()
 ///
   delete fGlobalTriggerBoard;
   delete fCrates;
-  for (Int_t i = 0; i < 2; ++i) {
-    delete fCopyXInput[i];
-    delete fCopyYInput[i];
-  }
-
-}
-
-//___________________________________________
-void AliMUONTriggerElectronics::SetCopyInput()
-{  
-  /// set list of copy input
-  
-    for (Int_t iDDL = 0; iDDL < 2; ++iDDL) { 
     
-      for(Int_t iReg = 0; iReg < 8; ++iReg){   //reg loop
-      
-       AliMpTriggerCrate* crateMapping = AliMpDDLStore::Instance()->GetTriggerCrate(iDDL, iReg);
-      
-       for(Int_t iLocal = 0; iLocal < crateMapping->GetNofLocalBoards(); ++iLocal) { 
-        
-         Int_t localBoardFromId = crateMapping->GetLocalBoardId(iLocal);
-         if (!localBoardFromId) continue; //empty slot, should not happen
-        
-          AliMpLocalBoard* localBoardFrom = AliMpDDLStore::Instance()->GetLocalBoard(localBoardFromId);
-         Int_t localBoardToId;
-         if ((localBoardToId = localBoardFrom->GetInputXto())) {
-             AliMpLocalBoard* localBoardTo = AliMpDDLStore::Instance()->GetLocalBoard(localBoardToId);
-             TString crateFrom = localBoardFrom->GetCrate();
-             Int_t   slotFrom  = localBoardFrom->GetSlot();
-             TString crateTo   = localBoardTo->GetCrate();
-             Int_t   slotTo    = localBoardTo->GetSlot();
-          
-             fCopyXInput[0]->Add(new AliMpIntPair(AliMpExMap::GetIndex(crateFrom), slotFrom));
-             fCopyXInput[1]->Add(new AliMpIntPair(AliMpExMap::GetIndex(crateTo), slotTo));
-             AliDebug(3, Form("copy xInputs from local  %s_%d to %s_%d\n", crateFrom.Data(), slotFrom, 
-                              crateTo.Data(), slotTo));
-         }
-        
-         if ((localBoardToId = localBoardFrom->GetInputYto())) {
-             AliMpLocalBoard* localBoardTo = AliMpDDLStore::Instance()->GetLocalBoard(localBoardToId);
-             TString crateFrom = localBoardFrom->GetCrate();
-             Int_t   slotFrom  = localBoardFrom->GetSlot();
-             TString crateTo   = localBoardTo->GetCrate();
-             Int_t   slotTo    = localBoardTo->GetSlot();
-          
-             fCopyYInput[0]->Add(new AliMpIntPair(AliMpExMap::GetIndex(crateFrom), slotFrom));
-             fCopyYInput[1]->Add(new AliMpIntPair(AliMpExMap::GetIndex(crateTo), slotTo));
-             AliDebug(3, Form("copy yInputs from local  %s_%d to %s_%d\n", crateFrom.Data(), slotFrom, 
-                              crateTo.Data(), slotTo));
-          
-         }
-       }
-      }
-    }
 }
 
 //___________________________________________
@@ -220,6 +159,17 @@ void AliMUONTriggerElectronics::Feed(const AliMUONVDigitStore& digitStore)
           if (cathode && b->GetSwitch(AliMpLocalBoard::kZeroAllYLSB)) ibitxy += 8;
           
           b->SetbitM(ibitxy,cathode,ichamber-10);
+          
+          if ( cathode == 0 ) {
+            // Particular case of the columns with 22 local boards (2R(L) 3R(L))
+            // Fill copy boards
+            AliMpLocalBoard* mpLocalBoard = AliMpDDLStore::Instance()->GetLocalBoard(nboard);
+            Int_t nboardCopy = mpLocalBoard->GetInputXto();
+            if ( nboardCopy > 0 ) {
+              AliMUONLocalTriggerBoard* copyBoard = fCrates->LocalBoard(nboardCopy);
+              copyBoard->SetbitM(ibitxy,cathode,ichamber-10);
+            }
+          }
         }
         else
         {
@@ -240,58 +190,6 @@ void AliMUONTriggerElectronics::FeedCopyNeighbours()
   /// Feed the local copies
   /// and complete the feed with the information of neighbours
   //
-
-  // Particular case of the columns with 22 local boards (2R(L) 3R(L))   
-  // fill copy input from mapping instead of hardcoded valued (Ch.F)
-  AliMUONTriggerCrate *crate = 0x0; TObjArray *bs = 0x0;
-
-  for (Int_t i = 0; i < fCopyXInput[0]->GetEntries(); ++i) 
-  {
-    AliMpIntPair* pair = (AliMpIntPair*)fCopyXInput[0]->At(i);
-    TString crateFrom  =  AliMpExMap::GetString(pair->GetFirst());
-    Int_t   slotFrom   =  pair->GetSecond();
-
-    pair = (AliMpIntPair*)fCopyXInput[1]->At(i);
-    TString crateTo  =  AliMpExMap::GetString(pair->GetFirst());
-    Int_t   slotTo   =  pair->GetSecond();
-
-    AliDebug(3, Form("copy xInputs from local  %s_%d to %s_%d\n", crateFrom.Data(), slotFrom, 
-                    crateTo.Data(), slotTo));
-
-    UShort_t cX[2];
-    crate = fCrates->Crate(crateFrom); 
-    bs = crate->Boards();
-    AliMUONLocalTriggerBoard *fromxb = (AliMUONLocalTriggerBoard*)bs->At(slotFrom);
-    crate = fCrates->Crate(crateTo); 
-    bs = crate->Boards();
-    AliMUONLocalTriggerBoard *desxb = (AliMUONLocalTriggerBoard*)bs->At(slotTo);
-    fromxb->GetX34(cX); desxb->SetX34(cX);
-
-
-  }
-
-  for (Int_t i = 0; i < fCopyYInput[0]->GetEntries(); ++i) 
-  {
-    AliMpIntPair* pair = (AliMpIntPair*)fCopyYInput[0]->At(i);
-    TString crateFrom  =  AliMpExMap::GetString(pair->GetFirst());
-    Int_t   slotFrom   =  pair->GetSecond();
-
-    pair = (AliMpIntPair*)fCopyYInput[1]->At(i);
-    TString crateTo  =  AliMpExMap::GetString(pair->GetFirst());
-    Int_t   slotTo   =  pair->GetSecond();
-
-    AliDebug(3, Form("copy yInputs from local  %s_%d to %s_%d\n", crateFrom.Data(), slotFrom, 
-                    crateTo.Data(), slotTo));
-
-    UShort_t cY[4];
-    crate = fCrates->Crate(crateFrom); 
-    bs = crate->Boards();
-    AliMUONLocalTriggerBoard *fromyb = (AliMUONLocalTriggerBoard*)bs->At(slotFrom);
-    crate = fCrates->Crate(crateTo); 
-    bs = crate->Boards();
-    AliMUONLocalTriggerBoard *desyb = (AliMUONLocalTriggerBoard*)bs->At(slotTo);
-    fromyb->GetY(cY); desyb->SetY(cY);
-  }
   
   // FILL UP/DOWN OF CURRENT BOARD (DONE VIA J3 BUS IN REAL LIFE)
   AliMUONTriggerCrate* cr;
@@ -467,7 +365,7 @@ void AliMUONTriggerElectronics::LoadMasks(AliMUONCalibrationData* calibData)
       
       Int_t cardNumber = b->GetNumber();
       
-      if (cardNumber) // interface board are not interested
+      if (cardNumber) // skip empty slots
       {
         AliMUONVCalibParam* localBoardMasks = calibData->LocalTriggerBoardMasks(cardNumber);
         for ( Int_t i = 0; i < localBoardMasks->Size(); ++i )
@@ -527,7 +425,7 @@ void AliMUONTriggerElectronics::LocalResponse()
        UShort_t response = board->GetResponse();            
         
        // CRATE CONTAINING INTERFACE BOARD
-       if (board->GetNumber() == 0) // copy boards
+  if (!board->IsNotified()) // copy boards
        {
          if ( response != 0 ) 
            AliWarning(Form("Interface board %s in slot %d of crate %s has a non zero response",
@@ -657,8 +555,6 @@ void AliMUONTriggerElectronics::Digits2Trigger(const AliMUONVDigitStore& digitSt
           //     {
           
           Int_t icirc = board->GetNumber();
-          if (icirc != 0) { // pcrochet 181206: MOOD needs ALL boards
-            
             localTrigger.SetLoCircuit(icirc);
             localTrigger.SetLoStripX(board->GetStripX11());
             localTrigger.SetLoDev(board->GetDev());
@@ -696,7 +592,6 @@ void AliMUONTriggerElectronics::Digits2Trigger(const AliMUONVDigitStore& digitSt
             triggerStore.Add(localTrigger);  
             
           }
-          }
         }
       pRegTrig.SetId(iReg + 8*iSide);
       pRegTrig.SetLocalOutput(regInpLpt, 0);
index 4bf9692071965bd986709e1344b83ff70c79e6ce..4ee8ae9b5a69626dac1f70f855af260d5de625ce 100644 (file)
@@ -72,13 +72,9 @@ class AliMUONTriggerElectronics : public TObject
       AliMUONTriggerElectronics&  operator = (const AliMUONTriggerElectronics& right);
 
       void FeedCopyNeighbours();
-     
-      /// set copy card array
-      void SetCopyInput();
+    
 
    private:
-      TList*                     fCopyXInput[2];         ///< list of copy X input from local to local board
-      TList*                     fCopyYInput[2];         ///< list of copy Y input from local to local board
       AliMUONTriggerCrateStore  *fCrates;             ///< Crate array
       AliMUONGlobalTriggerBoard *fGlobalTriggerBoard; ///< Global trigger board
       
index 6327301a0493b9d127240c3226a17146fa6a56e9..ae4bd54b6b2184a67f9bdddf0e89eb29a6ec7160 100644 (file)
@@ -693,16 +693,12 @@ void AliMUONTriggerQADataMakerRec::MakeRaws(AliRawReader* rawReader)
          Int_t loCircuit = crate->GetLocalBoardId(localStruct->GetId());
 
          if ( !loCircuit ) continue; // empty slot
-
+    
          AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(loCircuit, false);
 
          nBoardsInReg++; // Not necessary when regional output will work
          countAllBoards++;
 
-         // skip copy cards
-         if( !localBoard->IsNotified()) 
-           continue;
-
          AliMUONLocalTrigger inputLocalTrigger;
          inputLocalTrigger.SetLocalStruct(loCircuit, *localStruct);
          fTriggerStoreFromRaw->Add(inputLocalTrigger);
@@ -717,6 +713,8 @@ void AliMUONTriggerQADataMakerRec::MakeRaws(AliRawReader* rawReader)
          //Get regional inputs -> not checked, hardware read-out doesn't work
          //fTriggerInputRegionalDataLPt[0][loCircuit]=Int_t(((regHeader->GetInput(0))>>(2*iLocal))&1);
          //fTriggerInputRegionalDataLPt[1][loCircuit]=Int_t(((regHeader->GetInput(1))>>((2*iLocal)+1))&1);
+    
+    if ( ! localBoard->IsNotified() ) continue;
 
          //Get local in/outputs
          if (Int_t(localStruct->GetDec())!=0){
@@ -1232,6 +1230,8 @@ void AliMUONTriggerQADataMakerRec::RawTriggerMatchOutLocal()
   while ( ( recoLocalTrigger = static_cast<AliMUONLocalTrigger*>(next()) ) )
   {  
     loCircuit = recoLocalTrigger->LoCircuit();
+    // FIXME: skip copy boards for the moment
+    if ( loCircuit > AliMUONConstants::NTriggerCircuit() ) continue;
     Int_t iboard = loCircuit - 1;
 
     FillRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopyTest,loCircuit);
@@ -1273,6 +1273,8 @@ void AliMUONTriggerQADataMakerRec::RawTriggerMatchOutLocal()
   while ( ( recoLocalTrigger = static_cast<AliMUONLocalTrigger*>(next()) ) )
   {  
     loCircuit = recoLocalTrigger->LoCircuit();
+    // FIXME: skip copy boards for the moment
+    if ( loCircuit > AliMUONConstants::NTriggerCircuit() ) continue;
     Int_t iboard = loCircuit - 1;
     
     AliMUONLocalTrigger* inputLocalTrigger = fTriggerStoreFromRaw->FindLocal(loCircuit);
index b6a7f7ed118cf52f463e83d0e80a9aea1f20fe6b..eaf5bc45e49f17d64c57d74828cd5d7989e9792e 100644 (file)
@@ -43,10 +43,10 @@ ClassImp(AliMUONTriggerStoreV1)
 
 //_____________________________________________________________________________
 AliMUONTriggerStoreV1::AliMUONTriggerStoreV1() : AliMUONVTriggerStore(),
-fLocal(new TClonesArray("AliMUONLocalTrigger",234)),
+fLocal(new TClonesArray("AliMUONLocalTrigger",242)),
 fRegional(new TClonesArray("AliMUONRegionalTrigger",16)),
 fGlobal(new TClonesArray("AliMUONGlobalTrigger",1)),
-fEmptyLocal(new TClonesArray("AliMUONLocalTrigger",234))
+fEmptyLocal(new TClonesArray("AliMUONLocalTrigger",242))
 {
   /// ctor
   fLocal->SetOwner(kTRUE);
@@ -176,7 +176,7 @@ AliMUONTriggerStoreV1::FindLocal(Int_t boardNumber) const
     }
   }
   
-  if ( boardNumber>=1 && boardNumber<=234 ) 
+  if ( boardNumber>=1 && boardNumber<=242 )
   {
     AliMUONLocalTrigger empty;
     empty.SetLoCircuit(boardNumber);
index e50aa8653514d533c8c6a46cabb166cd59ac3aad..ada746ae23fd1d8bb53a03a50aeab2e59761882d 100644 (file)
@@ -75,7 +75,6 @@ Bool_t AliMUONTriggerUtilities::Init()
   AliMUONDigitStoreV2R digitStore, digitStorePart;
   AliMUONTriggerStoreV1 triggerStore, triggerStorePart;
 
-//  // In the trigger logic, when the regional input is masked in the
   TArrayI activeBoards(AliMUONConstants::NTriggerCircuit());
 //  for (Int_t iSide = 0; iSide < 2; iSide++) // right & left side
 //  {
@@ -140,14 +139,30 @@ Bool_t AliMUONTriggerUtilities::Init()
     Int_t detElemId = dig->DetElemId();
     Int_t board = dig->ManuId();
     Int_t strip = dig->ManuChannel();
-    AliMUONVDigit* currDigit = 0x0;
-    if ( activeBoards[board-1] == 1 ) currDigit = digitStoreMasked.FindObject(detElemId, board, strip, cath);
+    AliMUONVDigit* currDigit = digitStoreMasked.FindObject(detElemId, board, strip, cath);
+    Int_t ich = detElemId/100-11;
+    const AliMpVSegmentation* seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::GetCathodType(cath));
+    AliMpPad pad = seg->PadByIndices(dig->PadX(), dig->PadY(), kTRUE);
     Bool_t isMasked = ( currDigit ) ? kFALSE : kTRUE;
+    
+    if ( currDigit ) {
+      // Check if board is active
+      // For the non-bending plane the digit is created for the first board only
+      // The first board may be masked, but there may be some boards which are not.
+      // If so, the strip won't be masked, so we should keep it
+      Bool_t allBoardsMasked = kTRUE;
+      for (Int_t iloc=0; iloc<pad.GetNofLocations(); iloc++) {
+        Int_t currBoard = pad.GetLocalBoardId(iloc);
+        if ( activeBoards[currBoard-1] == 1 ) {
+          allBoardsMasked = kFALSE;
+          break;
+        }
+      }
+      isMasked = allBoardsMasked;
+    }
+    
     if ( isMasked ) fMaskedDigitsStore->Add(*((AliMUONVDigit*)dig->Clone()), AliMUONVDigitStore::kDeny);
     else {
-      Int_t ich = detElemId/100-11;
-      const AliMpVSegmentation* seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::GetCathodType(cath));
-      AliMpPad pad = seg->PadByIndices(dig->PadX(), dig->PadY(), kTRUE);
       for (Int_t iloc=0; iloc<pad.GetNofLocations(); iloc++) {
         Int_t currBoard = pad.GetLocalBoardId(iloc);
         Int_t arrayIndex = GetArrayIndex(cath, ich, currBoard);