ATLAS Offline Software
SCT3_RawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SCT3_RawData.h
7 // Header file for class SCT3_RawData
9 // (c) ATLAS Detector software
11 // Class to implement RawData for SCT
13 // Version 1.0 07/06/2005 MJ Costa
15 
16 #ifndef SITRACKEREVENT_SCT3_RAWDATA_H
17 #define SITRACKEREVENT_SCT3_RAWDATA_H
18 
19 // Base class
21 #include <vector>
22 
23 
24 class SCT3_RawData final: public SCT_RDORawData{
25 
27  // Public methods:
29 public:
30 
31  // Constructor with parameters:
32  SCT3_RawData(const Identifier rdoId, const unsigned int word,
33  const std::vector<int>* errorHit);
34 
35  SCT3_RawData(const Identifier rdoId, const unsigned int word,
36  std::vector<int>&& errorHit);
37 
38  // Destructor:
39  virtual ~SCT3_RawData() = default;
40 
42  // Virtual methods
44 
45  // decode group of strips
46  virtual int getGroupSize() const override final;
47 
48  // decode time bin information for the 3 consecutive bunch crossings
49  // This information is stored in 3 bits where the most significant bit
50  // corresponds to BC-1. So the 3 bit pattern is: (BC-1), BC, (BC+1)
51  int getTimeBin() const;
52 
53 
54  int getErrors() const;
55 
56  bool OnTime() const;
57 
58  bool FirstHitError() const;
59  bool SecondHitError() const;
60 
62 
63  // public default constructor needed for I/O, but should not be
64  // called from an alg
65  SCT3_RawData();
66 
67  // Default copy constructor
69  // Default assignment operator
71  // Default move constructor
73  // Default move assignment operator
75 
76 private:
77 
79 
80 };
81 
83 // Inline methods:
85 // decode size of group of strips information
86 inline int SCT3_RawData::getGroupSize() const
87 {
88  return (m_word & 0x7FF);
89 }
90 
91 //decode time bin information
92 inline int SCT3_RawData::getTimeBin() const
93 {
94  return ((m_word >> 22) & 0x7);
95 }
96 
97 //returns a word incoding the errors
98 // bit 4: error in condensed mode 1rst hit
99 // bit 5: error in condensed mode 2nd hit
100 inline int SCT3_RawData::getErrors() const
101 {
102  return ((m_word >> 25) & 0x7);
103 }
104 
105 // returns true if the time bin corresponding to the present BC is on
106 inline bool SCT3_RawData::OnTime() const
107 {
108  bool isOnTime = false;
109  if ((m_word >> 23) & 0x1) isOnTime = true;
110  return isOnTime;
111 }
112 
113 // returns true if there is an error in the first hit's data
114 inline bool SCT3_RawData::FirstHitError() const
115 {
116  bool isError = false;
117  if ((m_word >> 29) & 0x1) isError = true;
118  return isError;
119 }
120 
121 // returns true if there is an error in the second hit's data
122 inline bool SCT3_RawData::SecondHitError() const
123 {
124  bool isError = false;
125  if ((m_word >> 30) & 0x1) isError = true;
126  return isError;
127 }
128 
129 // returns a vector where each element is a number of the strip in
130 // that group (starting at zero) with an error in:
131 
132 inline const std::vector<int>& SCT3_RawData::getErrorCondensedHit() const
133 {
134  return m_errorCondensedHit;
135 }
136 
137 #endif // SITRACKEREVENT_SCT3_RAWDATA_H
SCT3_RawData::getGroupSize
virtual int getGroupSize() const override final
Definition: SCT3_RawData.h:86
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
SCT3_RawData::SecondHitError
bool SecondHitError() const
Definition: SCT3_RawData.h:122
SCT3_RawData::OnTime
bool OnTime() const
Definition: SCT3_RawData.h:106
SCT_RDORawData
Definition: SCT_RDORawData.h:24
SCT3_RawData::getErrorCondensedHit
const std::vector< int > & getErrorCondensedHit() const
Definition: SCT3_RawData.h:132
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
SCT3_RawData::getErrors
int getErrors() const
Definition: SCT3_RawData.h:100
SCT3_RawData::SCT3_RawData
SCT3_RawData()
Definition: SCT3_RawData.cxx:19
SCT3_RawData
Definition: SCT3_RawData.h:24
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
vector
Definition: MultiHisto.h:13
InDetRawData::m_word
unsigned int m_word
Definition: InDetRawData.h:72
SCT3_RawData::FirstHitError
bool FirstHitError() const
Definition: SCT3_RawData.h:114
SCT3_RawData::getTimeBin
int getTimeBin() const
Definition: SCT3_RawData.h:92
SCT_RDORawData.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
SCT3_RawData::m_errorCondensedHit
std::vector< int > m_errorCondensedHit
Definition: SCT3_RawData.h:78
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
SCT3_RawData::~SCT3_RawData
virtual ~SCT3_RawData()=default