/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ /// \class AliMUONGlobalTriggerBoard /// Global trigger implementation: /// - inputs are regional responses /// - output is a 12-bit word /// - 4 bits per trigger level /// \todo Change member functions comments in capital letters to normal text /// /// \author Rachid Guernane (LPCCFd) #include "AliMUONGlobalTriggerBoard.h" #include "AliLog.h" #include "TBits.h" #include ClassImp(AliMUONGlobalTriggerBoard) //___________________________________________ AliMUONGlobalTriggerBoard::AliMUONGlobalTriggerBoard() { /// Default constructor for (Int_t i=0;i<16;i++) fRegionalResponse[i] = 0; } //___________________________________________ AliMUONGlobalTriggerBoard::AliMUONGlobalTriggerBoard(const char *name, Int_t a) : AliMUONTriggerBoard(name, a) { /// Standard constructor for (Int_t i=0;i<16;i++) fRegionalResponse[i] = 0; } //___________________________________________ AliMUONGlobalTriggerBoard::~AliMUONGlobalTriggerBoard() { /// Destructor } //___________________________________________ void AliMUONGlobalTriggerBoard::Mask(Int_t index, UShort_t mask) { /// MASK GLOBAL TRIGGER BOARD INPUT index WITH VALUE mask if ( index>=0 && index < 16 ) { fMask[index]=mask; } else { AliError(Form("Index %d out of bounds (max %d)",index,16)); } } //___________________________________________ void AliMUONGlobalTriggerBoard::Response() { /// COMPUTE THE GLOBAL TRIGGER BOARD /// RESPONSE ACCORDING TO THE Algo() METHOD // output from global trigger algorithm // [+, -, LS, US] * [Hpt, Lpt] // transformed to [usHpt, usLpt, lsHpt, lsLpt, sHpt, sLpt] according // to Global Trigger Unit user manual Int_t t[16]; for (Int_t i=0;i<16;i++) t[i] = fRegionalResponse[i] & fMask[i]; Int_t rank = 8; for (Int_t i=0;i<4;i++) { Int_t ip = 0; for (Int_t j=0;j