ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDigitContainer
src
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
5
#include "
MuonDigitContainer/sTgcDigit.h
"
6
7
8
//**********************************************************************
9
// Full constructor from Identifier.
10
sTgcDigit::sTgcDigit
(
const
Identifier
&
id
,
float
time
)
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
34
uint16_t
sTgcDigit::bcTag
()
const
{
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
55
int
sTgcDigit::charge_10bit
()
const
{
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
MonDataType::ADC
@ ADC
Definition
LArLATOMEDecoder.h:50
MuonDigit::m_muonId
Identifier m_muonId
Definition
MuonDigit.h:21
MuonDigit::MuonDigit
MuonDigit()=default
sTgcDigit::sTgcDigit
sTgcDigit()=default
sTgcDigit::set_bcTag
void set_bcTag(uint16_t newbcTag)
Definition
sTgcDigit.cxx:66
sTgcDigit::set_isDead
void set_isDead(bool newIsDead)
Definition
sTgcDigit.cxx:81
sTgcDigit::set_time
void set_time(float newTime)
Definition
sTgcDigit.cxx:76
sTgcDigit::time
float time() const
Definition
sTgcDigit.cxx:61
sTgcDigit::m_time
float m_time
Definition
sTgcDigit.h:76
sTgcDigit::charge_6bit
int charge_6bit() const
Definition
sTgcDigit.cxx:50
sTgcDigit::set_isPileup
void set_isPileup(bool newIsPileup)
Definition
sTgcDigit.cxx:85
sTgcDigit::bcTag
uint16_t bcTag() const
Definition
sTgcDigit.cxx:34
sTgcDigit::charge
float charge() const
Definition
sTgcDigit.cxx:46
sTgcDigit::isDead
bool isDead() const
Definition
sTgcDigit.cxx:38
sTgcDigit::is_valid
bool is_valid(const sTgcIdHelper *sTgcHelper) const
Definition
sTgcDigit.cxx:29
sTgcDigit::m_isDead
bool m_isDead
Definition
sTgcDigit.h:77
sTgcDigit::isPileup
bool isPileup() const
Definition
sTgcDigit.cxx:42
sTgcDigit::m_bcTag
uint16_t m_bcTag
Definition
sTgcDigit.h:74
sTgcDigit::set_charge
void set_charge(float newCharge)
Definition
sTgcDigit.cxx:71
sTgcDigit::charge_10bit
int charge_10bit() const
Definition
sTgcDigit.cxx:55
sTgcDigit::m_isPileup
bool m_isPileup
Definition
sTgcDigit.h:78
sTgcDigit::m_charge
float m_charge
Definition
sTgcDigit.h:75
sTgcIdHelper
Definition
sTgcIdHelper.h:55
sTgcIdHelper::valid
bool valid(const Identifier &id) const
Definition
sTgcIdHelper.cxx:698
Identifier
Definition
IdentifierFieldParser.cxx:14
sTgcDigit.h
Generated on
for ATLAS Offline Software by
1.17.0