ATLAS Offline Software
Loading...
Searching...
No Matches
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
24class SCT3_RawData final: public SCT_RDORawData{
25
27 // Public methods:
29public:
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
66
67 // Default copy constructor
69 // Default assignment operator
70 SCT3_RawData& operator=(const SCT3_RawData&) = default;
71 // Default move constructor
73 // Default move assignment operator
74 SCT3_RawData& operator=(SCT3_RawData&&) = default;
75
77
79
80};
81
83// Inline methods:
85// decode size of group of strips information
86inline int SCT3_RawData::getGroupSize() const
87{
88 return (m_word & 0x7FF);
89}
90
91//decode time bin information
92inline 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
100inline 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
106inline 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
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
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
132inline const std::vector<int>& SCT3_RawData::getErrorCondensedHit() const
133{
134 return m_errorCondensedHit;
135}
136
137#endif // SITRACKEREVENT_SCT3_RAWDATA_H
unsigned int m_word
int getTimeBin() const
virtual int getGroupSize() const override final
SCT3_RawData(const Identifier rdoId, const unsigned int word, const std::vector< int > *errorHit)
bool SecondHitError() const
bool FirstHitError() const
int getErrors() const
virtual ~SCT3_RawData()=default
bool OnTime() const
const std::vector< int > & getErrorCondensedHit() const
std::vector< int > m_errorCondensedHit
SCT_RDORawData(const Identifier rdoId, const unsigned int word)
STL namespace.
#define private