11#ifndef ALICEO2_EMCAL_TRIGGERMAPPINGV2_H_
12#define ALICEO2_EMCAL_TRIGGERMAPPINGV2_H_
39 static constexpr unsigned int ALLTRUS = 52;
365 std::array<unsigned int, ALLTRUS> mTRUFastOROffsetX;
366 std::array<unsigned int, ALLTRUS> mTRUFastOROffsetY;
367 std::array<unsigned int, ALLTRUS> mNFastORInTRUPhi;
368 std::array<unsigned int, ALLTRUS> mNFastORInTRUEta;
369 std::bitset<ALLTRUS> mTRUIsCside;
371 std::array<unsigned int, SUPERMODULES> mSMFastOROffsetX;
372 std::array<unsigned int, SUPERMODULES> mSMFastOROffsetY;
373 std::array<unsigned int, SUPERMODULES> mNFastORInSMPhi;
374 std::array<unsigned int, SUPERMODULES> mNFastORInSMEta;
376 std::array<unsigned int, 5> mNModuleInEMCALPhi;
383 void init_TRU_offset();
384 void init_SM_offset();
433 if (supermoduleID < 10) {
436 if (supermoduleID < 12) {
439 if (supermoduleID < 18) {
442 if (supermoduleID < 20) {
446 throw SupermoduleIndexException(supermoduleID,
SUPERMODULES);
454 return (supermoduleID % 2 == 1) ? true :
false;
EMCAL geometry definition.
Handling error due to invalid supermodule.
Trigger mapping starting from Run2.
static constexpr unsigned int FASTORSPHITRU
Number of FastOR/TRU in Phi.
static constexpr unsigned int FASTORSTRU
Number of FastOR/TRU.
const std::array< unsigned int, SUPERMODULES > & getArraySMFastOROffsetY() const
std::tuple< IndexColumnEta, IndexRowPhi > getPositionInEMCALFromAbsFastORIndex(IndexFastOR fastORAbsID) const
Get the position in the Detector from the absolute FastOR ID.
IndexTRU convertTRUIndexSTUtoTRU(IndexTRU truIndexSTU, DetType_t detector) const
Convert the TRU index from the STU numbering scheme into the TRU numbering scheme.
std::tuple< IndexTRU, IndexColumnEta, IndexRowPhi > convertFastORPositionSTUtoTRU(IndexTRU truIndexSTU, IndexColumnEta truEtaSTU, IndexRowPhi truPhiSTU, DetType_t detector) const
Convert TRU and FastOR position in TRU from STU number scheme to TRU number scheme.
DetType_t
Calorimeter type.
IndexFastOR getAbsFastORIndexFromPositionInEMCAL(IndexColumnEta etaColumn, IndexRowPhi phiRow) const
Get the absolute index of the FastOR from the geometric position in EMCAL.
std::tuple< IndexTRU, IndexColumnEta, IndexRowPhi > getPositionInTRUFromAbsFastORIndex(IndexFastOR fastORAbsID) const
Get the position of a FastOR inside the TRU from the absolute FastOR ID.
unsigned int IndexColumnEta
const std::array< unsigned int, ALLTRUS > & getNFastORInTRUPhi() const
IndexFastOR getAbsFastORIndexFromIndexInTRU(IndexTRU truIndex, IndexFastOR fastorIndexTRU) const
Get the absolute index of the FastOr from the index in the TRU.
unsigned int IndexSupermodule
IndexFastOR getAbsFastORIndexFromPHOSSubregion(unsigned int phosRegionID) const
const std::array< unsigned int, SUPERMODULES > & getArrayNFastORInSMEta() const
std::tuple< IndexTRU, IndexColumnEta, IndexRowPhi > convertFastORPositionTRUtoSTU(IndexTRU truIndexTRU, IndexColumnEta etaTRU, IndexRowPhi phiTRU) const
Convert TRU and FastOR position in TRU from TRU number scheme to STU number scheme.
IndexTRU convertTRUIndexTRUtoSTU(IndexTRU truIndexTRU) const
static constexpr unsigned int TRUSETASM
Number of TRUs/SM in Eta.
TriggerMappingV2()
Default constructor.
static constexpr unsigned int TRUSPHISM
Number of TRUs/SM in Phi.
IndexFastOR getAbsFastORIndexFromPositionInTRU(IndexTRU truIndex, IndexColumnEta etaColumn, IndexRowPhi phiRow) const
Get the absolute index of the FastOr from geometric position in TRU.
std::tuple< IndexSupermodule, IndexColumnEta, IndexRowPhi > getPositionInSupermoduleFromAbsFastORIndex(IndexFastOR fastORAbsID) const
Get the position inside the supermodule from the absolute FastOR ID.
IndexFastOR getAbsFastORIndexFromPositionInSupermodule(IndexSupermodule supermoduleID, IndexColumnEta etaColumn, IndexRowPhi phiRow) const
Get the absolute index of the FastOr from the geometric position in the supermodule.
const std::array< unsigned int, ALLTRUS > & getArrayTRUFastOROffsetX() const
static constexpr unsigned int FASTORSPHI
Number of FastOR/EMCALs in Phi.
IndexTRU getTRUIndexFromOnlineIndex(IndexOnline onlineIndex) const noexcept
Get the TRU index from the online index.
const std::array< unsigned int, 5 > & getArrayNModuleInEMCALPhi() const
const std::array< unsigned int, ALLTRUS > & getTRUFastOROffsetY() const
static constexpr unsigned int FASTORSETATRU
Number of FastOR/TRU in Eta.
static constexpr unsigned int FASTORSETA
EMCAL+DCAL region eta size.
static constexpr unsigned int SUPERMODULES
Total number of supermodules in EMCAL.
static constexpr unsigned int FASTORSPHISM
Number of FastOR/SM in Phi.
const std::array< unsigned int, ALLTRUS > & getNFastORInTRUEta() const
static constexpr unsigned int FASTORSETASM
Number of FastOR/SM in Eta.
std::tuple< IndexTRU, IndexFastOR > convertFastORIndexTRUtoSTU(IndexTRU truIndexTRU, IndexFastOR fastorIndexTRU) const
Convert TRU and FastOR index in TRU from TRU number scheme to STU number scheme.
const std::array< unsigned int, SUPERMODULES > & getArrayNFastORInSMPhi() const
~TriggerMappingV2()=default
Destructor.
static constexpr unsigned int TRUSSUPERMODULE
Number of TRUs/SM.
IndexOnline getOnlineIndexFromTRUIndex(IndexTRU truIndex) const
Get the online index from the TRU index.
const std::array< unsigned int, SUPERMODULES > & getArraySMFastOROffsetX() const
std::array< IndexCell, 4 > getCellIndexFromAbsFastORIndex(IndexFastOR fastORAbsID) const
Get the indices of the cells in the module of a given FastOR.
IndexTRU getTRUIndexFromOnlineHardareAddree(int hardwareAddress, unsigned int ddlID, unsigned int supermoduleID) const
Get the TRU Index from the hardware address of the ALTRO channel (TRU rawdata)
std::tuple< IndexTRU, IndexFastOR > convertFastORIndexSTUtoTRU(IndexTRU truIndexSTU, IndexFastOR fastOrIndexSTU, DetType_t detector) const
Convert TRU and FastOR index in TRU from STU number scheme to TRU number scheme.
FastORInformation getInfoFromAbsFastORIndex(IndexFastOR absFastORID) const
IndexFastOR getAbsFastORIndexFromCellIndex(IndexCell cellIndex) const
Get the absolute FastOR index of the module containing a given cell.
std::array< unsigned int, 4 > getFastORIndexFromL0Index(IndexTRU iTRU, IndexFastOR l0index, int size) const
static constexpr unsigned int ALLFASTORS
Number of FastOR/EMCALs.
std::tuple< IndexTRU, IndexFastOR > getTRUFromAbsFastORIndex(IndexFastOR fastOrAbsID) const
Get the TRU index and FastOR index in TRU from the absolute FastOR ID.
static constexpr unsigned int ALLTRUS
Total number of TRUs in EMCAL.
static constexpr unsigned int PATCHESINTRU
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...