ATLAS Offline Software
Loading...
Searching...
No Matches
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
23public:
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 //
32 ITkPixel1RawData(ITkPixel1RawData&&) noexcept = default;
33 ITkPixel1RawData& operator=(const ITkPixel1RawData&) = default;
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)
62inline int ITkPixel1RawData::getToT() const
63{
64 return (m_word & 0xFF);
65}
66
67// decode BCID information
68inline int ITkPixel1RawData::getBCID() const
69{
70 return ( (m_word>>8) & 0xFF);
71}
72
73// decode LVL1 accept information
75{
76 return ( (m_word>>24) & 0xF);
77}
78
79// decode Atlas wide LVL1 information
81{
82 return ( (m_word>>16) & 0xFF);
83}
84
85#endif
ITkPixel1RawData(ITkPixel1RawData &&) noexcept=default
virtual int getLVL1A() const override
virtual int getLVL1ID() const override
virtual int getBCID() const override
virtual int getToT() const override
ITkPixel1RawData(const ITkPixel1RawData &)=default
ITkPixel1RawData(const Identifier rdoId, const unsigned int word)
ITkPixelRDORawData(const Identifier rdoId, const unsigned int word)
unsigned int m_word