ATLAS Offline Software
Loading...
Searching...
No Matches
STGC_RawData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONRDO_STGCRAWDATA_H
6#define MUONRDO_STGCRAWDATA_H
7
8
9#include "Identifier/Identifier.h"
10#include <iosfwd>
11#include <cstdint>
12class MsgStream;
13
14namespace Muon {
15class STGC_RawData final{
16 friend class STGC_RawDataCnv_p1;
17 friend class STGC_RawDataCnv_p2;
18 friend class STGC_RawDataCnv_p3;
19
20 private:
21
22 // offline identifier
24
25 // readout data
26 // keeping time in two variables: a float and an int. The float variable is kept for backward compatibility
27 float m_time{0};
28 unsigned int m_tdo{0}; // time converted to TDC counts
29 unsigned int m_charge{0};
30 uint16_t m_bcTag{0};
31
32 bool m_isDead{false};
34
35
36 public:
37 STGC_RawData (const Identifier id);
38 STGC_RawData () = default;
39 STGC_RawData(const STGC_RawData&) = default;
43 ~STGC_RawData() = default;
44
45 STGC_RawData(const Identifier id, const uint16_t bcTag, const float time,
46 const unsigned int charge, const bool isDead,
47 const bool timeAndChargeInCounts);
48
49 STGC_RawData (const Identifier id, const uint16_t bcTag, const float time, const unsigned int tdo,
50 const unsigned int charge, const bool isDead, const bool timeAndChargeInCounts );
51
52
53 const Identifier identify() const { return m_id; }
54
55 // access functions
56 float time() const {return m_time;}
57 unsigned int tdo() const {return m_tdo;}
58 unsigned int charge() const {return m_charge;}
59 uint16_t bcTag() const {return m_bcTag;}
60
61 bool isDead() const {return m_isDead;}
63
64 // Lower time bound of digits selected at the end of digitization.
65 // As of June 2022, the main event is assigned to relative_BCID=3, which is set to correspond
66 // to the time interval [-12.5ns, +12.5ns]. The digits within the BC window [-3, +4] are kept.
67 // Therefore the lower time bound is -87.5 ns.
68 static constexpr double s_lowerTimeBound{-87.5};
69
70 // BC window
71 static constexpr int s_BCWindow{8};
72
73 // A Simple constant to convert time to TDC counts in the absence of time calibration.
74 // This constant should be used only to preserve backward compatibility, since it doesn't have
75 // physical meaning and the value is arbitrary. The value is chosen to be greater than
76 // 25 ns plus the absolute value of the time corresponding to the first bunch crossing defined in
77 // sTGC_Digitization/python/sTGC_DigitizationConfig.py, which is -100ns as of 2022-05-01.
78 // Therefore, after time-tdo conversion, the resulting TDC count is positive.
79 static constexpr int s_timeTdoShift{200};
80};
81}
82
84MsgStream& operator << ( MsgStream& sl, const Muon::STGC_RawData& coll);
85
87std::ostream& operator << ( std::ostream& sl, const Muon::STGC_RawData& coll);
88
89#endif
90
MsgStream & operator<<(MsgStream &sl, const Muon::STGC_RawData &coll)
Overload of << operator for MsgStream for debug output.
STGC_RawData(const STGC_RawData &)=default
bool timeAndChargeInCounts() const
static constexpr int s_BCWindow
static constexpr double s_lowerTimeBound
unsigned int charge() const
STGC_RawData(STGC_RawData &&)=default
unsigned int m_charge
uint16_t bcTag() const
const Identifier identify() const
unsigned int tdo() const
friend class STGC_RawDataCnv_p1
STGC_RawData(const Identifier id)
STGC_RawData & operator=(STGC_RawData &&)=default
STGC_RawData()=default
friend class STGC_RawDataCnv_p3
~STGC_RawData()=default
static constexpr int s_timeTdoShift
friend class STGC_RawDataCnv_p2
float time() const
STGC_RawData & operator=(const STGC_RawData &)=default
bool isDead() const
unsigned int m_tdo
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.