ATLAS Offline Software
Loading...
Searching...
No Matches
TGCTriggerData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TGCTRIGGERDATA_H
6#define TGCTRIGGERDATA_H
7
10#include <string>
11#include <map>
12#include <vector>
13
14
100
102{
103 friend class TGCTriggerDbAlg;
104
105 public:
107 static constexpr uint8_t SIDE_MASK = 0x1;
109 static constexpr uint8_t SIDE_SHIFT = 29;
111 static constexpr uint8_t OCTANT_MASK = 0x7;
113 static constexpr uint8_t OCTANT_SHIFT = 26;
115 static constexpr uint8_t TYPE_MASK = 0x7;
117 static constexpr uint8_t TYPE_SHIFT = 26;
119 static constexpr uint8_t PHIMOD2_MASK = 0x1;
121 static constexpr uint8_t PHIMOD2_SHIFT = 22;
123 static constexpr uint8_t MODULE_MASK = 0xf;
125 static constexpr uint8_t MODULE_SHIFT = 18;
127 static constexpr uint8_t ROI_MASK = 0xff;
129 static constexpr uint8_t ROI_SHIFT = 10;
131 static constexpr uint8_t DR_MASK = 0x1f;
133 static constexpr uint8_t DR_SHIFT = 4;
135 static constexpr uint8_t DPHI_MASK = 0xf;
137 static constexpr uint8_t DPHI_SHIFT = 0;
139 static constexpr uint8_t PT_MASK = 0x7;
140
142 static constexpr uint8_t DR_HIGH_RANGE = 15;
144 static constexpr uint8_t DR_LOW_RANGE = 7;
146 static constexpr uint8_t DPHI_HIGH_RANGE = 7;
148 static constexpr uint8_t DPHI_LOW_RANGE = 3;
150 static constexpr uint8_t SECTOR_MASK = 0x3f;
152 static constexpr uint8_t SSC_MASK = 0x1f;
154 static constexpr uint8_t ADDR_SIDE_SHIFT = 11;
156 static constexpr uint8_t ADDR_SECTOR_SHIFT = 5;
158 static constexpr uint8_t EIFI_TRIGBIT_SHIFT = 2;
159
160 enum {CW_BW=0, CW_EIFI=1, CW_TILE=2, CW_NUM=3};
161 enum {N_PT_THRESH=6,
172 enum {COIN_HH=0x0, COIN_HL=0x1, COIN_LH=0x2, COIN_LL=0x3};
173
175 virtual ~TGCTriggerData();
176
177 std::string getType(int cwtype) const;
178 bool isActive(int cwtype) const;
179
180 int8_t getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const;
181
182 uint8_t getBigWheelPt(const uint32_t addr) const;
183
184 unsigned short getTrigBitEifi(int side, int slot, int ssc, int sectorId) const;
185 unsigned char getFlagPtEifi(int side, int ssc, int sectorId) const;
186 unsigned char getFlagRoiEifi(int side, int ssc, int sectorId) const;
187
188 unsigned short getTrigMaskTile(int ssc, int sectorId, int side) const;
189 unsigned char getFlagPtTile(int ssc, int sectorId, int side) const;
190 uint8_t getFlagRoiTile(int ssc, int sectorId, int side) const;
191
192 private:
193 std::string m_type[CW_NUM];
195
197 std::unordered_map<uint32_t, uint8_t> m_ptmap_bw;
198
199 // Run-2 EIFI-CW LUT map
200 std::unordered_map<uint16_t, uint8_t> m_flagpt_eifi;
201 std::unordered_map<uint16_t, uint8_t> m_flagroi_eifi;
202 std::unordered_map<uint16_t, uint16_t> m_trigbit_eifi;
203
204 //Run-2 Tile-CW LUT map
205 std::unordered_map<uint16_t, uint8_t> m_flagpt_tile;
206 std::unordered_map<uint16_t, uint8_t> m_flagroi_tile;
207 std::unordered_map<uint16_t, uint16_t> m_trigbit_tile;
208};
209
210CLASS_DEF(TGCTriggerData, 72345188, 3)
211
212#include "AthenaKernel/CondCont.h"
214
215#endif // TGCTRIGGERDATA_H
Provide an interface for finding inheritance information at run time.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Hold mapping of ranges to condition objects.
Definition CondCont.h:889
uint8_t getFlagRoiTile(int ssc, int sectorId, int side) const
static constexpr uint8_t TYPE_SHIFT
Bit position of the octant bits in the GLOBALADDR.
std::unordered_map< uint16_t, uint8_t > m_flagroi_eifi
static constexpr uint8_t DPHI_MASK
Mask for extracting the deltaPhi from the GLOBALADDR.
static constexpr uint8_t SECTOR_MASK
Mask for trigger sector for the (EIFI/TILE) ADDR.
virtual ~TGCTriggerData()
unsigned char getFlagPtTile(int ssc, int sectorId, int side) const
static constexpr uint8_t TYPE_MASK
Mask for extracting the octant from the GLOBALADDR.
static constexpr uint8_t EIFI_TRIGBIT_SHIFT
Special bit shift for the EIFI Trigger bit.
bool m_active[CW_NUM]
static constexpr uint8_t MODULE_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t PT_MASK
Mask for pT value for Run-2.
static constexpr uint8_t SIDE_MASK
Mask for extracting the side from the GLOBALADDR.
static constexpr uint8_t SIDE_SHIFT
Bit position of the side bit in the GLOBALADDR.
unsigned short getTrigBitEifi(int side, int slot, int ssc, int sectorId) const
static constexpr uint8_t PHIMOD2_MASK
Mask for extracting the phi(F or B) from the GLOBALADDR.
std::unordered_map< uint32_t, uint8_t > m_ptmap_bw
Run-2 BW-CW LUT map.
static constexpr uint8_t DPHI_LOW_RANGE
Range of DPhi in the BW coincidence window for 2-station.
std::unordered_map< uint16_t, uint16_t > m_trigbit_eifi
std::unordered_map< uint16_t, uint8_t > m_flagroi_tile
static constexpr uint8_t DR_HIGH_RANGE
Range of DR in the BW coincidence window for 3-station.
static constexpr uint8_t ROI_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t MODULE_MASK
Mask for extracting the module number from the GLOBALADDR.
unsigned short getTrigMaskTile(int ssc, int sectorId, int side) const
static constexpr uint8_t DR_MASK
Mask for extracting the deltaR from the GLOBALADDR.
static constexpr uint8_t DPHI_SHIFT
Bit position of the deltaPhi bits in the GLOBALADDR.
static constexpr uint8_t OCTANT_SHIFT
Bit position of the octant bits in the GLOBALADDR.
friend class TGCTriggerDbAlg
std::unordered_map< uint16_t, uint8_t > m_flagpt_eifi
static constexpr uint8_t OCTANT_MASK
Mask for extracting the octant from the GLOBALADDR.
unsigned char getFlagRoiEifi(int side, int ssc, int sectorId) const
std::unordered_map< uint16_t, uint16_t > m_trigbit_tile
bool isActive(int cwtype) const
static constexpr uint8_t DR_SHIFT
Bit position of the deltaR bits in the GLOBALADDR.
std::unordered_map< uint16_t, uint8_t > m_flagpt_tile
static constexpr uint8_t PHIMOD2_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t ADDR_SIDE_SHIFT
Bit position of the side bit in the (EIFI/TILE) ADDR.
std::string getType(int cwtype) const
static constexpr uint8_t DR_LOW_RANGE
Range of DR in the BW coincidence window for 2-station.
static constexpr uint8_t DPHI_HIGH_RANGE
Range of DPhi in the BW coincidence window for 3-station.
uint8_t getBigWheelPt(const uint32_t addr) const
static constexpr uint8_t SSC_MASK
Mask for SSC for the (EIFI/TILE) ADDR.
unsigned char getFlagPtEifi(int side, int ssc, int sectorId) const
int8_t getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const
static constexpr uint8_t ROI_MASK
Mask for extracting the module number from the GLOBALADDR.
std::string m_type[CW_NUM]
static constexpr uint8_t ADDR_SECTOR_SHIFT
Bit position of the trigger sector bit in the (EIFI/TILE) ADDR.