ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcDigit.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8//**********************************************************************
9// Full constructor from Identifier.
11 : MuonDigit(id),
12 m_time(time) { }
13//**********************************************************************
14sTgcDigit::sTgcDigit(const Identifier& id, uint16_t bctag, float time)
15 : MuonDigit (id),
16 m_bcTag (bctag),
17 m_time(time) { }
18//**********************************************************************
19sTgcDigit::sTgcDigit(const Identifier& id, uint16_t bctag, float time, float charge, bool isDead, bool isPileup)
20 : MuonDigit (id),
21 m_bcTag(bctag),
23 m_time(time),
26// //**********************************************************************
27// Validity check.
28
29bool sTgcDigit::is_valid( const sTgcIdHelper *sTgcHelper ) const {
30 return ( (sTgcHelper->valid(m_muonId)) );
31}
32// //**********************************************************************
33// get BC tag
34uint16_t sTgcDigit::bcTag() const {
35 return m_bcTag;
36}
37// get isDead
38bool sTgcDigit::isDead() const {
39 return m_isDead;
40}
41// get isPileup
42bool sTgcDigit::isPileup() const {
43 return m_isPileup;
44}
45// get the charge
46float sTgcDigit::charge() const {
47 return m_charge;
48}
49
51 constexpr float ADC = 0.02734; // = saturation / (2^6);
52 return ((int)(m_charge/ADC));
53}
54
56 constexpr float ADC = 0.00171; // = saturation / (2^10);
57 return ((int)(m_charge/ADC));
58}
59
60// get the charge
61float sTgcDigit::time() const {
62 return m_time;
63}
64
65// Set bcTag
66void sTgcDigit::set_bcTag(uint16_t newbcTag) {
67 m_bcTag = newbcTag;
68}
69
70// Set the charge
71void sTgcDigit::set_charge(float newCharge) {
72 m_charge = newCharge;
73}
74
75// Set the time
76void sTgcDigit::set_time(float newTime) {
77 m_time = newTime;
78}
79
80// Set isDead
81void sTgcDigit::set_isDead(bool newIsDead) {
82 m_isDead = newIsDead;
83}
84// Set isPileup
85void sTgcDigit::set_isPileup(bool newIsPileup) {
86 m_isPileup = newIsPileup;
87}
88
89
90
91
92
Identifier m_muonId
Definition MuonDigit.h:21
MuonDigit()=default
sTgcDigit()=default
void set_bcTag(uint16_t newbcTag)
Definition sTgcDigit.cxx:66
void set_isDead(bool newIsDead)
Definition sTgcDigit.cxx:81
void set_time(float newTime)
Definition sTgcDigit.cxx:76
float time() const
Definition sTgcDigit.cxx:61
float m_time
Definition sTgcDigit.h:76
int charge_6bit() const
Definition sTgcDigit.cxx:50
void set_isPileup(bool newIsPileup)
Definition sTgcDigit.cxx:85
uint16_t bcTag() const
Definition sTgcDigit.cxx:34
float charge() const
Definition sTgcDigit.cxx:46
bool isDead() const
Definition sTgcDigit.cxx:38
bool is_valid(const sTgcIdHelper *sTgcHelper) const
Definition sTgcDigit.cxx:29
bool m_isDead
Definition sTgcDigit.h:77
bool isPileup() const
Definition sTgcDigit.cxx:42
uint16_t m_bcTag
Definition sTgcDigit.h:74
void set_charge(float newCharge)
Definition sTgcDigit.cxx:71
int charge_10bit() const
Definition sTgcDigit.cxx:55
bool m_isPileup
Definition sTgcDigit.h:78
float m_charge
Definition sTgcDigit.h:75
bool valid(const Identifier &id) const