/************************************************************************** * 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 /// /// \author Rachid Guernane (LPCCFd), /// Corrected by Christian Finck (Subatech) //----------------------------------------------------------------------------- #include "AliMUONGlobalTriggerBoard.h" #include "AliLog.h" #include "TBits.h" #include /// \cond CLASSIMP ClassImp(AliMUONGlobalTriggerBoard) /// \endcond //___________________________________________ AliMUONGlobalTriggerBoard::AliMUONGlobalTriggerBoard(): AliMUONTriggerBoard() { /// 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 < 2 ) { fMask[index]=mask; } else { AliError(Form("Index %d out of bounds (max %d)",index,2)); } } //___________________________________________ void AliMUONGlobalTriggerBoard::Response() { /// compute the global trigger board /// response according to the algo() method // output from global trigger algorithm // [+, -, US, LS] * [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) { Int_t index = i/8; Int_t shift = i % 8; UShort_t enable = !((fMask[index] >> shift) & 0x1); if (enable) t[i] = fRegionalResponse[i]; else t[i] = 0; } Int_t rank = 8; for (Int_t i=0;i<4;i++) { Int_t ip = 0; for (Int_t j=0;j