ATLAS Offline Software
sTgcDigit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // sTgcDigit.h
6 
7 #ifndef sTgcDigitUH
8 #define sTgcDigitUH
9 
10 // Nektarios Chr. Benekos
11 // March 2013
12 //
13 // sTGC digitization.
14 
15 #include <iosfwd>
16 #include <inttypes.h>
19 
20 class sTgcDigit : public MuonDigit {
21 
22  public: // functions
23 
24  // Default constructor.
25  sTgcDigit() = default;
26 
27  // Full constructor --- From Identifier.
28  sTgcDigit(const Identifier& id, float time);
29 
30  // Full constructor --- From Identifier and bctag
31  sTgcDigit(const Identifier& id, uint16_t bctag, float time);
32 
33  // Full constructor --- From Identifier, bctag and charge, status flags
34  sTgcDigit(const Identifier& id, uint16_t bctag, float time, float charge, bool isDead, bool isPileup);
35 
36  // Is this a valid digit?
37  bool is_valid( const sTgcIdHelper *sTgcHelper) const;
38 
39  // get BC Tag
40  uint16_t bcTag() const;
41 
42  // get the charge
43  float charge() const;
44  int charge_6bit() const;
45  int charge_10bit() const;
46 
47  // get the time
48  float time() const;
49 
50  // get isDead
51  bool isDead() const;
52 
53  // get isPileup
54  bool isPileup() const;
55 
56  // Set bcTag
57  void set_bcTag(uint16_t newbcTag);
58 
59  // Set the charge
60  void set_charge(float newCharge);
61 
62  // Set the time
63  void set_time(float newTime);
64 
65  // Set the isDead
66  void set_isDead(bool newIsDead);
67 
68  // Set the isPileup
69  void set_isPileup(bool newIsPileup);
70 
71 
72  private: // data
73 
75  float m_charge{-1.f};
76  float m_time{0.f};
77  bool m_isDead{false};
78  bool m_isPileup{false};
79 };
80 
81 #endif
sTgcDigit::m_charge
float m_charge
Definition: sTgcDigit.h:75
sTgcIdHelper.h
sTgcDigit::set_charge
void set_charge(float newCharge)
Definition: sTgcDigit.cxx:71
sTgcDigit::sTgcDigit
sTgcDigit()=default
sTgcDigit::set_bcTag
void set_bcTag(uint16_t newbcTag)
Definition: sTgcDigit.cxx:66
sTgcDigit::isDead
bool isDead() const
Definition: sTgcDigit.cxx:38
sTgcDigit::bcTag
uint16_t bcTag() const
Definition: sTgcDigit.cxx:34
MuonDigit
Definition: MuonDigit.h:16
sTgcDigit::m_isPileup
bool m_isPileup
Definition: sTgcDigit.h:78
sTgcDigit::is_valid
bool is_valid(const sTgcIdHelper *sTgcHelper) const
Definition: sTgcDigit.cxx:29
sTgcDigit::m_time
float m_time
Definition: sTgcDigit.h:76
MuonDigit.h
sTgcDigit
Definition: sTgcDigit.h:20
sTgcDigit::charge_10bit
int charge_10bit() const
Definition: sTgcDigit.cxx:55
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
sTgcDigit::charge
float charge() const
Definition: sTgcDigit.cxx:46
sTgcDigit::time
float time() const
Definition: sTgcDigit.cxx:61
sTgcDigit::set_time
void set_time(float newTime)
Definition: sTgcDigit.cxx:76
sTgcIdHelper
Definition: sTgcIdHelper.h:55
sTgcDigit::m_bcTag
uint16_t m_bcTag
Definition: sTgcDigit.h:74
sTgcDigit::set_isDead
void set_isDead(bool newIsDead)
Definition: sTgcDigit.cxx:81
sTgcDigit::charge_6bit
int charge_6bit() const
Definition: sTgcDigit.cxx:50
sTgcDigit::set_isPileup
void set_isPileup(bool newIsPileup)
Definition: sTgcDigit.cxx:85
sTgcDigit::m_isDead
bool m_isDead
Definition: sTgcDigit.h:77
sTgcDigit::isPileup
bool isPileup() const
Definition: sTgcDigit.cxx:42
Identifier
Definition: IdentifierFieldParser.cxx:14