ATLAS Offline Software
TgcSlbDataHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONTGC_CNVTOOLS_TGCSLBDATAHELPER_H
6 #define MUONTGC_CNVTOOLS_TGCSLBDATAHELPER_H
7 
9 #include <vector>
10 #include <inttypes.h>
11 
12 class MsgStream;
13 class TgcRawData;
14 
15 namespace Muon
16 {
17  class TgcSlbData;
18 
32  : public AthMessaging
33  {
34  public:
36  enum {
37  SLB_WD =0,
42  SLB_NONE
43  };
44 
46  TgcSlbDataHelper(void);
48  virtual ~TgcSlbDataHelper(void);
49 
52 
55  void convertToHits(uint16_t subDetectorId,
56  uint16_t rodId,
57  const TgcSlbData * slb,
58  std::vector<TgcRawData *> &vChannel) const;
59 
62  void convertToCoincidences(uint16_t subDetectorId,
63  uint16_t rodId,
64  const TgcSlbData * slb,
65  std::vector<TgcRawData *> &vChannel) const;
66 
68  static bool setType( uint16_t subDetectorId,
69  uint16_t rodId,
70  TgcSlbData * slb,
71  int moduleType) ;
72 
74  static bool isAdjacent(int ibit) ;
75 
77  static uint16_t getSector(bool forward,
78  uint16_t subDetectorId,
79  uint16_t rodId,
80  const TgcSlbData * slb ) ;
81 
82  protected:
84  enum {
85  N_LPT_D = 2,
86  N_LPT_TW = 3,
87  N_LPT_TS = 8,
88  N_LPT_I = 8,
89  N_HPT_F = 6,
90  N_HPT_E = 13, // additional 2 for duplicate strip hits
91  N_SL = 2
92  };
93 
96  void getLPTforDoublet(const bool * bitArray,
97  bool hit[],
98  int delta[],
99  int pos[]) const;
100 
103  void getLPTforTripletWire(const bool * bitArray,
104  bool hit[],
105  int pos[]) const;
106 
109  void getLPTforTripletStrip(const bool * bitArray,
110  bool hit[],
111  int pos[]) const;
112 
115  void getLPTforInner(const bool * bitArray,
116  bool hit[]) const;
117 
120  void getSL_F(const bool * bitArray,
121  bool& cand3plus,
122  bool hit[],
123  bool muplus[],
124  uint16_t pt[],
125  bool overlap[],
126  uint16_t roi[]) const;
127 
130  void getSL_E(const bool * bitArray,
131  bool& cand3plus,
132  bool hit[],
133  bool muplus[],
134  uint16_t pt[],
135  bool overlap[],
136  uint16_t roi[]) const;
137 
140  void getHPT_F(const bool * bitArray,
141  bool hit[],
142  bool strip[],
143  uint16_t chip[],
144  uint16_t index[],
145  bool hipt[],
146  uint16_t hitId[],
147  uint16_t sub[],
148  int16_t delta[]) const;
149 
152  void getHPT_E(const bool * bitArray,
153  bool hit[],
154  bool strip[],
155  uint16_t chip[],
156  uint16_t index[],
157  bool hipt[],
158  uint16_t hitId[],
159  uint16_t sub[],
160  int16_t delta[]) const;
161 
164  static bool isValid_HPT(bool hit,
165  bool strip,
166  uint16_t chip,
167  uint16_t index,
168  bool hipt,
169  uint16_t hitId,
170  uint16_t pos,
171  int16_t delta) ;
172 
173  private:
175  static uint16_t getVal(const bool* bitArray, std::size_t start, std::size_t width) ;
176 
177  };
178 
179 } // end of namespace
180 
181 #endif // MUONTGC_CNVTOOLS_TGCSLBDATAHELPER_H
Muon::TgcSlbDataHelper::N_LPT_I
@ N_LPT_I
Definition: TgcSlbDataHelper.h:88
Muon::TgcSlbDataHelper::N_LPT_TW
@ N_LPT_TW
Definition: TgcSlbDataHelper.h:86
index
Definition: index.py:1
Muon::TgcSlbDataHelper::getSL_E
void getSL_E(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for endcap region from bit array.
Definition: TgcSlbDataHelper.cxx:737
Muon::TgcSlbDataHelper::isAdjacent
static bool isAdjacent(int ibit)
Adjacent or not.
Definition: TgcSlbDataHelper.cxx:534
Muon::TgcSlbDataHelper::N_LPT_D
@ N_LPT_D
Definition: TgcSlbDataHelper.h:85
Muon::TgcSlbDataHelper::operator=
TgcSlbDataHelper & operator=(const TgcSlbDataHelper &)=delete
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
Muon::TgcSlbDataHelper::getVal
static uint16_t getVal(const bool *bitArray, std::size_t start, std::size_t width)
Get a value in a range of a bitArray.
Definition: TgcSlbDataHelper.cxx:1221
Muon::TgcSlbDataHelper::convertToCoincidences
void convertToCoincidences(uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb, std::vector< TgcRawData * > &vChannel) const
Convert to coincidences.
Definition: TgcSlbDataHelper.cxx:98
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Muon::TgcSlbDataHelper::SLB_SD
@ SLB_SD
Definition: TgcSlbDataHelper.h:38
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::TgcSlbDataHelper::SLB_NONE
@ SLB_NONE
Definition: TgcSlbDataHelper.h:42
Muon::TgcSlbDataHelper::SLB_EIFI
@ SLB_EIFI
Definition: TgcSlbDataHelper.h:41
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
Muon::TgcSlbDataHelper
Definition: TgcSlbDataHelper.h:33
Muon::TgcSlbDataHelper::isValid_HPT
static bool isValid_HPT(bool hit, bool strip, uint16_t chip, uint16_t index, bool hipt, uint16_t hitId, uint16_t pos, int16_t delta)
Check if it is valid high-pT coincidence or not.
Definition: TgcSlbDataHelper.cxx:1194
Muon::TgcSlbDataHelper::getHPT_E
void getHPT_E(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for endcap region from bit array.
Definition: TgcSlbDataHelper.cxx:980
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
Muon::TgcSlbDataHelper::TgcSlbDataHelper
TgcSlbDataHelper(const TgcSlbDataHelper &)=delete
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
Muon::TgcSlbDataHelper::N_LPT_TS
@ N_LPT_TS
Definition: TgcSlbDataHelper.h:87
Muon::TgcSlbDataHelper::~TgcSlbDataHelper
virtual ~TgcSlbDataHelper(void)
Destructor.
Muon::TgcSlbData
Definition: TgcSlbData.h:22
Muon::TgcSlbDataHelper::N_SL
@ N_SL
Definition: TgcSlbDataHelper.h:91
Muon::TgcSlbDataHelper::SLB_ST
@ SLB_ST
Definition: TgcSlbDataHelper.h:40
Muon::TgcSlbDataHelper::getSector
static uint16_t getSector(bool forward, uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb)
Set sector for HpT/SL based on slbId.
Definition: TgcSlbDataHelper.cxx:547
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Muon::TgcSlbDataHelper::convertToHits
void convertToHits(uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb, std::vector< TgcRawData * > &vChannel) const
Convert to Hits.
Definition: TgcSlbDataHelper.cxx:30
Muon::TgcSlbDataHelper::getSL_F
void getSL_F(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for forward region from bit array.
Definition: TgcSlbDataHelper.cxx:669
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TgcRawData
An unit object of TGC ROD output.
Definition: TgcRawData.h:23
AthMessaging.h
Muon::TgcSlbDataHelper::getLPTforDoublet
void getLPTforDoublet(const bool *bitArray, bool hit[], int delta[], int pos[]) const
Decode low-pT coincidence (tracklet) information for doublet from bit array.
Definition: TgcSlbDataHelper.cxx:562
Muon::TgcSlbDataHelper::getLPTforTripletWire
void getLPTforTripletWire(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet wire from bit array.
Definition: TgcSlbDataHelper.cxx:593
Muon::TgcSlbDataHelper::getLPTforTripletStrip
void getLPTforTripletStrip(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet strip from bit array.
Definition: TgcSlbDataHelper.cxx:636
Muon::TgcSlbDataHelper::TgcSlbDataHelper
TgcSlbDataHelper(void)
Constructor.
Definition: TgcSlbDataHelper.cxx:21
Muon::TgcSlbDataHelper::N_HPT_E
@ N_HPT_E
Definition: TgcSlbDataHelper.h:90
Muon::TgcSlbDataHelper::setType
static bool setType(uint16_t subDetectorId, uint16_t rodId, TgcSlbData *slb, int moduleType)
Set SLB Type based on sswId and moduleType.
Definition: TgcSlbDataHelper.cxx:471
Muon::TgcSlbDataHelper::SLB_WT
@ SLB_WT
Definition: TgcSlbDataHelper.h:39
Muon::TgcSlbDataHelper::getHPT_F
void getHPT_F(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for forward region from bit array.
Definition: TgcSlbDataHelper.cxx:805
Muon::TgcSlbDataHelper::SLB_WD
@ SLB_WD
Definition: TgcSlbDataHelper.h:37
Muon::TgcSlbDataHelper::N_HPT_F
@ N_HPT_F
Definition: TgcSlbDataHelper.h:89
hipt
bool hipt
Definition: globals.cxx:29
Muon::TgcSlbDataHelper::getLPTforInner
void getLPTforInner(const bool *bitArray, bool hit[]) const
Decode low-pT coincidence (tracklet) information for inner from bit array.
Definition: TgcSlbDataHelper.cxx:654