ATLAS Offline Software
TGCTriggerLUTs.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 TGCTRIGGERLUTS_H
6 #define TGCTRIGGERLUTS_H
7 
10 
11 #include <string>
12 #include <map>
13 #include <fstream>
14 
15 
17 
18  friend class TGCTriggerCondAlg;
19  friend class TGCTriggerBWCWReader;
20 
21  public:
22 
24  static constexpr uint8_t SIDE_MASK = 0x1;
26  static constexpr uint8_t SIDE_SHIFT = 29;
28  static constexpr uint8_t OCTANT_MASK = 0x7;
30  static constexpr uint8_t OCTANT_SHIFT = 26;
32  static constexpr uint8_t TYPE_MASK = 0x7;
34  static constexpr uint8_t TYPE_SHIFT = 23;
36  static constexpr uint8_t PHIMOD2_MASK = 0x1;
38  static constexpr uint8_t PHIMOD2_SHIFT = 22;
40  static constexpr uint8_t MODULE_MASK = 0xf;
42  static constexpr uint8_t MODULE_SHIFT = 18;
44  static constexpr uint8_t ROI_MASK = 0xff;
46  static constexpr uint8_t ROI_SHIFT = 10;
48  static constexpr uint8_t DR_MASK = 0x1f;
50  static constexpr uint8_t DR_SHIFT = 4;
52  static constexpr uint8_t DPHI_MASK = 0xf;
54  static constexpr uint8_t DPHI_SHIFT = 0;
55 
57  static constexpr uint8_t DR_HIGH_RANGE = 15;
59  static constexpr uint8_t DR_LOW_RANGE = 7;
61  static constexpr uint8_t DPHI_HIGH_RANGE = 7;
63  static constexpr uint8_t DPHI_LOW_RANGE = 3;
64 
65  enum { COIN_HH = 0x0, COIN_HL = 0x1, COIN_LH = 0x2, COIN_LL = 0x3 };
66  enum {CW_BW=0, CW_EIFI=1, CW_TILE=2, CW_NSW=3, CW_BIS78=4, WHICH_INNER=5, HOTRoI=6, LUT_NUM};
67  enum {N_PT_THRESH=15,
68  N_SIDE=2,
71 
73  virtual ~TGCTriggerLUTs();
74 
75  std::string getData(int cwtype, std::string file) const;
76  std::string getData(int cwtype, int channel) const;
77  std::string getFile(int cwtype, int channel) const;
78  std::string getVersion(int cwtype, int channel = 0) const;
79  std::string getType(int cwtype, int channel = 0) const;
80 
81  int8_t getBigWheelPt(const uint32_t addr) const;
82 
83  private:
84  std::map<std::string, std::string> m_datamap[LUT_NUM];
85  std::vector<std::string> m_data[LUT_NUM];
86  std::vector<std::string> m_file[LUT_NUM];
87  std::vector<std::string> m_version[LUT_NUM];
88  std::vector<std::string> m_type[LUT_NUM];
89 
90  std::unordered_map<uint32_t, int8_t> m_ptmap_bw;
91 };
92 
93 
94 CLASS_DEF(TGCTriggerLUTs, 206388330, 1)
95 
96 #include "AthenaKernel/CondCont.h"
98 
99 #endif // TGCTRIGGERDATA_H
TGCTriggerLUTs::PHIMOD2_MASK
static constexpr uint8_t PHIMOD2_MASK
Mask for extracting the phi(F or B) from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:36
TGCTriggerLUTs::HOTRoI
@ HOTRoI
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::m_file
std::vector< std::string > m_file[LUT_NUM]
Definition: TGCTriggerLUTs.h:86
TGCTriggerLUTs::getFile
std::string getFile(int cwtype, int channel) const
Definition: TGCTriggerLUTs.cxx:33
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
TGCTriggerLUTs::N_SIDE
@ N_SIDE
Definition: TGCTriggerLUTs.h:68
TGCTriggerLUTs::CW_NSW
@ CW_NSW
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::COIN_HH
@ COIN_HH
Definition: TGCTriggerLUTs.h:65
TGCTriggerLUTs::CW_TILE
@ CW_TILE
Definition: TGCTriggerLUTs.h:66
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TGCTriggerLUTs::N_OCTANT
@ N_OCTANT
Definition: TGCTriggerLUTs.h:69
TGCTriggerLUTs::~TGCTriggerLUTs
virtual ~TGCTriggerLUTs()
Definition: TGCTriggerLUTs.cxx:13
TGCTriggerLUTs::getVersion
std::string getVersion(int cwtype, int channel=0) const
Definition: TGCTriggerLUTs.cxx:37
TGCTriggerLUTs::COIN_HL
@ COIN_HL
Definition: TGCTriggerLUTs.h:65
TGCTriggerLUTs::m_ptmap_bw
std::unordered_map< uint32_t, int8_t > m_ptmap_bw
Definition: TGCTriggerLUTs.h:90
TGCTriggerLUTs::DPHI_SHIFT
static constexpr uint8_t DPHI_SHIFT
Bit position of the deltaPhi bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:54
TGCTriggerLUTs::DPHI_LOW_RANGE
static constexpr uint8_t DPHI_LOW_RANGE
Range of DPhi in the BW coincidence window for 2-station.
Definition: TGCTriggerLUTs.h:63
TGCTriggerBWCWReader
Definition: TGCTriggerBWCWReader.h:14
TGCTriggerLUTs::CW_BW
@ CW_BW
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::getBigWheelPt
int8_t getBigWheelPt(const uint32_t addr) const
Definition: TGCTriggerLUTs.cxx:46
TGCTriggerLUTs::TGCTriggerLUTs
TGCTriggerLUTs()
Definition: TGCTriggerLUTs.cxx:8
TGCTriggerLUTs::WHICH_INNER
@ WHICH_INNER
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::getData
std::string getData(int cwtype, std::string file) const
Definition: TGCTriggerLUTs.cxx:18
TGCTriggerLUTs::N_PT_THRESH
@ N_PT_THRESH
Definition: TGCTriggerLUTs.h:67
TGCTriggerLUTs::CW_BIS78
@ CW_BIS78
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::ROI_SHIFT
static constexpr uint8_t ROI_SHIFT
Bit position of the module number bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:46
TGCTriggerLUTs::TYPE_SHIFT
static constexpr uint8_t TYPE_SHIFT
Bit position of the octant bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:34
TGCTriggerLUTs::DPHI_MASK
static constexpr uint8_t DPHI_MASK
Mask for extracting the deltaPhi from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:52
TGCTriggerLUTs::getType
std::string getType(int cwtype, int channel=0) const
Definition: TGCTriggerLUTs.cxx:41
TGCTriggerLUTs::DR_MASK
static constexpr uint8_t DR_MASK
Mask for extracting the deltaR from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:48
TGCTriggerLUTs::COIN_LL
@ COIN_LL
Definition: TGCTriggerLUTs.h:65
TGCTriggerLUTs::N_MODULETYPE
@ N_MODULETYPE
Definition: TGCTriggerLUTs.h:70
TGCTriggerLUTs::DPHI_HIGH_RANGE
static constexpr uint8_t DPHI_HIGH_RANGE
Range of DPhi in the BW coincidence window for 3-station.
Definition: TGCTriggerLUTs.h:61
TGCTriggerLUTs
Definition: TGCTriggerLUTs.h:16
BaseInfo.h
Provide an interface for finding inheritance information at run time.
TGCTriggerLUTs::OCTANT_MASK
static constexpr uint8_t OCTANT_MASK
Mask for extracting the octant from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:28
TGCTriggerLUTs::COIN_LH
@ COIN_LH
Definition: TGCTriggerLUTs.h:65
file
TFile * file
Definition: tile_monitor.h:29
TGCTriggerLUTs::DR_HIGH_RANGE
static constexpr uint8_t DR_HIGH_RANGE
Range of DR in the BW coincidence window for 3-station.
Definition: TGCTriggerLUTs.h:57
TGCTriggerLUTs::m_type
std::vector< std::string > m_type[LUT_NUM]
Definition: TGCTriggerLUTs.h:88
TGCTriggerLUTs::m_data
std::vector< std::string > m_data[LUT_NUM]
Definition: TGCTriggerLUTs.h:85
TGCTriggerLUTs::DR_SHIFT
static constexpr uint8_t DR_SHIFT
Bit position of the deltaR bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:50
TGCTriggerLUTs::OCTANT_SHIFT
static constexpr uint8_t OCTANT_SHIFT
Bit position of the octant bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:30
TGCTriggerLUTs::LUT_NUM
@ LUT_NUM
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::CW_EIFI
@ CW_EIFI
Definition: TGCTriggerLUTs.h:66
TGCTriggerLUTs::m_version
std::vector< std::string > m_version[LUT_NUM]
Definition: TGCTriggerLUTs.h:87
TGCTriggerLUTs::MODULE_MASK
static constexpr uint8_t MODULE_MASK
Mask for extracting the module number from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:40
TGCTriggerCondAlg
Definition: TGCTriggerCondAlg.h:15
TGCTriggerLUTs::SIDE_SHIFT
static constexpr uint8_t SIDE_SHIFT
Bit position of the side bit in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:26
CondCont< TGCTriggerLUTs >
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TGCTriggerLUTs::TYPE_MASK
static constexpr uint8_t TYPE_MASK
Mask for extracting the octant from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:32
TGCTriggerLUTs::SIDE_MASK
static constexpr uint8_t SIDE_MASK
Mask for extracting the side from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:24
TGCTriggerLUTs::DR_LOW_RANGE
static constexpr uint8_t DR_LOW_RANGE
Range of DR in the BW coincidence window for 2-station.
Definition: TGCTriggerLUTs.h:59
CLASS_DEF.h
macros to associate a CLID to a type
TGCTriggerLUTs::MODULE_SHIFT
static constexpr uint8_t MODULE_SHIFT
Bit position of the module number bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:42
TGCTriggerLUTs::m_datamap
std::map< std::string, std::string > m_datamap[LUT_NUM]
Definition: TGCTriggerLUTs.h:84
TGCTriggerLUTs::ROI_MASK
static constexpr uint8_t ROI_MASK
Mask for extracting the module number from the GLOBALADDR.
Definition: TGCTriggerLUTs.h:44
TGCTriggerLUTs::PHIMOD2_SHIFT
static constexpr uint8_t PHIMOD2_SHIFT
Bit position of the module number bits in the GLOBALADDR.
Definition: TGCTriggerLUTs.h:38