ATLAS Offline Software
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 //**********************************************************************
14 sTgcDigit::sTgcDigit(const Identifier& id, uint16_t bctag, float time)
15  : MuonDigit (id),
16  m_bcTag (bctag),
17  m_time(time) { }
18 //**********************************************************************
19 sTgcDigit::sTgcDigit(const Identifier& id, uint16_t bctag, float time, float charge, bool isDead, bool isPileup)
20  : MuonDigit (id),
21  m_bcTag(bctag),
22  m_charge(charge),
23  m_time(time),
24  m_isDead(isDead),
25  m_isPileup(isPileup) { }
26 // //**********************************************************************
27 // Validity check.
28 
29 bool sTgcDigit::is_valid( const sTgcIdHelper *sTgcHelper ) const {
30  return ( (sTgcHelper->valid(m_muonId)) );
31 }
32 // //**********************************************************************
33 // get BC tag
35  return m_bcTag;
36 }
37 // get isDead
38 bool sTgcDigit::isDead() const {
39  return m_isDead;
40 }
41 // get isPileup
42 bool sTgcDigit::isPileup() const {
43  return m_isPileup;
44 }
45 // get the charge
46 float sTgcDigit::charge() const {
47  return m_charge;
48 }
49 
50 int sTgcDigit::charge_6bit() const {
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
61 float sTgcDigit::time() const {
62  return m_time;
63 }
64 
65 // Set bcTag
66 void sTgcDigit::set_bcTag(uint16_t newbcTag) {
67  m_bcTag = newbcTag;
68 }
69 
70 // Set the charge
71 void sTgcDigit::set_charge(float newCharge) {
72  m_charge = newCharge;
73 }
74 
75 // Set the time
76 void sTgcDigit::set_time(float newTime) {
77  m_time = newTime;
78 }
79 
80 // Set isDead
81 void sTgcDigit::set_isDead(bool newIsDead) {
82  m_isDead = newIsDead;
83 }
84 // Set isPileup
85 void sTgcDigit::set_isPileup(bool newIsPileup) {
86  m_isPileup = newIsPileup;
87 }
88 
89 
90 
91 
92 
sTgcDigit::m_charge
float m_charge
Definition: sTgcDigit.h:75
MonDataType::ADC
@ ADC
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
sTgcDigit::charge_10bit
int charge_10bit() const
Definition: sTgcDigit.cxx:55
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
sTgcDigit::charge
float charge() const
Definition: sTgcDigit.cxx:46
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
sTgcDigit::time
float time() const
Definition: sTgcDigit.cxx:61
sTgcDigit::set_time
void set_time(float newTime)
Definition: sTgcDigit.cxx:76
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
sTgcIdHelper::valid
bool valid(const Identifier &id) const
Definition: sTgcIdHelper.cxx:690
charge
double charge(const T &p)
Definition: AtlasPID.h:494
sTgcIdHelper
Definition: sTgcIdHelper.h:55
InDet::TrkOrigin::isPileup
bool isPileup(int origin)
from pileup
Definition: InDetTrackTruthOriginDefs.h:49
sTgcDigit::m_bcTag
uint16_t m_bcTag
Definition: sTgcDigit.h:74
sTgcDigit::set_isDead
void set_isDead(bool newIsDead)
Definition: sTgcDigit.cxx:81
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
sTgcDigit.h
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
MuonDigit::m_muonId
Identifier m_muonId
Definition: MuonDigit.h:21
sTgcDigit::isPileup
bool isPileup() const
Definition: sTgcDigit.cxx:42