ATLAS Offline Software
Loading...
Searching...
No Matches
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;
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 };
67 enum {N_PT_THRESH=15,
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
94CLASS_DEF(TGCTriggerLUTs, 206388330, 1)
95
96#include "AthenaKernel/CondCont.h"
98
99#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
int8_t getBigWheelPt(const uint32_t addr) const
virtual ~TGCTriggerLUTs()
std::vector< std::string > m_version[LUT_NUM]
static constexpr uint8_t SIDE_SHIFT
Bit position of the side bit in the GLOBALADDR.
friend class TGCTriggerCondAlg
static constexpr uint8_t DR_MASK
Mask for extracting the deltaR from the GLOBALADDR.
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.
static constexpr uint8_t DPHI_SHIFT
Bit position of the deltaPhi bits in the GLOBALADDR.
std::map< std::string, std::string > m_datamap[LUT_NUM]
static constexpr uint8_t ROI_MASK
Mask for extracting the module number from the GLOBALADDR.
std::string getData(int cwtype, std::string file) const
static constexpr uint8_t PHIMOD2_SHIFT
Bit position of the module number bits in the GLOBALADDR.
std::string getFile(int cwtype, int channel) const
static constexpr uint8_t TYPE_MASK
Mask for extracting the octant from the GLOBALADDR.
static constexpr uint8_t DR_SHIFT
Bit position of the deltaR bits in the GLOBALADDR.
static constexpr uint8_t SIDE_MASK
Mask for extracting the side from the GLOBALADDR.
std::vector< std::string > m_file[LUT_NUM]
static constexpr uint8_t OCTANT_SHIFT
Bit position of the octant bits in the GLOBALADDR.
static constexpr uint8_t DR_HIGH_RANGE
Range of DR in the BW coincidence window for 3-station.
std::string getType(int cwtype, int channel=0) const
static constexpr uint8_t MODULE_MASK
Mask for extracting the module number from the GLOBALADDR.
friend class TGCTriggerBWCWReader
static constexpr uint8_t OCTANT_MASK
Mask for extracting the octant from the GLOBALADDR.
std::vector< std::string > m_type[LUT_NUM]
std::vector< std::string > m_data[LUT_NUM]
std::unordered_map< uint32_t, int8_t > m_ptmap_bw
static constexpr uint8_t TYPE_SHIFT
Bit position of the octant bits in the GLOBALADDR.
static constexpr uint8_t MODULE_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t DPHI_LOW_RANGE
Range of DPhi in the BW coincidence window for 2-station.
static constexpr uint8_t PHIMOD2_MASK
Mask for extracting the phi(F or B) from the GLOBALADDR.
std::string getVersion(int cwtype, int channel=0) const
static constexpr uint8_t DPHI_MASK
Mask for extracting the deltaPhi from the GLOBALADDR.
static constexpr uint8_t ROI_SHIFT
Bit position of the module number bits in the GLOBALADDR.
TFile * file