ATLAS Offline Software
BigWheelCoincidenceLUT.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigT1TGC_BigWheelCoincidenceLUT_h
6 #define TrigT1TGC_BigWheelCoincidenceLUT_h
7 
8 #include <vector>
9 #include <map>
10 #include <string>
11 
12 #include "GaudiKernel/ToolHandle.h"
15 #include "TrigT1TGC/TGCArguments.h"
16 
17 namespace LVL1TGC {
18 
36  public:
39  const std::string& version);
40  virtual ~BigWheelCoincidenceLUT();
41 
44 
45  bool readMap();
46 
47  int8_t test(int sideId, int octantId, int moduleId, int subsector,
48  int type, int dr, int dphi) const;
49 
50  int getMapType(int hlwire, int hlstrip) const;
51  const std::string& getVersion() const;
52 
54 
55  protected:
56  int getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const;
57 
58  private: // hide default constructor
60 
61  protected:
62  static constexpr uint32_t N_COIN_TYPE = 4;
63 
64  //converter from char to pTthre Number. the sign mean muon sign.
65  std::map<char, int8_t> m_pTdef={{'X',0},
66  {'A',1},{'B',2},{'C',3},{'D',4},{'E',5},{'F',6},{'G',7},{'H',8},{'I',9},{'J',10},{'K',11},{'L',12},{'M',13},{'N',14},{'O',15},
67  {'a',-1},{'b',-2},{'c',-3},{'d',-4},{'e',-5},{'f',-6},{'g',-7},{'h',-8},{'i',-9},{'j',-10},{'k',-11},{'l',-12},{'m',-13},{'n',-14},{'o',-15} };
68 
69  private:
70  std::unordered_map<uint32_t, char> m_lut; // GLOBALADDR, PTCHAR
71 
72  std::string m_verName;
73  bool m_fullCW{false};
74 
76 
78 };
79 
81  return m_tgcArgs;
82 }
83 
84 inline const std::string& BigWheelCoincidenceLUT::getVersion() const {
85  return m_verName;
86 }
87 
88 inline int BigWheelCoincidenceLUT::getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const {
92  } else if((lDR == -TGCTriggerLUTs::DR_LOW_RANGE) && (hDR == TGCTriggerLUTs::DR_LOW_RANGE)) {
95  }
96  return -1;
97 }
98 
99 inline int BigWheelCoincidenceLUT::getMapType(int hlwire, int hlstrip) const {
100  return (TGCTriggerLUTs::COIN_LL - 2*hlwire - hlstrip);
101 }
102 
103 } // namespace LVL1TGC
104 
105 #endif // TrigT1TGC_BigWheelCoincidenceLUT_H
106 
107 
LVL1TGC::BigWheelCoincidenceLUT::readMap
bool readMap()
Definition: BigWheelCoincidenceLUT.cxx:84
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TGCTriggerLUTs.h
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
LVL1TGC::BigWheelCoincidenceLUT::tgcArgs
const LVL1TGCTrigger::TGCArguments * tgcArgs() const
Definition: BigWheelCoincidenceLUT.h:80
LVL1TGC::BigWheelCoincidenceLUT::m_pTdef
std::map< char, int8_t > m_pTdef
Definition: BigWheelCoincidenceLUT.h:65
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
LVL1TGC::BigWheelCoincidenceLUT::getVersion
const std::string & getVersion() const
Definition: BigWheelCoincidenceLUT.h:84
LVL1TGC::BigWheelCoincidenceLUT::N_COIN_TYPE
static constexpr uint32_t N_COIN_TYPE
Definition: BigWheelCoincidenceLUT.h:62
LVL1TGC::BigWheelCoincidenceLUT::getTYPE
int getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const
Definition: BigWheelCoincidenceLUT.h:88
LVL1TGC::BigWheelCoincidenceLUT::m_readCondKey
const SG::ReadCondHandleKey< TGCTriggerLUTs > & m_readCondKey
Definition: BigWheelCoincidenceLUT.h:77
LVL1TGC::BigWheelCoincidenceLUT::operator=
BigWheelCoincidenceLUT & operator=(const BigWheelCoincidenceLUT &right)=delete
LVL1TGC::BigWheelCoincidenceLUT::~BigWheelCoincidenceLUT
virtual ~BigWheelCoincidenceLUT()
Definition: BigWheelCoincidenceLUT.cxx:81
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
LVL1TGC
Definition: BigWheelCoincidenceLUT.cxx:20
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
LVL1TGC::BigWheelCoincidenceLUT::BigWheelCoincidenceLUT
BigWheelCoincidenceLUT(const BigWheelCoincidenceLUT &right)=default
ReadCondHandleKey.h
LVL1TGC::BigWheelCoincidenceLUT::test
int8_t test(int sideId, int octantId, int moduleId, int subsector, int type, int dr, int dphi) const
Definition: BigWheelCoincidenceLUT.cxx:22
TGCTriggerLUTs::COIN_LH
@ COIN_LH
Definition: TGCTriggerLUTs.h:65
LVL1TGCTrigger::TGCArguments
Definition: TGCArguments.h:12
SG::ReadCondHandleKey< TGCTriggerLUTs >
get_generator_info.version
version
Definition: get_generator_info.py:33
LVL1TGC::BigWheelCoincidenceLUT::m_lut
std::unordered_map< uint32_t, char > m_lut
Definition: BigWheelCoincidenceLUT.h:70
TGCTriggerLUTs::COIN_HH
@ COIN_HH
Definition: TGCTriggerLUTs.h:65
TGCTriggerLUTs::COIN_HL
@ COIN_HL
Definition: TGCTriggerLUTs.h:65
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TGCTriggerLUTs::COIN_LL
@ COIN_LL
Definition: TGCTriggerLUTs.h:65
LVL1TGC::BigWheelCoincidenceLUT::m_fullCW
bool m_fullCW
Definition: BigWheelCoincidenceLUT.h:73
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
LVL1TGC::BigWheelCoincidenceLUT::BigWheelCoincidenceLUT
BigWheelCoincidenceLUT()=delete
TGCArguments.h
LVL1TGC::BigWheelCoincidenceLUT::m_tgcArgs
LVL1TGCTrigger::TGCArguments * m_tgcArgs
Definition: BigWheelCoincidenceLUT.h:75
LVL1TGC::BigWheelCoincidenceLUT::getMapType
int getMapType(int hlwire, int hlstrip) const
Definition: BigWheelCoincidenceLUT.h:99
LVL1TGC::BigWheelCoincidenceLUT
Definition: BigWheelCoincidenceLUT.h:35
LVL1TGC::BigWheelCoincidenceLUT::m_verName
std::string m_verName
Definition: BigWheelCoincidenceLUT.h:72