Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ITkPixel1RawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6 * Author: Ondra Kovanda, ondrej.kovanda at cern.ch
7 * Date: 03/2025
8 * Description: Initial implementation of the ITk Pixel RDO,
9 * heavily adapted from the existing ID
10 */
11 
12 
13 
14 #ifndef ITKPIXEL1RAWDATA_H
15 #define ITKPIXEL1RAWDATA_H
16 
17 // Base class
18 #include "ITkPixelRDORawData.h"
19 
20 
22 
23 public:
24  // Constructor with parameters:
25  // offline hashId of the readout element,
26  // the word
27 
29  ITkPixel1RawData(const Identifier rdoId, const unsigned int word) : ITkPixelRDORawData(rdoId, word){};
30  //
34  ITkPixel1RawData& operator=(ITkPixel1RawData&&) noexcept = default;
35  virtual ~ITkPixel1RawData() = default;
36 
37  // Constructor with full parameter list: hashId, ToT, BCO ID,
38  // LVL1 accept, ATLAS wide LVL1
39  ITkPixel1RawData(const Identifier rdoId, const unsigned int ToT,
40  const unsigned int BCID, const unsigned int LVL1ID,
41  const unsigned int LVL1A = 0) : ITkPixelRDORawData(rdoId,
42  ((ToT&0xFF)<<0)
43  +((BCID&0xFF)<<8)
44  +((LVL1ID&0xFF)<<16)
45  +((LVL1A&0xF)<<24)){};
46 
48  // Virtual methods
50 
51  virtual int getToT() const override; // Time over Threshold value 0-255
52  virtual int getBCID() const override; // Beam Crossing ID
53  virtual int getLVL1A() const override; // Level 1 accept, 0-15, used if
54  // reading consecutive BCOs
55  virtual int getLVL1ID() const override; // ATLAS LVL1 0-255
56 };
57 
59 // Inline methods:
61 // decode TOT information (taken from Calvet RawData class)
62 inline int ITkPixel1RawData::getToT() const
63 {
64  return (m_word & 0xFF);
65 }
66 
67 // decode BCID information
68 inline int ITkPixel1RawData::getBCID() const
69 {
70  return ( (m_word>>8) & 0xFF);
71 }
72 
73 // decode LVL1 accept information
74 inline int ITkPixel1RawData::getLVL1A() const
75 {
76  return ( (m_word>>24) & 0xF);
77 }
78 
79 // decode Atlas wide LVL1 information
80 inline int ITkPixel1RawData::getLVL1ID() const
81 {
82  return ( (m_word>>16) & 0xFF);
83 }
84 
85 #endif
ITkPixelRDORawData
Definition: ITkPixelRDORawData.h:19
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ITkPixelRDORawData.h
ITkPixel1RawData::getLVL1A
virtual int getLVL1A() const override
Definition: ITkPixel1RawData.h:74
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
ITkPixel1RawData::getToT
virtual int getToT() const override
Definition: ITkPixel1RawData.h:62
ITkPixel1RawData::getLVL1ID
virtual int getLVL1ID() const override
Definition: ITkPixel1RawData.h:80
InDetRawData::m_word
unsigned int m_word
Definition: InDetRawData.h:72
columnar::final
CM final
Definition: ColumnAccessor.h:106
ITkPixel1RawData::ITkPixel1RawData
ITkPixel1RawData(const Identifier rdoId, const unsigned int word)
Definition: ITkPixel1RawData.h:29
ITkPixel1RawData
Definition: ITkPixel1RawData.h:21
ITkPixel1RawData::ITkPixel1RawData
ITkPixel1RawData()
python.CaloAddPedShiftConfig.default
default
Definition: CaloAddPedShiftConfig.py:43
ITkPixel1RawData::ITkPixel1RawData
ITkPixel1RawData(const ITkPixel1RawData &)=default
ITkPixel1RawData::ITkPixel1RawData
ITkPixel1RawData(ITkPixel1RawData &&) noexcept=default
ITkPixel1RawData::getBCID
virtual int getBCID() const override
Definition: ITkPixel1RawData.h:68
PixelByteStreamErrors::LVL1ID
@ LVL1ID
Definition: PixelByteStreamErrors.h:13
Identifier
Definition: IdentifierFieldParser.cxx:14