ATLAS Offline Software
Loading...
Searching...
No Matches
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"
16
17namespace LVL1TGC {
18
34
36 public:
39 const std::string& version);
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
83
84inline const std::string& BigWheelCoincidenceLUT::getVersion() const {
85 return m_verName;
86}
87
88inline 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
99inline 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
LVL1TGCTrigger::TGCArguments * m_tgcArgs
const std::string & getVersion() const
const LVL1TGCTrigger::TGCArguments * tgcArgs() const
BigWheelCoincidenceLUT(const BigWheelCoincidenceLUT &right)=default
BigWheelCoincidenceLUT & operator=(const BigWheelCoincidenceLUT &right)=delete
static constexpr uint32_t N_COIN_TYPE
int getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const
int8_t test(int sideId, int octantId, int moduleId, int subsector, int type, int dr, int dphi) const
BigWheelCoincidenceLUT(LVL1TGCTrigger::TGCArguments *, const SG::ReadCondHandleKey< TGCTriggerLUTs > &readKey, const std::string &version)
int getMapType(int hlwire, int hlstrip) const
std::unordered_map< uint32_t, char > m_lut
const SG::ReadCondHandleKey< TGCTriggerLUTs > & m_readCondKey
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 DR_HIGH_RANGE
Range of DR in the BW coincidence window for 3-station.
static constexpr uint8_t DPHI_LOW_RANGE
Range of DPhi in the BW coincidence window for 2-station.